diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPut.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPut.java index 42ab7bf3..b19007c8 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPut.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPut.java @@ -135,7 +135,11 @@ public class WmsProductPut extends BaseEntity { */ @Excel(name = "过账SAP状态") private String sapStatus; - + /** + * 质检状态 + */ + @Excel(name = "质检状态") + private String ZJStatus; /** * 过账SAP凭证 */ @@ -546,5 +550,11 @@ public class WmsProductPut extends BaseEntity { '}'; } + public String getZJStatus() { + return ZJStatus; + } + public void setZJStatus(String ZJStatus) { + this.ZJStatus = ZJStatus; + } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsProductPutMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsProductPutMapper.java index 062d96f3..77fff22f 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsProductPutMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsProductPutMapper.java @@ -94,6 +94,8 @@ public interface WmsProductPutMapper { public WmsProductPut selectWmsProductPutByIdANDStatus(@Param("id")String id); + String selectQcCheckTask(@Param("wmsProductPut")WmsProductPut wmsProductPut1); + // String selectProOrderWorkorder(WmsProductPut wmsProductPut1); diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOutOrderServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOutOrderServiceImpl.java index 27accbc8..d475506d 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOutOrderServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOutOrderServiceImpl.java @@ -453,14 +453,48 @@ public class OdsProcureOutOrderServiceImpl implements IOdsProcureOutOrderService public void OutboundPostingzcSAPGYTS(List orderList) { //先根据出库单获取 -// * 退料的移动类型为 262 -// * 领料的移动类型为 261-- and wms_ods_procure_out_order.Order_Status='3' +// +// -- and wms_ods_procure_out_order.Order_Status='3' //我把过账状态-- and wms_ods_procure_out_order.User_Defined10!='2'去掉了 List orderList1 = odsProcureOutOrderMapper.selectWmsOdsProcureOutOrderSpecialByIDs(orderList); for (OdsProcureOutOrder order: orderList1 ) { if ("成本中心".equals(orderList1.get(0).getUserDefined6())){//区分出来内部订单 + Map paramMap=new HashMap<>(); + List mapList = new ArrayList<>(); + paramMap.put("COSTCENTER", order.getUserDefined3());//成本中心 + paramMap.put("PLANT", order.getSiteCode());//工厂 + paramMap.put("LGORT", order.getLocCode());//库存地点 + paramMap.put("MATNR", order.getMaterialCode());//物料号 + paramMap.put("QUANTITY", order.getPlanNumber());//数量 + paramMap.put("MEINS", order.getUnit());//条目单位 + paramMap.put("BATCH", order.getUserDefined1());//批号 + paramMap.put("PROD_DATE", order.getPlanDate());//生产日期 + paramMap.put("EXPIRYDATE", order.getUserDefined5());//货架寿命到期日 + mapList.add(paramMap); + R result2 = remoteSapService.sapProductOutboundCostCenter(mapList); + int code = result2.getCode(); + OdsProcureOutOrder order1 = new OdsProcureOutOrder(); + String msg = result2.getMsg(); + order.setUserDefined11(msg); + if (code== 200){ + //过账成功 + Map map = new HashMap(); + map = (Map) result2.getData(); + String userDefined9 = (String) map.get("MATERIALDOCUMENT"); + order.setUserDefined9(userDefined9); + order.setUserDefined10("2");//成功 +// for (OdsProcureOutOrder order2: +// orderList2 ) { +// BigDecimal sapNumber= order1.getSapNumber(); +// order1.setSapNumber(sapNumber.add(order1.getOutNumber()));//成功..这个是否的outNumber是用已出库减去已经过账的数量 +// odsProcureOutOrderMapper.updateWMSOdsProcureOutOrdersapById(order1); +// } + } + //这个地方需要对 + }else { + //内部订单 Map paramMap=new HashMap<>(); List mapList = new ArrayList<>(); paramMap.put("COSTCENTER", order.getUserDefined3());// @@ -473,10 +507,7 @@ public class OdsProcureOutOrderServiceImpl implements IOdsProcureOutOrderService paramMap.put("PROD_DATE", order.getPlanDate());//生产日期 paramMap.put("EXPIRYDATE", order.getUserDefined5());//货架寿命到期日 mapList.add(paramMap); - R result2 = remoteSapService.sapProductOutboundCostCenter(mapList); - }else { - //内部订单 - +// R result2 = remoteSapService.sapProductOutboundCostTWO(mapList); } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java index 42c5c637..b4851635 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java @@ -89,11 +89,11 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { @DS("#header.poolName") public List selectWmsProductPutList(WmsProductPut wmsProductPut) { List wmsProductPutList= wmsProductPutMapper.selectWmsProductPutList(wmsProductPut); -// for (WmsProductPut wmsProductPut1: -// wmsProductPutList) { -// String qcResult= wmsProductPutMapper.selectProOrderWorkorder(wmsProductPut1); -// wmsProductPut1.setQcResult(qcResult); -// } + for (WmsProductPut wmsProductPut1: + wmsProductPutList) { + String qcResult= wmsProductPutMapper.selectQcCheckTask(wmsProductPut1); + wmsProductPut1.setZJStatus(qcResult); + } return wmsProductPutList; } diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsProductPutMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsProductPutMapper.xml index e74091db..6131b6e8 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsProductPutMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsProductPutMapper.xml @@ -523,4 +523,18 @@ where id = #{id} and SAP_status='1' +