SerialNo 동기화 (영업, 생산, 판매)
This commit is contained in:
@@ -18,6 +18,7 @@ import com.pms.common.SqlMapConfig;
|
||||
import com.pms.common.bean.PersonBean;
|
||||
import com.pms.common.utils.CommonUtils;
|
||||
import com.pms.common.utils.Constants;
|
||||
import com.pms.common.utils.SerialNoSyncUtil;
|
||||
|
||||
@Service
|
||||
public class ProductionPlanningService {
|
||||
@@ -1897,20 +1898,28 @@ public class ProductionPlanningService {
|
||||
SqlSession sqlSession = null;
|
||||
|
||||
try {
|
||||
sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
sqlSession = SqlMapConfig.getInstance().getSqlSession(false);
|
||||
|
||||
String objid = CommonUtils.nullToEmpty((String)paramMap.get("OBJID"));
|
||||
String actionType = CommonUtils.nullToEmpty((String)paramMap.get("actionType"));
|
||||
|
||||
if("regist".equals(actionType) || "".equals(objid)) {
|
||||
// 신규 등록
|
||||
paramMap.put("OBJID", CommonUtils.createObjId());
|
||||
sqlSession.insert("productionplanning.insertProdPlan", paramMap);
|
||||
} else {
|
||||
// 수정
|
||||
sqlSession.update("productionplanning.updateProdPlan", paramMap);
|
||||
}
|
||||
|
||||
// S/N → CONTRACT_ITEM_SERIAL 동기화 (프로젝트 연결 시)
|
||||
String projectNo = CommonUtils.nullToEmpty((String)paramMap.get("PROJECT_NO"));
|
||||
String serialNo = CommonUtils.nullToEmpty((String)paramMap.get("SERIAL_NO"));
|
||||
String writer = CommonUtils.nullToEmpty((String)paramMap.get("userId"));
|
||||
|
||||
if(!projectNo.isEmpty()) {
|
||||
SerialNoSyncUtil.syncSerialToContractItemSerial(
|
||||
sqlSession, projectNo, serialNo, writer);
|
||||
}
|
||||
|
||||
sqlSession.commit();
|
||||
result = true;
|
||||
} catch(Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user