From 8027700c2f1962c9cd6946e58f30f5d12483e586 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Wed, 24 May 2023 09:55:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8C=BB=E7=96=97=E5=99=A8?= =?UTF-8?q?=E6=A2=B0=E4=BF=A1=E6=81=AF=E7=BB=B4=E6=8A=A4=EF=BC=8C=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E6=B3=A8=E5=86=8C=E5=8C=BB=E7=96=97=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 + .../basic/UdiProductController.java | 133 +++++++++++++++ .../controller/basic/UdiRelController.java | 151 ++++++++++++++++ .../controller/basic/UdiSyncController.java | 161 +++--------------- .../trace/TraceManuOrderController.java | 58 +++++++ .../api/dao/basic/BasicUdiProductMapper.java | 6 + .../dao/basic/BasicUdiRelEntityMapper.java | 9 - .../api/dao/trace/TraceManuOrderMapper.java | 7 + .../entity/basic/BasicUdiProductEntity.java | 16 +- .../entity/trace/TraceManuCodeRelEntity.java | 8 +- .../api/req/basic/BasicDictSelectRequest.java | 12 ++ ...uest.java => BasicUdiBatchRelRequest.java} | 2 +- .../api/req/trace/TraceManuDetailRequest.java | 53 ++++++ .../api/req/trace/TraceManuOrderRequest.java | 77 +++++++++ .../res/trace/TraceManuCodeRellResponse.java | 79 +++++++++ .../api/res/trace/TraceManuOrderResponse.java | 80 +++++++++ .../service/basic/BasicUdiProductService.java | 12 +- .../basic/BasicUdiProductServiceImpl.java | 23 ++- .../api/service/basic/BasicUdiRelService.java | 4 + .../trace/TraceManuCodeRelService.java | 7 +- .../trace/TraceManuCodeRelServiceImpl.java | 10 +- .../service/trace/TraceManuOrderService.java | 9 +- .../trace/TraceManuOrderServiceImpl.java | 11 -- .../trace/impl/TraceManuOrderServiceImpl.java | 39 +++++ .../TraceTaskNoticeServiceImpl.java | 5 +- .../mapper/basic/BasicUdiProductMapper.xml | 44 +++++ .../mapper/basic/BasicUdiRelEntityMapper.xml | 18 -- .../mapper/trace/TraceManuOrderMapper.xml | 44 +++++ src/main/resources/schemas/schema_v2.1.sql | 2 + 29 files changed, 891 insertions(+), 193 deletions(-) create mode 100644 src/main/java/com/glxp/api/controller/basic/UdiProductController.java create mode 100644 src/main/java/com/glxp/api/controller/basic/UdiRelController.java create mode 100644 src/main/java/com/glxp/api/controller/trace/TraceManuOrderController.java delete mode 100644 src/main/java/com/glxp/api/dao/basic/BasicUdiRelEntityMapper.java create mode 100644 src/main/java/com/glxp/api/req/basic/BasicDictSelectRequest.java rename src/main/java/com/glxp/api/req/basic/{BasicUdiReRequest.java => BasicUdiBatchRelRequest.java} (95%) create mode 100644 src/main/java/com/glxp/api/req/trace/TraceManuDetailRequest.java create mode 100644 src/main/java/com/glxp/api/req/trace/TraceManuOrderRequest.java create mode 100644 src/main/java/com/glxp/api/res/trace/TraceManuCodeRellResponse.java create mode 100644 src/main/java/com/glxp/api/res/trace/TraceManuOrderResponse.java delete mode 100644 src/main/java/com/glxp/api/service/trace/TraceManuOrderServiceImpl.java create mode 100644 src/main/java/com/glxp/api/service/trace/impl/TraceManuOrderServiceImpl.java rename src/main/java/com/glxp/api/service/trace/{ => impl}/TraceTaskNoticeServiceImpl.java (76%) delete mode 100644 src/main/resources/mybatis/mapper/basic/BasicUdiRelEntityMapper.xml diff --git a/pom.xml b/pom.xml index 719f85d..5c4e47b 100644 --- a/pom.xml +++ b/pom.xml @@ -371,6 +371,10 @@ bcprov-jdk15to18 1.68 + + org.springframework.boot + spring-boot-starter-amqp + diff --git a/src/main/java/com/glxp/api/controller/basic/UdiProductController.java b/src/main/java/com/glxp/api/controller/basic/UdiProductController.java new file mode 100644 index 0000000..140ffd0 --- /dev/null +++ b/src/main/java/com/glxp/api/controller/basic/UdiProductController.java @@ -0,0 +1,133 @@ +package com.glxp.api.controller.basic; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; +import com.github.pagehelper.PageInfo; +import com.glxp.api.annotation.AuthRuleAnnotation; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.controller.BaseController; +import com.glxp.api.entity.basic.BasicUdiProductEntity; +import com.glxp.api.entity.basic.ProductInfoEntity; +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.res.PageSimpleResponse; +import com.glxp.api.res.basic.BasicUdiRelResponse; +import com.glxp.api.service.basic.BasicUdiProductService; +import com.glxp.api.service.basic.ProductInfoService; +import com.glxp.api.util.udi.FilterUdiUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +@ApiIgnore +@Slf4j +@RestController +public class UdiProductController extends BaseController { + + @Resource + BasicUdiProductService basicUdiProductService; + @Resource + ProductInfoService productInfoService; + + + //获取同步库UDI信息 + @AuthRuleAnnotation("") + @ApiIgnore + @GetMapping("udi/basic/dict/filter") + public BaseResponse filterDict(FilterUdiRelRequest filterUdiRelRequest) { + String nameCode; + if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) { + UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode()); + if (udiEntity != null) { + nameCode = udiEntity.getUdi(); + } else { + return ResultVOUtils.error(500, "无效UDI码!"); + } + } else + nameCode = filterUdiRelRequest.getNameCode(); + if (StrUtil.isNotEmpty(nameCode)) { + filterUdiRelRequest.setNameCode(nameCode); + } else { + filterUdiRelRequest.setDiType(1); + } + List udiDlDeviceResponse = basicUdiProductService.filterList(filterUdiRelRequest); + PageInfo basicUdiRelResponsePageInfo = new PageInfo<>(udiDlDeviceResponse); + PageSimpleResponse basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>(); + basicUdiRelResponsePageSimpleResponse.setTotal(basicUdiRelResponsePageInfo.getTotal()); + basicUdiRelResponsePageSimpleResponse.setList(udiDlDeviceResponse); + return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse); + } + + + //医疗器械信息字典编辑保存 + @AuthRuleAnnotation("") + @PostMapping("udi/basic/dict/add") + public BaseResponse addDict(@RequestBody BasicDictSelectRequest basicDictSelectRequest) { + + if (StrUtil.isNotEmpty(basicDictSelectRequest.getUuid())) { + List productInfoEntities = productInfoService.selectByUuid(basicDictSelectRequest.getUuid()); + if (CollUtil.isNotEmpty(productInfoEntities)) { + for (ProductInfoEntity productInfoEntity : productInfoEntities) { + BasicUdiProductEntity basicUdiProductEntity = new BasicUdiProductEntity(); + BeanUtils.copyProperties(productInfoEntity, basicUdiProductEntity); + basicUdiProductEntity.setUpdateTime(new Date()); + basicUdiProductEntity.setUpdateUser(getUserId()); + basicUdiProductEntity.setId(IdUtil.getSnowflakeNextId()); + basicUdiProductService.save(basicUdiProductEntity); + } + } + } + return ResultVOUtils.success("添加成功!"); + } + + + //医疗器械信息字典编辑保存 + @AuthRuleAnnotation("") + @PostMapping("udi/basic/dict/batchAdd") + public BaseResponse batchAdd(@RequestBody BasicDictSelectRequest basicDictSelectRequest) { + + long userId = getUserId(); + if (CollUtil.isNotEmpty(basicDictSelectRequest.getUuids())) { + for (String uuid : basicDictSelectRequest.getUuids()) { + + if (!basicUdiProductService.isExit(uuid)) { + List productInfoEntities = productInfoService.selectByUuid(basicDictSelectRequest.getUuid()); + if (CollUtil.isNotEmpty(productInfoEntities)) { + for (ProductInfoEntity productInfoEntity : productInfoEntities) { + BasicUdiProductEntity basicUdiProductEntity = new BasicUdiProductEntity(); + BeanUtils.copyProperties(productInfoEntity, basicUdiProductEntity); + basicUdiProductEntity.setUpdateTime(new Date()); + basicUdiProductEntity.setUpdateUser(userId); + basicUdiProductEntity.setId(IdUtil.getSnowflakeNextId()); + basicUdiProductService.save(basicUdiProductEntity); + } + } + } + + } + } + return ResultVOUtils.success("添加成功!"); + } + + //医疗器械信息字典编辑保存 + @AuthRuleAnnotation("") + @PostMapping("udi/basic/dict/edit") + public BaseResponse editDict(@RequestBody BasicUdiProductEntity basicUdiProductEntity) { + basicUdiProductEntity.setUpdateTime(new Date()); + basicUdiProductService.updateById(basicUdiProductEntity); + return ResultVOUtils.success("更新成功!"); + } + + +} diff --git a/src/main/java/com/glxp/api/controller/basic/UdiRelController.java b/src/main/java/com/glxp/api/controller/basic/UdiRelController.java new file mode 100644 index 0000000..60416d9 --- /dev/null +++ b/src/main/java/com/glxp/api/controller/basic/UdiRelController.java @@ -0,0 +1,151 @@ +package com.glxp.api.controller.basic; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; +import com.github.pagehelper.PageInfo; +import com.glxp.api.annotation.AuthRuleAnnotation; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.controller.BaseController; +import com.glxp.api.entity.basic.*; +import com.glxp.api.req.basic.*; +import com.glxp.api.req.system.DeleteRequest; +import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.res.basic.BasicUdiRelResponse; +import com.glxp.api.service.auth.CustomerService; +import com.glxp.api.service.basic.*; +import com.glxp.api.util.udi.FilterUdiUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * 国家库产品信息相关接口 + */ +@Api(tags = "注册企业医疗器械信息绑定接口") +@Slf4j +@RestController +public class UdiRelController extends BaseController { + + @Resource + BasicUdiRelService basicUdiRelService; + @Resource + CustomerService customerService; + @Resource + BasicUdiProductService basicUdiProductService; + @Resource + ProductInfoService productInfoService; + + //获取同步库UDI信息 + @AuthRuleAnnotation("") + @ApiIgnore + @GetMapping("udi/basic/rel/filter") + public BaseResponse filterRel(FilterUdiRelRequest filterUdiRelRequest) { + String nameCode; + if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) { + UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode()); + if (udiEntity != null) { + nameCode = udiEntity.getUdi(); + } else { + return ResultVOUtils.error(500, "无效UDI码!"); + } + } else + nameCode = filterUdiRelRequest.getNameCode(); + if (StrUtil.isNotEmpty(nameCode)) { + filterUdiRelRequest.setNameCode(nameCode); + } else { + filterUdiRelRequest.setDiType(1); + } + List udiDlDeviceResponse = basicUdiRelService.filterList(filterUdiRelRequest); + PageInfo basicUdiRelResponsePageInfo = new PageInfo<>(udiDlDeviceResponse); + PageSimpleResponse basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>(); + basicUdiRelResponsePageSimpleResponse.setTotal(basicUdiRelResponsePageInfo.getTotal()); + basicUdiRelResponsePageSimpleResponse.setList(udiDlDeviceResponse); + return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse); + } + + + //产品信息关联新增 + @ApiIgnore + @AuthRuleAnnotation("") + @ApiOperation(value = "注册企业新增医疗器械信息", response = BaseResponse.class) + @PostMapping("udi/basic/rel/save") + public BaseResponse saveRel(@RequestBody BasicUdiBatchRelRequest basicUdiBatchRelRequest) { + BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity(); + BeanUtils.copyProperties(basicUdiBatchRelRequest, basicUdiRelEntity); + basicUdiRelEntity.setUpdateTime(new Date()); + basicUdiRelEntity.setUpdateUser(customerService.getUserId() + ""); + basicUdiRelEntity.setId(IdUtil.getSnowflakeNextId()); + basicUdiRelService.save(basicUdiRelEntity); + return ResultVOUtils.success("添加成功!"); + } + + + //产品信息关联新增 + @AuthRuleAnnotation("") + @ApiOperation(value = "注册企业批量新增医疗器械信息", response = BaseResponse.class) + @PostMapping("udi/basic/rel/batch/save") + public BaseResponse batchSaveRel(@RequestBody UdiSelectRequest udiSelectRequest) { + String userId = customerService.getUserId() + ""; + if (CollUtil.isNotEmpty(udiSelectRequest.getProducts())) { + for (BasicUdiRelRequest basicUdiRelRequest : udiSelectRequest.getProducts()) { + if (!basicUdiRelService.isExit(basicUdiRelRequest.getUuid(), udiSelectRequest.getCompanyId())) { + BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity(); + basicUdiRelEntity.setUuid(basicUdiRelRequest.getUuid()); + basicUdiRelEntity.setCompanyIdFk(udiSelectRequest.getCompanyId()); + basicUdiRelEntity.setUpdateTime(new Date()); + basicUdiRelEntity.setUpdateUser(userId); + basicUdiRelEntity.setId(IdUtil.getSnowflakeNextId()); + basicUdiRelService.save(basicUdiRelEntity); + + List productInfoEntities = productInfoService.selectByUuid(basicUdiRelRequest.getUuid()); + if (CollUtil.isNotEmpty(productInfoEntities)) { + for (ProductInfoEntity productInfoEntity : productInfoEntities) { +// basicUdiProductService + BasicUdiProductEntity basicUdiProductEntity = new BasicUdiProductEntity(); + BeanUtils.copyProperties(productInfoEntity, basicUdiProductEntity); + basicUdiProductEntity.setId(IdUtil.getSnowflakeNextId()); + basicUdiProductService.save(basicUdiProductEntity); + } + } + + } + } + } + return ResultVOUtils.success("添加成功!"); + } + + @AuthRuleAnnotation("") + @PostMapping("udi/basic/rel/delete") + public BaseResponse deletRel(@RequestBody DeleteRequest deleteRequest) { + basicUdiRelService.removeById(deleteRequest.getId()); + return ResultVOUtils.success("删除成功!"); + } + + //产品信息关联修改 + @AuthRuleAnnotation("") + @PostMapping("udi/basic/rel/update") + public BaseResponse updateRel(@RequestBody BasicUdiRelRequest basicUdiRelRequest) { + + BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity(); + BeanUtils.copyProperties(basicUdiRelRequest, basicUdiRelEntity); + basicUdiRelEntity.setUpdateTime(new Date()); + basicUdiRelEntity.setUpdateUser(customerService.getUserId() + ""); + basicUdiRelService.updateById(basicUdiRelEntity); + return ResultVOUtils.success("添加成功!"); + } + + +} + diff --git a/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java b/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java index c997556..32006bc 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java @@ -1,53 +1,35 @@ package com.glxp.api.controller.basic; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.annotation.Resource; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.IdUtil; -import com.glxp.api.controller.BaseController; -import com.glxp.api.entity.auth.DeptUserEntity; -import com.glxp.api.entity.basic.*; -import com.glxp.api.req.auth.FilterDeptUserReqeust; -import com.glxp.api.req.basic.*; -import com.glxp.api.req.system.DeleteRequest; -import com.glxp.api.res.auth.AuthAdminResponse; -import com.glxp.api.res.basic.BasicUdiRelResponse; -import com.glxp.api.res.basic.UdiRelevanceResponse; -import com.glxp.api.service.auth.CustomerService; -import com.glxp.api.service.basic.*; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.Data; -import org.springframework.beans.BeanUtils; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - +import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageInfo; import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; -import com.glxp.api.constant.AsyncDiDlHelper; +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.FilterUdiRelRequest; +import com.glxp.api.req.basic.ProductInfoFilterRequest; +import com.glxp.api.req.basic.UdiCompanyRequest; import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.res.basic.BasicUdiRelResponse; +import com.glxp.api.service.basic.BasicUdiRelService; +import com.glxp.api.service.basic.ProductInfoService; +import com.glxp.api.service.basic.SyncUdiService; +import com.glxp.api.service.basic.UdiCompanyService; import com.glxp.api.util.udi.FilterUdiUtils; - -import cn.hutool.core.util.StrUtil; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; -/** - * 国家库产品信息相关接口 - */ -@Api(tags = "注册企业医疗器械信息绑定接口") +import javax.annotation.Resource; +import java.util.List; + @Slf4j @RestController -public class UdiSyncController extends BaseController { - +public class UdiSyncController { @Resource SyncUdiService syncUdiService; @Resource @@ -56,10 +38,6 @@ public class UdiSyncController extends BaseController { UdiCompanyService udiCompanyService; @Resource BasicUdiRelService basicUdiRelService; - @Resource - CustomerService customerService; - @Resource - BasicUdiProductService basicUdiProductService; //获取同步库UDI信息 @ApiIgnore @@ -124,105 +102,6 @@ public class UdiSyncController extends BaseController { } - //获取同步库UDI信息 - @AuthRuleAnnotation("") - @ApiIgnore - @GetMapping("udi/basic/rel/filter") - public BaseResponse filterRel(FilterUdiRelRequest filterUdiRelRequest) { - String nameCode; - if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) { - UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode()); - if (udiEntity != null) { - nameCode = udiEntity.getUdi(); - } else { - return ResultVOUtils.error(500, "无效UDI码!"); - } - } else - nameCode = filterUdiRelRequest.getNameCode(); - if (StrUtil.isNotEmpty(nameCode)) { - filterUdiRelRequest.setNameCode(nameCode); - } else { - filterUdiRelRequest.setDiType(1); - } - List udiDlDeviceResponse = basicUdiRelService.filterList(filterUdiRelRequest); - PageInfo basicUdiRelResponsePageInfo = new PageInfo<>(udiDlDeviceResponse); - PageSimpleResponse basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>(); - basicUdiRelResponsePageSimpleResponse.setTotal(basicUdiRelResponsePageInfo.getTotal()); - basicUdiRelResponsePageSimpleResponse.setList(udiDlDeviceResponse); - return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse); - } - - //产品信息关联新增 - @ApiIgnore - @AuthRuleAnnotation("") - @ApiOperation(value = "注册企业新增医疗器械信息", response = BaseResponse.class) - @PostMapping("udi/basic/rel/save") - public BaseResponse saveRel(@RequestBody BasicUdiReRequest basicUdiReRequest) { - BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity(); - BeanUtils.copyProperties(basicUdiReRequest, basicUdiRelEntity); - basicUdiRelEntity.setUpdateTime(new Date()); - basicUdiRelEntity.setUpdateUser(customerService.getUserId() + ""); - basicUdiRelEntity.setId(IdUtil.getSnowflakeNextId()); - basicUdiRelService.save(basicUdiRelEntity); - return ResultVOUtils.success("添加成功!"); - } - - - //产品信息关联新增 - @AuthRuleAnnotation("") - @ApiOperation(value = "注册企业批量新增医疗器械信息", response = BaseResponse.class) - @PostMapping("udi/basic/rel/batch/save") - public BaseResponse batchSaveRel(@RequestBody UdiSelectRequest udiSelectRequest) { - String userId = customerService.getUserId() + ""; - if (CollUtil.isNotEmpty(udiSelectRequest.getProducts())) { - for (BasicUdiRelRequest basicUdiRelRequest : udiSelectRequest.getProducts()) { - if (!basicUdiRelService.isExit(basicUdiRelRequest.getUuid(), udiSelectRequest.getCompanyId())) { - BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity(); - basicUdiRelEntity.setUuid(basicUdiRelRequest.getUuid()); - basicUdiRelEntity.setCompanyIdFk(udiSelectRequest.getCompanyId()); - basicUdiRelEntity.setUpdateTime(new Date()); - basicUdiRelEntity.setUpdateUser(userId); - basicUdiRelEntity.setId(IdUtil.getSnowflakeNextId()); - basicUdiRelService.save(basicUdiRelEntity); - - List productInfoEntities = productInfoService.selectByUuid(basicUdiRelRequest.getUuid()); - if (CollUtil.isNotEmpty(productInfoEntities)) { - for (ProductInfoEntity productInfoEntity : productInfoEntities) { -// basicUdiProductService - BasicUdiProductEntity basicUdiProductEntity = new BasicUdiProductEntity(); - BeanUtils.copyProperties(productInfoEntity, basicUdiProductEntity); - basicUdiProductEntity.setId(IdUtil.getSnowflakeNextId()); - basicUdiProductService.save(basicUdiProductEntity); - } - } - - } - } - } - return ResultVOUtils.success("添加成功!"); - } - - @AuthRuleAnnotation("") - @PostMapping("udi/basic/rel/delete") - public BaseResponse deletRel(@RequestBody DeleteRequest deleteRequest) { - basicUdiRelService.removeById(deleteRequest.getId()); - return ResultVOUtils.success("删除成功!"); - } - - //产品信息关联修改 - @AuthRuleAnnotation("") - @PostMapping("udi/basic/rel/update") - public BaseResponse updateRel(@RequestBody BasicUdiRelRequest basicUdiRelRequest) { - - BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity(); - BeanUtils.copyProperties(basicUdiRelRequest, basicUdiRelEntity); - basicUdiRelEntity.setUpdateTime(new Date()); - basicUdiRelEntity.setUpdateUser(customerService.getUserId() + ""); - basicUdiRelService.updateById(basicUdiRelEntity); - return ResultVOUtils.success("添加成功!"); - } - - //出入库同步下载 @GetMapping("udidl/udiwms/syncUdi") public BaseResponse syncUdi(ProductInfoFilterRequest productInfoFilterRequest) { @@ -254,5 +133,5 @@ public class UdiSyncController extends BaseController { return ResultVOUtils.success(udiInfoEntities); } -} +} diff --git a/src/main/java/com/glxp/api/controller/trace/TraceManuOrderController.java b/src/main/java/com/glxp/api/controller/trace/TraceManuOrderController.java new file mode 100644 index 0000000..87a36b6 --- /dev/null +++ b/src/main/java/com/glxp/api/controller/trace/TraceManuOrderController.java @@ -0,0 +1,58 @@ +package com.glxp.api.controller.trace; + +import com.github.pagehelper.PageInfo; +import com.glxp.api.annotation.AuthRuleAnnotation; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.req.trace.TraceManuDetailRequest; +import com.glxp.api.req.trace.TraceManuOrderRequest; +import com.glxp.api.req.trace.TraceRecordRequest; +import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.res.trace.TraceManuCodeRellResponse; +import com.glxp.api.res.trace.TraceManuOrderResponse; +import com.glxp.api.res.trace.TraceRecordResponse; +import com.glxp.api.service.trace.TraceManuCodeRelService; +import com.glxp.api.service.trace.TraceManuOrderService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import javax.annotation.Resource; +import java.util.List; + +@ApiIgnore +@RestController +@Slf4j +public class TraceManuOrderController { + @Resource + TraceManuOrderService traceManuOrderService; + @Resource + TraceManuCodeRelService traceManuCodeRelService; + + @AuthRuleAnnotation("udi/trace/manu/order/filter") + @GetMapping("udi/trace/manu/order/filter") + public BaseResponse filterLogs(TraceManuOrderRequest traceManuOrderRequest) { + + List traceManuOrderResponses = traceManuOrderService.filterTraces(traceManuOrderRequest); + PageInfo pageInfo = new PageInfo<>(traceManuOrderResponses); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(traceManuOrderResponses); + return ResultVOUtils.success(pageSimpleResponse); + } + + + @AuthRuleAnnotation("udi/trace/manu/order/relCode") + @GetMapping("udi/trace/manu/order/relCode") + public BaseResponse filterDetail(TraceManuDetailRequest traceManuDetailRequest) { + + List traceManuCodeRellResponses = traceManuCodeRelService.filterList(traceManuDetailRequest); + PageInfo pageInfo = new PageInfo<>(traceManuCodeRellResponses); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + pageSimpleResponse.setList(traceManuCodeRellResponses); + 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 e3737e7..8a6077f 100644 --- a/src/main/java/com/glxp/api/dao/basic/BasicUdiProductMapper.java +++ b/src/main/java/com/glxp/api/dao/basic/BasicUdiProductMapper.java @@ -2,8 +2,14 @@ package com.glxp.api.dao.basic; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.glxp.api.entity.basic.BasicUdiProductEntity; +import com.glxp.api.req.basic.FilterUdiRelRequest; +import com.glxp.api.res.basic.BasicUdiRelResponse; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + @Mapper public interface BasicUdiProductMapper extends BaseMapper { + + List filterList(FilterUdiRelRequest filterUdiRelRequest); } diff --git a/src/main/java/com/glxp/api/dao/basic/BasicUdiRelEntityMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicUdiRelEntityMapper.java deleted file mode 100644 index d2e4da2..0000000 --- a/src/main/java/com/glxp/api/dao/basic/BasicUdiRelEntityMapper.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.glxp.api.dao.basic; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.glxp.api.entity.basic.BasicUdiRelEntity; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface BasicUdiRelEntityMapper extends BaseMapper { -} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/dao/trace/TraceManuOrderMapper.java b/src/main/java/com/glxp/api/dao/trace/TraceManuOrderMapper.java index 0c40417..d22be92 100644 --- a/src/main/java/com/glxp/api/dao/trace/TraceManuOrderMapper.java +++ b/src/main/java/com/glxp/api/dao/trace/TraceManuOrderMapper.java @@ -2,8 +2,15 @@ package com.glxp.api.dao.trace; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.glxp.api.entity.trace.TraceManuOrderEntity; +import com.glxp.api.req.trace.TraceManuOrderRequest; +import com.glxp.api.res.trace.TraceManuOrderResponse; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + @Mapper public interface TraceManuOrderMapper extends BaseMapper { + + List filterTraces(TraceManuOrderRequest traceManuOrderRequest); + } diff --git a/src/main/java/com/glxp/api/entity/basic/BasicUdiProductEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicUdiProductEntity.java index c02bad3..c9c320c 100644 --- a/src/main/java/com/glxp/api/entity/basic/BasicUdiProductEntity.java +++ b/src/main/java/com/glxp/api/entity/basic/BasicUdiProductEntity.java @@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; + import java.io.Serializable; import java.util.Date; + import lombok.Data; @Data @@ -46,7 +48,7 @@ public class BasicUdiProductEntity implements Serializable { /** * 最小包装单元内包含使用单元数量: -最小销售标识包含使用单元数量 + * 最小销售标识包含使用单元数量 */ @TableField(value = "zxxsbzbhsydysl") private Integer zxxsbzbhsydysl; @@ -254,7 +256,7 @@ public class BasicUdiProductEntity implements Serializable { /** * 共振(MR) 安全相关信息; 0 安全 , 1 条件安全, 28 -不安全 , 3 说明书或标签上面不包括 MR 安全信息 + * 不安全 , 3 说明书或标签上面不包括 MR 安全信息 */ @TableField(value = "cgzmraqxgxx") private String cgzmraqxgxx; @@ -301,5 +303,15 @@ public class BasicUdiProductEntity implements Serializable { @TableField(value = "categoryName") private String categoryName; + @TableField(value = "manufactory") + private String manufactory; + @TableField(value = "measname") + private String measname; + @TableField(value = "remark") + private String remark; + @TableField(value = "updateUser") + private Long updateUser; + + private static final long serialVersionUID = 1L; } diff --git a/src/main/java/com/glxp/api/entity/trace/TraceManuCodeRelEntity.java b/src/main/java/com/glxp/api/entity/trace/TraceManuCodeRelEntity.java index c2c5006..9c968ba 100644 --- a/src/main/java/com/glxp/api/entity/trace/TraceManuCodeRelEntity.java +++ b/src/main/java/com/glxp/api/entity/trace/TraceManuCodeRelEntity.java @@ -4,14 +4,16 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; + import java.io.Serializable; + import lombok.Data; @Data @TableName(value = "trace_manu_code_rel") public class TraceManuCodeRelEntity implements Serializable { @TableId(value = "id", type = IdType.INPUT) - private Integer id; + private Long id; /** * UDI码 @@ -53,13 +55,13 @@ public class TraceManuCodeRelEntity implements Serializable { * 1.满箱;2:零箱 3:拼箱满箱 4:拼箱零箱 */ @TableField(value = "packState") - private Byte packState; + private Integer packState; /** * 包装层级 */ @TableField(value = "bzcj") - private Byte bzcj; + private Integer bzcj; private static final long serialVersionUID = 1L; } diff --git a/src/main/java/com/glxp/api/req/basic/BasicDictSelectRequest.java b/src/main/java/com/glxp/api/req/basic/BasicDictSelectRequest.java new file mode 100644 index 0000000..8a7d09d --- /dev/null +++ b/src/main/java/com/glxp/api/req/basic/BasicDictSelectRequest.java @@ -0,0 +1,12 @@ +package com.glxp.api.req.basic; + +import lombok.Data; + +import java.util.List; + +@Data +public class BasicDictSelectRequest { + + private String uuid; + private List uuids; +} diff --git a/src/main/java/com/glxp/api/req/basic/BasicUdiReRequest.java b/src/main/java/com/glxp/api/req/basic/BasicUdiBatchRelRequest.java similarity index 95% rename from src/main/java/com/glxp/api/req/basic/BasicUdiReRequest.java rename to src/main/java/com/glxp/api/req/basic/BasicUdiBatchRelRequest.java index b14ff48..dac599c 100644 --- a/src/main/java/com/glxp/api/req/basic/BasicUdiReRequest.java +++ b/src/main/java/com/glxp/api/req/basic/BasicUdiBatchRelRequest.java @@ -9,7 +9,7 @@ import lombok.Data; import java.util.Date; @Data -public class BasicUdiReRequest { +public class BasicUdiBatchRelRequest { /** diff --git a/src/main/java/com/glxp/api/req/trace/TraceManuDetailRequest.java b/src/main/java/com/glxp/api/req/trace/TraceManuDetailRequest.java new file mode 100644 index 0000000..a9a4b0c --- /dev/null +++ b/src/main/java/com/glxp/api/req/trace/TraceManuDetailRequest.java @@ -0,0 +1,53 @@ +package com.glxp.api.req.trace; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +@Data +public class TraceManuDetailRequest { + private Long id; + + /** + * UDI码 + */ + private String code; + + /** + * 父码 + */ + private String pcode; + + /** + * 批次号 + */ + private String batchNo; + + /** + * 生产日期 + */ + private String produceDate; + + /** + * 失效日期 + */ + private String expireDate; + + /** + * 序列号 + */ + private String serialNo; + + /** + * 1.满箱;2:零箱 3:拼箱满箱 4:拼箱零箱 + */ + private Integer packState; + + /** + * 包装层级 + */ + private Integer bzcj; + + +} diff --git a/src/main/java/com/glxp/api/req/trace/TraceManuOrderRequest.java b/src/main/java/com/glxp/api/req/trace/TraceManuOrderRequest.java new file mode 100644 index 0000000..5fa870b --- /dev/null +++ b/src/main/java/com/glxp/api/req/trace/TraceManuOrderRequest.java @@ -0,0 +1,77 @@ +package com.glxp.api.req.trace; + +import com.glxp.api.util.page.ListPageRequest; +import lombok.Data; + +import java.util.Date; + +@Data +public class TraceManuOrderRequest extends ListPageRequest { + + private Long id; + + /** + * 生产订单号 + */ + private String billNo; + + /** + * 订单日期 + */ + private String billDate; + + /** + * 产品名称 + */ + private String cpmctymc; + + /** + * 规格型号 + */ + private String ggxh; + + /** + * 产品描述 + */ + private String cpms; + + /** + * 注册/备案证号 + */ + private String zczbhhzbapzbh; + + /** + * DI + */ + private String nameCode; + + /** + * 国家库UUID + */ + private String uuid; + + /** + * 医疗器械注册人 + */ + private String ylqxzcrbarmc; + + /** + * 生产企业 + */ + private String manufactory; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 企业信息ID外键 + */ + private Long companyIdFk; + + /** + * 上传者ID + */ + private Long uploadUser; +} diff --git a/src/main/java/com/glxp/api/res/trace/TraceManuCodeRellResponse.java b/src/main/java/com/glxp/api/res/trace/TraceManuCodeRellResponse.java new file mode 100644 index 0000000..5aa92c2 --- /dev/null +++ b/src/main/java/com/glxp/api/res/trace/TraceManuCodeRellResponse.java @@ -0,0 +1,79 @@ +package com.glxp.api.res.trace; + +import lombok.Data; + +import java.util.Date; + +@Data +public class TraceManuCodeRellResponse { + + + private Long id; + + /** + * 生产订单号 + */ + private String billNo; + + /** + * 订单日期 + */ + private String billDate; + + /** + * 产品名称 + */ + private String cpmctymc; + + /** + * 规格型号 + */ + private String ggxh; + + /** + * 产品描述 + */ + private String cpms; + + /** + * 注册/备案证号 + */ + private String zczbhhzbapzbh; + + /** + * DI + */ + private String nameCode; + + /** + * 国家库UUID + */ + private String uuid; + + /** + * 医疗器械注册人 + */ + private String ylqxzcrbarmc; + + /** + * 生产企业 + */ + private String manufactory; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 企业信息ID外键 + */ + private Long companyIdFk; + + /** + * 上传者ID + */ + private Long uploadUser; + + +} diff --git a/src/main/java/com/glxp/api/res/trace/TraceManuOrderResponse.java b/src/main/java/com/glxp/api/res/trace/TraceManuOrderResponse.java new file mode 100644 index 0000000..87cce57 --- /dev/null +++ b/src/main/java/com/glxp/api/res/trace/TraceManuOrderResponse.java @@ -0,0 +1,80 @@ +package com.glxp.api.res.trace; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.util.Date; + +@Data +public class TraceManuOrderResponse { + + + private Long id; + + /** + * 生产订单号 + */ + private String billNo; + + /** + * 订单日期 + */ + private String billDate; + + /** + * 产品名称 + */ + private String cpmctymc; + + /** + * 规格型号 + */ + private String ggxh; + + /** + * 产品描述 + */ + private String cpms; + + /** + * 注册/备案证号 + */ + private String zczbhhzbapzbh; + + /** + * DI + */ + private String nameCode; + + /** + * 国家库UUID + */ + private String uuid; + + /** + * 医疗器械注册人 + */ + private String ylqxzcrbarmc; + + /** + * 生产企业 + */ + private String manufactory; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 企业信息ID外键 + */ + private Long companyIdFk; + + /** + * 上传者ID + */ + private Long uploadUser; +} 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 7d95d33..37863ae 100644 --- a/src/main/java/com/glxp/api/service/basic/BasicUdiProductService.java +++ b/src/main/java/com/glxp/api/service/basic/BasicUdiProductService.java @@ -1,8 +1,16 @@ package com.glxp.api.service.basic; -import com.glxp.api.entity.basic.BasicUdiProductEntity; import com.baomidou.mybatisplus.extension.service.IService; -public interface BasicUdiProductService extends IService{ +import com.glxp.api.entity.basic.BasicUdiProductEntity; +import com.glxp.api.req.basic.FilterUdiRelRequest; +import com.glxp.api.res.basic.BasicUdiRelResponse; + +import java.util.List; +public interface BasicUdiProductService extends IService { + public boolean isExit(String uuid); + + public List filterList(FilterUdiRelRequest filterUdiRelRequest); } + diff --git a/src/main/java/com/glxp/api/service/basic/BasicUdiProductServiceImpl.java b/src/main/java/com/glxp/api/service/basic/BasicUdiProductServiceImpl.java index 1b9fe40..07522ff 100644 --- a/src/main/java/com/glxp/api/service/basic/BasicUdiProductServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/BasicUdiProductServiceImpl.java @@ -1,11 +1,32 @@ package com.glxp.api.service.basic; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.github.pagehelper.PageHelper; +import com.glxp.api.entity.basic.BasicUdiRelEntity; +import com.glxp.api.req.basic.FilterUdiRelRequest; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.glxp.api.dao.basic.BasicUdiProductMapper; import com.glxp.api.entity.basic.BasicUdiProductEntity; +import javax.annotation.Resource; +import java.util.List; + @Service -public class BasicUdiProductServiceImpl extends ServiceImpl implements BasicUdiProductService{ +public class BasicUdiProductServiceImpl extends ServiceImpl implements BasicUdiProductService { + @Resource + BasicUdiProductMapper basicUdiProductMapper; + + @Override + public boolean isExit(String uuid) { + return basicUdiProductMapper.exists(new QueryWrapper().eq("uuid", uuid)); + } + @Override + public List filterList(FilterUdiRelRequest filterUdiRelRequest) { + if (null != filterUdiRelRequest.getPage() && null != filterUdiRelRequest.getLimit()) { + PageHelper.offsetPage((filterUdiRelRequest.getPage() - 1) * filterUdiRelRequest.getLimit(), filterUdiRelRequest.getLimit()); + } + return basicUdiProductMapper.filterList(filterUdiRelRequest); + } } diff --git a/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java b/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java index 91af281..5068b93 100644 --- a/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java +++ b/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java @@ -1,6 +1,7 @@ package com.glxp.api.service.basic; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.github.pagehelper.PageHelper; import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.res.basic.BasicUdiRelResponse; import org.springframework.stereotype.Service; @@ -22,6 +23,9 @@ public class BasicUdiRelService extends ServiceImpl filterList(FilterUdiRelRequest filterUdiRelRequest) { + if (null != filterUdiRelRequest.getPage() && null != filterUdiRelRequest.getLimit()) { + PageHelper.offsetPage((filterUdiRelRequest.getPage() - 1) * filterUdiRelRequest.getLimit(), filterUdiRelRequest.getLimit()); + } return basicUdiRelMapper.filterList(filterUdiRelRequest); } } diff --git a/src/main/java/com/glxp/api/service/trace/TraceManuCodeRelService.java b/src/main/java/com/glxp/api/service/trace/TraceManuCodeRelService.java index 20989c9..4ababb0 100644 --- a/src/main/java/com/glxp/api/service/trace/TraceManuCodeRelService.java +++ b/src/main/java/com/glxp/api/service/trace/TraceManuCodeRelService.java @@ -2,7 +2,12 @@ package com.glxp.api.service.trace; import com.glxp.api.entity.trace.TraceManuCodeRelEntity; import com.baomidou.mybatisplus.extension.service.IService; -public interface TraceManuCodeRelService extends IService{ +import com.glxp.api.req.trace.TraceManuDetailRequest; +import com.glxp.api.res.trace.TraceManuCodeRellResponse; +import java.util.List; +public interface TraceManuCodeRelService extends IService { + + List filterList(TraceManuDetailRequest traceManuDetailRequest); } diff --git a/src/main/java/com/glxp/api/service/trace/TraceManuCodeRelServiceImpl.java b/src/main/java/com/glxp/api/service/trace/TraceManuCodeRelServiceImpl.java index 1a116b0..d1d4f48 100644 --- a/src/main/java/com/glxp/api/service/trace/TraceManuCodeRelServiceImpl.java +++ b/src/main/java/com/glxp/api/service/trace/TraceManuCodeRelServiceImpl.java @@ -1,11 +1,19 @@ package com.glxp.api.service.trace; +import com.glxp.api.req.trace.TraceManuDetailRequest; +import com.glxp.api.res.trace.TraceManuCodeRellResponse; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.glxp.api.entity.trace.TraceManuCodeRelEntity; import com.glxp.api.dao.trace.TraceManuCodeRelMapper; +import java.util.List; + @Service -public class TraceManuCodeRelServiceImpl extends ServiceImpl implements TraceManuCodeRelService{ +public class TraceManuCodeRelServiceImpl extends ServiceImpl implements TraceManuCodeRelService { + @Override + public List filterList(TraceManuDetailRequest traceManuDetailRequest) { + return null; + } } diff --git a/src/main/java/com/glxp/api/service/trace/TraceManuOrderService.java b/src/main/java/com/glxp/api/service/trace/TraceManuOrderService.java index 4c75c8a..b590758 100644 --- a/src/main/java/com/glxp/api/service/trace/TraceManuOrderService.java +++ b/src/main/java/com/glxp/api/service/trace/TraceManuOrderService.java @@ -2,7 +2,14 @@ package com.glxp.api.service.trace; import com.glxp.api.entity.trace.TraceManuOrderEntity; import com.baomidou.mybatisplus.extension.service.IService; -public interface TraceManuOrderService extends IService{ +import com.glxp.api.req.trace.TraceManuOrderRequest; +import com.glxp.api.req.trace.TraceRecordRequest; +import com.glxp.api.res.trace.TraceManuOrderResponse; +import com.glxp.api.res.trace.TraceRecordResponse; +import java.util.List; +public interface TraceManuOrderService extends IService { + + List filterTraces(TraceManuOrderRequest traceManuOrderRequest); } diff --git a/src/main/java/com/glxp/api/service/trace/TraceManuOrderServiceImpl.java b/src/main/java/com/glxp/api/service/trace/TraceManuOrderServiceImpl.java deleted file mode 100644 index 022b4ec..0000000 --- a/src/main/java/com/glxp/api/service/trace/TraceManuOrderServiceImpl.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.glxp.api.service.trace; - -import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.glxp.api.entity.trace.TraceManuOrderEntity; -import com.glxp.api.dao.trace.TraceManuOrderMapper; - -@Service -public class TraceManuOrderServiceImpl extends ServiceImpl implements TraceManuOrderService{ - -} diff --git a/src/main/java/com/glxp/api/service/trace/impl/TraceManuOrderServiceImpl.java b/src/main/java/com/glxp/api/service/trace/impl/TraceManuOrderServiceImpl.java new file mode 100644 index 0000000..cbd919e --- /dev/null +++ b/src/main/java/com/glxp/api/service/trace/impl/TraceManuOrderServiceImpl.java @@ -0,0 +1,39 @@ +package com.glxp.api.service.trace.impl; + +import com.github.pagehelper.PageHelper; +import com.glxp.api.dao.trace.TraceRecordMapper; +import com.glxp.api.req.trace.TraceManuOrderRequest; +import com.glxp.api.req.trace.TraceRecordRequest; +import com.glxp.api.res.trace.TraceManuOrderResponse; +import com.glxp.api.res.trace.TraceRecordResponse; +import com.glxp.api.service.trace.TraceManuOrderService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.entity.trace.TraceManuOrderEntity; +import com.glxp.api.dao.trace.TraceManuOrderMapper; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; + +@Service +public class TraceManuOrderServiceImpl extends ServiceImpl implements TraceManuOrderService { + + + @Resource + TraceManuOrderMapper traceManuOrderMapper; + + @Override + public List filterTraces(TraceManuOrderRequest traceManuOrderRequest) { + if (traceManuOrderRequest == null) { + return Collections.emptyList(); + } + if (traceManuOrderRequest.getPage() != null) { + int offset = (traceManuOrderRequest.getPage() - 1) * traceManuOrderRequest.getLimit(); + PageHelper.offsetPage(offset, traceManuOrderRequest.getLimit()); + } + return traceManuOrderMapper.filterTraces(traceManuOrderRequest); + } + + +} diff --git a/src/main/java/com/glxp/api/service/trace/TraceTaskNoticeServiceImpl.java b/src/main/java/com/glxp/api/service/trace/impl/TraceTaskNoticeServiceImpl.java similarity index 76% rename from src/main/java/com/glxp/api/service/trace/TraceTaskNoticeServiceImpl.java rename to src/main/java/com/glxp/api/service/trace/impl/TraceTaskNoticeServiceImpl.java index 1de1794..5bd0aa8 100644 --- a/src/main/java/com/glxp/api/service/trace/TraceTaskNoticeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/trace/impl/TraceTaskNoticeServiceImpl.java @@ -1,11 +1,12 @@ -package com.glxp.api.service.trace; +package com.glxp.api.service.trace.impl; +import com.glxp.api.service.trace.TraceTaskNoticeService; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.glxp.api.entity.trace.TraceTaskNoticeEntity; import com.glxp.api.dao.trace.TraceTaskNoticeMapper; @Service -public class TraceTaskNoticeServiceImpl extends ServiceImpl implements TraceTaskNoticeService{ +public class TraceTaskNoticeServiceImpl extends ServiceImpl implements TraceTaskNoticeService { } diff --git a/src/main/resources/mybatis/mapper/basic/BasicUdiProductMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicUdiProductMapper.xml index 3af6238..6b4b2fb 100644 --- a/src/main/resources/mybatis/mapper/basic/BasicUdiProductMapper.xml +++ b/src/main/resources/mybatis/mapper/basic/BasicUdiProductMapper.xml @@ -1,4 +1,48 @@ + diff --git a/src/main/resources/mybatis/mapper/basic/BasicUdiRelEntityMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicUdiRelEntityMapper.xml deleted file mode 100644 index e7293eb..0000000 --- a/src/main/resources/mybatis/mapper/basic/BasicUdiRelEntityMapper.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - id, uuid, companyIdFk, updateTime, remark, updateUser - - \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/trace/TraceManuOrderMapper.xml b/src/main/resources/mybatis/mapper/trace/TraceManuOrderMapper.xml index 78a1d6a..ded3580 100644 --- a/src/main/resources/mybatis/mapper/trace/TraceManuOrderMapper.xml +++ b/src/main/resources/mybatis/mapper/trace/TraceManuOrderMapper.xml @@ -1,4 +1,48 @@ + diff --git a/src/main/resources/schemas/schema_v2.1.sql b/src/main/resources/schemas/schema_v2.1.sql index 61c125d..a4cebba 100644 --- a/src/main/resources/schemas/schema_v2.1.sql +++ b/src/main/resources/schemas/schema_v2.1.sql @@ -10,6 +10,8 @@ CALL Pro_Temp_ColumnWork('user_register', 'xemail', 'varchar(255)', 1); -- CALL Pro_Temp_ColumnWork('user_company', 'reason', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('user_register', 'fmobile', 'varchar(255)', 1); +CALL Pro_Temp_ColumnWork('trace_order', 'recordCodeFk', 'varchar(255)', 1); +