From 5460a524068b9c7538f760783466c1206856cdf1 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Sun, 21 Jan 2024 10:38:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/op/plan/mapper/ProOrderWorkorderMapper.java | 2 +- .../op/plan/service/impl/ProOrderServiceImpl.java | 6 +++--- .../service/impl/ProOrderWorkorderServiceImpl.java | 12 +++++------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderMapper.java b/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderMapper.java index 34be5801..9bd51bca 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderMapper.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderMapper.java @@ -133,7 +133,7 @@ public interface ProOrderWorkorderMapper { List selectProOrderWorkerderByWorkerIds(String[] ids); - public void updateWorkOrderCodeSap(ProOrderWorkorder oworkSap); + public int updateWorkOrderCodeSap(ProOrderWorkorder oworkSap); /** * 通过工艺code查询工艺名称 diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java index f0763aa6..b6ab006d 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java @@ -288,7 +288,7 @@ public class ProOrderServiceImpl implements IProOrderService { BigDecimal newSapQuantityNum = new BigDecimal(proOrder.getQuantity()) .subtract(new BigDecimal(proOrder.getQuantitySplit())); sapChange.setQuantity(newSapQuantityNum.toString());//母订单新数量 - logger.info("母订单"+proOrder.getOrderCode()+ + logger.info("【成品订单拆分】母订单"+proOrder.getOrderCode()+ "订单数量变更:修改前"+proOrder.getQuantity()+","+ ",已拆数量"+proOrder.getQuantitySplit()+","+ "给sap汇报数量"+newSapQuantityNum.toString()); @@ -302,7 +302,7 @@ public class ProOrderServiceImpl implements IProOrderService { workOrder.setBelongWorkOrder(belongWorkOrder); workOrder.setProdType("LJ01"); - // 将工单信息更新至数据库 + // 将工单信息更新至数据库/**pro_order_workorder**/ proOrderWorkorderMapper.insertProOrderWorkorder(workOrder); // 生成批次表信息并更新至数据库 setBatch(workBatch, splitOrderDTO.getFormFields(), workOrder.getWorkorderId(), conver); @@ -940,7 +940,7 @@ public class ProOrderServiceImpl implements IProOrderService { // 拆分中 proOrder.setStatus("o1"); } - // 更新订单表 + // 更新订单表/**pro_order**/ proOrderMapper.updateOrder(proOrder); // 生成对应的工单表 // 生成id diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java index 75da8975..45379106 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java @@ -320,8 +320,10 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { R>> r = remoteSapService.SapCreateOrder(sapList); logger.info("sap工单回传:" + r.getMsg()); if (500 == r.getCode()) { - logger.error("sap工单回传:(sap订单创建)" + r.getMsg()); + logger.error("工单派发sap工单回传:(sap订单创建失败)" + r.getMsg()); return 0; + }else{ + logger.info("工单派发sap工单回传:(sap订单创建成功)" + JSONObject.toJSONString(r)); } List> returnMaps = r.getData(); List returnCodes = new ArrayList<>(); @@ -339,14 +341,10 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { oworkSap.setWorkorderId(wcodes.get(m));//工单编码 oworkSap.setUpdateTime(updateTime); /**pro_order_workorder**/ - proOrderWorkorderMapper.updateWorkOrderCodeSap(oworkSap); + int n = proOrderWorkorderMapper.updateWorkOrderCodeSap(oworkSap); + logger.info("工单派发pro_order_workorder:"+n); } } -//测试 -// List returnCodes = new ArrayList<>(); -// returnCodes.add("000100305879"); -// returnCodes.add("000100305878"); - //获取领料单 this.getMesPrepare(returnCodes,wcodes);