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 index b571ce8d..11c5b7bc 100644 --- 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 @@ -235,6 +235,26 @@ public class WmsToWCSmissionController { public AjaxResult WmsProductPutByWorkOrderConfirm(@RequestBody WmsProductPut wmsProductPut) { return AjaxResult.success(wmsProductPutService.WmsProductPutByWorkOrderConfirm(wmsProductPut)); } + + + /** + * 成品 + * 托盘关联箱码 + */ + @PostMapping("/addSnCorrelationBarcode") + public AjaxResult addSnCorrelationBarcode(@RequestBody WmsProductPutTrayCode wmsProductPutTrayCode) { + return AjaxResult.success(wmsProductPutService.addSnCorrelationBarcode(wmsProductPutTrayCode)); + } + + + /** + * 查询托盘和箱码的关系信息 + * + */ + @PostMapping("/selectSnCorrelationBarcode") + public AjaxResult selectSnCorrelationBarcode(@RequestBody WmsProductPutTrayCode wmsProductPutTrayCode) { + return AjaxResult.success(wmsProductPutService.selectSnCorrelationBarcode(wmsProductPutTrayCode)); + } /** * 手持白胚入库查询 */ diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPutTrayCode.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPutTrayCode.java index 173f9bd8..546f78ba 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPutTrayCode.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPutTrayCode.java @@ -43,6 +43,16 @@ public class WmsProductPutTrayCode extends BaseEntity { */ @Excel(name = "关联状态") private String relatStatus; + @Excel(name = "工厂") + private String siteCode; + + public String getSiteCode() { + return siteCode; + } + + public void setSiteCode(String siteCode) { + this.siteCode = siteCode; + } /** * 预留字段1 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 e80f277b..ebf52618 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 @@ -56,6 +56,9 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { private WmsOdsEmStorageNewsSnMapper wmsOdsEmStorageNewsSnMapper; @Autowired private WmsOdsEmStorageNewsMapper wmsOdsEmStorageNewsMapper; + + @Autowired + private WmsProductPutTrayCodeMapper wmsProductPutTrayCodeMapper; /** * 查询成品生产入库 * @@ -639,4 +642,23 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { return result; } + @Override + public List selectSnCorrelationBarcode(WmsProductPutTrayCode wmsProductPutTrayCode) { + DynamicDataSourceContextHolder.push("ds_" + wmsProductPutTrayCode.getSiteCode()); + wmsProductPutTrayCode.setRelatStatus("1"); + List wmsProductPutTrayCodeList= wmsProductPutTrayCodeMapper.selectWmsProductPutTrayCodeList(wmsProductPutTrayCode); + return wmsProductPutTrayCodeList; + } + + @Override + public String addSnCorrelationBarcode(WmsProductPutTrayCode wmsProductPutTrayCode) { + String result="关联成功"; + DynamicDataSourceContextHolder.push("ds_" + wmsProductPutTrayCode.getSiteCode()); + wmsProductPutTrayCode.setRelatStatus("1"); + wmsProductPutTrayCode.setStorageId(IdUtils.fastSimpleUUID()); + wmsProductPutTrayCode.setNumber(1); + wmsProductPutTrayCodeMapper.insertWmsProductPutTrayCode(wmsProductPutTrayCode); + return result; + } + }