This commit is contained in:
2022-07-21 10:18:48 +08:00
parent 144960a348
commit d284a29a9d
3 changed files with 50 additions and 3 deletions

View File

@@ -406,6 +406,51 @@ public class WmsToErpServiceImpl implements WmsToErpService {
String CGENERALHID = jo.getString("CGENERALHID");
JSONObject purchase = purchaseIn_wql.query("CGENERALHID = '"+CGENERALHID+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(purchase)){
purchase = new JSONObject();
purchase.put("CGENERALHID",jo.getString("CGENERALHID"));
purchase.put("CGENERALBID",jo.getString("CGENERALBID"));
purchase.put("CROWNO",jo.getString("CROWNO"));
purchase.put("ITEM_ID",jo.getString("ITEM_ID"));
purchase.put("ITEM_NO",jo.getString("ITEM_NO"));
purchase.put("ITEM_NAME",jo.getString("ITEM_NAME"));
purchase.put("MATERIALSPEC",jo.getString("MATERIALSPEC"));
purchase.put("MATERIALTYPE",jo.getString("MATERIALTYPE"));
purchase.put("VBILLCODE",jo.getString("VBILLCODE"));
purchase.put("DBILLDATE",jo.getString("DBILLDATE"));
purchase.put("DR",jo.getString("DR"));
purchase.put("CREATOR",jo.getString("CREATOR"));
purchase.put("CREATIONTIME",jo.getString("CREATIONTIME"));
purchase.put("T_NOTE",jo.getString("T_NOTE"));
purchase.put("FBILLFLAG",jo.getString("FBILLFLAG"));
purchase.put("QTY",jo.getString("QTY"));
purchase.put("F_QTY",jo.getString("F_QTY"));
purchase.put("UNIT",jo.getString("UNIT"));
purchase.put("F_UNIT",jo.getString("F_UNIT"));
purchase.put("D_NOTE",jo.getString("D_NOTE"));
purchase.put("VBATCHCODE",jo.getString("VBATCHCODE"));
purchase.put("PK_BATCHCODE",jo.getString("PK_BATCHCODE"));
purchase.put("CG_EMPL",jo.getString("CG_EMPL"));
purchase.put("VEND_NAME",jo.getString("VEND_NAME"));
purchase.put("input_optid","1452555001116364823");
purchase.put("input_optname","mes系统");
purchase.put("input_time",DateUtil.now());
if (jo.getString("FBILLFLAG").equals("2")){
purchase.put("proc_status","01");
}else if (jo.getString("FBILLFLAG").equals("3")){
purchase.put("proc_status","02");
}else {
throw new BadRequestException("备件采购订单状态不符!");
}
/* update_optid
update_optname
update_time*/
}
}

View File

@@ -169,6 +169,10 @@ public class SparePartServiceImpl implements SparePartService {
String now = DateUtil.now();
//插入主表
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
Long deptId = currentUser.getDeptId();
JSONObject io_mst = new JSONObject();
String bill_code = CodeUtil.getNewCode("IO_CODE");
io_mst.put("iostorinv_id", iostorinv_id);
@@ -202,8 +206,6 @@ public class SparePartServiceImpl implements SparePartService {
io_mst.put("device_name", device_name);
io_mst.put("is_delete", "0");
io_mst.put("is_upload", "0");
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
Long deptId = currentUser.getDeptId();
io_mst.put("sysdeptid", deptId + "");
io_mst.put("syscompanyid", deptId + "");
io_mst.put("bizdeptid", deptId + "");

View File

@@ -236,7 +236,7 @@ export default {
disShow: false,
divShow: false,
billType: null,
openParam: {},
openParam: [],
bussConfig: null,
currentRow: null,
viewShow: false,