计划优化

master
zhaoxiaolin 1 year ago
parent a8fa036f00
commit 5460a52406

@ -133,7 +133,7 @@ public interface ProOrderWorkorderMapper {
List<ProOrderWorkorder> selectProOrderWorkerderByWorkerIds(String[] ids); List<ProOrderWorkorder> selectProOrderWorkerderByWorkerIds(String[] ids);
public void updateWorkOrderCodeSap(ProOrderWorkorder oworkSap); public int updateWorkOrderCodeSap(ProOrderWorkorder oworkSap);
/** /**
* code * code

@ -288,7 +288,7 @@ public class ProOrderServiceImpl implements IProOrderService {
BigDecimal newSapQuantityNum = new BigDecimal(proOrder.getQuantity()) BigDecimal newSapQuantityNum = new BigDecimal(proOrder.getQuantity())
.subtract(new BigDecimal(proOrder.getQuantitySplit())); .subtract(new BigDecimal(proOrder.getQuantitySplit()));
sapChange.setQuantity(newSapQuantityNum.toString());//母订单新数量 sapChange.setQuantity(newSapQuantityNum.toString());//母订单新数量
logger.info("母订单"+proOrder.getOrderCode()+ logger.info("【成品订单拆分】母订单"+proOrder.getOrderCode()+
"订单数量变更:修改前"+proOrder.getQuantity()+","+ "订单数量变更:修改前"+proOrder.getQuantity()+","+
",已拆数量"+proOrder.getQuantitySplit()+","+ ",已拆数量"+proOrder.getQuantitySplit()+","+
"给sap汇报数量"+newSapQuantityNum.toString()); "给sap汇报数量"+newSapQuantityNum.toString());
@ -302,7 +302,7 @@ public class ProOrderServiceImpl implements IProOrderService {
workOrder.setBelongWorkOrder(belongWorkOrder); workOrder.setBelongWorkOrder(belongWorkOrder);
workOrder.setProdType("LJ01"); workOrder.setProdType("LJ01");
// 将工单信息更新至数据库 // 将工单信息更新至数据库/**pro_order_workorder**/
proOrderWorkorderMapper.insertProOrderWorkorder(workOrder); proOrderWorkorderMapper.insertProOrderWorkorder(workOrder);
// 生成批次表信息并更新至数据库 // 生成批次表信息并更新至数据库
setBatch(workBatch, splitOrderDTO.getFormFields(), workOrder.getWorkorderId(), conver); setBatch(workBatch, splitOrderDTO.getFormFields(), workOrder.getWorkorderId(), conver);
@ -940,7 +940,7 @@ public class ProOrderServiceImpl implements IProOrderService {
// 拆分中 // 拆分中
proOrder.setStatus("o1"); proOrder.setStatus("o1");
} }
// 更新订单表 // 更新订单表/**pro_order**/
proOrderMapper.updateOrder(proOrder); proOrderMapper.updateOrder(proOrder);
// 生成对应的工单表 // 生成对应的工单表
// 生成id // 生成id

@ -320,8 +320,10 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
R<List<Map<String, String>>> r = remoteSapService.SapCreateOrder(sapList); R<List<Map<String, String>>> r = remoteSapService.SapCreateOrder(sapList);
logger.info("sap工单回传" + r.getMsg()); logger.info("sap工单回传" + r.getMsg());
if (500 == r.getCode()) { if (500 == r.getCode()) {
logger.error("sap工单回传(sap订单创建)" + r.getMsg()); logger.error("工单派发sap工单回传(sap订单创建失败)" + r.getMsg());
return 0; return 0;
}else{
logger.info("工单派发sap工单回传(sap订单创建成功)" + JSONObject.toJSONString(r));
} }
List<Map<String, String>> returnMaps = r.getData(); List<Map<String, String>> returnMaps = r.getData();
List<String> returnCodes = new ArrayList<>(); List<String> returnCodes = new ArrayList<>();
@ -339,14 +341,10 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
oworkSap.setWorkorderId(wcodes.get(m));//工单编码 oworkSap.setWorkorderId(wcodes.get(m));//工单编码
oworkSap.setUpdateTime(updateTime); oworkSap.setUpdateTime(updateTime);
/**pro_order_workorder**/ /**pro_order_workorder**/
proOrderWorkorderMapper.updateWorkOrderCodeSap(oworkSap); int n = proOrderWorkorderMapper.updateWorkOrderCodeSap(oworkSap);
logger.info("工单派发pro_order_workorder"+n);
} }
} }
//测试
// List<String> returnCodes = new ArrayList<>();
// returnCodes.add("000100305879");
// returnCodes.add("000100305878");
//获取领料单 //获取领料单
this.getMesPrepare(returnCodes,wcodes); this.getMesPrepare(returnCodes,wcodes);

Loading…
Cancel
Save