diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapRFW.java b/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapRFW.java index 534fd004..19a581c8 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapRFW.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapRFW.java @@ -114,7 +114,7 @@ public class SapRFW { } } - public static class lt_hw{ + public class lt_hw{ String material; String entry_qnt; diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepServiceImpl.java index ce0a9008..259af103 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquUpkeepServiceImpl.java @@ -187,6 +187,28 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService { EquPlanDetail detail = new EquPlanDetail(); BeanUtils.copyProperties(checkItem,detail); + if (!detail.getItemCode().isEmpty()) { + itemTempName.append(detail.getItemName()).append(","); + // 获取检查项详情list + List equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode()); + if (equCheckItemList.size() > 0) { + List standardList = new ArrayList<>(); + for (EquCheckItemDetail standardTemp : equCheckItemDetailList) { + EquPlanStandard standard = new EquPlanStandard(); + BeanUtils.copyProperties(standardTemp,standard); + + standard.setShowFlag(true); + standardList.add(standard); + } + detail.setEquPlanStandardList(standardList); + } + } + detailList.add(detail); + } + if (data.getItemLoop() == 0) { + EquPlanDetail detail = new EquPlanDetail(); + BeanUtils.copyProperties(checkItem,detail); + if (!detail.getItemCode().isEmpty()) { itemTempName.append(detail.getItemName()).append(","); // 获取检查项详情list diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquOrderDetailMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquOrderDetailMapper.xml index ea050820..9556f487 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquOrderDetailMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquOrderDetailMapper.xml @@ -113,13 +113,14 @@ #{itemTools}, + insert into equ_order_detail ( id, order_code, item_code, item_name, item_method, item_type, item_type_name, factory_code, del_flag, - create_by, create_time,item_tools + create_by, create_time ) VALUES @@ -127,7 +128,7 @@ #{item.id},#{item.parentCode}, #{item.itemCode},#{item.itemName},#{item.itemMethod}, #{item.itemType},#{item.itemTypeName},#{item.factoryCode},#{item.delFlag}, - #{item.createBy},#{item.createTime},#{itemTools} + #{item.createBy},#{item.createTime} ) diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java index edc31d23..435f3d3a 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java @@ -298,7 +298,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService { SapRFW sapRFW = new SapRFW(); sapRFW.setAufnr(work.getWorkorderCodeSap());//虚拟工单号 sapRFW.setGamng(work.getQuantityFeedback().toString());//报工数量 - SapRFW.lt_gs ltgs = sapRFW.new lt_gs();//生产订单报工工时修改 + SapRFW.lt_gs ltgs = sapRFW.getLt_gs();//生产订单报工工时修改 ltgs.setConf_activity1(work.getSac1());//人工 ltgs.setConf_activity2(work.getSac2()); ltgs.setConf_activity3(work.getSac3());//机器 diff --git a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java index ebdcc7bd..2bd5a1aa 100644 --- a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java +++ b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java @@ -168,7 +168,7 @@ public class OpenServiceImpl implements OpenService { SapRFW sapRFW = new SapRFW(); sapRFW.setAufnr(work.getWorkorderCodeSap());//虚拟工单号 sapRFW.setGamng(work.getQuantityFeedback().toString());//报工数量 - SapRFW.lt_gs ltgs = sapRFW.new lt_gs();//生产订单报工工时修改 + SapRFW.lt_gs ltgs = sapRFW.getLt_gs();//生产订单报工工时修改 ltgs.setConf_activity1(work.getSac1());//人工 ltgs.setConf_activity2(work.getSac2()); ltgs.setConf_activity3(work.getSac3());//机器 diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/OdsProcureOrderController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/OdsProcureOrderController.java index 8a45d736..98afca16 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/OdsProcureOrderController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/OdsProcureOrderController.java @@ -2,6 +2,7 @@ package com.op.wms.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.op.wms.domain.WmsRawOrderInSn; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -23,7 +24,7 @@ import com.op.common.core.web.page.TableDataInfo; /** * 包材采购单Controller - * + * * @author Open Platform * @date 2023-07-06 */ @@ -94,4 +95,50 @@ public class OdsProcureOrderController extends BaseController { public AjaxResult remove(@PathVariable String[] IDs) { return toAjax(odsProcureOrderService.deleteOdsProcureOrderByIDs(IDs)); } + + /** + *手持 --包材采购单采购收货查询 + */ + + @PostMapping("/PurchaseOrderPda") + public AjaxResult PurchaseOrderPda(@RequestBody OdsProcureOrder odsProcureOrder) { + List orderList =odsProcureOrderService.PurchaseOrderPda(odsProcureOrder); + return success(orderList); + } + + //** + + /** + * 用于出库任务页面--查询 + * @param odsProcureOrder + * @return + */ + @PostMapping("/PurchaseOrderOutboundTask") + public AjaxResult PurchaseOrderOutboundTask(@RequestBody OdsProcureOrder odsProcureOrder) { + List orderList =odsProcureOrderService.PurchaseOrderPda(odsProcureOrder); + return success(orderList); + } + + + + /** + *手持 --包材采购单采购收货操作 + */ + + @PostMapping("/PurchaseOrderdeliPda") + public AjaxResult PurchaseOrderdeliPda(@RequestBody OdsProcureOrder odsProcureOrder) { + int tem =odsProcureOrderService.PurchaseOrderdeliPda(odsProcureOrder); + return success(tem); + } + + /** + *手持 --包材采购单采购查询明细 + */ + + @PostMapping("/PurchaseOrderdetailPda") + public AjaxResult PurchaseOrderdetailPda(@RequestBody WmsRawOrderInSn wmsRawOrderInSn) { + List wmsRawOrderInSns =odsProcureOrderService.PurchaseOrderdetailPda(wmsRawOrderInSn); + return success(wmsRawOrderInSns); + } + } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsOdsWhiteEmbryoInController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsOdsWhiteEmbryoInController.java index c70353f3..107954bc 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsOdsWhiteEmbryoInController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsOdsWhiteEmbryoInController.java @@ -36,7 +36,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController { /** * 查询白胚入库单列表 */ - @RequiresPermissions("wms:wmsEmbryoin:list") +// @RequiresPermissions("wms:wmsEmbryoin:list") @GetMapping("/list") public TableDataInfo list(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn) { startPage(); @@ -47,7 +47,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController { /** * 导出白胚入库单列表 */ - @RequiresPermissions("wms:wmsEmbryoin:export") + //@RequiresPermissions("wms:wmsEmbryoin:export") @Log(title = "白胚入库单", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn) { @@ -59,7 +59,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController { /** * 获取白胚入库单详细信息 */ - @RequiresPermissions("wms:wmsEmbryoin:query") + //@RequiresPermissions("wms:wmsEmbryoin:query") @GetMapping(value = "/{ID}") public AjaxResult getInfo(@PathVariable("ID") String ID) { return success(wmsOdsWhiteEmbryoInService.selectWmsOdsWhiteEmbryoInByID(ID)); @@ -76,7 +76,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController { /** * 修改白胚入库单 */ - @RequiresPermissions("wms:wmsEmbryoin:edit") + //@RequiresPermissions("wms:wmsEmbryoin:edit") @Log(title = "白胚入库单", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn) { @@ -86,7 +86,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController { /** * 删除白胚入库单 */ - @RequiresPermissions("wms:wmsEmbryoin:remove") + //@RequiresPermissions("wms:wmsEmbryoin:remove") @Log(title = "白胚入库单", businessType = BusinessType.DELETE) @DeleteMapping("/{IDs}") public AjaxResult remove(@PathVariable String[] IDs) { diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSInterfaceContorller.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSInterfaceContorller.java new file mode 100644 index 00000000..689fea5d --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSInterfaceContorller.java @@ -0,0 +1,107 @@ +package com.op.wms.controller; + +import com.op.common.core.utils.StringUtils; +import com.op.wms.domain.WmsToWCSDTO; +import com.op.wms.service.IWmsToWCSInterfaceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/WmsToWCSInterface") +public class WmsToWCSInterfaceContorller { + + @Autowired + private IWmsToWCSInterfaceService wmsToWCSInterfaceService; + /** + * 白坯请求入库 + * @param wcsdto + * @return + */ + @PostMapping("/blankRequestForStorage") + public WmsToWCSDTO blankRequestForStorage(@RequestBody WmsToWCSDTO wcsdto) { + if(StringUtils.isBlank(wcsdto.getFactory())){ + wcsdto.setCode("1"); + wcsdto.setMessage("factory is not null"); + return wcsdto; + } + return wmsToWCSInterfaceService.requestMaterialLoadNo(wcsdto); + } + /** + * 白坯入库或移库完成 + * @param wcsdto + * @return + */ + @PostMapping("/blankStorageOrTransferCompleted") + public WmsToWCSDTO blankStorageOrTransferCompleted(@RequestBody WmsToWCSDTO wcsdto) { + if(StringUtils.isBlank(wcsdto.getFactory())){ + wcsdto.setCode("1"); + wcsdto.setMessage("factory is not null"); + return wcsdto; + } + return wmsToWCSInterfaceService.blankStorageOrTransferCompleted(wcsdto); + } + /** + * 白坯库存状态更新 + * @param wcsdto + * @return + */ + @PostMapping("/blankInventoryStatusUpdate") + public WmsToWCSDTO blankInventoryStatusUpdate(@RequestBody WmsToWCSDTO wcsdto) { + if(StringUtils.isBlank(wcsdto.getFactory())){ + wcsdto.setCode("1"); + wcsdto.setMessage("factory is not null"); + return wcsdto; + } + return wmsToWCSInterfaceService.blankInventoryStatusUpdate(wcsdto); + } + /** + * 白坯出库需求下发 + * @param wcsdto + * @return + */ + @PostMapping("/issuanceOfBlankOutboundDemand") + public WmsToWCSDTO issuanceOfBlankOutboundDemand(@RequestBody WmsToWCSDTO wcsdto) { + if(StringUtils.isBlank(wcsdto.getFactory())){ + wcsdto.setCode("1"); + wcsdto.setMessage("factory is not null"); + return wcsdto; + } + return wmsToWCSInterfaceService.issuanceOfBlankOutboundDemand(wcsdto); + } + +// /** +// * 白坯指定托盘出库----WMS 指定托盘号出库, +// * @param wcsdto +// * @return +// */ +// @PostMapping("/blankDesignatedPalletOutbound") +// public WmsToWCSDTO blankDesignatedPalletOutbound(@RequestBody WmsToWCSDTO wcsdto) { +// if(StringUtils.isBlank(wcsdto.getFactory())){ +// wcsdto.setCode("1"); +// wcsdto.setMessage("factory is not null"); +// return wcsdto; +// } +// return wmsToWCSInterfaceService.blankDesignatedPalletOutbound(wcsdto); +// } + + /** + * 白坯出库完成 + * @param wcsdto + * @return + */ + @PostMapping("/blankOutboundCompleted") + public WmsToWCSDTO blankOutboundCompleted(@RequestBody WmsToWCSDTO wcsdto) { + if(StringUtils.isBlank(wcsdto.getFactory())){ + wcsdto.setCode("1"); + wcsdto.setMessage("factory is not null"); + return wcsdto; + } + return wmsToWCSInterfaceService.blankDesignatedPalletOutbound(wcsdto); + } + + + +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java new file mode 100644 index 00000000..f57dbd33 --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java @@ -0,0 +1,133 @@ +package com.op.wms.controller; + + +import com.op.common.core.utils.StringUtils; +import com.op.common.core.web.domain.AjaxResult; +import com.op.wms.domain.OdsProcureOrder; +import com.op.wms.domain.WmsRawOrderInSn; +import com.op.wms.domain.WmsToWCSDTO; +import com.op.wms.service.IOdsProcureOrderService; +import com.op.wms.service.IWmsToWCSmissionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +import static com.op.common.core.web.domain.AjaxResult.success; + +@RestController +@RequestMapping("/WmsToWCSmission") +public class WmsToWCSmissionController { + + @Autowired + private IWmsToWCSmissionService iWmsToWCSmissionService; + @Autowired + private IOdsProcureOrderService odsProcureOrderService; + + /** + * 包材请求入库--- + * @param wcsdto + * @return + */ + @PostMapping("/packingMaterialsRequestInbound") + public WmsToWCSDTO PackagingStorage(@RequestBody WmsToWCSDTO wcsdto) { + if(StringUtils.isBlank(wcsdto.getFactory())){ + wcsdto.setCode("1"); + wcsdto.setMessage("factory is not null"); + return wcsdto; + } + return iWmsToWCSmissionService.packagingStorage(wcsdto); + } + + + // + //packingMaterialsInboundCompleted + /** + * 包材入库或移库完成回传 + * @param wcsdto + * @return + */ + @PostMapping("/packingMaterialsInboundCompleted") + public WmsToWCSDTO blankStorageOrTransferCompleted(@RequestBody WmsToWCSDTO wcsdto) { + if(StringUtils.isBlank(wcsdto.getFactory())){ + wcsdto.setCode("1"); + wcsdto.setMessage("factory is not null"); + return wcsdto; + } + return iWmsToWCSmissionService.packingMaterialsInboundCompleted(wcsdto); + } +//packingMaterialsOutBoundCompleted + + /** + * 包材出库完成回传 + * @param wcsdto + * @return + */ +@PostMapping("/packingMaterialsOutBoundCompleted") +public WmsToWCSDTO packingMaterialsOutBoundCompleted(@RequestBody WmsToWCSDTO wcsdto) { + if(StringUtils.isBlank(wcsdto.getFactory())){ + wcsdto.setCode("1"); + wcsdto.setMessage("factory is not null"); + return wcsdto; + } + return iWmsToWCSmissionService.packingMaterialsOutBoundCompleted(wcsdto); +} + /** + *手持 --包材采购单采购收货查询 + */ + + @PostMapping("/PurchaseOrderPda") + public AjaxResult PurchaseOrderPda(@RequestBody OdsProcureOrder odsProcureOrder) { + List orderList =odsProcureOrderService.PurchaseOrderPda(odsProcureOrder); + return success(orderList); + } + + + /** + *手持 --包材采购单采购收货操作 + */ + + @PostMapping("/PurchaseOrderdeliPda") + public AjaxResult PurchaseOrderdeliPda(@RequestBody OdsProcureOrder odsProcureOrder) { + int tem =odsProcureOrderService.PurchaseOrderdeliPda(odsProcureOrder); + return success(tem); + } + + /** + *手持 --包材采购单采购查询明细 + */ + + @PostMapping("/PurchaseOrderdetailPda") + public AjaxResult PurchaseOrderdetailPda(@RequestBody WmsRawOrderInSn wmsRawOrderInSn) { + List wmsRawOrderInSns =odsProcureOrderService.PurchaseOrderdetailPda(wmsRawOrderInSn); + return success(wmsRawOrderInSns); + } + /** + *手持 -入库查询--入参:pono,whcode + * userDefined1;//备用1--收货1,入库2 + */ + + @PostMapping("/PurchaseOrderWarehousingPda") + public AjaxResult PurchaseOrderWarehousingPda(@RequestBody WmsRawOrderInSn wmsRawOrderInSn) { + List wmsRawOrderInSns =odsProcureOrderService.PurchaseOrderWarehousingPda(wmsRawOrderInSn); + //采购入库(PO) + return success(wmsRawOrderInSns); + } + + /** + * 入库操作 + * @param wmsRawOrderInSn + * @return + */ + @PostMapping("/PurchaseOrderRKPda") + public AjaxResult PurchaseOrderRKPda(@RequestBody WmsRawOrderInSn wmsRawOrderInSn) { + odsProcureOrderService.PurchaseOrderRKPda(wmsRawOrderInSn); + //采购入库(PO) + return success(); + } + + +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOrder.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOrder.java index 5a4ae44c..8f17f7c6 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOrder.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOrder.java @@ -3,6 +3,7 @@ package com.op.wms.domain; import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.op.common.core.annotation.Excel; @@ -14,15 +15,61 @@ import com.op.common.core.web.domain.BaseEntity; * @author Open Platform * @date 2023-07-06 */ +@JsonInclude(JsonInclude.Include.NON_NULL) public class OdsProcureOrder extends BaseEntity { private static final long serialVersionUID = 1L; + /** ID */ + private String ID; + @Excel(name = "工厂编码") + private String factoryCode; + + public String getFactoryCode() { + return factoryCode; + } + + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } /** 工厂编码 */ @Excel(name = "工厂编码") private String siteCode; + /** 仓库编码--收货仓库 */ + @Excel(name = "仓库编码") + private String whCode; - /** ID */ - private String ID; + public String getWhCode() { + return whCode; + } + /** 托盘号--托盘号 */ + @Excel(name = "托盘号") + private String sn; + + public String getSn() { + return sn; + } + + public void setSn(String sn) { + this.sn = sn; + } + + public void setWhCode(String whCode) { + this.whCode = whCode; + } + + + + /** 采购订单行项目 */ + @Excel(name = "采购订单行项目") + private String poLine; + + public String getPoLine() { + return poLine; + } + + public void setPoLine(String poLine) { + this.poLine = poLine; + } /** 采购单号 */ @Excel(name = "采购单号") @@ -31,6 +78,17 @@ public class OdsProcureOrder extends BaseEntity { /** 物料编码 */ @Excel(name = "物料编码") private String materialCode; + /** 批次号 */ + @Excel(name = "批次号") + private String incomeBatchNo; + + public String getIncomeBatchNo() { + return incomeBatchNo; + } + + public void setIncomeBatchNo(String incomeBatchNo) { + this.incomeBatchNo = incomeBatchNo; + } /** 物料描述 */ @Excel(name = "物料描述") diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/OrderLine.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/OrderLine.java new file mode 100644 index 00000000..08171187 --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/OrderLine.java @@ -0,0 +1,80 @@ +package com.op.wms.domain; + +import com.op.common.core.web.domain.BaseEntity; + +import java.math.BigDecimal; + +public class OrderLine extends BaseEntity { + private String orderNo;//订单号 + private String warehouseNo; //仓库编号 + private String orderLineNo;//订单行号 + private String sku;//物料编码 + private String batchNo; //批次号 + private BigDecimal qty;//数量 + private String qualityStatus;//质检状态,1合格,2不合格 + private String stationNo;//包装线 + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public String getWarehouseNo() { + return warehouseNo; + } + + public void setWarehouseNo(String warehouseNo) { + this.warehouseNo = warehouseNo; + } + + public String getOrderLineNo() { + return orderLineNo; + } + + public void setOrderLineNo(String orderLineNo) { + this.orderLineNo = orderLineNo; + } + + public String getSku() { + return sku; + } + + public void setSku(String sku) { + this.sku = sku; + } + + public String getBatchNo() { + return batchNo; + } + + public void setBatchNo(String batchNo) { + this.batchNo = batchNo; + } + + public BigDecimal getQty() { + return qty; + } + + public void setQty(BigDecimal qty) { + this.qty = qty; + } + + public String getQualityStatus() { + return qualityStatus; + } + + public void setQualityStatus(String qualityStatus) { + this.qualityStatus = qualityStatus; + } + + public String getStationNo() { + return stationNo; + } + + public void setStationNo(String stationNo) { + this.stationNo = stationNo; + } +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsRawOrderInSn.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsRawOrderInSn.java index e0b779ec..161da4c1 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsRawOrderInSn.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsRawOrderInSn.java @@ -3,6 +3,7 @@ package com.op.wms.domain; import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.op.common.core.annotation.Excel; @@ -10,20 +11,33 @@ import com.op.common.core.web.domain.BaseEntity; /** * 原材料收货明细对象 wms_raw_order_in_sn - * + * * @author Open Platform * @date 2023-08-30 */ +@JsonInclude(JsonInclude.Include.NON_NULL) public class WmsRawOrderInSn extends BaseEntity { private static final long serialVersionUID = 1L; /** 唯一序列号 */ - private Long rawOrderInSnId; + private String rawOrderInSnId; - /** 仓库编码 */ + /** 仓库编码--收货仓库 */ @Excel(name = "仓库编码") private String whCode; + /** 批次号 */ + @Excel(name = "批次号") + private String incomeBatchNo; + + public String getIncomeBatchNo() { + return incomeBatchNo; + } + + public void setIncomeBatchNo(String incomeBatchNo) { + this.incomeBatchNo = incomeBatchNo; + } + /** 库区编码 */ @Excel(name = "库区编码") private String waCode; @@ -52,7 +66,7 @@ public class WmsRawOrderInSn extends BaseEntity { @Excel(name = "物料描述") private String materialDesc; - /** 托盘号 */ + /** 托盘号--托盘号 */ @Excel(name = "托盘号") private String sn; @@ -62,7 +76,7 @@ public class WmsRawOrderInSn extends BaseEntity { /** 备用1 */ @Excel(name = "备用1") - private String userDefined1; + private String userDefined1;//备用1--收货1,入库2 /** 备用2 */ @Excel(name = "备用2") @@ -118,7 +132,7 @@ public class WmsRawOrderInSn extends BaseEntity { @Excel(name = "有效标记") private String activeFlag; - /** $column.columnComment */ + /** $column.columnComment 工厂*/ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String factoryCode; @@ -126,11 +140,11 @@ public class WmsRawOrderInSn extends BaseEntity { @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String sapFactoryCode; - public void setRawOrderInSnId(Long rawOrderInSnId) { + public void setRawOrderInSnId(String rawOrderInSnId) { this.rawOrderInSnId = rawOrderInSnId; } - public Long getRawOrderInSnId() { + public String getRawOrderInSnId() { return rawOrderInSnId; } public void setWhCode(String whCode) { diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsToWCSDTO.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsToWCSDTO.java new file mode 100644 index 00000000..a5f59948 --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsToWCSDTO.java @@ -0,0 +1,213 @@ +package com.op.wms.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.op.common.core.web.domain.BaseEntity; + +import java.util.Date; +import java.util.List; +@JsonInclude(JsonInclude.Include.NON_NULL) +public class WmsToWCSDTO extends BaseEntity { + + + private String reqCode;//请求ID + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date reqTime;//请求时间 + + private String planNo; + private ListorderLines; + private String code;//返回代码 + private String location; //库位编码 + private String message;//返回信息 + private String colQty;//列数 + private String factory; + private String qty;//数量(列数) + private String sku;//物料编码 + private String qualityStatus;//质检状态 1合格,2不合格 + private String loadNo; + private String batchNo; //批次号 + private String stationType;//收坯机台编号 + private String stationNo; + private String rfidNo;//rfid编号 + private String spec; + private String productionState; + private String warehouseNo;//仓库编号 + private String orderNo;//订单号 + private String workorderCode; + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public String getWorkorderCode() { + return workorderCode; + } + + public List getOrderLines() { + return orderLines; + } + + public void setOrderLines(List orderLines) { + this.orderLines = orderLines; + } + + public void setWorkorderCode(String workorderCode) { + this.workorderCode = workorderCode; + } + + public String getWarehouseNo() { + return warehouseNo; + } + + public void setWarehouseNo(String warehouseNo) { + this.warehouseNo = warehouseNo; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getReqCode() { + return reqCode; + } + + public void setReqCode(String reqCode) { + this.reqCode = reqCode; + } + + public Date getReqTime() { + return reqTime; + } + + public void setReqTime(Date reqTime) { + this.reqTime = reqTime; + } + + public String getPlanNo() { + return planNo; + } + + public void setPlanNo(String planNo) { + this.planNo = planNo; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getColQty() { + return colQty; + } + + public void setColQty(String colQty) { + this.colQty = colQty; + } + + public String getFactory() { + return factory; + } + + public void setFactory(String factory) { + this.factory = factory; + } + + public String getQty() { + return qty; + } + + public void setQty(String qty) { + this.qty = qty; + } + + public String getSku() { + return sku; + } + + public void setSku(String sku) { + this.sku = sku; + } + + public String getQualityStatus() { + return qualityStatus; + } + + public void setQualityStatus(String qualityStatus) { + this.qualityStatus = qualityStatus; + } + + public String getLoadNo() { + return loadNo; + } + + public void setLoadNo(String loadNo) { + this.loadNo = loadNo; + } + + public String getBatchNo() { + return batchNo; + } + + public void setBatchNo(String batchNo) { + this.batchNo = batchNo; + } + + public String getStationType() { + return stationType; + } + + public void setStationType(String stationType) { + this.stationType = stationType; + } + + public String getStationNo() { + return stationNo; + } + + public void setStationNo(String stationNo) { + this.stationNo = stationNo; + } + + public String getRfidNo() { + return rfidNo; + } + + public void setRfidNo(String rfidNo) { + this.rfidNo = rfidNo; + } + + public String getSpec() { + return spec; + } + + public void setSpec(String spec) { + this.spec = spec; + } + + public String getProductionState() { + return productionState; + } + + public void setProductionState(String productionState) { + this.productionState = productionState; + } +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOrderMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOrderMapper.java index 2b045f17..697f57df 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOrderMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOrderMapper.java @@ -6,14 +6,14 @@ import com.op.wms.domain.OdsProcureOrder; /** * 包材采购单Mapper接口 - * + * * @author Open Platform * @date 2023-07-06 */ public interface OdsProcureOrderMapper { /** * 查询包材采购单 - * + * * @param ID 包材采购单主键 * @return 包材采购单 */ @@ -21,7 +21,7 @@ public interface OdsProcureOrderMapper { /** * 查询包材采购单列表 - * + * * @param odsProcureOrder 包材采购单 * @return 包材采购单集合 */ @@ -29,7 +29,7 @@ public interface OdsProcureOrderMapper { /** * 新增包材采购单 - * + * * @param odsProcureOrder 包材采购单 * @return 结果 */ @@ -37,7 +37,7 @@ public interface OdsProcureOrderMapper { /** * 修改包材采购单 - * + * * @param odsProcureOrder 包材采购单 * @return 结果 */ @@ -45,7 +45,7 @@ public interface OdsProcureOrderMapper { /** * 删除包材采购单 - * + * * @param ID 包材采购单主键 * @return 结果 */ @@ -53,9 +53,11 @@ public interface OdsProcureOrderMapper { /** * 批量删除包材采购单 - * + * * @param IDs 需要删除的数据主键集合 * @return 结果 */ public int deleteOdsProcureOrderByIDs(String[] IDs); + + Integer updateRealityNuById(OdsProcureOrder odsProcureOrder); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java index 954d4b69..461f2c50 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java @@ -58,4 +58,6 @@ public interface WmsOdsEmStorageNewsMapper { * @return 结果 */ public int deleteWmsOdsEmStorageNewsByStorageIds(String[] storageIds); + + void updateAdd(WmsOdsEmStorageNews wmsOdsEmStorageNews); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsMateStorageNewsMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsMateStorageNewsMapper.java index 3aa63134..8b83fd85 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsMateStorageNewsMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsMateStorageNewsMapper.java @@ -2,18 +2,19 @@ package com.op.wms.mapper; import java.util.List; +import com.op.wms.domain.WmsOdsEmStorageNews; import com.op.wms.domain.WmsOdsMateStorageNews; /** * 包材库存主表Mapper接口 - * + * * @author Open Platform * @date 2023-08-30 */ public interface WmsOdsMateStorageNewsMapper { /** * 查询包材库存主表 - * + * * @param storageId 包材库存主表主键 * @return 包材库存主表 */ @@ -21,7 +22,7 @@ public interface WmsOdsMateStorageNewsMapper { /** * 查询包材库存主表列表 - * + * * @param wmsOdsMateStorageNews 包材库存主表 * @return 包材库存主表集合 */ @@ -29,7 +30,7 @@ public interface WmsOdsMateStorageNewsMapper { /** * 新增包材库存主表 - * + * * @param wmsOdsMateStorageNews 包材库存主表 * @return 结果 */ @@ -37,7 +38,7 @@ public interface WmsOdsMateStorageNewsMapper { /** * 修改包材库存主表 - * + * * @param wmsOdsMateStorageNews 包材库存主表 * @return 结果 */ @@ -45,7 +46,7 @@ public interface WmsOdsMateStorageNewsMapper { /** * 删除包材库存主表 - * + * * @param storageId 包材库存主表主键 * @return 结果 */ @@ -53,9 +54,11 @@ public interface WmsOdsMateStorageNewsMapper { /** * 批量删除包材库存主表 - * + * * @param storageIds 需要删除的数据主键集合 * @return 结果 */ public int deleteWmsOdsMateStorageNewsByStorageIds(String[] storageIds); + + WmsOdsMateStorageNews selectByWhCodeAndMate(WmsOdsEmStorageNews wmsOdsEmStorageNews); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsMateStorageNewsSnMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsMateStorageNewsSnMapper.java index c029f89c..0d286a22 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsMateStorageNewsSnMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsMateStorageNewsSnMapper.java @@ -2,18 +2,19 @@ package com.op.wms.mapper; import java.util.List; +import com.op.wms.domain.WmsOdsEmStorageNews; import com.op.wms.domain.WmsOdsMateStorageNewsSn; /** - * 包材库存明细表Mapper接口 - * + * 包材库存明细表Mapper接口是 + * * @author Open Platform * @date 2023-08-30 */ public interface WmsOdsMateStorageNewsSnMapper { /** * 查询包材库存明细表 - * + * * @param mateOrderInSnId 包材库存明细表主键 * @return 包材库存明细表 */ @@ -21,7 +22,7 @@ public interface WmsOdsMateStorageNewsSnMapper { /** * 查询包材库存明细表列表 - * + * * @param wmsOdsMateStorageNewsSn 包材库存明细表 * @return 包材库存明细表集合 */ @@ -29,7 +30,7 @@ public interface WmsOdsMateStorageNewsSnMapper { /** * 新增包材库存明细表 - * + * * @param wmsOdsMateStorageNewsSn 包材库存明细表 * @return 结果 */ @@ -37,7 +38,7 @@ public interface WmsOdsMateStorageNewsSnMapper { /** * 修改包材库存明细表 - * + * * @param wmsOdsMateStorageNewsSn 包材库存明细表 * @return 结果 */ @@ -45,7 +46,7 @@ public interface WmsOdsMateStorageNewsSnMapper { /** * 删除包材库存明细表 - * + * * @param mateOrderInSnId 包材库存明细表主键 * @return 结果 */ @@ -53,9 +54,13 @@ public interface WmsOdsMateStorageNewsSnMapper { /** * 批量删除包材库存明细表 - * + * * @param mateOrderInSnIds 需要删除的数据主键集合 * @return 结果 */ public int deleteWmsOdsMateStorageNewsSnByMateOrderInSnIds(Long[] mateOrderInSnIds); + + void updateAdd(WmsOdsEmStorageNews wmsOdsEmStorageNews); + + } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsWhiteEmbryoInMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsWhiteEmbryoInMapper.java index 0c6b35aa..be84ffc2 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsWhiteEmbryoInMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsWhiteEmbryoInMapper.java @@ -6,14 +6,14 @@ import com.op.wms.domain.WmsOdsWhiteEmbryoIn; /** * 白胚入库单Mapper接口 - * + * * @author Open Platform * @date 2023-07-20 */ public interface WmsOdsWhiteEmbryoInMapper { /** * 查询白胚入库单 - * + * * @param ID 白胚入库单主键 * @return 白胚入库单 */ @@ -21,7 +21,7 @@ public interface WmsOdsWhiteEmbryoInMapper { /** * 查询白胚入库单列表 - * + * * @param wmsOdsWhiteEmbryoIn 白胚入库单 * @return 白胚入库单集合 */ @@ -29,7 +29,7 @@ public interface WmsOdsWhiteEmbryoInMapper { /** * 新增白胚入库单 - * + * * @param wmsOdsWhiteEmbryoIn 白胚入库单 * @return 结果 */ @@ -37,7 +37,7 @@ public interface WmsOdsWhiteEmbryoInMapper { /** * 修改白胚入库单 - * + * * @param wmsOdsWhiteEmbryoIn 白胚入库单 * @return 结果 */ @@ -45,7 +45,7 @@ public interface WmsOdsWhiteEmbryoInMapper { /** * 删除白胚入库单 - * + * * @param ID 白胚入库单主键 * @return 结果 */ @@ -53,9 +53,13 @@ public interface WmsOdsWhiteEmbryoInMapper { /** * 批量删除白胚入库单 - * + * * @param IDs 需要删除的数据主键集合 * @return 结果 */ public int deleteWmsOdsWhiteEmbryoInByIDs(String[] IDs); + + WmsOdsWhiteEmbryoIn selectWmsOdsWhiteEmbryoInByWorkorderCode(String workorderCode); + + void updateWmsOdsWhiteEmbryoInByOrderCode(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRawOrderInMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRawOrderInMapper.java index 6db7da4a..4ab94c6d 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRawOrderInMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRawOrderInMapper.java @@ -3,17 +3,18 @@ package com.op.wms.mapper; import java.util.List; import com.op.wms.domain.WmsRawOrderIn; +import com.op.wms.domain.WmsToWCSDTO; /** * 包材到货单Mapper接口 - * + * * @author Open Platform * @date 2023-08-30 */ public interface WmsRawOrderInMapper { /** * 查询包材到货单 - * + * * @param rawOrderInId 包材到货单主键 * @return 包材到货单 */ @@ -21,7 +22,7 @@ public interface WmsRawOrderInMapper { /** * 查询包材到货单列表 - * + * * @param wmsRawOrderIn 包材到货单 * @return 包材到货单集合 */ @@ -29,7 +30,7 @@ public interface WmsRawOrderInMapper { /** * 新增包材到货单 - * + * * @param wmsRawOrderIn 包材到货单 * @return 结果 */ @@ -37,7 +38,7 @@ public interface WmsRawOrderInMapper { /** * 修改包材到货单 - * + * * @param wmsRawOrderIn 包材到货单 * @return 结果 */ @@ -45,7 +46,7 @@ public interface WmsRawOrderInMapper { /** * 删除包材到货单 - * + * * @param rawOrderInId 包材到货单主键 * @return 结果 */ @@ -53,9 +54,11 @@ public interface WmsRawOrderInMapper { /** * 批量删除包材到货单 - * + * * @param rawOrderInIds 需要删除的数据主键集合 * @return 结果 */ public int deleteWmsRawOrderInByRawOrderInIds(String[] rawOrderInIds); + + WmsToWCSDTO packagingStorage(WmsToWCSDTO wcsdto); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRawOrderInSnMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRawOrderInSnMapper.java index 0c845218..ab778b3e 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRawOrderInSnMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRawOrderInSnMapper.java @@ -3,17 +3,18 @@ package com.op.wms.mapper; import java.util.List; import com.op.wms.domain.WmsRawOrderInSn; +import com.op.wms.domain.WmsToWCSDTO; /** * 原材料收货明细Mapper接口 - * + * * @author Open Platform * @date 2023-08-30 */ public interface WmsRawOrderInSnMapper { /** * 查询原材料收货明细 - * + * * @param rawOrderInSnId 原材料收货明细主键 * @return 原材料收货明细 */ @@ -21,7 +22,7 @@ public interface WmsRawOrderInSnMapper { /** * 查询原材料收货明细列表 - * + * * @param wmsRawOrderInSn 原材料收货明细 * @return 原材料收货明细集合 */ @@ -29,7 +30,7 @@ public interface WmsRawOrderInSnMapper { /** * 新增原材料收货明细 - * + * * @param wmsRawOrderInSn 原材料收货明细 * @return 结果 */ @@ -37,7 +38,7 @@ public interface WmsRawOrderInSnMapper { /** * 修改原材料收货明细 - * + * * @param wmsRawOrderInSn 原材料收货明细 * @return 结果 */ @@ -45,7 +46,7 @@ public interface WmsRawOrderInSnMapper { /** * 删除原材料收货明细 - * + * * @param rawOrderInSnId 原材料收货明细主键 * @return 结果 */ @@ -53,9 +54,13 @@ public interface WmsRawOrderInSnMapper { /** * 批量删除原材料收货明细 - * + * * @param rawOrderInSnIds 需要删除的数据主键集合 * @return 结果 */ public int deleteWmsRawOrderInSnByRawOrderInSnIds(Long[] rawOrderInSnIds); + + WmsRawOrderInSn selectwmsRfidNo(WmsToWCSDTO wmsToWCSDTO); + + void updateU1Byid(WmsRawOrderInSn wmsRawOrderInSn); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsToWCSInterfaceMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsToWCSInterfaceMapper.java new file mode 100644 index 00000000..5956bae8 --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsToWCSInterfaceMapper.java @@ -0,0 +1,7 @@ +package com.op.wms.mapper; + +import com.op.wms.domain.WmsToWCSDTO; + +public interface WmsToWCSInterfaceMapper { + WmsToWCSDTO selectWmsToWCSDTO(WmsToWCSDTO wcsdto); +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java index ba034e1d..cf621972 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java @@ -2,17 +2,18 @@ package com.op.wms.service; import java.util.List; import com.op.wms.domain.OdsProcureOrder; +import com.op.wms.domain.WmsRawOrderInSn; /** * 包材采购单Service接口 - * + * * @author Open Platform * @date 2023-07-06 */ public interface IOdsProcureOrderService { /** * 查询包材采购单 - * + * * @param ID 包材采购单主键 * @return 包材采购单 */ @@ -20,7 +21,7 @@ public interface IOdsProcureOrderService { /** * 查询包材采购单列表 - * + * * @param odsProcureOrder 包材采购单 * @return 包材采购单集合 */ @@ -28,7 +29,7 @@ public interface IOdsProcureOrderService { /** * 新增包材采购单 - * + * * @param odsProcureOrder 包材采购单 * @return 结果 */ @@ -36,7 +37,7 @@ public interface IOdsProcureOrderService { /** * 修改包材采购单 - * + * * @param odsProcureOrder 包材采购单 * @return 结果 */ @@ -44,7 +45,7 @@ public interface IOdsProcureOrderService { /** * 批量删除包材采购单 - * + * * @param IDs 需要删除的包材采购单主键集合 * @return 结果 */ @@ -52,9 +53,19 @@ public interface IOdsProcureOrderService { /** * 删除包材采购单信息 - * + * * @param ID 包材采购单主键 * @return 结果 */ public int deleteOdsProcureOrderByID(String ID); + + List PurchaseOrderPda(OdsProcureOrder odsProcureOrder); + + int PurchaseOrderdeliPda(OdsProcureOrder odsProcureOrder); + + List PurchaseOrderdetailPda(WmsRawOrderInSn wmsRawOrderInSn); + + List PurchaseOrderWarehousingPda(WmsRawOrderInSn wmsRawOrderInSn); + + void PurchaseOrderRKPda(WmsRawOrderInSn wmsRawOrderInSn); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsToWCSInterfaceService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsToWCSInterfaceService.java new file mode 100644 index 00000000..53250efe --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsToWCSInterfaceService.java @@ -0,0 +1,15 @@ +package com.op.wms.service; + +import com.op.wms.domain.WmsToWCSDTO; + +public interface IWmsToWCSInterfaceService { + WmsToWCSDTO requestMaterialLoadNo(WmsToWCSDTO wcsdto); + + WmsToWCSDTO blankStorageOrTransferCompleted(WmsToWCSDTO wcsdto); + + WmsToWCSDTO blankInventoryStatusUpdate(WmsToWCSDTO wcsdto); + + WmsToWCSDTO issuanceOfBlankOutboundDemand(WmsToWCSDTO wcsdto); + + WmsToWCSDTO blankDesignatedPalletOutbound(WmsToWCSDTO wcsdto); +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsToWCSmissionService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsToWCSmissionService.java new file mode 100644 index 00000000..9d247385 --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsToWCSmissionService.java @@ -0,0 +1,11 @@ +package com.op.wms.service; + +import com.op.wms.domain.WmsToWCSDTO; + +public interface IWmsToWCSmissionService { + WmsToWCSDTO packagingStorage(WmsToWCSDTO wcsdto); + + WmsToWCSDTO packingMaterialsInboundCompleted(WmsToWCSDTO wcsdto); + + WmsToWCSDTO packingMaterialsOutBoundCompleted(WmsToWCSDTO wcsdto); +} 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 45a513e7..10f6d23b 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 @@ -1,12 +1,19 @@ package com.op.wms.service.impl; +import java.math.BigDecimal; +import java.util.Date; import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; +import com.op.common.core.utils.uuid.IdUtils; +import com.op.wms.domain.*; +import com.op.wms.mapper.WmsOdsMateStorageNewsMapper; +import com.op.wms.mapper.WmsOdsMateStorageNewsSnMapper; +import com.op.wms.mapper.WmsRawOrderInSnMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.op.wms.mapper.OdsProcureOrderMapper; -import com.op.wms.domain.OdsProcureOrder; import com.op.wms.service.IOdsProcureOrderService; /** @@ -19,6 +26,12 @@ import com.op.wms.service.IOdsProcureOrderService; public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { @Autowired private OdsProcureOrderMapper odsProcureOrderMapper; + @Autowired + private WmsRawOrderInSnMapper wmsRawOrderInSnMapper; + @Autowired + private WmsOdsMateStorageNewsSnMapper wmsOdsMateStorageNewsSnMapper; + @Autowired + private WmsOdsMateStorageNewsMapper wmsOdsMateStorageNewsMapper; /** * 查询包材采购单 @@ -91,4 +104,118 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { public int deleteOdsProcureOrderByID(String ID) { return odsProcureOrderMapper.deleteOdsProcureOrderByID(ID); } + + @Override +// @DS("#header.poolName") + public List PurchaseOrderPda(OdsProcureOrder odsProcureOrder) { + DynamicDataSourceContextHolder.push("ds_" + odsProcureOrder.getFactoryCode()); + return odsProcureOrderMapper.selectOdsProcureOrderList(odsProcureOrder); + } + + @Override + //@DS("#header.poolName") + public int PurchaseOrderdeliPda(OdsProcureOrder odsProcureOrder) { + //收货记录--rawOrderInSnId。修改收货数量 + DynamicDataSourceContextHolder.push("ds_" + odsProcureOrder.getFactoryCode()); + + OdsProcureOrder order= odsProcureOrderMapper.selectOdsProcureOrderByID(odsProcureOrder.getID()); + //wms_raw_order_in_sn + WmsRawOrderInSn wmsRawOrderInSn=new WmsRawOrderInSn(); + wmsRawOrderInSn.setRawOrderInSnId(IdUtils.fastSimpleUUID()); + wmsRawOrderInSn.setUserDefined1("1");//出入库 + wmsRawOrderInSn.setUserDefined2(odsProcureOrder.getIncomeBatchNo());//批次 + wmsRawOrderInSn.setWhCode(odsProcureOrder.getWhCode());//厂库编号 + wmsRawOrderInSn.setPoNo(order.getProcureCode());//采购单号 +// wmsRawOrderInSn.setPoLine(odsProcureOrder.getPoLine());//行项目 + wmsRawOrderInSn.setMaterialCode(odsProcureOrder.getMaterialCode()); + wmsRawOrderInSn.setMaterialDesc(odsProcureOrder.getMaterialDesc()); + wmsRawOrderInSn.setAmount(odsProcureOrder.getPlanNumber()); + wmsRawOrderInSn.setCreateBy(odsProcureOrder.getCreateBy()); + wmsRawOrderInSn.setGmtCreate(new Date()); + wmsRawOrderInSn.setActiveFlag("1"); + wmsRawOrderInSn.setUserDefined4(order.getUnit());//单位 + wmsRawOrderInSn.setSn(odsProcureOrder.getSn());//托盘号 + wmsRawOrderInSn.setFactoryCode(odsProcureOrder.getSiteCode()); + wmsRawOrderInSn.setUserDefined3(order.getID()); + wmsRawOrderInSnMapper.insertWmsRawOrderInSn(wmsRawOrderInSn); + //插入收货记录 + //如果收货完成了的话,就插入信息收货完成 + odsProcureOrder.setOrderStatus("1"); + BigDecimal result =order.getRealityNumber().add(odsProcureOrder.getPlanNumber()); + if (result.equals(order.getPlanNumber())){ + odsProcureOrder.setOrderStatus("2"); + } + Integer tem= odsProcureOrderMapper.updateRealityNuById(odsProcureOrder); + return tem; + } + + @Override + //@DS("#header.poolName") + public List PurchaseOrderdetailPda(WmsRawOrderInSn wmsRawOrderInSn) { + DynamicDataSourceContextHolder.push("ds_" + wmsRawOrderInSn.getFactoryCode()); + wmsRawOrderInSn.setActiveFlag("1"); + //u3备注 + return wmsRawOrderInSnMapper.selectWmsRawOrderInSnList(wmsRawOrderInSn); + } + + @Override + public List PurchaseOrderWarehousingPda(WmsRawOrderInSn wmsRawOrderInSn) { + DynamicDataSourceContextHolder.push("ds_" + wmsRawOrderInSn.getFactoryCode()); + wmsRawOrderInSn.setActiveFlag("1"); + //u3备注 + return wmsRawOrderInSnMapper.selectWmsRawOrderInSnList(wmsRawOrderInSn); + } + + @Override + public void PurchaseOrderRKPda(WmsRawOrderInSn wmsRawOrderInSn) { + //入库//修改备用1为2 + DynamicDataSourceContextHolder.push("ds_" + wmsRawOrderInSn.getFactoryCode()); + //判断如果收过就不能收了 +// if("2".equals(wmsRawOrderInSn.getUserDefined1())){//已经入库--前端判断吧 +// +// } + WmsOdsMateStorageNewsSn wmsOdsMateStorageNewsSn=new WmsOdsMateStorageNewsSn(); + wmsOdsMateStorageNewsSn.setWhCode(wmsRawOrderInSn.getWhCode());//仓库编码 + wmsOdsMateStorageNewsSn.setWlCode(wmsRawOrderInSn.getWlCode());//库位编码 + wmsOdsMateStorageNewsSn.setMaterialCode(wmsRawOrderInSn.getMaterialCode()); + wmsOdsMateStorageNewsSn.setMaterialDesc(wmsRawOrderInSn.getMaterialDesc()); + wmsOdsMateStorageNewsSn.setSn(wmsRawOrderInSn.getSn()); + wmsOdsMateStorageNewsSn.setAmount(wmsRawOrderInSn.getAmount()); + wmsOdsMateStorageNewsSn.setCreateBy(wmsRawOrderInSn.getCreateBy()); + wmsOdsMateStorageNewsSn.setGmtCreate(new Date()); + wmsOdsMateStorageNewsSn.setFactoryCode(wmsRawOrderInSn.getFactoryCode()); + wmsOdsMateStorageNewsSn.setSapFactoryCode(wmsRawOrderInSn.getFactoryCode()); + wmsOdsMateStorageNewsSnMapper.insertWmsOdsMateStorageNewsSn(wmsOdsMateStorageNewsSn); + //修改库存 + //2,修改库存---/加库存数量-/-冻结数量 + WmsOdsEmStorageNews wmsOdsEmStorageNews=new WmsOdsEmStorageNews(); + wmsOdsEmStorageNews.setWhCode(wmsRawOrderInSn.getWhCode());//仓库编码 + wmsOdsEmStorageNews.setWlCode(wmsRawOrderInSn.getWlCode());//库位编码 + wmsOdsEmStorageNews.setMaterialCode(wmsRawOrderInSn.getMaterialCode()); + wmsOdsEmStorageNews.setAmount(wmsRawOrderInSn.getAmount()); + //添加库存--这个要有个判断有没有这个库存如果没有的话,就插入 + WmsOdsMateStorageNews wmsOdsMateStorageNews= wmsOdsMateStorageNewsMapper.selectByWhCodeAndMate(wmsOdsEmStorageNews); + if (wmsOdsMateStorageNews==null){ + WmsOdsMateStorageNews wmsOdsMateStorageNews1=new WmsOdsMateStorageNews(); + wmsOdsMateStorageNews1.setStorageId(IdUtils.fastSimpleUUID()); + wmsOdsMateStorageNews1.setWhCode(wmsRawOrderInSn.getWhCode()); + wmsOdsMateStorageNews1.setWlCode(wmsRawOrderInSn.getWlCode()); + wmsOdsMateStorageNews1.setAmount(wmsRawOrderInSn.getAmount()); + wmsOdsMateStorageNews1.setStorageAmount(wmsRawOrderInSn.getAmount()); + wmsOdsMateStorageNews1.setMaterialCode(wmsRawOrderInSn.getMaterialCode()); + wmsOdsMateStorageNews1.setMaterialDesc(wmsRawOrderInSn.getMaterialDesc()); + wmsOdsMateStorageNews1.setStorageType("BC"); + wmsOdsMateStorageNews1.setCreateBy(wmsRawOrderInSn.getCreateBy()); + wmsOdsMateStorageNews1.setGmtCreate(new Date()); + wmsOdsMateStorageNews1.setActiveFlag("1"); + wmsOdsMateStorageNews1.setFactoryCode(wmsRawOrderInSn.getFactoryCode()); + wmsOdsMateStorageNews1.setSapFactoryCode(wmsRawOrderInSn.getSapFactoryCode()); + wmsOdsMateStorageNews1.setUserDefined1(wmsRawOrderInSn.getUserDefined4());//单位 + wmsOdsMateStorageNewsMapper.insertWmsOdsMateStorageNews(wmsOdsMateStorageNews1); + }else { + wmsOdsMateStorageNewsSnMapper.updateAdd(wmsOdsEmStorageNews); + } + wmsRawOrderInSnMapper.updateU1Byid(wmsRawOrderInSn); + //修改库存--加,并且为冻结的,sap过账后再解 + } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsToWCSInterfaceServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsToWCSInterfaceServiceImpl.java new file mode 100644 index 00000000..e038dd2f --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsToWCSInterfaceServiceImpl.java @@ -0,0 +1,146 @@ +package com.op.wms.service.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.core.utils.uuid.IdUtils; +import com.op.wms.domain.*; +import com.op.wms.mapper.*; +import com.op.wms.service.IWmsToWCSInterfaceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +@Service +public class WmsToWCSInterfaceServiceImpl implements IWmsToWCSInterfaceService { + @Autowired + private WmsToWCSInterfaceMapper wmsToWCSInterfaceMapper; + @Autowired + private WmsOdsWhiteEmbryoInMapper wmsOdsWhiteEmbryoInMapper; + @Autowired + private WmsOdsEmStorageNewsSnMapper wmsOdsEmStorageNewsSnMapper; + @Autowired + private WmsOdsEmStorageNewsMapper wmsOdsEmStorageNewsMapper; + @Autowired + private OdsWhiteEmbryoMapper odsWhiteEmbryoMapper; + + @Override + @DS("#header.poolName") + public WmsToWCSDTO requestMaterialLoadNo(WmsToWCSDTO wcsdto) { + WmsToWCSDTO wmsToWCSDTO= wmsToWCSInterfaceMapper.selectWmsToWCSDTO(wcsdto); + // wmsToWCSDTO.set// + wmsToWCSDTO.setCode("0"); + wmsToWCSDTO.setReqCode(wcsdto.getReqCode()); + wmsToWCSDTO.setMessage("OK"); + return wmsToWCSDTO; + } + + /** + * 白坯入库或移库完成 + * @param wcsdto + * @return + */ + @Transactional + @Override + @DS("#header.poolName") + public WmsToWCSDTO blankStorageOrTransferCompleted(WmsToWCSDTO wcsdto) { + WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn1=new WmsOdsWhiteEmbryoIn(); + //rfidNo-托盘 + WmsToWCSDTO wmsToWCSDTO= wmsToWCSInterfaceMapper.selectWmsToWCSDTO(wcsdto); + //AGV 将白坯放到库内-- + + String workorderCode= wmsToWCSDTO.getWorkorderCode();//单号 + wmsOdsWhiteEmbryoIn1.setOrderCode(workorderCode); + WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn= wmsOdsWhiteEmbryoInMapper.selectWmsOdsWhiteEmbryoInByWorkorderCode(workorderCode); + String qty = wmsToWCSDTO.getQty();//操作数量 + BigDecimal planNumber = wmsOdsWhiteEmbryoIn.getPlanNumber();//计划数量 + BigDecimal realityNumber = wmsOdsWhiteEmbryoIn.getRealityNumber();//已入数量 + BigDecimal sum = new BigDecimal(qty).add(realityNumber); // 将qty转换为BigDecimal类型,并与realityNumber相加 + boolean ten = sum.compareTo(planNumber) >= 0; // 判断sum是否大于等于planNumber + if (ten) { + wmsOdsWhiteEmbryoIn1.setOrderStatus("1"); + + } else { + //小于 + wmsOdsWhiteEmbryoIn1.setOrderStatus("2"); + + } + wmsOdsWhiteEmbryoIn1.setRealityNumber(sum);///操作数量+已入数量 + //1,修改订单 + wmsOdsWhiteEmbryoInMapper.updateWmsOdsWhiteEmbryoInByOrderCode(wmsOdsWhiteEmbryoIn1); + //2,修改库存---减冻结数量//加库存数量 + WmsOdsEmStorageNews wmsOdsEmStorageNews=new WmsOdsEmStorageNews(); + wmsOdsEmStorageNews.setWhCode(wcsdto.getWarehouseNo());//仓库编码 + wmsOdsEmStorageNews.setWlCode(wcsdto.getLocation());//库位编码 + wmsOdsEmStorageNews.setMaterialCode(wmsOdsWhiteEmbryoIn.getMaterialCode()); + wmsOdsEmStorageNews.setAmount(new BigDecimal(wmsToWCSDTO.getQty())); + //解冻 + wmsOdsEmStorageNewsMapper.updateAdd(wmsOdsEmStorageNews); + //3,添加记录 + WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn=new WmsOdsEmStorageNewsSn(); + wmsOdsEmStorageNewsSn.setWhCode(wcsdto.getWarehouseNo());//仓库编码 + wmsOdsEmStorageNewsSn.setWaCode(wcsdto.getLocation());//库区编码 + wmsOdsEmStorageNewsSn.setWlCode(wcsdto.getLocation());//库位编码 + wmsOdsEmStorageNewsSn.setMaterialCode(wmsOdsWhiteEmbryoIn.getMaterialCode()); + wmsOdsEmStorageNewsSn.setMaterialDesc(wmsOdsWhiteEmbryoIn.getMaterialDesc()); + wmsOdsEmStorageNewsSn.setSn(wcsdto.getRfidNo());//托盘号 + wmsOdsEmStorageNewsSn.setAmount(new BigDecimal(wmsToWCSDTO.getQty())); + wmsOdsEmStorageNewsSn.setCreateTime(new Date()); + wmsOdsEmStorageNewsSnMapper.insertWmsOdsEmStorageNewsSn(wmsOdsEmStorageNewsSn); + // + wmsToWCSDTO.setCode("0"); + wmsToWCSDTO.setReqCode(wcsdto.getReqCode()); + wmsToWCSDTO.setMessage("OK"); + return wmsToWCSDTO; + } + + @Override + public WmsToWCSDTO blankInventoryStatusUpdate(WmsToWCSDTO wcsdto) { + + + + + return null; + } + + @Override + public WmsToWCSDTO issuanceOfBlankOutboundDemand(WmsToWCSDTO wcsdto) { + //默认合格即可-- 白坯出库需求下发 + WmsToWCSDTO wmsToWCSDTO=new WmsToWCSDTO(); + List orderLineList= wcsdto.getOrderLines(); + for (OrderLine orderLine: + orderLineList) { + //少传字段 + orderLine.setOrderNo(wcsdto.getOrderNo()); + orderLine.setWarehouseNo(wcsdto.getWarehouseNo()); + OdsWhiteEmbryo odsWhiteEmbryo=new OdsWhiteEmbryo(); + odsWhiteEmbryo.setID(IdUtils.fastSimpleUUID()); + odsWhiteEmbryo.setSiteCode(wcsdto.getFactory());//工厂编码 + odsWhiteEmbryo.setOrderCode(orderLine.getOrderNo());//出库单号 + odsWhiteEmbryo.setMaterialCode(orderLine.getSku());//型号编码 + odsWhiteEmbryo.setPlanDate(wcsdto.getReqTime());//计划日期 + odsWhiteEmbryo.setPlanNumber(orderLine.getQty());//计划数量 + odsWhiteEmbryo.setOrderStatus("0"); + odsWhiteEmbryo.setUserDefined1(orderLine.getBatchNo()); + odsWhiteEmbryo.setProductionLineCode(orderLine.getStationNo());//产线编号 + //Loc_Code + //odsWhiteEmbryo.setUnit(); + odsWhiteEmbryoMapper.insertOdsWhiteEmbryo(odsWhiteEmbryo); + } + wmsToWCSDTO.setCode("0"); + wmsToWCSDTO.setReqCode(wcsdto.getReqCode()); + wmsToWCSDTO.setMessage("OK"); + return wmsToWCSDTO; + } + + @Override + public WmsToWCSDTO blankDesignatedPalletOutbound(WmsToWCSDTO wcsdto) { + //先确定数量---托盘确定数量,在库存明细中取,然后出库 + //orderNo--订单号--修改出库订单,修改库存数量,修改库存明细,--记录出库明细,--- + + + return null; + } +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsToWCSmissionServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsToWCSmissionServiceImpl.java new file mode 100644 index 00000000..ac7d94c1 --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsToWCSmissionServiceImpl.java @@ -0,0 +1,104 @@ +package com.op.wms.service.impl; + + +import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; +import com.op.wms.domain.WmsOdsEmStorageNews; +import com.op.wms.domain.WmsOdsMateStorageNewsSn; +import com.op.wms.domain.WmsRawOrderInSn; +import com.op.wms.domain.WmsToWCSDTO; +import com.op.wms.mapper.WmsOdsEmStorageNewsMapper; +import com.op.wms.mapper.WmsOdsMateStorageNewsSnMapper; +import com.op.wms.mapper.WmsRawOrderInMapper; +import com.op.wms.mapper.WmsRawOrderInSnMapper; +import com.op.wms.service.IWmsToWCSmissionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.Date; + +@Service +public class WmsToWCSmissionServiceImpl implements IWmsToWCSmissionService { + @Autowired + private WmsRawOrderInMapper wmsRawOrderInMapper; + @Autowired + private WmsRawOrderInSnMapper wmsRawOrderInSnMapper; + @Autowired + private WmsOdsMateStorageNewsSnMapper wmsOdsMateStorageNewsSnMapper; + @Autowired + private WmsOdsEmStorageNewsMapper wmsOdsEmStorageNewsMapper; + + @Override + public WmsToWCSDTO packagingStorage(WmsToWCSDTO wcsdto) { + DynamicDataSourceContextHolder.push("ds_" + wcsdto.getFactory()); + WmsToWCSDTO wmsToWCSDTO= wmsRawOrderInMapper.packagingStorage(wcsdto); + // wmsToWCSDTO.set// + if (wmsToWCSDTO==null){ + WmsToWCSDTO wms=new WmsToWCSDTO(); + wms.setCode("0"); + wms.setReqCode(wcsdto.getReqCode()); + wms.setMessage("OK"); + return wms; + } + wmsToWCSDTO.setQualityStatus("1"); + wmsToWCSDTO.setCode("0"); + wmsToWCSDTO.setReqCode(wcsdto.getReqCode()); + wmsToWCSDTO.setMessage("OK"); + return wmsToWCSDTO; + } + + /** + * 包材入库完成,WCS 通知 WMS 入库完成信息,将最终入库的库位返回至 WMS + * @param wcsdto + * @return + */ + @Override + public WmsToWCSDTO packingMaterialsInboundCompleted(WmsToWCSDTO wmsToWCSDTO) { + DynamicDataSourceContextHolder.push("ds_" + wmsToWCSDTO.getFactory()); + WmsRawOrderInSn wmsRawOrderInSn= wmsRawOrderInSnMapper.selectwmsRfidNo(wmsToWCSDTO); + wmsRawOrderInSn.setWhCode(wmsToWCSDTO.getWarehouseNo()); + wmsRawOrderInSn.setWlCode(wmsToWCSDTO.getLocation()); + WmsOdsMateStorageNewsSn wmsOdsMateStorageNewsSn=new WmsOdsMateStorageNewsSn(); + wmsOdsMateStorageNewsSn.setWhCode(wmsRawOrderInSn.getWhCode());//仓库编码 + wmsOdsMateStorageNewsSn.setWlCode(wmsRawOrderInSn.getWlCode());//库位编码 + wmsOdsMateStorageNewsSn.setMaterialCode(wmsRawOrderInSn.getMaterialCode()); + wmsOdsMateStorageNewsSn.setMaterialDesc(wmsRawOrderInSn.getMaterialDesc()); + wmsOdsMateStorageNewsSn.setSn(wmsRawOrderInSn.getSn()); + wmsOdsMateStorageNewsSn.setAmount(wmsRawOrderInSn.getAmount()); + wmsOdsMateStorageNewsSn.setCreateBy("AGV"); + wmsOdsMateStorageNewsSn.setGmtCreate(new Date()); + wmsOdsMateStorageNewsSn.setFactoryCode(wmsToWCSDTO.getFactory()); + wmsOdsMateStorageNewsSn.setSapFactoryCode(wmsToWCSDTO.getFactory()); + wmsOdsMateStorageNewsSnMapper.insertWmsOdsMateStorageNewsSn(wmsOdsMateStorageNewsSn); + //修改库存 + //2,修改库存---/加库存数量-/-冻结数量 + WmsOdsEmStorageNews wmsOdsEmStorageNews=new WmsOdsEmStorageNews(); + wmsOdsEmStorageNews.setWhCode(wmsRawOrderInSn.getWhCode());//仓库编码 + wmsOdsEmStorageNews.setWlCode(wmsRawOrderInSn.getWlCode());//库位编码 + wmsOdsEmStorageNews.setMaterialCode(wmsRawOrderInSn.getMaterialCode()); + wmsOdsEmStorageNews.setAmount(new BigDecimal(wmsToWCSDTO.getQty())); + //添加库存--这个要有个判断有没有这个库存如果没有的话,就插入 + wmsOdsMateStorageNewsSnMapper.updateAdd(wmsOdsEmStorageNews); + //修改托盘记录为入库 + wmsRawOrderInSnMapper.updateU1Byid(wmsRawOrderInSn); + + wmsToWCSDTO.setCode("0"); + + wmsToWCSDTO.setMessage("OK"); + return wmsToWCSDTO; + } + + /** + * 包材出库完成回传 + * @param wcsdto + * @return + */ + @Override + public WmsToWCSDTO packingMaterialsOutBoundCompleted(WmsToWCSDTO wcsdto) { + //记录明细消减库存 + DynamicDataSourceContextHolder.push("ds_" + wcsdto.getFactory()); + + return wcsdto; + } +} diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOrderMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOrderMapper.xml index f4afca53..60db94ef 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOrderMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOrderMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -39,12 +39,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit, Reality_Number, 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, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code from ods_procure_order + select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit,COALESCE(Reality_Number, 0) Reality_Number, 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, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code from ods_procure_order - + - + insert into ods_procure_order @@ -195,9 +195,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from ods_procure_order where ID in + delete from ods_procure_order where ID in #{ID} - \ No newline at end of file + + update ods_procure_order + SET Reality_Number = COALESCE(Reality_Number, 0) + #{planNumber}, + Order_Status=#{orderStatus} + where ID = #{ID} + + + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml index dd3cde8a..dcfa49cb 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + insert into wms_ods_em_storage_news @@ -205,9 +205,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from wms_ods_em_storage_news where storage_id in + delete from wms_ods_em_storage_news where storage_id in #{storageId} - \ No newline at end of file + + update wms_ods_em_storage_news + set + storage_amount = IFNULL(storage_amount, 0) - #{amount}, + gmt_modified=now() + where wh_code=#{whCode} and wl_code=#{wlCode} and material_code=#{materialCode} + + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsMateStorageNewsMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsMateStorageNewsMapper.xml index 5cdf65da..892d7633 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsMateStorageNewsMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsMateStorageNewsMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + insert into wms_ods_mate_storage_news @@ -205,9 +205,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from wms_ods_mate_storage_news where storage_id in + delete from wms_ods_mate_storage_news where storage_id in #{storageId} - \ No newline at end of file + + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsMateStorageNewsSnMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsMateStorageNewsSnMapper.xml index 7cb49b69..e623fe4c 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsMateStorageNewsSnMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsMateStorageNewsSnMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + insert into wms_ods_mate_storage_news_sn @@ -182,9 +182,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from wms_ods_mate_storage_news_sn where mate_order_in_sn_id in + delete from wms_ods_mate_storage_news_sn where mate_order_in_sn_id in #{mateOrderInSnId} - \ No newline at end of file + + update wms_ods_mate_storage_news + set amount = IFNULL(amount, 0) + #{amount}, + storage_amount = IFNULL(storage_amount, 0) + #{amount}, + gmt_modified=now() + where wh_code=#{whCode} and wl_code=#{wlCode} and material_code=#{materialCode} + + + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsWhiteEmbryoInMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsWhiteEmbryoInMapper.xml index 3a49d4ba..8b915888 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsWhiteEmbryoInMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsWhiteEmbryoInMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + + + + - + insert into wms_ods_white_embryo_in @@ -210,9 +218,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from wms_ods_white_embryo_in where ID in + delete from wms_ods_white_embryo_in where ID in #{ID} - \ No newline at end of file + + + update wms_ods_white_embryo_in + set + Order_Status = #{orderStatus}, + Reality_Number=#{realityNumber}, + Last_Update_Date = now() + where Order_Code=#{orderCode} + + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInMapper.xml index dd97d3e1..17adb8f6 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + insert into wms_raw_order_in @@ -299,9 +299,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from wms_raw_order_in where raw_order_in_id in + delete from wms_raw_order_in where raw_order_in_id in #{rawOrderInId} - \ No newline at end of file + + + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInSnMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInSnMapper.xml index 347ccaf7..a90f5baa 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInSnMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInSnMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -41,7 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + insert into wms_raw_order_in_sn + raw_order_in_sn_id, wh_code, wa_code, wl_code, @@ -108,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sap_factory_code, + #{rawOrderInSnId}, #{whCode}, #{waCode}, #{wlCode}, @@ -177,9 +180,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from wms_raw_order_in_sn where raw_order_in_sn_id in + delete from wms_raw_order_in_sn where raw_order_in_sn_id in #{rawOrderInSnId} - \ No newline at end of file + + + update wms_raw_order_in_sn + set + user_defined1 = '2' + where raw_order_in_sn_id=#{rawOrderInSnId} + +