|
|
@@ -1,9 +1,6 @@
|
|
|
package com.uas.mes.common.service.impl;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Set;
|
|
|
+import java.util.*;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -110,8 +107,32 @@ public class CommonSeriveImpl implements CommonService {
|
|
|
Object status = baseDao.getFieldDataByCondition(tab, sF, keyF + "=" + store.get(keyF));
|
|
|
StateAssert.updateOnlyEntering(status);
|
|
|
}
|
|
|
- String formSql = SqlUtil.getUpdateSqlByFormStore(store, tab, keyF);
|
|
|
- baseDao.execute(formSql);
|
|
|
+
|
|
|
+ if(caller.equals("LINEPH") && tab.equals("LINEPH")){
|
|
|
+ String lpLinecode = Objects.toString(store.get("lp_linecode"),"");
|
|
|
+ String[] lineArr = lpLinecode.split(",");
|
|
|
+ store.put("lp_linecode",lineArr[0]);
|
|
|
+
|
|
|
+ String formSql = SqlUtil.getUpdateSqlByFormStore(store, tab, keyF);
|
|
|
+ baseDao.execute(formSql);
|
|
|
+
|
|
|
+ if (lpLinecode.contains(",")){
|
|
|
+ String currLpId = Objects.toString(store.get("lp_id"),"");
|
|
|
+ String lpProdcode = Objects.toString(store.get("lp_prodcode"),"");
|
|
|
+ String lpUph = Objects.toString(store.get("lp_uph"),"");
|
|
|
+
|
|
|
+ for (String str : lineArr){
|
|
|
+ Object updateLpId = baseDao.getFieldDataByCondition("lineph", "lp_id","lp_prodcode = '"+lpProdcode+"' AND lp_linecode = '"+str+"'");
|
|
|
+
|
|
|
+ if(!updateLpId.equals(currLpId)){
|
|
|
+ baseDao.updateByCondition("lineph","lp_uph = '"+ lpUph +"'", "lp_id = '"+updateLpId+"'");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ String formSql = SqlUtil.getUpdateSqlByFormStore(store, tab, keyF);
|
|
|
+ baseDao.execute(formSql);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
// 修改Grid
|