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 349ee1b6..23ebea08 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 @@ -108,23 +108,23 @@ public class ProOrderServiceImpl implements IProOrderService { } } } - //校验各工序设备是否已选择 - List processes = proOrderMapper.getRouteProcess(splitOrderDTO.getRouteCode()); - if (splitOrderDTO.getProdLineCodeArray().length == 0) { + //校验各工序设备是否已选择 + List processes= proOrderMapper.getRouteProcess(splitOrderDTO.getRouteCode()); + if(splitOrderDTO.getProdLineCodeArray().length == 0){ checkout = false; return error(500, "必须选择工单生产设备!"); - } else { + }else{ String codeArray = JSONArray.toJSONString(splitOrderDTO.getProdLineCodeArray()); - for (int i = 0; i < processes.size(); i++) { - if (codeArray.indexOf(processes.get(i).getValue()) < 0) { + for(int i=0;i wetDetails = new ArrayList<>(); //设备-根据工单获取实际规划设备路线 String[][] lineCodes = splitOrderDTO.getProdLineCodeArray();//proRfidProcessDetailMapper.getActuaEquips(rfidInfo); ProWetMaterialPlanDetail wetDetail = null; - for (int c1 = 0; c1 < lineCodes.length; c1++) { - if (lineCodes[c1][1].startsWith("L")) {//L1-8湿料罐 + for(int c1= 0;c1 0) { + if (proOrder.getChildren() != null && proOrder.getChildren().size()>0) { ProOrderDTO newProOrder = (ProOrderDTO) proOrder.getChildren().get(0); // 更新换算值 conver = (newProOrder.getQuantity() / quantity); @@ -367,12 +367,12 @@ public class ProOrderServiceImpl implements IProOrderService { StringBuilder prodLineName = new StringBuilder(""); StringBuilder equipCods = new StringBuilder("'"); JSONArray codeArray = JSONArray.parseArray(proOrderWorkorder.getProdLineCode()); - for (int c = 0; c < codeArray.size(); c++) { + for(int c=0;c equipMap = proOrderMapper.getEquipInfoByCodes(equipCods.substring(1));//设备字典 + Map equipMap = proOrderMapper.getEquipInfoByCodes(equipCods.substring(1));//设备字典 for (int c = 0; c < codeArray.size(); c++) { String equipCode = codeArray.getJSONArray(c).getString(1); prodLineName.append(equipMap.get(equipCode).getLabel() + ","); @@ -387,7 +387,7 @@ public class ProOrderServiceImpl implements IProOrderService { // 格式化数据 for (ProOrderWorkorderBatch batchCode : batchCodeList) { batchCodes.add(new StringBuilder(batchCode.getBatchCode()).append(";")); - batchNums.add(new StringBuilder(batchCode.getBatchQuantity() + "").append(";")); + batchNums.add(new StringBuilder(batchCode.getBatchQuantity()+"").append(";")); } // 将查询结果设置到当前工单对象 proOrderWorkorder.setShiftDesc(shiftDesc); @@ -434,40 +434,32 @@ public class ProOrderServiceImpl implements IProOrderService { // //获取当前所选工厂 HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); String key = "#header.poolName"; - sapqo.setWerk(request.getHeader(key.substring(8)).replace("ds_", "")); + sapqo.setWerk(request.getHeader(key.substring(8)).replace("ds_","")); SapProOrder maxCreateTime = proOrderMapper.getMaxCreatetime(); - if (maxCreateTime == null) { + if(maxCreateTime == null ){ sapqo.setErdat(DateFormatUtils.format(new Date(), "yyyyMMdd"));//S_ERDAT(创建日期) 例如:20230923 - } else { + }else{ sapqo.setErdat(maxCreateTime.getCreateTimeStr());//S_ERDAT(创建日期) 例如:20230923 } -// //添加调用sap日志 -// SysSapLog sysSapLog = new SysSapLog(); -// sysSapLog.setId(IdUtils.fastSimpleUUID()); -// sysSapLog.setMesssge(sapqo.toString()); -// sysSapLog.setMethod("syncSAP"); -// sysSapLog.setReqcode("请求"); -// sysSapLog.setCreateTime(DateUtils.getNowDate()); -// proOrderMapper.addSapLog(sysSapLog); - logger.info("手动订单同步:【参数】" + JSONObject.toJSONString(sapqo)); - //取>=20230923的sap数据 + logger.info("手动订单同步:【参数】"+ JSONObject.toJSONString(sapqo)); + //取>=20230923的sap数据 R> rSapProOrder = remoteSapService.shopOrderSync(sapqo);//sap只能同步指定日期的数据 List newOrders = rSapProOrder.getData(); - if (CollectionUtils.isEmpty(newOrders)) { - System.out.println("无" + sapqo.getErdat() + "之后的最新订单"); - } else { + if(CollectionUtils.isEmpty(newOrders)){ + System.out.println("无"+sapqo.getErdat()+"之后的最新订单"); + }else { syncSAPFunc(newOrders, "Job"); } } - public String syncSAPFunc(List newOrders, String syncUser) { + public String syncSAPFunc(List newOrders,String syncUser){ String failOrder = ""; ProOrder proOrder = null; - for (SapProOrder sapProOrder : newOrders) { - if ("LJ88".equals(sapProOrder.getOrderType())) { + for (SapProOrder sapProOrder:newOrders) { + if("LJ88".equals(sapProOrder.getOrderType())){ //工单生产后整个订单就被锁定//订单存在就更新,不存在就插入 proOrder = new ProOrder(); BeanUtils.copyProperties(sapProOrder, proOrder); @@ -479,38 +471,38 @@ public class ProOrderServiceImpl implements IProOrderService { return failOrder; } - public String syncImportFunc(List newOrders) { + public String syncImportFunc(List newOrders){ String failOrder = ""; - for (ProOrder proOrder : newOrders) { + for (ProOrder proOrder:newOrders) { //prodType->@Excel(name = "产品类型", readConverterExp = "white=白坯,prod=成品") proOrder.setCreateBy(SecurityUtils.getUsername()); proOrder.setSyncUser("import"); proOrder.setPlanFactoryCode(proOrder.getFactoryCode()); String msg = syncFunc(proOrder); - if (StringUtils.isNotBlank(msg)) { - failOrder += msg + ","; + if(StringUtils.isNotBlank(msg)){ + failOrder += msg+","; } } return failOrder; } @Transactional(rollbackFor = Exception.class) - public String syncFunc(ProOrder proOrder) { + public String syncFunc(ProOrder proOrder){ String failOrder = ""; //pro_order_workorder Date nowDate = DateUtils.getNowDate(); ProOrder orderExit = proOrderMapper.selectProOrderByOrderCode(proOrder.getOrderCode()); - if (orderExit == null) {//不存在就插入 + if (orderExit==null) {//不存在就插入 proOrder.setId(IdUtils.fastSimpleUUID()); proOrder.setCreateTime(nowDate); proOrderMapper.insertProOrder(proOrder); - logger.info("=======订单" + proOrder.getOrderCode() + "同步成功"); + logger.info("=======订单"+proOrder.getOrderCode()+"同步成功"); } else {//存在,如果没活动更新,否则不允许更新,关闭订单 proOrder.setId(orderExit.getId()); proOrder.setQuantitySplit(0L); ProOrderWorkorder owork = new ProOrderWorkorder(); owork.setOrderCode(proOrder.getOrderCode()); - owork.setStatusArray("'w2','w3','w4'");//已派发w1未派w0活动w2报工w3暂停w4 + owork.setStatusArray("'w1','w2','w3','w4'");//已派发w1未派w0活动w2报工w3暂停w4 List workOrders = proOrderWorkorderMapper.selectProOrderWorkorderList(owork); if (CollectionUtils.isEmpty(workOrders)) {//更新 proOrder.setUpdateTime(nowDate); @@ -526,10 +518,10 @@ public class ProOrderServiceImpl implements IProOrderService { //删除工单pro_order_workorder proOrderWorkorderMapper.deleteProOrderWorkorderByOrderIds(ids); } - logger.info("=======订单" + proOrder.getOrderCode() + "同步成功"); - } else { + logger.info("=======订单"+proOrder.getOrderCode()+"同步成功"); + }else{ failOrder = proOrder.getOrderCode(); - logger.info("=======订单" + failOrder + "同步失败"); + logger.info("=======订单"+failOrder+"同步忽略,订单已经派发"); } } return failOrder; @@ -568,11 +560,11 @@ public class ProOrderServiceImpl implements IProOrderService { @Transactional public AjaxResult importOrder(List orderList) { BaseProduct bpqo = null; - for (ProOrder order : orderList) { - if (StringUtils.isBlank(order.getOrderType())) { + for(ProOrder order:orderList){ + if(StringUtils.isBlank(order.getOrderType())){ order.setOrderType("LJ01"); } - String factoryCode = ServletUtils.getRequest().getHeader("PoolName").replace("ds_", ""); + String factoryCode = ServletUtils.getRequest().getHeader("PoolName").replace("ds_",""); order.setPlanFactoryCode(factoryCode); order.setFactoryCode(factoryCode); order.setCreateBy(SecurityUtils.getUsername()); @@ -582,7 +574,7 @@ public class ProOrderServiceImpl implements IProOrderService { bpqo = new BaseProduct(); bpqo.setProductCode(order.getProdCode()); List bp = baseProductMapper.selectBaseProductList(bpqo); - if (!CollectionUtils.isEmpty(bp)) { + if(!CollectionUtils.isEmpty(bp)){ order.setProdDesc(bp.get(0).getProductDescZh()); } } @@ -592,8 +584,8 @@ public class ProOrderServiceImpl implements IProOrderService { // 如果数据校验成功 if (checkResult.isSuccess()) { String info = syncImportFunc(orderList); - return success("信息导入完成。其中导入失败订单:" + info); - } else { + return success("信息导入完成。其中导入失败订单:"+info); + }else{ return checkResult; } } @@ -627,7 +619,6 @@ public class ProOrderServiceImpl implements IProOrderService { /** * 获取班次信息list - * * @return */ @Override @@ -638,7 +629,6 @@ public class ProOrderServiceImpl implements IProOrderService { /** * 通过订单物料code查询工艺list - * * @param prodCode * @return */ @@ -650,41 +640,40 @@ public class ProOrderServiceImpl implements IProOrderService { /** * 通过工艺编码获取设备信息list - * * @param routeCode * @return */ @Override @DS("#header.poolName") public List getProEquipment(String routeCode) { - List level = proOrderMapper.getRouteProcess(routeCode); - List level2 = proOrderMapper.getRouteProcessEquips(level); - Map equipMap = new HashMap<>();//设备字典 - if (!CollectionUtils.isEmpty(level2)) { + List level= proOrderMapper.getRouteProcess(routeCode); + List level2= proOrderMapper.getRouteProcessEquips(level); + Map equipMap = new HashMap<>();//设备字典 + if(!CollectionUtils.isEmpty(level2)){ List oldCodes = level2.stream() .filter(value -> StringUtils.isNotEmpty(value.getValue())) .map(value -> value.getValue()).collect(Collectors.toList()); - String equipCods = oldCodes.stream().reduce((sum, num) -> sum + "," + num).get(); - equipMap = proOrderMapper.getEquipInfoByCodes(equipCods.replace(",", "','")); + String equipCods = oldCodes.stream().reduce((sum,num) -> sum+","+num).get(); + equipMap = proOrderMapper.getEquipInfoByCodes(equipCods.replace(",","','")); } - if (equipMap.isEmpty()) { + if(equipMap.isEmpty()){ return null; } List children = null; - for (CascaderDTO level1 : level) { + for(CascaderDTO level1:level){ children = new ArrayList<>();//最终结果 List childrens = level2.stream() - .filter(dto -> dto.getLabel().equals(level1.getValue())) + .filter(dto ->dto.getLabel().equals(level1.getValue())) .collect(Collectors.toList()); - for (CascaderDTO child : childrens) { + for(CascaderDTO child:childrens){ String[] equipstr = child.getValue().split(","); - for (String equipcode : equipstr) { - if (equipMap.get(equipcode) != null) { + for(String equipcode:equipstr){ + if(equipMap.get(equipcode) != null){ children.add(equipMap.get(equipcode)); } } } - if (!CollectionUtils.isEmpty(children)) { + if(!CollectionUtils.isEmpty(children)){ level1.setChildren(children); } } @@ -694,7 +683,6 @@ public class ProOrderServiceImpl implements IProOrderService { /** * 通过母订单Code查询级联订单信息并封装 - * * @param orderCode * @return */ @@ -717,7 +705,7 @@ public class ProOrderServiceImpl implements IProOrderService { proOrderList.add(childProOrderList.get(0)); tempCode.setLength(0); tempCode.append(childProOrderList.get(0).getOrderCode()); - } else { + }else { break; } } @@ -726,13 +714,13 @@ public class ProOrderServiceImpl implements IProOrderService { ProOrder proOrderVO = new ProOrder(); // 处理列表 - for (int i = proOrderList.size() - 1; i > 0; i--) { + for (int i = proOrderList.size()-1; i > 0; i--) { List setList = new ArrayList<>(); setList.add(proOrderList.get(i)); - proOrderList.get(i - 1).setChildren(setList); + proOrderList.get(i-1).setChildren(setList); } - BeanUtils.copyProperties(proOrderList.get(0), proOrderVO); + BeanUtils.copyProperties(proOrderList.get(0),proOrderVO); return success(proOrderVO); } @@ -750,11 +738,11 @@ public class ProOrderServiceImpl implements IProOrderService { // sapqo.setCreateTime(calendar.getTime()); // SapShopOrderQuery sapqo = new SapShopOrderQuery(); - sapqo.setWerk(poolName.replace("ds_", "")); + sapqo.setWerk(poolName.replace("ds_","")); SapProOrder maxCreateTime = proOrderMapper.getMaxCreatetime(); - if (maxCreateTime == null) { + if(maxCreateTime == null ){ sapqo.setErdat(DateFormatUtils.format(new Date(), "yyyyMMdd"));//S_ERDAT(创建日期) 例如:20230923 - } else { + }else{ sapqo.setErdat(maxCreateTime.getCreateTimeStr());//S_ERDAT(创建日期) 例如:20230923 } @@ -769,9 +757,9 @@ public class ProOrderServiceImpl implements IProOrderService { R> rSapProOrder = remoteSapService.shopOrderSync(sapqo); List newOrders = rSapProOrder.getData(); - if (CollectionUtils.isEmpty(newOrders)) { - System.out.println("无" + sapqo.getErdat() + "之后的最新订单"); - } else { + if(CollectionUtils.isEmpty(newOrders)){ + System.out.println("无"+sapqo.getErdat()+"之后的最新订单"); + }else { syncSAPFunc(newOrders, "Job"); } } @@ -943,7 +931,7 @@ public class ProOrderServiceImpl implements IProOrderService { if (proOrder.getQuantity().longValue() == proOrder.getQuantitySplit().longValue()) { // 已拆分 proOrder.setStatus("o2"); - } else { + }else { // 拆分中 proOrder.setStatus("o1"); } @@ -1094,11 +1082,10 @@ public class ProOrderServiceImpl implements IProOrderService { } return success(); } - - public static void main(String args[]) { + public static void main(String args[]){ String arrayStr = "[[\"GX01\",\"LG1\"],[\"GX01\",\"LG2\"],[\"GX02\",\"S1\"],[\"GX02\",\"S2\"],[\"GX03\",\"HF01\"],[\"GX04\",\"SPJ01\"]]"; JSONArray jsonArray = JSONArray.parseArray(arrayStr); - for (int c = 0; c < jsonArray.size(); c++) { + for(int c=0;c selectOdsProcureOutOrderListZUKEN(OdsProcureOutOrder order); List selectOdsProcureOutOrderListZUKENX(OdsProcureOutOrder order); + + String selectMachineCode(@Param("order")OdsProcureOutOrder odsProcureOutOrder); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java index c90523f9..a51a541c 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java @@ -284,14 +284,15 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { public OdsProcureOutOrder PurchaseOrderOutboundPda(OdsProcureOutOrder odsProcureOrder) { //母单,其中list里面是对应的子单 OdsProcureOutOrder odsProcureOutOrder = odsProcureOutOrderMapper.selectmesPrepare(odsProcureOrder); - + String machine= odsProcureOutOrderMapper.selectMachineCode(odsProcureOutOrder); if (odsProcureOutOrder != null) { List orderList = odsProcureOutOrderMapper.selectmesPrepareDetail(odsProcureOutOrder); + for (OdsProcureOutOrder order:orderList){ + order.setProductionLineCode(machine); + } odsProcureOutOrder.setList(orderList); } - return odsProcureOutOrder; - } @Override diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml index 800e4bd5..a3c495cb 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml @@ -39,6 +39,7 @@ + limit #{page.pageOffset} , #{page.rows} @@ -46,232 +47,227 @@ select Site_code, ID, Produce_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit, COALESCE(Out_Number, 0) as Out_Number , Loc_Code, Loc_Desc, Production_Line_Desc, Production_Line_Code, Order_Status, User_Defined1, User_Defined2, User_Defined3, User_Defined4, User_Defined5, User_Defined6, User_Defined7, User_Defined8, User_Defined9, User_Defined10, User_Defined11, Supplier_Code, Supplier_Name, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code from ods_procure_out_order - + SELECT + Produce_Code, + User_Defined1, + MAX(Create_Date) AS Create_Date + FROM + ods_procure_out_order + where + Active='1' + and Produce_Code like concat('%', #{produceCode}, '%') - and User_Defined1 = #{userDefined1} - GROUP BY Produce_Code,User_Defined1 - - - - - + and User_Defined1 = #{userDefined1} + GROUP BY Produce_Code,User_Defined1 + ORDER BY + Create_Date DESC; + + + + + - + - - insert into ods_procure_out_order - - Site_code, - ID, - Produce_Code, - Material_Code, - Material_Desc, - Plan_Date, - Plan_Number, - Unit, - Out_Number, - Loc_Code, - Loc_Desc, - Production_Line_Desc, - Production_Line_Code, - Order_Status, - User_Defined1, - User_Defined2, - User_Defined3, - User_Defined4, - User_Defined5, - User_Defined6, - User_Defined7, - User_Defined8, - User_Defined9, - User_Defined10, - User_Defined11, - Supplier_Code, - Supplier_Name, - Create_By, - Create_Date, - Last_Update_By, - Last_Update_Date, - Active, - Enterprise_Id, - Enterprise_Code, - - - #{siteCode}, - #{ID}, - #{produceCode}, - #{materialCode}, - #{materialDesc}, - #{planDate}, - #{planNumber}, - #{Unit}, - #{outNumber}, - #{locCode}, - #{locDesc}, - #{productionLineDesc}, - #{productionLineCode}, - #{orderStatus}, - #{userDefined1}, - #{userDefined2}, - #{userDefined3}, - #{userDefined4}, - #{userDefined5}, - #{userDefined6}, - #{userDefined7}, - #{userDefined8}, - #{userDefined9}, - #{userDefined10}, - #{userDefined11}, - #{supplierCode}, - #{supplierName}, - #{createBy}, - #{createDate}, - #{lastUpdateBy}, - #{lastUpdateDate}, - #{Active}, - #{enterpriseId}, - #{enterpriseCode}, - - + + insert into ods_procure_out_order + + Site_code, + ID, + Produce_Code, + Material_Code, + Material_Desc, + Plan_Date, + Plan_Number, + Unit, + Out_Number, + Loc_Code, + Loc_Desc, + Production_Line_Desc, + Production_Line_Code, + Order_Status, + User_Defined1, + User_Defined2, + User_Defined3, + User_Defined4, + User_Defined5, + User_Defined6, + User_Defined7, + User_Defined8, + User_Defined9, + User_Defined10, + User_Defined11, + Supplier_Code, + Supplier_Name, + Create_By, + Create_Date, + Last_Update_By, + Last_Update_Date, + Active, + Enterprise_Id, + Enterprise_Code, + + + #{siteCode}, + #{ID}, + #{produceCode}, + #{materialCode}, + #{materialDesc}, + #{planDate}, + #{planNumber}, + #{Unit}, + #{outNumber}, + #{locCode}, + #{locDesc}, + #{productionLineDesc}, + #{productionLineCode}, + #{orderStatus}, + #{userDefined1}, + #{userDefined2}, + #{userDefined3}, + #{userDefined4}, + #{userDefined5}, + #{userDefined6}, + #{userDefined7}, + #{userDefined8}, + #{userDefined9}, + #{userDefined10}, + #{userDefined11}, + #{supplierCode}, + #{supplierName}, + #{createBy}, + #{createDate}, + #{lastUpdateBy}, + #{lastUpdateDate}, + #{Active}, + #{enterpriseId}, + #{enterpriseCode}, + + - - update ods_procure_out_order - - Site_code = #{siteCode}, - Produce_Code = #{produceCode}, - Material_Code = #{materialCode}, - Material_Desc = #{materialDesc}, - Plan_Date = #{planDate}, - Plan_Number = #{planNumber}, - Unit = #{Unit}, - Out_Number = #{outNumber}, - Loc_Code = #{locCode}, - Loc_Desc = #{locDesc}, - Production_Line_Desc = #{productionLineDesc}, - Production_Line_Code = #{productionLineCode}, - Order_Status = #{orderStatus}, - User_Defined1 = #{userDefined1}, - User_Defined2 = #{userDefined2}, - User_Defined3 = #{userDefined3}, - User_Defined4 = #{userDefined4}, - User_Defined5 = #{userDefined5}, - User_Defined6 = #{userDefined6}, - User_Defined7 = #{userDefined7}, - User_Defined8 = #{userDefined8}, - User_Defined9 = #{userDefined9}, - User_Defined10 = #{userDefined10}, - User_Defined11 = #{userDefined11}, - Supplier_Code = #{supplierCode}, - Supplier_Name = #{supplierName}, - Create_By = #{createBy}, - Create_Date = #{createDate}, - Last_Update_By = #{lastUpdateBy}, - Last_Update_Date = #{lastUpdateDate}, - Active = #{Active}, - Enterprise_Id = #{enterpriseId}, - Enterprise_Code = #{enterpriseCode}, - - where ID = #{ID} - + + update ods_procure_out_order + + Site_code = #{siteCode}, + Produce_Code = #{produceCode}, + Material_Code = #{materialCode}, + Material_Desc = #{materialDesc}, + Plan_Date = #{planDate}, + Plan_Number = #{planNumber}, + Unit = #{Unit}, + Out_Number = #{outNumber}, + Loc_Code = #{locCode}, + Loc_Desc = #{locDesc}, + Production_Line_Desc = #{productionLineDesc}, + Production_Line_Code = #{productionLineCode}, + Order_Status = #{orderStatus}, + User_Defined1 = #{userDefined1}, + User_Defined2 = #{userDefined2}, + User_Defined3 = #{userDefined3}, + User_Defined4 = #{userDefined4}, + User_Defined5 = #{userDefined5}, + User_Defined6 = #{userDefined6}, + User_Defined7 = #{userDefined7}, + User_Defined8 = #{userDefined8}, + User_Defined9 = #{userDefined9}, + User_Defined10 = #{userDefined10}, + User_Defined11 = #{userDefined11}, + Supplier_Code = #{supplierCode}, + Supplier_Name = #{supplierName}, + Create_By = #{createBy}, + Create_Date = #{createDate}, + Last_Update_By = #{lastUpdateBy}, + Last_Update_Date = #{lastUpdateDate}, + Active = #{Active}, + Enterprise_Id = #{enterpriseId}, + Enterprise_Code = #{enterpriseCode}, + + where ID = #{ID} + - + delete from ods_procure_out_order where ID = #{ID} - - delete from ods_procure_out_order where ID in - - #{ID} - - - SELECT prepare_id id, workorder_name Produce_Code, + workorder_code workorderCode, product_code Material_Code, product_name Material_Desc, unit Unit, @@ -281,7 +277,7 @@ workorder_name =#{produceCode} - SELECT mes_prepare_detail.record_id ID, mes_prepare.workorder_name, @@ -301,7 +297,7 @@ WHERE mes_prepare_detail.prepare_id= #{ID} - + insert into wms_raw_mission_out(id, prd_order, material_code, @@ -331,78 +327,84 @@ #{createDate} ) - + update ods_procure_out_order set User_Defined10 = #{userDefined10}, User_Defined9 = #{userDefined9}, User_Defined11 = #{userDefined11} where ID = #{ID} - - update ods_procure_out_order - set User_Defined10 = #{order.userDefined10}, - User_Defined9 = #{order.userDefined9}, - User_Defined11 = #{order.userDefined11} - where ID in - - #{item.ID} - - - - + + update ods_procure_out_order + set User_Defined10 = #{order.userDefined10}, + User_Defined9 = #{order.userDefined9}, + User_Defined11 = #{order.userDefined11} + where ID in + + #{item.ID} + + + + +