This commit is contained in:
zj
2026-01-04 13:45:42 +08:00
parent bb9f009b58
commit 4f550e2f4b
11 changed files with 221 additions and 807 deletions

View File

@@ -211,8 +211,27 @@ public class ToWmsApiController {
basProduct.setProductName(param.get("item_name").toString());
basProduct.setPrice(param.get("item_desc").toString());
basProduct.setSpec(param.get("item_spec").toString());
basProduct.setUnit(param.get("inv_unit_no").toString());
basProduct.setUnit(param.get("item_group_no").toString());
basProduct.setParentId(param.get("item_group_no").toString());
JSONArray param1 = JSONUtil.parseArray(param.get("packing_mode").toString());
if(param1.size() > 0){
basProduct.setSpare36(JSONUtil.parseObj(param1.get(0).toString()).get("length").toString());
basProduct.setSpare37(JSONUtil.parseObj(param1.get(0).toString()).get("width").toString());
basProduct.setSpare38(JSONUtil.parseObj(param1.get(0).toString()).get("heigth").toString());
if(basProduct.getSpare36() != null && basProduct.getSpare37() != null){
if("760".equals(basProduct.getSpare36()) && "960".equals(basProduct.getSpare37())){
basProduct.setSpare10("1");
} else if ("1000".equals(basProduct.getSpare36()) && "800".equals(basProduct.getSpare37())) {
basProduct.setSpare10("2");
} else if ("1130".equals(basProduct.getSpare36()) && "800".equals(basProduct.getSpare37())) {
basProduct.setSpare10("3");
} else if ("1130".equals(basProduct.getSpare36()) && "900".equals(basProduct.getSpare37())) {
basProduct.setSpare10("4");
} else{
basProduct.setSpare10("5");
}
}
}
AjaxResult ajaxResult = toWmsService.receiveProduct(basProduct);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(basProduct), "接收物料", ajaxResult);
requestLogService.insertRequestLog(requestLog);
@@ -249,6 +268,12 @@ public class ToWmsApiController {
basProduct.setPrice(param.get("item_desc").toString());
basProduct.setSpec(param.get("item_spec").toString());
basProduct.setUnit(param.get("inv_unit_no").toString());
JSONArray param1 = JSONUtil.parseArray(param.get("packing_mode").toString());
if(param1.size() > 0){
basProduct.setSpare36(JSONUtil.parseObj(param1.get(0).toString()).get("length").toString());
basProduct.setSpare37(JSONUtil.parseObj(param1.get(0).toString()).get("width").toString());
basProduct.setSpare38(JSONUtil.parseObj(param1.get(0).toString()).get("heigth").toString());
}
AjaxResult ajaxResult = toWmsService.InvalidProduct(basProduct);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(basProduct), "作废物料", ajaxResult);
requestLogService.insertRequestLog(requestLog);