From aeb91b295ce7a8a4c4a056cb3eff84f21edfafab Mon Sep 17 00:00:00 2001 From: x_z Date: Thu, 22 Dec 2022 14:54:37 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E7=9B=98=E7=82=B9=E8=BD=AC?= =?UTF-8?q?=E5=8D=95=E6=9D=A1=E7=A0=81=E7=BB=91=E5=AE=9A=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E6=97=B6=E8=87=AA=E5=8A=A8=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=9A=84=E9=97=AE=E9=A2=98=202.=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=95=E6=8D=AE=E5=A4=87=E6=B3=A8=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/StockOrderController.java | 10 +++- .../controller/inout/OrderController.java | 25 +++++++- .../inventory/InvSpaceController.java | 2 +- .../dao/basic/CompanyProductRelevanceDao.java | 8 +++ .../api/admin/dao/business/InvSpaceDao.java | 2 +- .../glxp/api/admin/dao/inout/OrderDao.java | 17 ++++++ .../dao/inventory/InvProductDetailDao.java | 2 +- .../admin/res/inout/StockOrderResponse.java | 3 + .../api/admin/service/inout/OrderService.java | 17 ++++++ .../service/inout/impl/OrderServiceImpl.java | 17 ++++-- .../service/inventory/InvSpaceService.java | 2 +- .../impl/InvCountOrderServiceImpl.java | 58 ++++++++++++++----- .../inventory/impl/InvSpaceServiceImpl.java | 2 +- .../api/admin/thread/IoTransInoutService.java | 27 +++------ .../basic/CompanyProductRelevanceDao.xml | 3 + .../mybatis/mapper/business/InvSpaceDao.xml | 12 ++-- .../mybatis/mapper/inout/OrderDao.xml | 7 +++ .../mapper/inventory/InvProductDetailDao.xml | 2 +- 18 files changed, 163 insertions(+), 53 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java index a34827e0..084f5a9a 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/business/StockOrderController.java @@ -32,7 +32,9 @@ import com.glxp.api.admin.req.business.StockOrderIdsRequest; import com.glxp.api.admin.req.business.StockOrderPostRequest; import com.glxp.api.admin.req.inout.AddStockOrderChangeRequest; import com.glxp.api.admin.req.inout.DeleteRequest; -import com.glxp.api.admin.req.inventory.*; +import com.glxp.api.admin.req.inventory.FilterInvUserRequest; +import com.glxp.api.admin.req.inventory.InnerOrderDetailRequest; +import com.glxp.api.admin.req.inventory.PostStockPrintRequest; import com.glxp.api.admin.res.PageSimpleResponse; import com.glxp.api.admin.res.basic.UdiRelevanceResponse; import com.glxp.api.admin.res.business.StockOrderExportResponse; @@ -48,7 +50,6 @@ import com.glxp.api.admin.service.business.StockOrderDetailService; import com.glxp.api.admin.service.business.StockOrderDetailTempService; import com.glxp.api.admin.service.business.StockOrderService; import com.glxp.api.admin.service.business.StockQRCodeTextService; -import com.glxp.api.admin.service.info.CompanyService; import com.glxp.api.admin.service.info.SystemParamConfigService; import com.glxp.api.admin.service.inout.CodesService; import com.glxp.api.admin.service.inout.CodesTempService; @@ -328,9 +329,12 @@ public class StockOrderController { //判断订单是否可以补单 List resultList = orderService.checkSupplementOrder(stockOrderEntityList); + //查询补单设置 + orderService.checkSubmitOrder(resultList); //查询仓库名称 orderService.queryInvName(resultList); - resultList = orderService.checkSubmitOrder(resultList); + //查询单据备注 + orderService.queryPrintRemark(resultList); PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(pageInfo.getTotal()); pageSimpleResponse.setList(resultList); diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java index 70e1ce78..16a21100 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java @@ -19,7 +19,10 @@ import com.glxp.api.admin.entity.basic.EntrustReceEntity; import com.glxp.api.admin.entity.basic.UdiEntity; import com.glxp.api.admin.entity.business.StockOrderEntity; import com.glxp.api.admin.entity.info.SystemParamConfigEntity; -import com.glxp.api.admin.entity.inout.*; +import com.glxp.api.admin.entity.inout.ErpOrderEntity; +import com.glxp.api.admin.entity.inout.FilterErpOrderRequest; +import com.glxp.api.admin.entity.inout.OrderEntity; +import com.glxp.api.admin.entity.inout.WarehouseEntity; import com.glxp.api.admin.entity.inventory.InvBusUserEntity; import com.glxp.api.admin.entity.inventory.InvWarehouseEntity; import com.glxp.api.admin.httpclient.SpsDirectClient; @@ -27,7 +30,6 @@ import com.glxp.api.admin.req.basic.BasicEntrustRecRequest; import com.glxp.api.admin.req.business.StockOrderFilterRequest; import com.glxp.api.admin.req.inout.*; import com.glxp.api.admin.req.inventory.FilterInvBusUserRequest; -import com.glxp.api.admin.req.inventory.FilterInvUserRequest; import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest; import com.glxp.api.admin.req.receipt.BussinessTypeFilterRequest; import com.glxp.api.admin.res.PageSimpleResponse; @@ -207,6 +209,25 @@ public class OrderController { return ResultVOUtils.success("更新成功"); } + /** + * 更新单据备注 + * + * @param orderEntity + * @param bindingResult + * @return + */ + @PostMapping("/udiwms/inout/order/updateOrderPrintRemark") + public BaseResponse updateOrderRemark(@RequestBody OrderEntity orderEntity, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + boolean b = orderService.updatePrintRemark(orderEntity.getId(), orderEntity.getPrintRemark()); + if (!b) { + return ResultVOUtils.error(500, "单据备注更新失败!"); + } + return ResultVOUtils.success("更新成功"); + } + @AuthRuleAnnotation("") @PostMapping("/udiwms/inout/order/updateUnit") diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvSpaceController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvSpaceController.java index 39f54748..74010160 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvSpaceController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvSpaceController.java @@ -98,7 +98,7 @@ public class InvSpaceController { */ @GetMapping("/spms/inv/space/getSpaceCodeList") public BaseResponse getSpaceCodeList(FilterInvSpaceRequest filterInvSpaceRequest) { - List list = invSpaceService.getSpaceCodeList(filterInvSpaceRequest); + List list = invSpaceService.getSpaceCodeList(filterInvSpaceRequest); return ResultVOUtils.success(list); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/basic/CompanyProductRelevanceDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/basic/CompanyProductRelevanceDao.java index f2d935d0..3c32fb59 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/basic/CompanyProductRelevanceDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/basic/CompanyProductRelevanceDao.java @@ -35,4 +35,12 @@ public interface CompanyProductRelevanceDao { boolean deleteById(String id); boolean deleteByRlId(String id); + + /** + * 根据产品ID查询供应商ID + * + * @param udiRlIdFk + * @return + */ + List selectUnitFkByUdiRlIdFk(@Param("udiRlIdFk") String udiRlIdFk); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/business/InvSpaceDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/business/InvSpaceDao.java index bddca773..f84b81d4 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/business/InvSpaceDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/business/InvSpaceDao.java @@ -48,7 +48,7 @@ public interface InvSpaceDao { * @param filterInvSpaceRequest * @return */ - List selectSpaceCodeList(FilterInvSpaceRequest filterInvSpaceRequest); + List selectSpaceCodeList(FilterInvSpaceRequest filterInvSpaceRequest); /** * 根据货位码查询此 diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java index 8f32773a..ef479b7c 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java @@ -100,4 +100,21 @@ public interface OrderDao { * @return */ List selectByBillNoAndStatus(String billNo); + + /** + * 更新单据备注 + * + * @param orderId 单据号 + * @param printRemark 备注信息 + * @return + */ + boolean updatePrintRemark(@Param("orderId") String orderId, @Param("printRemark") String printRemark); + + /** + * 查询单据备注 + * + * @param orderId + * @return + */ + String selectPrintRemarkById(@Param("orderId") String orderId); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/inventory/InvProductDetailDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/inventory/InvProductDetailDao.java index ee6b892c..9c936941 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/inventory/InvProductDetailDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/inventory/InvProductDetailDao.java @@ -100,6 +100,6 @@ public interface InvProductDetailDao { * @param code * @return */ - String selectSupIdByCode(String code); + List selectSupIdByCode(String code); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/res/inout/StockOrderResponse.java b/api-admin/src/main/java/com/glxp/api/admin/res/inout/StockOrderResponse.java index 1e2282d8..33de8e80 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/res/inout/StockOrderResponse.java +++ b/api-admin/src/main/java/com/glxp/api/admin/res/inout/StockOrderResponse.java @@ -21,4 +21,7 @@ public class StockOrderResponse extends StockOrderEntity { //当前分库名称 private String invWarehouseName; + //单据备注 + private String printRemark; + } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java b/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java index 6c14a45c..acfce749 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inout/OrderService.java @@ -138,4 +138,21 @@ public interface OrderService { * @param responseList */ void queryInvName(List responseList); + + /** + * 更新单据备注 + * + * @param id + * @param printRemark + * @return + */ + boolean updatePrintRemark(String id, String printRemark); + + /** + * 查询单据备注 + * + * @param resultList + */ + void queryPrintRemark(List resultList); + } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java index 953bc848..1e8f0d00 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java @@ -406,10 +406,6 @@ public class OrderServiceImpl implements OrderService { @Override public List checkSubmitOrder(List orderResponseList) { - if (CollUtil.isEmpty(orderResponseList)) { - return Collections.emptyList(); - } - //查询第三方系统的 List actions = new ArrayList<>(); for (StockOrderResponse stockOrderResponse : orderResponseList) { @@ -539,6 +535,19 @@ public class OrderServiceImpl implements OrderService { } } + @Override + public boolean updatePrintRemark(String orderId, String printRemark) { + return orderDao.updatePrintRemark(orderId, printRemark); + } + + @Override + public void queryPrintRemark(List resultList) { + for (StockOrderResponse stockOrderResponse : resultList) { + String printRemark = orderDao.selectPrintRemarkById(stockOrderResponse.getOrderIdFk()); + stockOrderResponse.setPrintRemark(printRemark); + } + } + @Transactional(rollbackFor = Exception.class) @Override public void deleteOrders(List ids) { diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvSpaceService.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvSpaceService.java index 7605c177..2ce2a25d 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvSpaceService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/InvSpaceService.java @@ -41,7 +41,7 @@ public interface InvSpaceService { */ BaseResponse updateSpace(InvSpace invSpace); - List getSpaceCodeList(FilterInvSpaceRequest filterInvSpaceRequest); + List getSpaceCodeList(FilterInvSpaceRequest filterInvSpaceRequest); /** * 根据分库编码查询货位信息 diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvCountOrderServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvCountOrderServiceImpl.java index d044f49f..a72e3173 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvCountOrderServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvCountOrderServiceImpl.java @@ -11,6 +11,7 @@ import com.glxp.api.admin.constant.Constant; import com.glxp.api.admin.constant.ConstantStatus; import com.glxp.api.admin.constant.ConstantType; import com.glxp.api.admin.dao.basic.BussinessTypeDao; +import com.glxp.api.admin.dao.basic.CompanyProductRelevanceDao; import com.glxp.api.admin.dao.basic.UnitMaintainDao; import com.glxp.api.admin.dao.inout.CodesDao; import com.glxp.api.admin.dao.inout.CodesTempDao; @@ -73,6 +74,8 @@ public class InvCountOrderServiceImpl implements InvCountOrderService { private InvCountCodesService invCountCodesService; @Resource private CodesDao codesDao; + @Resource + private CompanyProductRelevanceDao companyProductRelevanceDao; @Override public List filterList(FilterInvCountOrderRequest filterInvCountOrderRequest) { @@ -299,7 +302,7 @@ public class InvCountOrderServiceImpl implements InvCountOrderService { warehouseEntity.setReCount(codeNum); //设置供应商信息 - setSupInfo(warehouseEntity); + setSupInfo(warehouseEntity, "loss"); outOrderCodes.add(warehouseEntity); } else { for (InvProductDetailEntity invProductDetailEntity : invProductDetailEntities) { @@ -323,7 +326,7 @@ public class InvCountOrderServiceImpl implements InvCountOrderService { } //设置供应商信息 - setSupInfo(warehouseEntity); + setSupInfo(warehouseEntity, "loss"); outOrderCodes.add(warehouseEntity); } } @@ -362,11 +365,11 @@ public class InvCountOrderServiceImpl implements InvCountOrderService { UdiEntity udi = FilterUdiUtils.getUdi(countCodesList.get(0)); //修改码数量 int actCount = invCountCodesService.getActCount(udi.getUdi()); - //使用此盘点单据详情的盘亏数量 / 实际数量,计算得出扫码数量 + //使用此盘点单据详情的盘盈数量 / 实际数量,计算得出扫码数量 int codeNum = invCountOrderDetail.getProfitNum() / actCount; warehouseEntity.setCount(codeNum); warehouseEntity.setReCount(codeNum); - setSupInfo(warehouseEntity); + setSupInfo(warehouseEntity, "profit"); inOrderCodes.add(warehouseEntity); } else { for (String code : profitCodes) { @@ -378,7 +381,7 @@ public class InvCountOrderServiceImpl implements InvCountOrderService { if ((StrUtil.isBlank(udi.getBatchNo()) && StrUtil.isBlank(udi.getSerialNo())) || (StrUtil.isBlank(udi.getSerialNo()) && StrUtil.isNotBlank(udi.getBatchNo()))) { //修改码数量 int actCount = invCountCodesService.getActCount(udi.getUdi()); - //使用此盘点单据详情的盘亏数量 / 实际数量,计算得出扫码数量 + //使用此盘点单据详情的盘盈数量 / 实际数量,计算得出扫码数量 int codeNum = invCountOrderDetail.getProfitNum() / actCount; warehouseEntity.setCount(codeNum); warehouseEntity.setReCount(codeNum); @@ -388,7 +391,7 @@ public class InvCountOrderServiceImpl implements InvCountOrderService { warehouseEntity.setCount(actCount); warehouseEntity.setReCount(actCount); } - setSupInfo(warehouseEntity); + setSupInfo(warehouseEntity, "profit"); inOrderCodes.add(warehouseEntity); } } @@ -444,16 +447,41 @@ public class InvCountOrderServiceImpl implements InvCountOrderService { /** * 对条码添加供应商信息 * - * @param warehouseEntity + * @param warehouseEntity 码明细 + * @param countStatus 盈亏状态 */ - private void setSupInfo(WarehouseEntity warehouseEntity) { - //设置供应商参数 - String supId = invProductDetailDao.selectSupIdByCode(warehouseEntity.getCode()); - if (StrUtil.isNotEmpty(supId)) { - warehouseEntity.setSupId(supId); - //查询供应商名称 - String name = unitMaintainDao.selectNameByErpId(supId); - warehouseEntity.setSupName(name); + private void setSupInfo(WarehouseEntity warehouseEntity, String countStatus) { + /** + * 根据此码明细的盈亏状态,使用不同的逻辑生成供应商信息 + * 盘盈:此条码不存在于库存详情中,需要从供应商产品信息表查询供应商信息 + * 盘亏:此条码在库存中存在,但是盘点中没有此条码,直接查询库存详情表中的供应商ID + * + * 若查询出的供应商信息多余1条,则表明此产品被多个供应商绑定,在此处不进行绑定,单据生成之后会进入异常单据页面,在异常单据页面手动指定供应商 + */ + if (countStatus.equals("loss")) { + log.info("生成盘亏单据条码供应商详情,条码信息:{}", warehouseEntity.getCode()); + List supIds = invProductDetailDao.selectSupIdByCode(warehouseEntity.getCode()); + if (CollUtil.isNotEmpty(supIds)) { + if (supIds.size() == 1) { + //此产品只绑定了一个供应商,若绑定了多个供应商,则不填供应商ID字段,生成单据之后会进入异常单据页面,手动指定供应商 + warehouseEntity.setSupId(supIds.get(0)); + //查询供应商名称 + String name = unitMaintainDao.selectNameByErpId(supIds.get(0)); + warehouseEntity.setSupName(name); + } + } + } else { + log.info("生成盘盈单据条码供应商详情,条码信息:{}", warehouseEntity.getCode()); + List unitFkList = companyProductRelevanceDao.selectUnitFkByUdiRlIdFk(warehouseEntity.getRelId()); + if (CollUtil.isNotEmpty(unitFkList)) { + if (unitFkList.size() == 1) { + //此产品只绑定了一个供应商,若绑定了多个供应商,则不填供应商ID字段,生成单据之后会进入异常单据页面,手动指定供应商 + warehouseEntity.setSupId(unitFkList.get(0)); + //查询供应商名称 + String name = unitMaintainDao.selectNameByErpId(unitFkList.get(0)); + warehouseEntity.setSupName(name); + } + } } } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvSpaceServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvSpaceServiceImpl.java index 81eb1c97..85d2e0d6 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvSpaceServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/InvSpaceServiceImpl.java @@ -125,7 +125,7 @@ public class InvSpaceServiceImpl implements InvSpaceService { } @Override - public List getSpaceCodeList(FilterInvSpaceRequest filterInvSpaceRequest) { + public List getSpaceCodeList(FilterInvSpaceRequest filterInvSpaceRequest) { return invSpaceDao.selectSpaceCodeList(filterInvSpaceRequest); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/IoTransInoutService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/IoTransInoutService.java index b39909c4..29051f2a 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/thread/IoTransInoutService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/thread/IoTransInoutService.java @@ -7,16 +7,15 @@ import com.glxp.api.admin.constant.Constant; import com.glxp.api.admin.constant.ConstantStatus; import com.glxp.api.admin.constant.ConstantType; import com.glxp.api.admin.controller.inout.utils.CheckOrderUtils; -import com.glxp.api.admin.controller.inout.utils.ContrastErpUtil; -import com.glxp.api.admin.controller.inout.utils.DataTransUtil; import com.glxp.api.admin.controller.inout.utils.InoutUtils; import com.glxp.api.admin.dao.business.StockOrderRemakDao; -import com.glxp.api.admin.entity.basic.*; +import com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity; +import com.glxp.api.admin.entity.basic.BussinessTypeEntity; +import com.glxp.api.admin.entity.basic.CompanyProductRelevanceEntity; +import com.glxp.api.admin.entity.basic.UdiEntity; import com.glxp.api.admin.entity.business.StockOrderDetailEntity; import com.glxp.api.admin.entity.business.StockOrderEntity; import com.glxp.api.admin.entity.business.StockOrderRemakEntity; -import com.glxp.api.admin.entity.info.CompanyEntity; -import com.glxp.api.admin.entity.info.SystemParamConfigEntity; import com.glxp.api.admin.entity.inout.ErpOrderEntity; import com.glxp.api.admin.entity.inout.FilterErpOrderRequest; import com.glxp.api.admin.entity.inout.OrderEntity; @@ -24,41 +23,33 @@ import com.glxp.api.admin.entity.inout.WarehouseEntity; import com.glxp.api.admin.entity.inventory.InvProductDetailEntity; import com.glxp.api.admin.entity.inventory.InvProductEntity; import com.glxp.api.admin.entity.inventory.InvWarehouseEntity; -import com.glxp.api.admin.httpclient.ErpOrderClient; -import com.glxp.api.admin.httpclient.UdiDlHttpClient; import com.glxp.api.admin.req.basic.CompanyProductRelevanceRequest; import com.glxp.api.admin.req.basic.FilterCompanyProductRelevanceRequest; -import com.glxp.api.admin.req.basic.FilterUdiInfoRequest; import com.glxp.api.admin.req.business.StockOrderFilterRequest; import com.glxp.api.admin.req.inout.CommitRequest; import com.glxp.api.admin.req.inout.OrderFilterRequest; import com.glxp.api.admin.req.inout.PostOrderRequest; import com.glxp.api.admin.req.inout.WarehouseQueryRequest; -import com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest; import com.glxp.api.admin.req.inventory.FilterInvProductRequest; import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest; -import com.glxp.api.admin.res.basic.BussinessOriginTypeResponse; import com.glxp.api.admin.res.basic.UdiRelevanceResponse; import com.glxp.api.admin.res.info.CompanyProductRelevanceResponse; -import com.glxp.api.admin.service.basic.*; +import com.glxp.api.admin.service.basic.BasicUnitMaintainService; +import com.glxp.api.admin.service.basic.BussinessTypeService; +import com.glxp.api.admin.service.basic.UdiInfoService; +import com.glxp.api.admin.service.basic.UdiRelevanceService; import com.glxp.api.admin.service.business.StockOrderDetailService; import com.glxp.api.admin.service.business.StockOrderService; import com.glxp.api.admin.service.info.CompanyProductRelevanceService; -import com.glxp.api.admin.service.info.CompanyService; -import com.glxp.api.admin.service.info.SystemParamConfigService; import com.glxp.api.admin.service.inout.CodesService; import com.glxp.api.admin.service.inout.CodesTempService; import com.glxp.api.admin.service.inout.OrderDetailService; import com.glxp.api.admin.service.inout.OrderService; import com.glxp.api.admin.service.inventory.*; -import com.glxp.api.admin.service.thrsys.ThrDataService; -import com.glxp.api.admin.service.thrsys.ThrOrderService; import com.glxp.api.admin.util.*; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -528,7 +519,7 @@ public class IoTransInoutService { if (originSupId != null) { warehouseEntity.setSupId(originSupId); } - if (udiRelevanceEntities != null && udiRelevanceEntities.size() > 1 && warehouseEntity.getRelId() == null) {//同一个DI绑定多个产品西信息 + if (udiRelevanceEntities != null && udiRelevanceEntities.size() > 1 && warehouseEntity.getRelId() == null) {//同一个DI绑定多个产品信息 warehouseEntity.setRelId(null); warehouseEntity.setStatus(ConstantStatus.ORDER_DETAIL_DI_MUTI); } else if (udiRelevanceEntities == null || udiRelevanceEntities.size() == 0) {//未找到产品信息,一般不会出现 diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/CompanyProductRelevanceDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/CompanyProductRelevanceDao.xml index 1120658b..1a99b4de 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/CompanyProductRelevanceDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/CompanyProductRelevanceDao.xml @@ -297,4 +297,7 @@ WHERE udiRlIdFk = #{id} + \ No newline at end of file diff --git a/api-admin/src/main/resources/mybatis/mapper/business/InvSpaceDao.xml b/api-admin/src/main/resources/mybatis/mapper/business/InvSpaceDao.xml index 03f35383..6c32739a 100644 --- a/api-admin/src/main/resources/mybatis/mapper/business/InvSpaceDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/business/InvSpaceDao.xml @@ -315,18 +315,20 @@ - + select inv_space.code, inv_space.name, iws.name invSubStorageName, iw.name invStorageName from inv_space + left join inv_warehouse_sub iws on iws.code = inv_space.invWarehouseCode + left join inv_warehouse iw on iw.code = inv_space.invStorageCode - AND invStorageCode = #{invStorageCode} + AND inv_space.invStorageCode = #{invStorageCode} - AND invWarehouseCode = #{invWarehouseCode} + AND inv_space.invWarehouseCode = #{invWarehouseCode} - AND status = #{status} + AND inv_space.status = #{status} diff --git a/api-admin/src/main/resources/mybatis/mapper/inout/OrderDao.xml b/api-admin/src/main/resources/mybatis/mapper/inout/OrderDao.xml index 234cd6db..e44d966d 100644 --- a/api-admin/src/main/resources/mybatis/mapper/inout/OrderDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/inout/OrderDao.xml @@ -671,4 +671,11 @@ and (io_order.id = #{billNo} or io_order.erpFk = #{billNo}) + + update io_order set printRemark = #{printRemark} where id = #{orderId} + + + \ No newline at end of file diff --git a/api-admin/src/main/resources/mybatis/mapper/inventory/InvProductDetailDao.xml b/api-admin/src/main/resources/mybatis/mapper/inventory/InvProductDetailDao.xml index 4959ec2a..933c1db1 100644 --- a/api-admin/src/main/resources/mybatis/mapper/inventory/InvProductDetailDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/inventory/InvProductDetailDao.xml @@ -434,6 +434,6 @@ \ No newline at end of file