|
@@ -166,9 +166,22 @@ public class AutoDockItemService extends ServiceController {
|
|
|
sqlFactory.addParameter("specalnote", "");
|
|
|
sqlFactory.addParameter("prodline", "");
|
|
|
sqlFactory.addParameter("device", "");
|
|
|
+ sqlList.add(sqlFactory.getSQL());
|
|
|
+
|
|
|
+ // 添加领域
|
|
|
+ Rows tradefieldRows = dbConnect.runSqlQuery("select value,siteid from sys_optiontypemx where isused=1 and (ifnull(siteid,'')='' or siteid='"+siteid+"') and optiontypeid in(select optiontypeid from sys_optiontype where typename='tradefield')");
|
|
|
+ if (tradefieldRows.isNotEmpty() && tradefieldRows.size()==1) {
|
|
|
+ sqlFactory = new SQLFactory(new Item(jsonObject), "新增领域");
|
|
|
+ sqlFactory.addParameter("siteid", siteid);
|
|
|
+ sqlFactory.addParameter("plm_item_tradefieldid", createTableID("plm_item_tradefield"));
|
|
|
+ sqlFactory.addParameter("tradefield", tradefieldRows.get(0).getString("value"));
|
|
|
+ sqlFactory.addParameter("userid", 1);
|
|
|
+ sqlFactory.addParameter("itemid", itemid);
|
|
|
+ sqlList.add(sqlFactory.getSQL());
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- sqlList.add(sqlFactory.getSQL());
|
|
|
|
|
|
} else {
|
|
|
// sqlList.add("update plm_item set itemname='" + jsonObject.getString("fitemname") + "',volume='" + jsonObject.getStringValue("fvolume") + "',packageqty='" + (StringUtils.isBlank(jsonObject.getStringValue("fpackqty")) ? "0" : jsonObject.getStringValue("fpackqty")) + "' where itemid=" + itemRowsMapAll.get(jsonObject.getString("fitemno")).get(0).getLong("itemid"));
|