From bb04ec954a8bdd06264b756d274f9beea55eb909 Mon Sep 17 00:00:00 2001 From: anthonyywj2 <353682448@qq.com> Date: Sun, 12 Jun 2022 20:40:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=8D=95=E6=8D=AE=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=AD=89=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/ConnectTestController.java | 2 +- .../basic/SpsSyncUploadController.java | 11 ++++++- .../inventory/InvPreProductsController.java | 10 ++++++ .../inventory/InvProductsController.java | 9 ++++++ .../entity/basic/BussinessTypeEntity.java | 6 ++++ .../admin/res/basic/BussinessTypResponse.java | 4 +++ .../inventory/InvPreProductDetailService.java | 2 ++ .../inventory/InvProductDetailService.java | 2 ++ .../InvPreInProductDetailServiceImpl.java | 16 ++++++++++ .../impl/InvPreProductDetailServiceImpl.java | 32 +++++++++++++++++++ .../impl/InvProductDetailServiceImpl.java | 31 ++++++++++++++++++ .../mybatis/mapper/basic/BussinessTypeDao.xml | 23 ++++++++++--- 12 files changed, 142 insertions(+), 6 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/auth/ConnectTestController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/auth/ConnectTestController.java index 3238be3..8488e16 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/auth/ConnectTestController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/auth/ConnectTestController.java @@ -25,7 +25,7 @@ public class ConnectTestController { AuthConnectEntity authConnectEntity = new AuthConnectEntity(); authConnectEntity.setCompanyName(companyEntity.getCompanyName()); authConnectEntity.setSysName("UDI自助平台"); - return ResultVOUtils.success(companyEntity.getCompanyName()); + return ResultVOUtils.success(authConnectEntity); } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/SpsSyncUploadController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/SpsSyncUploadController.java index 1042473..10d50c9 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/SpsSyncUploadController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/basic/SpsSyncUploadController.java @@ -19,6 +19,7 @@ import com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity; import com.glxp.sale.admin.entity.inout.WarehouseEntity; import com.glxp.sale.admin.entity.inout.WarehouseUserEntity; import com.glxp.sale.admin.entity.inventory.InvWarehouseEntity; +import com.glxp.sale.admin.entity.param.SystemParamConfigEntity; import com.glxp.sale.admin.entity.thrsys.*; import com.glxp.sale.admin.res.basic.SpsSyncBusResponse; import com.glxp.sale.admin.res.basic.SpsSyncDataResponse; @@ -28,6 +29,7 @@ import com.glxp.sale.admin.service.basic.BussinessChangeTypeService; import com.glxp.sale.admin.service.basic.EntrustReceService; import com.glxp.sale.admin.service.inout.OrderService; import com.glxp.sale.admin.service.inventory.InvWarehouseService; +import com.glxp.sale.admin.service.param.SystemParamConfigService; import com.glxp.sale.admin.thread.BasicBackUpdateProductService; import com.glxp.sale.admin.util.BeanUtils; import com.glxp.sale.common.res.BaseResponse; @@ -68,6 +70,8 @@ public class SpsSyncUploadController { EntrustReceService entrustReceService; @Resource private BasicDownloadService basicDownloadService; + @Resource + private SystemParamConfigService systemParamConfigService; @PostMapping("sps/sync/basic/upload") public BaseResponse findProductInfo(@RequestBody SpsSyncDataResponse syncDataResponse) { @@ -432,7 +436,12 @@ public class SpsSyncUploadController { orderEntity.setFromType(ConstantStatus.FROM_UDIWMS); orderEntity.setReceiveStatus(0); orderEntity.setErpFk(null); -// orderEntity.setOutChangeEnable(false); + + String value = systemParamConfigService.selectValueByParamKey("syns_out_change"); + if (value.equals("1")) { + orderEntity.setOutChangeEnable(true); + } else + orderEntity.setOutChangeEnable(false); orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS); OrderEntity temp = orderService.findById(orderEntity.getId()); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/inventory/InvPreProductsController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/inventory/InvPreProductsController.java index ff76e17..3dc4626 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/inventory/InvPreProductsController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/inventory/InvPreProductsController.java @@ -158,4 +158,14 @@ public class InvPreProductsController { return ResultVOUtils.success(invProductStatResponse); } + + @AuthRuleAnnotation("") + @GetMapping("spms/pre/inv/products/getDetaiByCode") + public BaseResponse getDetaiByCode(FilterInvProductDetailRequest filterInvProductDetailRequest) { + InvProductDetailEntity invProductDetailEntity = invProductDetailService.statInvPreInDetail(filterInvProductDetailRequest.getCode()); + if (invProductDetailEntity != null) + return ResultVOUtils.success(invProductDetailEntity); + return ResultVOUtils.error(501, "寄售库存不存在此产品"); + } + } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/inventory/InvProductsController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/inventory/InvProductsController.java index 9620b5e..b32167b 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/inventory/InvProductsController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/inventory/InvProductsController.java @@ -395,4 +395,13 @@ public class InvProductsController { } + @AuthRuleAnnotation("") + @GetMapping("spms/inv/products/getDetaiByCode") + public BaseResponse getDetaiByCode(FilterInvProductDetailRequest filterInvProductDetailRequest) { + InvProductDetailEntity invProductDetailEntity = invProductDetailService.statInvPreInDetail(filterInvProductDetailRequest.getCode()); + if (invProductDetailEntity != null) + return ResultVOUtils.success(invProductDetailEntity); + return ResultVOUtils.error(501, "库存不存在此产品"); + } + } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessTypeEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessTypeEntity.java index ff2074d..2cd29a4 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessTypeEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/basic/BussinessTypeEntity.java @@ -61,4 +61,10 @@ public class BussinessTypeEntity { private boolean checkUdiwms; private boolean secCheckUdiwms; + private boolean ullageFill; + private boolean scanPreIn; + private boolean vailInv; + + + } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/res/basic/BussinessTypResponse.java b/api-admin/src/main/java/com/glxp/sale/admin/res/basic/BussinessTypResponse.java index 6768006..6019757 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/res/basic/BussinessTypResponse.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/res/basic/BussinessTypResponse.java @@ -60,4 +60,8 @@ public class BussinessTypResponse { private boolean preIn; private boolean checkUdiwms; private boolean secCheckUdiwms; + + private boolean ullageFill; + private boolean scanPreIn; + private boolean vailInv; } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/InvPreProductDetailService.java b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/InvPreProductDetailService.java index 9262c6a..e4ba7a2 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/InvPreProductDetailService.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/InvPreProductDetailService.java @@ -25,4 +25,6 @@ public interface InvPreProductDetailService { boolean deleteByProductId(FilterInvProductDetailRequest filterInvProductDetailRequest); int statCount(FilterInvProductDetailRequest filterInvProductDetailRequest); + + InvProductDetailEntity statInvPreInDetail(String code); } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/InvProductDetailService.java b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/InvProductDetailService.java index 17d7abd..2ecfe33 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/InvProductDetailService.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/InvProductDetailService.java @@ -30,4 +30,6 @@ public interface InvProductDetailService { boolean deleteByProductId(FilterInvProductDetailRequest productIdFk); int statCount(FilterInvProductDetailRequest filterInvProductDetailRequest); + + InvProductDetailEntity statInvPreInDetail(String code); } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvPreInProductDetailServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvPreInProductDetailServiceImpl.java index a0d258e..d563802 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvPreInProductDetailServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvPreInProductDetailServiceImpl.java @@ -8,9 +8,11 @@ import com.glxp.sale.admin.dao.inventory.InvPreInProductDao; import com.glxp.sale.admin.dao.inventory.InvPreInProductDetailDao; import com.glxp.sale.admin.entity.inventory.InvProductDetailEntity; import com.glxp.sale.admin.entity.inventory.InvProductEntity; +import com.glxp.sale.admin.entity.udid.UdiEntity; import com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest; import com.glxp.sale.admin.res.inventory.InvProductDetailJoinResponse; import com.glxp.sale.admin.service.inventory.InvPreInProductDetailService; +import com.glxp.sale.admin.util.FilterUdiUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -93,7 +95,21 @@ public class InvPreInProductDetailServiceImpl implements InvPreInProductDetailSe public InvProductDetailEntity statInvPreInDetail(String code) { FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest(); filterInvProductDetailRequest.setOriginCode(code); + List datas = invPreInProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest); + if (CollUtil.isEmpty(datas)) { + filterInvProductDetailRequest.setOriginCode(null); + UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(code); + if (StrUtil.isNotEmpty(udiEntity.getBatchNo())) + filterInvProductDetailRequest.setBatchNo(udiEntity.getBatchNo()); + else + filterInvProductDetailRequest.setBatchNo("empty"); + + filterInvProductDetailRequest.setProductionDate(udiEntity.getProduceDate()); + filterInvProductDetailRequest.setExpireDate(udiEntity.getExpireDate()); + datas = invPreInProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest); + } + if (CollUtil.isNotEmpty(datas)) { InvProductDetailEntity invProductDetailEntity = datas.get(0); diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvPreProductDetailServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvPreProductDetailServiceImpl.java index f05adad..f15a595 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvPreProductDetailServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvPreProductDetailServiceImpl.java @@ -1,13 +1,18 @@ package com.glxp.sale.admin.service.inventory.impl; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageHelper; import com.glxp.sale.admin.dao.inventory.InvPreProductDetailDao; import com.glxp.sale.admin.dao.inventory.InvProductDetailDao; import com.glxp.sale.admin.entity.inventory.InvProductDetailEntity; +import com.glxp.sale.admin.entity.inventory.InvProductEntity; +import com.glxp.sale.admin.entity.udid.UdiEntity; import com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest; import com.glxp.sale.admin.res.inventory.InvProductDetailJoinResponse; import com.glxp.sale.admin.service.inventory.InvPreProductDetailService; import com.glxp.sale.admin.service.inventory.InvProductDetailService; +import com.glxp.sale.admin.util.FilterUdiUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -76,4 +81,31 @@ public class InvPreProductDetailServiceImpl implements InvPreProductDetailServic public int statCount(FilterInvProductDetailRequest filterInvProductDetailRequest) { return invPreProductDetailDao.statCount(filterInvProductDetailRequest); } + + @Override + public InvProductDetailEntity statInvPreInDetail(String code) { + FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest(); + filterInvProductDetailRequest.setOriginCode(code); + + List datas = invPreProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest); + if (CollUtil.isEmpty(datas)) { + filterInvProductDetailRequest.setOriginCode(null); + UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(code); + if (StrUtil.isNotEmpty(udiEntity.getBatchNo())) + filterInvProductDetailRequest.setBatchNo(udiEntity.getBatchNo()); + else + filterInvProductDetailRequest.setBatchNo("empty"); + + filterInvProductDetailRequest.setProductionDate(udiEntity.getProduceDate()); + filterInvProductDetailRequest.setExpireDate(udiEntity.getExpireDate()); + datas = invPreProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest); + } + + + if (CollUtil.isNotEmpty(datas)) { + InvProductDetailEntity invProductDetailEntity = datas.get(0); + return invProductDetailEntity; + } + return null; + } } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvProductDetailServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvProductDetailServiceImpl.java index c252194..c163efe 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvProductDetailServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/inventory/impl/InvProductDetailServiceImpl.java @@ -1,11 +1,15 @@ package com.glxp.sale.admin.service.inventory.impl; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageHelper; import com.glxp.sale.admin.dao.inventory.InvProductDetailDao; import com.glxp.sale.admin.entity.inventory.InvProductDetailEntity; +import com.glxp.sale.admin.entity.udid.UdiEntity; import com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest; import com.glxp.sale.admin.res.inventory.InvProductDetailJoinResponse; import com.glxp.sale.admin.service.inventory.InvProductDetailService; +import com.glxp.sale.admin.util.FilterUdiUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -90,4 +94,31 @@ public class InvProductDetailServiceImpl implements InvProductDetailService { public int statCount(FilterInvProductDetailRequest filterInvProductDetailRequest) { return invProductDetailDao.statCount(filterInvProductDetailRequest); } + + @Override + public InvProductDetailEntity statInvPreInDetail(String code) { + FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest(); + filterInvProductDetailRequest.setOriginCode(code); + + List datas = invProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest); + if (CollUtil.isEmpty(datas)) { + filterInvProductDetailRequest.setOriginCode(null); + UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(code); + if (StrUtil.isNotEmpty(udiEntity.getBatchNo())) + filterInvProductDetailRequest.setBatchNo(udiEntity.getBatchNo()); + else + filterInvProductDetailRequest.setBatchNo("empty"); + + filterInvProductDetailRequest.setProductionDate(udiEntity.getProduceDate()); + filterInvProductDetailRequest.setExpireDate(udiEntity.getExpireDate()); + datas = invProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest); + } + + + if (CollUtil.isNotEmpty(datas)) { + InvProductDetailEntity invProductDetailEntity = datas.get(0); + return invProductDetailEntity; + } + return null; + } } diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml index eafd4f3..e8f9491 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml @@ -13,6 +13,7 @@ basic_bussiness_type.checkWebNew,basic_bussiness_type.checkChange, basic_bussiness_type.secCheckUdims, basic_bussiness_type.secCheckPdaEd, basic_bussiness_type.secCheckPdaUn, basic_bussiness_type.secCheckWebNew, basic_bussiness_type.secCheckChange, + basic_bussiness_type.ullageFill, basic_bussiness_type.scanPreIn, basic_bussiness_type.vailInv, basic_bustype_local.name localName,basic_bussiness_type.checkEnable, basic_bustype_local.advanceType, basic_bustype_local.changeEnable,basic_bussiness_type.genUnit,basic_bussiness_type.innerOrder, basic_bustype_local.spUse,corpType,basic_bussiness_type.storageCode,basic_bussiness_type.checkBalacne, @@ -126,6 +127,7 @@ basic_bussiness_type.checkWebNew,basic_bussiness_type.checkChange, basic_bussiness_type.secCheckUdims, basic_bussiness_type.secCheckPdaEd, basic_bussiness_type.secCheckPdaUn, basic_bussiness_type.secCheckWebNew, basic_bussiness_type.secCheckChange, + basic_bussiness_type.ullageFill, basic_bussiness_type.scanPreIn, basic_bussiness_type.vailInv, basic_bustype_local.name localName,basic_bussiness_type.checkEnable, basic_bustype_local.advanceType, basic_bustype_local.changeEnable,basic_bussiness_type.genUnit,basic_bussiness_type.innerOrder, basic_bustype_local.spUse,corpType,basic_bussiness_type.storageCode,basic_bussiness_type.checkBalacne,defaultUnit, @@ -178,7 +180,8 @@ checkUdims,checkPdaEd,checkPdaUn,checkPc,checkWebNew,checkChange ,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew, secCheckChange,corpType,basic_bussiness_type.storageCode,checkBalacne, - secCheckBalacne,supplementOrderType,defaultUnit,useDyCount,expireTip,updateTime,prefix) + secCheckBalacne,supplementOrderType,defaultUnit,useDyCount,expireTip,updateTime,prefix + ,ullageFill,scanPreIn,vailInv) values ( #{action}, @@ -212,7 +215,11 @@ #{defaultUnit}, #{useDyCount}, #{expireTip}, - #{updateTime},#{prefix} + #{updateTime}, + #{prefix}, + #{ullageFill}, + #{scanPreIn}, + #{vailInv} ) @@ -226,7 +233,8 @@ checkEnable,genUnit,innerOrder,secCheckEnable, checkUdims,checkPdaEd,checkPdaUn,checkPc,checkWebNew,checkChange ,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew, - secCheckChange,corpType,storageCode,checkBalacne,secCheckBalacne,supplementOrderType,defaultUnit,useDyCount,expireTip,updateTime,prefix) + secCheckChange,corpType,storageCode,checkBalacne,secCheckBalacne,supplementOrderType,defaultUnit,useDyCount,expireTip,updateTime,prefix + ,ullageFill,scanPreIn,vailInv) values ( #{index}, @@ -261,7 +269,11 @@ #{defaultUnit}, #{useDyCount}, #{expireTip}, - #{updateTime},#{prefix} + #{updateTime}, + #{prefix}, + #{ullageFill}, + #{scanPreIn}, + #{vailInv} ) @@ -301,6 +313,9 @@ useDyCount=#{useDyCount}, expireTip=#{expireTip}, updateTime=#{updateTime}, + ullageFill=#{ullageFill}, + scanPreIn=#{scanPreIn}, + vailInv=#{vailInv}, prefix=#{prefix}, thirdSysFk=#{thirdSysFk},