From 9f9ad88b1676b800c5322c7a37b97cc8f9635b03 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 9 May 2023 18:02:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/UdiRelevanceController.java | 21 +++++-- .../mybatis/mapper/inv/InvPreProductDao.xml | 1 + .../mybatis/mapper/inv/InvPreinProductDao.xml | 61 ++++++++++--------- 3 files changed, 47 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java index 46ba0cb8..bb6a4680 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java @@ -16,10 +16,7 @@ import com.glxp.api.entity.inv.InvProductEntity; import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.req.basic.UdiCombineRequest; -import com.glxp.api.req.basic.FilterUdiRelRequest; -import com.glxp.api.req.basic.LockUdiRequest; -import com.glxp.api.req.basic.UdiRelevanceSaveRequest; +import com.glxp.api.req.basic.*; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest; import com.glxp.api.res.PageSimpleResponse; @@ -52,8 +49,6 @@ import java.util.List; @RestController public class UdiRelevanceController extends BaseController { - @Resource - GennerOrderUtils gennerOrderUtils; @Resource UdiRelevanceService udiRelevanceService; @Resource @@ -70,6 +65,8 @@ public class UdiRelevanceController extends BaseController { ThrDataService thrDataService; @Resource UdiRlSupService udiRlSupService; + @Resource + ProductInfoService productInfoService; //手持终端下载UDI产品信息 @AuthRuleAnnotation("") @@ -698,4 +695,16 @@ public class UdiRelevanceController extends BaseController { return ResultVOUtils.success(ggxhList); } + //国家库uuid获取产品 + @PostMapping("/udi/udirel/selectOriginuuid") + @Log(title = "单据管理", businessType = BusinessType.INSERT) + public BaseResponse selectOriginuuid(@RequestBody ProductInfoFilterRequest productInfoFilterRequest, BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List udiProductEntities = productInfoService.findAll(productInfoFilterRequest); + return ResultVOUtils.success(udiProductEntities); + } + } diff --git a/src/main/resources/mybatis/mapper/inv/InvPreProductDao.xml b/src/main/resources/mybatis/mapper/inv/InvPreProductDao.xml index fed3333a..f68ceca7 100644 --- a/src/main/resources/mybatis/mapper/inv/InvPreProductDao.xml +++ b/src/main/resources/mybatis/mapper/inv/InvPreProductDao.xml @@ -77,6 +77,7 @@ + group by ipp.id select ipp.id, - ipp.nameCode, - bp.cpmctymc, - ipp.relIdFk, - bp.ggxh, - ipp.batchNo, - ipp.productionDate, - ipp.expireDate, - bp.ylqxzcrbarmc, - bp.zczbhhzbapzbh, - ipp.inCount, - ipp.outCount, - ipp.reCount, - ipp.customerId, - basic_corp.name supName, - ipp.supId, - auth_dept.name deptName, - auth_warehouse.name invName, - ipp.deptCode, - ipp.invCode, - bp.measname + ipp.nameCode, + bp.cpmctymc, + ipp.relIdFk, + bp.ggxh, + ipp.batchNo, + ipp.productionDate, + ipp.expireDate, + bp.ylqxzcrbarmc, + bp.zczbhhzbapzbh, + ipp.inCount, + ipp.outCount, + ipp.reCount, + ipp.customerId, + basic_corp.name supName, + ipp.supId, + auth_dept.name deptName, + auth_warehouse.name invName, + ipp.deptCode, + ipp.invCode, + bp.measname from inv_prein_product ipp - inner join basic_udirel on ipp.relIdFk = basic_udirel.id - inner join basic_products bp on basic_udirel.uuid = bp.uuid - left join basic_corp on ipp.supId = basic_corp.erpId - left join auth_dept on auth_dept.code = ipp.deptCode - left join auth_warehouse on auth_warehouse.code = ipp.invCode + inner join basic_udirel on ipp.relIdFk = basic_udirel.id + inner join basic_products bp on basic_udirel.uuid = bp.uuid + left join basic_corp on ipp.supId = basic_corp.erpId + left join auth_dept on auth_dept.code = ipp.deptCode + left join auth_warehouse on auth_warehouse.code = ipp.invCode AND bp.cpmctymc like concat('%', #{cpmctymc}, '%') @@ -76,16 +76,17 @@ + group by ipp.id