Browse Source

Merge remote-tracking branch 'origin/mes_malata_prod' into mes_malata_prod

wuyx 5 years ago
parent
commit
0783cf536b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/com/uas/mes/common/service/impl/CommonSeriveImpl.java

+ 6 - 0
src/com/uas/mes/common/service/impl/CommonSeriveImpl.java

@@ -39,6 +39,12 @@ public class CommonSeriveImpl implements CommonService {
 		Map<Object, Object> store = FlexJsonUtil.fromJson(formStore);
 		// 执行保存前的其它逻辑
 		handlerService.beforeSave(caller, new Object[] { store });
+		if(caller.equals("SNProblemColl")){
+		 	Object sn=	store.get("spc_sncode");
+		 	if(!baseDao.checkIf("Makeserial","ms_sncode='"+sn.toString()+"'")){
+		 		BaseUtil.showError("SN"+sn.toString()+"不存在");
+			}
+		}
 		// 保存form
 		Object[] objs = baseDao.getFieldsDataByCondition("form", new String[] { "fo_table", "fo_keyfield", "fo_detailmainkeyfield" },
 				"fo_caller='" + caller + "'");// 先根据caller拿到对应table和主键