From 10dce574d3594062f8a48122f55a378335b829be Mon Sep 17 00:00:00 2001 From: schry <2433098676@qq.com> Date: Thu, 1 Jun 2023 10:55:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=BD=E6=BA=AF=E6=9F=A5=E8=AF=A2=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/UdiProductController.java | 48 ++-- .../api/dao/basic/BasicUdiProductMapper.java | 11 + .../glxp/api/dao/basic/ProductInfoDao.java | 6 - .../api/req/basic/BasicUdiProductRequest.java | 261 ++++++++++++++++++ .../service/basic/BasicUdiProductService.java | 17 ++ .../api/service/basic/ProductInfoService.java | 5 - .../impl/BasicUdiProductServiceImpl.java | 48 ++++ .../basic/impl/ProductInfoServiceImpl.java | 33 --- .../mapper/basic/BasicUdiProductMapper.xml | 120 ++++++++ .../mybatis/mapper/basic/ProductInfoDao.xml | 91 ------ 10 files changed, 486 insertions(+), 154 deletions(-) create mode 100644 src/main/java/com/glxp/api/req/basic/BasicUdiProductRequest.java diff --git a/src/main/java/com/glxp/api/controller/basic/UdiProductController.java b/src/main/java/com/glxp/api/controller/basic/UdiProductController.java index 8309a3b..666bb12 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiProductController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiProductController.java @@ -13,10 +13,7 @@ import com.glxp.api.entity.basic.BasicUdiProductEntity; import com.glxp.api.entity.basic.ProductInfoEntity; import com.glxp.api.entity.basic.UdiCompanyEntity; import com.glxp.api.entity.basic.UdiEntity; -import com.glxp.api.req.basic.BasicDictSelectRequest; -import com.glxp.api.req.basic.FilterUdiRelRequest; -import com.glxp.api.req.basic.ProductInfoFilterRequest; -import com.glxp.api.req.basic.UdiCompanyRequest; +import com.glxp.api.req.basic.*; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.trace.TraceManuCodeRellResponse; @@ -143,39 +140,52 @@ public class UdiProductController extends BaseController { return ResultVOUtils.success("更新成功!"); } + + @AuthRuleAnnotation("") + @GetMapping("udi/basic/dict/filterylqxzcrbarmc") + public BaseResponse filterylqxzcrbarmc(BasicUdiProductRequest basicUdiProductRequest) { + + List basicUdiProductEntities = basicUdiProductService.filterYlqxzcrbarmc(basicUdiProductRequest); + PageInfo pageInfo = new PageInfo<>(basicUdiProductEntities); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(basicUdiProductEntities); + return ResultVOUtils.success(pageSimpleResponse); + } + @AuthRuleAnnotation("") @GetMapping("udi/basic/dict/filterCpmctymc") - public BaseResponse filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest) { + public BaseResponse filterCpmctymc(BasicUdiProductRequest basicUdiProductRequest) { - List productInfoEntities = productInfoService.filterCpmctymc(productInfoFilterRequest); - PageInfo pageInfo = new PageInfo<>(productInfoEntities); - PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + List basicUdiProductEntities = basicUdiProductService.filterCpmctymc(basicUdiProductRequest); + PageInfo pageInfo = new PageInfo<>(basicUdiProductEntities); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(pageInfo.getTotal()); - pageSimpleResponse.setList(productInfoEntities); + pageSimpleResponse.setList(basicUdiProductEntities); return ResultVOUtils.success(pageSimpleResponse); } @AuthRuleAnnotation("") @GetMapping("udi/basic/dict/filterGgxh") - public BaseResponse filterGgxh(ProductInfoFilterRequest productInfoFilterRequest) { + public BaseResponse filterGgxh(BasicUdiProductRequest basicUdiProductRequest) { - List productInfoEntities = productInfoService.filterGgxh(productInfoFilterRequest); - PageInfo pageInfo = new PageInfo<>(productInfoEntities); - PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + List basicUdiProductEntities = basicUdiProductService.filterGgxh(basicUdiProductRequest); + PageInfo pageInfo = new PageInfo<>(basicUdiProductEntities); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(pageInfo.getTotal()); - pageSimpleResponse.setList(productInfoEntities); + pageSimpleResponse.setList(basicUdiProductEntities); return ResultVOUtils.success(pageSimpleResponse); } @AuthRuleAnnotation("") @GetMapping("udi/basic/dict/filterNameCode") - public BaseResponse filterNameCode(ProductInfoFilterRequest productInfoFilterRequest) { + public BaseResponse filterNameCode(BasicUdiProductRequest basicUdiProductRequest) { - List productInfoEntities = productInfoService.filterNameCode(productInfoFilterRequest); - PageInfo pageInfo = new PageInfo<>(productInfoEntities); - PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + List basicUdiProductEntities = basicUdiProductService.filterNameCode(basicUdiProductRequest); + PageInfo pageInfo = new PageInfo<>(basicUdiProductEntities); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(pageInfo.getTotal()); - pageSimpleResponse.setList(productInfoEntities); + pageSimpleResponse.setList(basicUdiProductEntities); return ResultVOUtils.success(pageSimpleResponse); } diff --git a/src/main/java/com/glxp/api/dao/basic/BasicUdiProductMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicUdiProductMapper.java index 8a6077f..f481c53 100644 --- a/src/main/java/com/glxp/api/dao/basic/BasicUdiProductMapper.java +++ b/src/main/java/com/glxp/api/dao/basic/BasicUdiProductMapper.java @@ -2,7 +2,10 @@ package com.glxp.api.dao.basic; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.glxp.api.entity.basic.BasicUdiProductEntity; +import com.glxp.api.entity.basic.ProductInfoEntity; +import com.glxp.api.req.basic.BasicUdiProductRequest; import com.glxp.api.req.basic.FilterUdiRelRequest; +import com.glxp.api.req.basic.ProductInfoFilterRequest; import com.glxp.api.res.basic.BasicUdiRelResponse; import org.apache.ibatis.annotations.Mapper; @@ -12,4 +15,12 @@ import java.util.List; public interface BasicUdiProductMapper extends BaseMapper { List filterList(FilterUdiRelRequest filterUdiRelRequest); + + List filterYlqxzcrbarmc(BasicUdiProductRequest basicUdiProductRequest); + + List filterCpmctymc(BasicUdiProductRequest basicUdiProductRequest); + + List filterGgxh(BasicUdiProductRequest basicUdiProductRequest); + + List filterNameCode(BasicUdiProductRequest basicUdiProductRequest); } diff --git a/src/main/java/com/glxp/api/dao/basic/ProductInfoDao.java b/src/main/java/com/glxp/api/dao/basic/ProductInfoDao.java index 0ff57ff..1fe7372 100644 --- a/src/main/java/com/glxp/api/dao/basic/ProductInfoDao.java +++ b/src/main/java/com/glxp/api/dao/basic/ProductInfoDao.java @@ -15,12 +15,6 @@ public interface ProductInfoDao { List filterProductGroup(ProductInfoFilterRequest productInfoFilterRequest); - List filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest); - - List filterGgxh(ProductInfoFilterRequest productInfoFilterRequest); - - List filterNameCode(ProductInfoFilterRequest productInfoFilterRequest); - List filterUdiByTyshxydm(ProductInfoFilterRequest productInfoFilterRequest); List filterUdiByCreditNo(ProductInfoFilterRequest productInfoFilterRequest); diff --git a/src/main/java/com/glxp/api/req/basic/BasicUdiProductRequest.java b/src/main/java/com/glxp/api/req/basic/BasicUdiProductRequest.java new file mode 100644 index 0000000..eeedb06 --- /dev/null +++ b/src/main/java/com/glxp/api/req/basic/BasicUdiProductRequest.java @@ -0,0 +1,261 @@ +package com.glxp.api.req.basic; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.glxp.api.util.page.ListPageRequest; +import lombok.Data; + +import java.util.Date; + +@Data +public class BasicUdiProductRequest extends ListPageRequest { + + private Long id; + + /** + * 标识 + */ + private String nameCode; + + /** + * 包装比例 + */ + private String packRatio; + + /** + * 包装级别 + */ + private String packLevel; + + /** + * 包含下级数量 + */ + private Integer bhxjsl; + + /** + * 包含最小销售包装数量 + */ + private Integer bhzxxsbzsl; + + /** + * 最小包装单元内包含使用单元数量: + * 最小销售标识包含使用单元数量 + */ + private Integer zxxsbzbhsydysl; + + /** + * 包含下级产品编码 + */ + private String bhxjcpbm; + + /** + * 包装层级 + */ + private String bzcj; + + /** + * ERPID + */ + private String thirdProductNo; + + /** + * 1.器械,2,药品 + */ + private Integer addType; + + /** + * 国家库key + */ + private String deviceRecordKey; + + /** + * 以使用单元数量入库 + */ + private Integer isUseDy; + + /** + * ERP产品名 + */ + private String thirdProductName; + + /** + * 产品名称,通用名称 + */ + private String cpmctymc; + + /** + * 产品类别 + */ + private String cplb; + + /** + * 分类编码 + */ + private String flbm; + + /** + * 规格型号 + */ + private String ggxh; + + /** + * 器械类别 + */ + private String qxlb; + + /** + * 统一社会信用代码证号 + */ + private String tyshxydm; + + /** + * 注册/备案人名称 + */ + private String ylqxzcrbarmc; + + /** + * "注册/备案证号, + */ + private String zczbhhzbapzbh; + + /** + * 注册/备案人名称英文名称 + */ + private String ylqxzcrbarywmc; + + /** + * 使用单元产品标识 + */ + private String sydycpbs; + + /** + * UUID主键 + */ + private String uuid; + + /** + * 上级产品标识 + */ + private String sjcpbm; + + /** + * 历史版本号,最高为最新 + */ + private Integer versionNumber; + + /** + * 表示类型:1.主标识,2,使用单元标识,3.本体标识,4,包装标识 + */ + private Integer diType; + + /** + * 生产标识是否包含批号 + */ + private String scbssfbhph; + + /** + * 生产标识是否包含序列号 + */ + private String scbssfbhxlh; + + /** + * 生产标识是否包含生产日期 + */ + private String scbssfbhscrq; + + /** + * 生产标识是否包含失效日期 + */ + private String scbssfbhsxrq; + + /** + * 医保编码 + */ + private String ybbm; + + /** + * 商品名称 + */ + private String spmc; + + private String cphhhbh; + + private String cpms; + + private String cpbsbmtxmc; + + /** + * 是否是最新记录 + */ + private Boolean isNewest; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 产品类型 + */ + private String cplx; + + /** + * 耗材或者设备 + */ + private String hchzsb; + + /** + * 是否为包类产品/组套类产品; 1 是 0 否 + */ + private String sfwblztlcp; + + /** + * 共振(MR) 安全相关信息; 0 安全 , 1 条件安全, 28 + * 不安全 , 3 说明书或标签上面不包括 MR 安全信息 + */ + private String cgzmraqxgxx; + + /** + * 标记为一次性使用:0 否, 1 是 + */ + private String sfbjwycxsy; + + /** + * 最大重复使用次数 + */ + private String zdcfsycs; + + /** + * 是否为已灭菌产品:1 是 0 否 + */ + private String sfwwjbz; + + /** + * 使用前是否需要进行灭菌:1 是 0 否 + */ + private String syqsfxyjxmj; + + /** + * 灭菌方式 + */ + private String mjfs; + + /** + * 其他信息的网址链接 + */ + private String qtxxdwzlj; + + /** + * 分类编码对应分类名称 + */ + private String categoryName; + + private String manufactory; + + private String measname; + + private String remark; + + private Long updateUser; +} diff --git a/src/main/java/com/glxp/api/service/basic/BasicUdiProductService.java b/src/main/java/com/glxp/api/service/basic/BasicUdiProductService.java index fe98e9e..8367cfd 100644 --- a/src/main/java/com/glxp/api/service/basic/BasicUdiProductService.java +++ b/src/main/java/com/glxp/api/service/basic/BasicUdiProductService.java @@ -1,9 +1,17 @@ package com.glxp.api.service.basic; import com.baomidou.mybatisplus.extension.service.IService; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.entity.basic.BasicUdiProductEntity; +import com.glxp.api.entity.basic.ProductInfoEntity; +import com.glxp.api.entity.basic.UdiCompanyEntity; +import com.glxp.api.req.basic.BasicUdiProductRequest; import com.glxp.api.req.basic.FilterUdiRelRequest; +import com.glxp.api.req.basic.ProductInfoFilterRequest; +import com.glxp.api.req.basic.UdiCompanyRequest; +import javax.validation.Valid; import java.util.List; public interface BasicUdiProductService extends IService { @@ -13,5 +21,14 @@ public interface BasicUdiProductService extends IService public List filterList(FilterUdiRelRequest filterUdiRelRequest); boolean updateByUuid(BasicUdiProductEntity basicUdiProductEntity); + + List filterYlqxzcrbarmc(BasicUdiProductRequest basicUdiProductRequest); + + List filterCpmctymc(BasicUdiProductRequest basicUdiProductRequest); + + List filterGgxh(BasicUdiProductRequest basicUdiProductRequest); + + List filterNameCode(BasicUdiProductRequest basicUdiProductRequest); + } diff --git a/src/main/java/com/glxp/api/service/basic/ProductInfoService.java b/src/main/java/com/glxp/api/service/basic/ProductInfoService.java index 5ca25b6..539b0ae 100644 --- a/src/main/java/com/glxp/api/service/basic/ProductInfoService.java +++ b/src/main/java/com/glxp/api/service/basic/ProductInfoService.java @@ -11,11 +11,6 @@ public interface ProductInfoService { //赋码用 //获取产品名称通用名称 - List filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest); - - List filterGgxh(ProductInfoFilterRequest productInfoFilterRequest); - - List filterNameCode(ProductInfoFilterRequest productInfoFilterRequest); List filterProductInfo(ProductInfoFilterRequest productInfoFilterRequest); diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicUdiProductServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicUdiProductServiceImpl.java index cb4a6f9..4ee8db1 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicUdiProductServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicUdiProductServiceImpl.java @@ -3,7 +3,10 @@ package com.glxp.api.service.basic.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.glxp.api.entity.basic.BasicUdiRelEntity; +import com.glxp.api.entity.basic.ProductInfoEntity; +import com.glxp.api.req.basic.BasicUdiProductRequest; import com.glxp.api.req.basic.FilterUdiRelRequest; +import com.glxp.api.req.basic.ProductInfoFilterRequest; import com.glxp.api.service.basic.BasicUdiProductService; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -11,6 +14,7 @@ import com.glxp.api.dao.basic.BasicUdiProductMapper; import com.glxp.api.entity.basic.BasicUdiProductEntity; import javax.annotation.Resource; +import java.util.Collections; import java.util.List; @Service @@ -35,4 +39,48 @@ public class BasicUdiProductServiceImpl extends ServiceImpl().eq("uuid", basicUdiProductEntity.getUuid())) > 0; } + + @Override + public List filterYlqxzcrbarmc(BasicUdiProductRequest basicUdiProductRequest) { + if (basicUdiProductRequest == null) { + return Collections.emptyList(); + } + int offset = (basicUdiProductRequest.getPage() - 1) * basicUdiProductRequest.getLimit(); + PageHelper.offsetPage(offset, basicUdiProductRequest.getLimit()); + List data = basicUdiProductMapper.filterYlqxzcrbarmc(basicUdiProductRequest); + return data; + } + + @Override + public List filterCpmctymc(BasicUdiProductRequest basicUdiProductRequest) { + if (basicUdiProductRequest == null) { + return Collections.emptyList(); + } + int offset = (basicUdiProductRequest.getPage() - 1) * basicUdiProductRequest.getLimit(); + PageHelper.offsetPage(offset, basicUdiProductRequest.getLimit()); + List data = basicUdiProductMapper.filterCpmctymc(basicUdiProductRequest); + return data; + } + + @Override + public List filterGgxh(BasicUdiProductRequest basicUdiProductRequest) { + if (basicUdiProductRequest == null) { + return Collections.emptyList(); + } + int offset = (basicUdiProductRequest.getPage() - 1) * basicUdiProductRequest.getLimit(); + PageHelper.offsetPage(offset, basicUdiProductRequest.getLimit()); + List data = basicUdiProductMapper.filterGgxh(basicUdiProductRequest); + return data; + } + + @Override + public List filterNameCode(BasicUdiProductRequest basicUdiProductRequest) { + if (basicUdiProductRequest == null) { + return Collections.emptyList(); + } + int offset = (basicUdiProductRequest.getPage() - 1) * basicUdiProductRequest.getLimit(); + PageHelper.offsetPage(offset, basicUdiProductRequest.getLimit()); + List data = basicUdiProductMapper.filterNameCode(basicUdiProductRequest); + return data; + } } diff --git a/src/main/java/com/glxp/api/service/basic/impl/ProductInfoServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/ProductInfoServiceImpl.java index b726be5..37ef4cf 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/ProductInfoServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/ProductInfoServiceImpl.java @@ -20,39 +20,6 @@ public class ProductInfoServiceImpl implements ProductInfoService { @Resource ProductInfoDao productInfoDao; - @Override - public List filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest) { - if (productInfoFilterRequest == null) { - return Collections.emptyList(); - } - int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); - PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); - List data = productInfoDao.filterCpmctymc(productInfoFilterRequest); - return data; - } - - @Override - public List filterGgxh(ProductInfoFilterRequest productInfoFilterRequest) { - if (productInfoFilterRequest == null) { - return Collections.emptyList(); - } - int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); - PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); - List data = productInfoDao.filterGgxh(productInfoFilterRequest); - return data; - } - - @Override - public List filterNameCode(ProductInfoFilterRequest productInfoFilterRequest) { - if (productInfoFilterRequest == null) { - return Collections.emptyList(); - } - int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit(); - PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit()); - List data = productInfoDao.filterNameCode(productInfoFilterRequest); - return data; - } - @Override public List filterProductInfo(ProductInfoFilterRequest productInfoFilterRequest) { if (productInfoFilterRequest == null) { diff --git a/src/main/resources/mybatis/mapper/basic/BasicUdiProductMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicUdiProductMapper.xml index 6b4b2fb..762d485 100644 --- a/src/main/resources/mybatis/mapper/basic/BasicUdiProductMapper.xml +++ b/src/main/resources/mybatis/mapper/basic/BasicUdiProductMapper.xml @@ -45,4 +45,124 @@ ORDER BY updateTime DESC + + + + + + diff --git a/src/main/resources/mybatis/mapper/basic/ProductInfoDao.xml b/src/main/resources/mybatis/mapper/basic/ProductInfoDao.xml index a7f58e9..415e528 100644 --- a/src/main/resources/mybatis/mapper/basic/ProductInfoDao.xml +++ b/src/main/resources/mybatis/mapper/basic/ProductInfoDao.xml @@ -70,98 +70,7 @@ GROUP BY uuid - - - -