From 48ab83a8f8061351fc13c3b0e6f6ac0163f84e3f Mon Sep 17 00:00:00 2001 From: yanghaihang <1344638791@qq.com> Date: Tue, 25 Apr 2023 14:58:08 +0800 Subject: [PATCH] 4.25 --- pom.xml | 18 + .../AcceptanceContentController.java | 151 --------- .../AcceptanceRecordFormController.java | 59 ++-- .../ApplicationForUseController.java | 28 +- .../controller/BlacklistController.java | 151 --------- .../controller/CabinetFormController.java | 182 ++++++----- .../CatalogueDetailsController.java | 151 --------- .../CentralizedRequestController.java | 40 +-- .../controller/CheckContentController.java | 151 --------- .../controller/CheckScheduleController.java | 70 ++-- .../controller/ComplianceCheckController.java | 71 ++-- .../DecentralizeDetailsController.java | 151 --------- .../DecentralizedRequestController.java | 38 ++- .../DeliveryRegistrationFormController.java | 35 +- .../DetailsOfCentralizedController.java | 151 --------- .../controller/EvaluationFormController.java | 49 +-- .../controller/InstructionBookController.java | 2 +- .../controller/LatticeFormController.java | 151 --------- .../OutgoingContentsController.java | 2 +- ...dVerificationImplementationController.java | 10 +- .../PeriodVerificationPlanController.java | 151 --------- .../ProvideServicesOrSuppliesController.java | 103 +----- .../PurchaseCatalogueController.java | 85 +++-- .../controller/PurchaseListController.java | 53 ++- .../PurchaseListDetailsController.java | 149 --------- .../controller/PurchasingPlanController.java | 86 +++-- .../ReagentConsumableInventoryController.java | 46 ++- .../ReagentConsumablesController.java | 90 +---- .../RequisitionRecordController.java | 17 - ...StandardMaterialApplicationController.java | 1 - ...tandardMaterialApprovalFormController.java | 93 +++++- .../StandardReserveSolutionController.java | 2 +- .../StandardSolutionCurveController.java | 92 +----- .../StorageRegistrationFormController.java | 6 +- .../controller/StorageRoomFormController.java | 182 ++++++----- .../SupplierInformationController.java | 151 ++++++--- .../WarehousingRecordFormController.java | 85 +---- .../reagent/dto/AcceptanceRecordFormDTO.java | 39 ++- .../reagent/dto/ApplicationForUseDTO.java | 23 ++ .../dto/AuditDecentralizedRequestDTO.java | 12 - .../reagent/dto/CentralizedRequestDTO.java | 10 +- .../platform/reagent/dto/CheckContentDTO.java | 2 + .../reagent/dto/ComplianceCheckDTO.java | 19 ++ .../reagent/dto/DecentralizedRequestDTO.java | 4 + .../reagent/dto/EvaluationFormDTO.java | 32 +- .../reagent/dto/OutgoingContentsDTO.java | 1 + .../PeriodVerificationImplementationDTO.java | 35 +- .../dto/PeriodVerificationPlanDTO.java | 29 +- .../platform/reagent/dto/PurchaseListDTO.java | 11 +- .../reagent/dto/PurchasingPlanDTO.java | 23 +- .../dto/StandardMaterialApplicationDTO.java | 3 +- .../reagent/dto/SupplierInformationDTO.java | 4 +- .../reagent/dto/WarehousingRecordFormDTO.java | 36 +- .../reagent/entity/AcceptanceContent.java | 5 - .../reagent/entity/AcceptanceRecordForm.java | 27 +- .../reagent/entity/ApplicationForUse.java | 6 +- .../platform/reagent/entity/BatchDetails.java | 3 + .../platform/reagent/entity/CabinetForm.java | 28 +- .../reagent/entity/CentralizedRequest.java | 15 +- .../platform/reagent/entity/CheckContent.java | 41 --- .../reagent/entity/CheckSchedule.java | 4 +- .../reagent/entity/ComplianceCheck.java | 53 +-- .../reagent/entity/DecentralizeDetails.java | 8 +- .../reagent/entity/DecentralizedRequest.java | 8 +- .../entity/DeliveryRegistrationForm.java | 12 +- .../reagent/entity/DetailsOfCentralized.java | 10 +- .../reagent/entity/EvaluationForm.java | 10 +- .../reagent/entity/InstructionBook.java | 14 +- .../platform/reagent/entity/LatticeForm.java | 19 +- .../reagent/entity/OutgoingContents.java | 16 +- .../PeriodVerificationImplementation.java | 8 +- .../entity/PeriodVerificationPlan.java | 26 +- .../reagent/entity/ProcurementContent.java | 7 +- .../entity/ProvideServicesOrSupplies.java | 10 +- .../platform/reagent/entity/PurchaseList.java | 15 +- .../reagent/entity/PurchaseListDetails.java | 17 +- .../reagent/entity/PurchasingPlan.java | 45 ++- .../entity/ReagentConsumableInventory.java | 81 ++++- .../reagent/entity/ReagentConsumables.java | 5 + .../reagent/entity/ReagentConsumablesSet.java | 11 +- .../reagent/entity/ReferenceMaterial.java | 2 + .../entity/StandardMaterialApplication.java | 20 +- .../entity/StandardMaterialApprovalForm.java | 6 +- .../entity/StandardReserveSolution.java | 48 +-- .../reagent/entity/StandardSolutionCurve.java | 17 +- .../reagent/entity/StorageRoomForm.java | 31 +- .../reagent/entity/SupplierInformation.java | 6 +- .../reagent/entity/WarehousingBatchList.java | 27 +- .../reagent/entity/WarehousingContent.java | 25 +- .../reagent/entity/WarehousingRecordForm.java | 6 +- .../mapper/AcceptanceRecordFormMapper.java | 2 +- .../mapper/ApplicationForUseMapper.java | 3 +- .../mapper/CentralizedRequestMapper.java | 2 +- .../reagent/mapper/CheckContentMapper.java | 22 -- .../reagent/mapper/CheckScheduleMapper.java | 3 +- .../mapper/DecentralizedRequestMapper.java | 2 +- .../DeliveryRegistrationFormMapper.java | 7 + .../reagent/mapper/EvaluationFormMapper.java | 7 +- ...eriodVerificationImplementationMapper.java | 3 +- .../ProvideServicesOrSuppliesMapper.java | 1 - .../mapper/PurchaseListDetailsMapper.java | 4 +- .../mapper/StandardReserveSolutionMapper.java | 7 + .../mapper/StandardSolutionCurveMapper.java | 5 + .../mapper/WarehousingBatchListMapper.java | 2 +- .../mapper/WarehousingRecordFormMapper.java | 3 +- .../service/AcceptanceRecordFormService.java | 6 +- .../service/ApplicationForUseService.java | 6 +- .../reagent/service/BlacklistService.java | 2 + .../reagent/service/CabinetFormService.java | 9 + .../service/CentralizedRequestService.java | 2 +- .../reagent/service/CheckContentService.java | 20 -- .../reagent/service/CheckScheduleService.java | 2 +- .../service/ComplianceCheckService.java | 2 +- .../service/DecentralizedRequestService.java | 3 +- .../DeliveryRegistrationFormService.java | 10 + .../service/EvaluationFormService.java | 10 +- .../reagent/service/LatticeFormService.java | 2 + .../ProvideServicesOrSuppliesService.java | 4 +- .../service/PurchaseCatalogueService.java | 3 +- .../service/PurchaseListDetailsService.java | 1 + .../reagent/service/PurchaseListService.java | 8 +- .../service/PurchasingPlanService.java | 1 - .../ReagentConsumableInventoryService.java | 17 +- .../StandardReserveSolutionService.java | 15 + .../service/StandardSolutionCurveService.java | 8 + .../service/StorageRoomFormService.java | 8 + .../service/SupplierInformationService.java | 5 +- .../service/WarehousingContentService.java | 2 + .../service/WarehousingRecordFormService.java | 3 +- .../impl/AcceptanceRecordFormServiceImpl.java | 86 ++++- .../impl/ApplicationForUseServiceImpl.java | 116 +++---- .../service/impl/BatchDetailsServiceImpl.java | 11 +- .../service/impl/BlacklistServiceImpl.java | 15 + .../service/impl/CabinetFormServiceImpl.java | 124 +++++++ .../impl/CentralizedRequestServiceImpl.java | 20 +- .../service/impl/CheckContentServiceImpl.java | 26 -- .../impl/CheckScheduleServiceImpl.java | 26 +- .../impl/ComplianceCheckServiceImpl.java | 84 +++-- .../impl/DecentralizedRequestServiceImpl.java | 169 ++++++---- .../DeliveryRegistrationFormServiceImpl.java | 211 +++++++++--- .../impl/DetailsOfCentralizedServiceImpl.java | 31 +- .../impl/EvaluationFormServiceImpl.java | 44 ++- .../service/impl/LatticeFormServiceImpl.java | 33 ++ ...VerificationImplementationServiceImpl.java | 24 +- .../impl/ProcurementContentServiceImpl.java | 21 +- .../ProvideServicesOrSuppliesServiceImpl.java | 66 +++- .../impl/PurchaseCatalogueServiceImpl.java | 53 +-- .../impl/PurchaseListDetailsServiceImpl.java | 22 +- .../service/impl/PurchaseListServiceImpl.java | 87 +++-- .../impl/PurchasingPlanServiceImpl.java | 143 +++++--- ...ReagentConsumableInventoryServiceImpl.java | 309 +++++++++++++++--- .../impl/ReagentConsumablesServiceImpl.java | 1 + .../ReagentConsumablesSetServiceImpl.java | 12 +- ...tandardMaterialApplicationServiceImpl.java | 45 ++- ...andardMaterialApprovalFormServiceImpl.java | 5 +- .../StandardReserveSolutionServiceImpl.java | 229 ++++++++++++- .../StandardSolutionCurveServiceImpl.java | 56 ++++ .../impl/StorageRoomFormServiceImpl.java | 101 +++++- .../impl/SupplierInformationServiceImpl.java | 35 +- .../impl/WarehousingContentServiceImpl.java | 14 +- .../WarehousingRecordFormServiceImpl.java | 106 ++++-- .../reagent/vo/AcceptanceRecordFormVO.java | 23 ++ .../reagent/vo/ApplicationForUseVO.java | 7 +- .../platform/reagent/vo/BatchDetailsVO.java | 3 + .../reagent/vo/CentralizedRequestVO.java | 4 +- .../platform/reagent/vo/CheckContentVO.java | 10 - .../platform/reagent/vo/CheckScheduleVO.java | 6 + .../reagent/vo/ComplianceCheckVO.java | 19 +- .../reagent/vo/DecentralizeDetailsVO.java | 2 + .../reagent/vo/DecentralizedRequestVO.java | 17 +- .../reagent/vo/DetailsOfCentralizedVO.java | 28 ++ .../platform/reagent/vo/EvaluationFormVO.java | 12 +- .../PeriodVerificationImplementationVO.java | 6 + .../reagent/vo/PeriodVerificationPlanVO.java | 4 + .../reagent/vo/ProcurementContentVO.java | 13 +- .../vo/ProvideServicesOrSuppliesVO.java | 12 + .../reagent/vo/PurchaseListDetailsVO.java | 10 + .../platform/reagent/vo/PurchaseListVO.java | 1 + .../platform/reagent/vo/PurchasingPlanVO.java | 10 +- .../vo/ReagentConsumableInventoryVO.java | 10 + .../reagent/vo/ReagentConsumablesSetVO.java | 6 +- .../reagent/vo/ReferenceMaterialVO.java | 2 + .../vo/StandardMaterialApplicationVO.java | 7 + .../vo/StandardMaterialApprovalFormVO.java | 5 +- .../reagent/vo/SupplierInformationVO.java | 6 - .../reagent/vo/WarehousingBatchListVO.java | 3 +- .../reagent/vo/WarehousingContentVO.java | 21 ++ .../reagent/vo/WarehousingRecordFormVO.java | 9 +- src/main/resources/bootstrap.yml | 35 ++ .../mapper/AcceptanceContentMapper.xml | 2 +- .../mapper/AcceptanceRecordFormMapper.xml | 12 +- .../mapper/ApplicationForUseMapper.xml | 6 +- .../resources/mapper/BatchDetailsMapper.xml | 2 + .../resources/mapper/CabinetFormMapper.xml | 3 +- .../mapper/CatalogueDetailsMapper.xml | 4 +- .../mapper/CentralizedRequestMapper.xml | 21 +- .../resources/mapper/CheckContentMapper.xml | 32 -- .../resources/mapper/CheckScheduleMapper.xml | 15 +- .../mapper/ComplianceCheckMapper.xml | 147 +++++---- .../mapper/DecentralizeDetailsMapper.xml | 4 +- .../mapper/DecentralizedRequestMapper.xml | 10 +- .../mapper/DeliveryRegistrationFormMapper.xml | 25 +- .../mapper/DetailsOfCentralizedMapper.xml | 3 +- .../resources/mapper/EvaluationFormMapper.xml | 23 +- .../mapper/InstructionBookMapper.xml | 2 +- .../mapper/OutgoingContentsMapper.xml | 5 +- ...PeriodVerificationImplementationMapper.xml | 6 +- .../mapper/PeriodVerificationPlanMapper.xml | 2 +- .../mapper/ProcurementContentMapper.xml | 1 + .../ProvideServicesOrSuppliesMapper.xml | 10 +- .../resources/mapper/PurchaseListMapper.xml | 4 +- .../mapper/PurchaselistDetailsMapper.xml | 18 +- .../ReagentConsumableInventoryMapper.xml | 13 +- .../mapper/ReagentConsumablesMapper.xml | 1 + .../mapper/ReagentConsumablesSetMapper.xml | 4 +- .../mapper/ReferenceMaterialMapper.xml | 1 + .../mapper/RequisitionRecordMapper.xml | 1 - .../StandardMaterialApplicationMapper.xml | 1 + .../StandardMaterialApprovalFormMapper.xml | 31 +- .../mapper/StandardReserveSolutionMapper.xml | 23 +- .../mapper/StandardSolutionCurveMapper.xml | 13 +- .../mapper/StorageRoomFormMapper.xml | 6 +- .../mapper/SupplierInformationMapper.xml | 2 +- .../mapper/WarehousingBatchListMapper.xml | 16 +- .../mapper/WarehousingContentMapper.xml | 13 +- .../mapper/WarehousingRecordFormMapper.xml | 49 +-- 226 files changed, 3879 insertions(+), 3518 deletions(-) delete mode 100644 src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceContentController.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/controller/BlacklistController.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/controller/CatalogueDetailsController.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/controller/CheckContentController.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/controller/DecentralizeDetailsController.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/controller/DetailsOfCentralizedController.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/controller/LatticeFormController.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationPlanController.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListDetailsController.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/dto/AuditDecentralizedRequestDTO.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/entity/CheckContent.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/mapper/CheckContentMapper.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/service/CheckContentService.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/service/impl/CheckContentServiceImpl.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/vo/CheckContentVO.java delete mode 100644 src/main/java/digital/laboratory/platform/reagent/vo/SupplierInformationVO.java delete mode 100644 src/main/resources/mapper/CheckContentMapper.xml diff --git a/pom.xml b/pom.xml index 91930da..2600182 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,12 @@ 2021.1 + + + org.springframework.boot + spring-boot-starter-thymeleaf + + @@ -60,6 +66,12 @@ 2022.10.11-snapshots + + + + + + org.springframework.boot @@ -112,6 +124,12 @@ dlp-admin-api 2022.10.11-snapshots + + org.testng + testng + RELEASE + compile + diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceContentController.java b/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceContentController.java deleted file mode 100644 index b361c65..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceContentController.java +++ /dev/null @@ -1,151 +0,0 @@ -package digital.laboratory.platform.reagent.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import digital.laboratory.platform.common.core.util.R; -import digital.laboratory.platform.common.log.annotation.SysLog; -import digital.laboratory.platform.common.mybatis.security.service.DLPUser; -import digital.laboratory.platform.reagent.entity.AcceptanceContent; -import digital.laboratory.platform.reagent.service.AcceptanceContentService; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.security.Principal; - -/** - * (验收内容) - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe (验收内容) 前端控制器 - * - * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 - * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 - * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/acceptance_content" ) -@Api(value = "acceptance_content", tags = "(验收内容)管理") -public class AcceptanceContentController { - - private final AcceptanceContentService acceptanceContentService; - - /** - * 通过id查询(验收内容) - * @param acceptanceContentId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{acceptanceContentId}" ) - @PreAuthorize("@pms.hasPermission('reagent_acceptance_content_get')" ) - public R getById(@PathVariable("acceptanceContentId" ) String acceptanceContentId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - AcceptanceContent acceptanceContent = acceptanceContentService.getById(acceptanceContentId); - return R.ok(acceptanceContent); - //return R.ok(acceptanceContentService.getById(acceptanceContentId)); - } - - /** - * 分页查询 - * @param page 分页对象 - * @param acceptanceContent (验收内容) - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_acceptance_content_get')" ) - public R> getAcceptanceContentPage(Page page, AcceptanceContent acceptanceContent, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage acceptanceContentSList = acceptanceContentService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(acceptanceContentSList); -// return R.ok(acceptanceContentService.page(page, Wrappers.query(acceptanceContent))); - } - - - /** - * 新增(验收内容) - * @param acceptanceContent (验收内容) - * @return R - */ - @ApiOperation(value = "新增(验收内容)", notes = "新增(验收内容)") - @SysLog("新增(验收内容)" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_acceptance_content_add')" ) - public R postAddObject(@RequestBody AcceptanceContent acceptanceContent, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - acceptanceContent.setAcceptanceContentId(IdWorker.get32UUID().toUpperCase()); - if (acceptanceContentService.save(acceptanceContent)) { - return R.ok(acceptanceContent, "对象创建成功"); - } - else { - return R.failed(acceptanceContent, "对象创建失败"); - } - } - - /** - * 修改(验收内容) - * @param acceptanceContent (验收内容) - * @return R - */ - @ApiOperation(value = "修改(验收内容)", notes = "修改(验收内容)") - @SysLog("修改(验收内容)" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_acceptance_content_edit')" ) - public R putUpdateById(@RequestBody AcceptanceContent acceptanceContent, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (acceptanceContentService.updateById(acceptanceContent)) { - return R.ok(acceptanceContent, "保存对象成功"); - } - else { - return R.failed(acceptanceContent, "保存对象失败"); - } - } - - /** - * 通过id删除(验收内容) - * @param acceptanceContentId id - * @return R - */ - @ApiOperation(value = "通过id删除(验收内容)", notes = "通过id删除(验收内容)") - @SysLog("通过id删除(验收内容)" ) - @DeleteMapping("/{acceptanceContentId}" ) - @PreAuthorize("@pms.hasPermission('reagent_acceptance_content_del')" ) - public R deleteById(@PathVariable String acceptanceContentId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - AcceptanceContent oldAcceptanceContent = acceptanceContentService.getById(acceptanceContentId); - - if (acceptanceContentService.removeById(acceptanceContentId)) { - return R.ok(oldAcceptanceContent, "对象删除成功"); - } - else { - return R.failed(oldAcceptanceContent, "对象删除失败"); - } - - } - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java index 7e4bcfd..667e337 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java @@ -12,6 +12,7 @@ import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm; import digital.laboratory.platform.reagent.service.AcceptanceRecordFormService; import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -23,6 +24,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; +import java.util.List; /** * (验收记录表) @@ -52,9 +54,9 @@ public class AcceptanceRecordFormController { * @return R */ @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{acceptanceRecordFormId}") + @GetMapping() // @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')" ) - public R getById(@PathVariable("acceptanceRecordFormId") String acceptanceRecordFormId, HttpServletRequest theHttpServletRequest) { + public R getById( String acceptanceRecordFormId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -70,21 +72,40 @@ public class AcceptanceRecordFormController { * @param acceptanceRecordForm (验收记录表) * @return */ - @ApiOperation(value = "分页查询", notes = "分页查询") + @ApiOperation(value = "分页查询验收任务", notes = "分页查询验收任务") @GetMapping("/page") -// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')" ) +// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_page')" ) public R> getAcceptanceRecordFormPage(Page page, AcceptanceRecordForm acceptanceRecordForm, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - IPage acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVOPage(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") + IPage acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVOPage(page ); return R.ok(acceptanceRecordFormVOPage); // return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm))); } + /** + * 分页查询 + * + * @param page 分页对象 + * @param acceptanceRecordForm (验收记录表) + * @return + */ + @ApiOperation(value = "分页查询验收记录", notes = "分页查询验收记录") + @GetMapping("/recordPage") +// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_recordPage')" ) + public R> getAcceptanceRecordFormRecordPage(Page page, AcceptanceRecordForm acceptanceRecordForm, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + IPage acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVORecordPage(page); + + + return R.ok(acceptanceRecordFormVOPage); +// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm))); + } + /** * 录入(验收记录表) @@ -94,13 +115,13 @@ public class AcceptanceRecordFormController { */ @ApiOperation(value = "录入(验收记录表)", notes = "录入(验收记录表)") @SysLog("录入(验收记录表)") - @PostMapping + @PutMapping("/commit") // @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_add')" ) public R postAddObject(@RequestBody AcceptanceRecordFormDTO acceptanceRecordFormDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.editFrom(acceptanceRecordFormDTO); + AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.commitForm(acceptanceRecordFormDTO,dlpUser); if (acceptanceRecordForm != null) { return R.ok(acceptanceRecordForm, "保存成功"); @@ -114,20 +135,6 @@ public class AcceptanceRecordFormController { * @param acceptanceRecordFormDTO (验收记录表) * @return R */ - @ApiOperation(value = "提交(验收记录表)", notes = "提交(验收记录表)") - @SysLog("提交(验收记录表)") - @PostMapping("/commit") -// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_edit')") - public R putUpdateById(@RequestBody AcceptanceRecordFormDTO acceptanceRecordFormDTO, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.commitForm(acceptanceRecordFormDTO); - - if (acceptanceRecordForm!=null){ - return R.ok(acceptanceRecordForm,"提交成功"); - }else return R.failed("提交失败"); - } // /** // * 通过id删除(验收记录表) @@ -162,7 +169,7 @@ public class AcceptanceRecordFormController { @ApiOperation(value = "一级审核(验收记录表)", notes = "一级审核(验收记录表)") @SysLog("一级审核(验收记录表)") @PutMapping("/primary") -// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_edit')") +// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_primary')") public R primaryAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -183,7 +190,7 @@ public class AcceptanceRecordFormController { @ApiOperation(value = "二级审核(验收记录表)", notes = "二级审核(验收记录表)") @SysLog("二级审核(验收记录表)") @PutMapping("/secondary") -// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_edit')") +// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_secondary')") public R secondaryAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -204,7 +211,7 @@ public class AcceptanceRecordFormController { @ApiOperation(value = "三级审核(验收记录表)", notes = "三级审核(验收记录表)") @SysLog("三级审核(验收记录表)") @PutMapping("/threeLevel") -// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_edit')") +// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_threeLevel')") public R threeLevelAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/ApplicationForUseController.java b/src/main/java/digital/laboratory/platform/reagent/controller/ApplicationForUseController.java index 6fc443d..61d7093 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ApplicationForUseController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ApplicationForUseController.java @@ -52,9 +52,9 @@ public class ApplicationForUseController { * @return R */ @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{applicationForUseId}") + @GetMapping() // @PreAuthorize("@pms.hasPermission('reagent_application_for_use_get')") - public R getById(@PathVariable("applicationForUseId") String applicationForUseId, HttpServletRequest theHttpServletRequest) { + public R getById( String applicationForUseId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -74,7 +74,7 @@ public class ApplicationForUseController { */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page") -// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_get')") +// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_page')") public R> getApplicationForUsePage(Page page, ApplicationForUse applicationForUse, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -86,8 +86,6 @@ public class ApplicationForUseController { return R.ok(applicationForUseVOList); } - - /** * 新增(试剂耗材领用申请表) * @@ -98,13 +96,13 @@ public class ApplicationForUseController { @SysLog("新增(试剂耗材领用申请表)") @PostMapping // @PreAuthorize("@pms.hasPermission('reagent_application_for_use_add')") - public R postAddObject(@RequestBody List applicationForUseDTOList, HttpServletRequest theHttpServletRequest) { + public R postAddObject(@RequestBody List applicationForUseDTOList, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - ApplicationForUse applicationForUse = applicationForUseService.addApplication(applicationForUseDTOList, dlpUser); + ApplicationForUseVO applicationForUse = applicationForUseService.addApplication(applicationForUseDTOList, dlpUser); if (applicationForUse != null) { return R.ok(applicationForUse, "保存成功"); @@ -121,13 +119,13 @@ public class ApplicationForUseController { @SysLog("修改(试剂耗材领用申请表)") @PutMapping // @PreAuthorize("@pms.hasPermission('reagent_application_for_use_edit')") - public R putUpdateById(@RequestBody List applicationForUseDTOList, HttpServletRequest theHttpServletRequest) { + public R putUpdateById(@RequestBody List applicationForUseDTOList, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - ApplicationForUse applicationForUse = applicationForUseService.editApplication(applicationForUseDTOList, dlpUser); + ApplicationForUseVO applicationForUse = applicationForUseService.editApplication(applicationForUseDTOList, dlpUser); if (applicationForUse != null) { return R.ok(applicationForUse, "修改成功"); @@ -142,9 +140,9 @@ public class ApplicationForUseController { */ @ApiOperation(value = "通过id删除(试剂耗材领用申请表)", notes = "通过id删除(试剂耗材领用申请表)") @SysLog("通过id删除(试剂耗材领用申请表)") - @DeleteMapping("/{applicationForUseId}") + @DeleteMapping() // @PreAuthorize("@pms.hasPermission('reagent_application_for_use_del')") - public R deleteById(@PathVariable String applicationForUseId, HttpServletRequest theHttpServletRequest) { + public R deleteById( String applicationForUseId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -154,8 +152,6 @@ public class ApplicationForUseController { return R.ok("删除成功"); } else return R.failed("删除失败"); } - - /** * 提交试剂耗材领用申请表 * @@ -165,14 +161,14 @@ public class ApplicationForUseController { @ApiOperation(value = "提交试剂耗材领用申请表", notes = "提交试剂耗材领用申请表") @SysLog("修改试剂耗材领用申请表") @PostMapping("/commit") -// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_edit')") - public R commitById(@RequestBody List applicationForUseDTOList, HttpServletRequest theHttpServletRequest) { +// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_commit')") + public R commitById(@RequestBody List applicationForUseDTOList, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - ApplicationForUse applicationForUse = applicationForUseService.commitApplication(applicationForUseDTOList, dlpUser); + ApplicationForUseVO applicationForUse = applicationForUseService.commitApplication(applicationForUseDTOList, dlpUser); if (applicationForUse != null) { return R.ok(applicationForUse, "提交成功"); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/BlacklistController.java b/src/main/java/digital/laboratory/platform/reagent/controller/BlacklistController.java deleted file mode 100644 index 15bcdc5..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/controller/BlacklistController.java +++ /dev/null @@ -1,151 +0,0 @@ -package digital.laboratory.platform.reagent.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import digital.laboratory.platform.common.core.util.R; -import digital.laboratory.platform.common.log.annotation.SysLog; -import digital.laboratory.platform.common.mybatis.security.service.DLPUser; -import digital.laboratory.platform.reagent.entity.Blacklist; -import digital.laboratory.platform.reagent.service.BlacklistService; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.security.Principal; - -/** - * (试剂耗材黑名单) - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe (试剂耗材黑名单) 前端控制器 - * - * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 - * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 - * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/blacklist" ) -@Api(value = "blacklist", tags = "(试剂耗材黑名单)管理") -public class BlacklistController { - - private final BlacklistService blacklistService; - - /** - * 通过id查询(试剂耗材黑名单) - * @param blacklistId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{blacklistId}" ) - @PreAuthorize("@pms.hasPermission('reagent_blacklist_get')" ) - public R getById(@PathVariable("blacklistId" ) String blacklistId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - Blacklist blacklist = blacklistService.getById(blacklistId); - return R.ok(blacklist); - //return R.ok(blacklistService.getById(blacklistId)); - } - - /** - * 分页查询 - * @param page 分页对象 - * @param blacklist (试剂耗材黑名单) - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_blacklist_get')" ) - public R> getBlacklistPage(Page page, Blacklist blacklist, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage blacklistSList = blacklistService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(blacklistSList); -// return R.ok(blacklistService.page(page, Wrappers.query(blacklist))); - } - - - /** - * 新增(试剂耗材黑名单) - * @param blacklist (试剂耗材黑名单) - * @return R - */ - @ApiOperation(value = "新增(试剂耗材黑名单)", notes = "新增(试剂耗材黑名单)") - @SysLog("新增(试剂耗材黑名单)" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_blacklist_add')" ) - public R postAddObject(@RequestBody Blacklist blacklist, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - blacklist.setBlacklistId(IdWorker.get32UUID().toUpperCase()); - if (blacklistService.save(blacklist)) { - return R.ok(blacklist, "对象创建成功"); - } - else { - return R.failed(blacklist, "对象创建失败"); - } - } - - /** - * 修改(试剂耗材黑名单) - * @param blacklist (试剂耗材黑名单) - * @return R - */ - @ApiOperation(value = "修改(试剂耗材黑名单)", notes = "修改(试剂耗材黑名单)") - @SysLog("修改(试剂耗材黑名单)" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_blacklist_edit')" ) - public R putUpdateById(@RequestBody Blacklist blacklist, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (blacklistService.updateById(blacklist)) { - return R.ok(blacklist, "保存对象成功"); - } - else { - return R.failed(blacklist, "保存对象失败"); - } - } - - /** - * 通过id删除(试剂耗材黑名单) - * @param blacklistId id - * @return R - */ - @ApiOperation(value = "通过id删除(试剂耗材黑名单)", notes = "通过id删除(试剂耗材黑名单)") - @SysLog("通过id删除(试剂耗材黑名单)" ) - @DeleteMapping("/{blacklistId}" ) - @PreAuthorize("@pms.hasPermission('reagent_blacklist_del')" ) - public R deleteById(@PathVariable String blacklistId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - Blacklist oldBlacklist = blacklistService.getById(blacklistId); - - if (blacklistService.removeById(blacklistId)) { - return R.ok(oldBlacklist, "对象删除成功"); - } - else { - return R.failed(oldBlacklist, "对象删除失败"); - } - - } - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/CabinetFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/CabinetFormController.java index 4d9775d..fcb00d1 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/CabinetFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/CabinetFormController.java @@ -9,6 +9,7 @@ import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.entity.CabinetForm; import digital.laboratory.platform.reagent.service.CabinetFormService; +import digital.laboratory.platform.reagent.vo.CabinetFormVO; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -22,129 +23,140 @@ import java.io.IOException; import java.security.Principal; /** - * - * * @author Zhang Xiaolong created at 2023-03-22 - * @describe 前端控制器 - * + * @describe 前端控制器 + *

* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 + * 为前端提供数据, 接受前端的数据 + * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 + * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 */ @RestController @RequiredArgsConstructor -@RequestMapping("/cabinet_form" ) -@Api(value = "cabinet_form", tags = "管理") +@RequestMapping("/cabinet_form") +@Api(value = "cabinet_form", tags = "柜子管理") public class CabinetFormController { - private final CabinetFormService cabinetFormService; - - /** - * 通过id查询 - * @param cabinetFormId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{cabinetFormId}" ) - @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')" ) - public R getById(@PathVariable("cabinetFormId" ) String cabinetFormId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - CabinetForm cabinetForm = cabinetFormService.getById(cabinetFormId); - return R.ok(cabinetForm); - //return R.ok(cabinetFormService.getById(cabinetFormId)); - } - - /** + private final CabinetFormService cabinetFormService; + + /** + * 通过id查询 + * + * @param cabinetFormId id + * @return R + */ + @ApiOperation(value = "通过id查询柜子信息", notes = "通过id查询柜子信息") + @GetMapping() +// @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')" ) + + public R getById(String cabinetFormId, HttpServletRequest theHttpServletRequest) { + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + CabinetFormVO formById = cabinetFormService.getFormById(cabinetFormId); + + return R.ok(formById); + + } + + /** * 分页查询 - * @param page 分页对象 - * @param cabinetForm + * + * @param page 分页对象 + * @param cabinetForm * @return */ @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')" ) + @GetMapping("/page") + @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')") public R> getCabinetFormPage(Page page, CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage cabinetFormSList = cabinetFormService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(cabinetFormSList); -// return R.ok(cabinetFormService.page(page, Wrappers.query(cabinetForm))); + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + IPage cabinetFormSList = cabinetFormService.page(page, Wrappers.query() + .orderByDesc("create_time") + ); + return R.ok(cabinetFormSList); } /** * 新增 - * @param cabinetForm + * + * @param cabinetForm * @return R */ - @ApiOperation(value = "新增", notes = "新增") - @SysLog("新增" ) + @ApiOperation(value = "新增柜子信息", notes = "新增柜子信息") + @SysLog("新增柜子信息") @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_add')" ) +// @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_add')" ) public R postAddObject(@RequestBody CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - cabinetForm.setCabinetFormId(IdWorker.get32UUID().toUpperCase()); - if (cabinetFormService.save(cabinetForm)) { - return R.ok(cabinetForm, "对象创建成功"); - } - else { - return R.failed(cabinetForm, "对象创建失败"); - } + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + CabinetForm form = cabinetFormService.addById(cabinetForm); + + if (form != null) { + return R.ok(cabinetForm, "保存成功"); + } else { + return R.failed(cabinetForm, "保存失败"); + } } /** * 修改 - * @param cabinetForm + * + * @param cabinetForm * @return R */ - @ApiOperation(value = "修改", notes = "修改") - @SysLog("修改" ) + @ApiOperation(value = "修改柜子信息", notes = "新增柜子信息") + @SysLog("新增柜子信息") @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_edit')" ) + @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_edit')") public R putUpdateById(@RequestBody CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (cabinetFormService.updateById(cabinetForm)) { - return R.ok(cabinetForm, "保存对象成功"); - } - else { - return R.failed(cabinetForm, "保存对象失败"); - } + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + CabinetForm form = cabinetFormService.editById(cabinetForm); + + if (form != null) { + return R.ok(cabinetForm, "保存成功"); + } else { + return R.failed(cabinetForm, "保存失败"); + } } /** * 通过id删除 + * * @param cabinetFormId id * @return R */ - @ApiOperation(value = "通过id删除", notes = "通过id删除") - @SysLog("通过id删除" ) - @DeleteMapping("/{cabinetFormId}" ) - @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_del')" ) - public R deleteById(@PathVariable String cabinetFormId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - CabinetForm oldCabinetForm = cabinetFormService.getById(cabinetFormId); - - if (cabinetFormService.removeById(cabinetFormId)) { - return R.ok(oldCabinetForm, "对象删除成功"); - } - else { - return R.failed(oldCabinetForm, "对象删除失败"); - } + @ApiOperation(value = "通过id删除柜子信息", notes = "通过id删除柜子信息") + @SysLog("通过id删除柜子信息") + @DeleteMapping("/{cabinetFormId}") + @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_del')") + public R deleteById(@PathVariable String cabinetFormId, HttpServletRequest theHttpServletRequest) { + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + if (cabinetFormService.delById(cabinetFormId)) { + return R.ok("删除成功"); + } else { + return R.failed("删除失败"); + } } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/CatalogueDetailsController.java b/src/main/java/digital/laboratory/platform/reagent/controller/CatalogueDetailsController.java deleted file mode 100644 index cd593fb..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/controller/CatalogueDetailsController.java +++ /dev/null @@ -1,151 +0,0 @@ -package digital.laboratory.platform.reagent.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import digital.laboratory.platform.common.core.util.R; -import digital.laboratory.platform.common.log.annotation.SysLog; -import digital.laboratory.platform.common.mybatis.security.service.DLPUser; -import digital.laboratory.platform.reagent.entity.CatalogueDetails; -import digital.laboratory.platform.reagent.service.CatalogueDetailsService; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.security.Principal; - -/** - * (采购目录明细) - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe (采购目录明细) 前端控制器 - * - * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 - * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 - * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/catalogue_details" ) -@Api(value = "catalogue_details", tags = "(采购目录明细)管理") -public class CatalogueDetailsController { - - private final CatalogueDetailsService catalogueDetailsService; - - /** - * 通过id查询(采购目录明细) - * @param catalogueDetailsId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{catalogueDetailsId}" ) - @PreAuthorize("@pms.hasPermission('reagent_catalogue_details_get')" ) - public R getById(@PathVariable("catalogueDetailsId" ) String catalogueDetailsId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - CatalogueDetails catalogueDetails = catalogueDetailsService.getById(catalogueDetailsId); - return R.ok(catalogueDetails); - //return R.ok(catalogueDetailsService.getById(catalogueDetailsId)); - } - - /** - * 分页查询 - * @param page 分页对象 - * @param catalogueDetails (采购目录明细) - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_catalogue_details_get')" ) - public R> getCatalogueDetailsPage(Page page, CatalogueDetails catalogueDetails, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage catalogueDetailsSList = catalogueDetailsService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(catalogueDetailsSList); -// return R.ok(catalogueDetailsService.page(page, Wrappers.query(catalogueDetails))); - } - - - /** - * 新增(采购目录明细) - * @param catalogueDetails (采购目录明细) - * @return R - */ - @ApiOperation(value = "新增(采购目录明细)", notes = "新增(采购目录明细)") - @SysLog("新增(采购目录明细)" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_catalogue_details_add')" ) - public R postAddObject(@RequestBody CatalogueDetails catalogueDetails, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - catalogueDetails.setCatalogueDetailsId(IdWorker.get32UUID().toUpperCase()); - if (catalogueDetailsService.save(catalogueDetails)) { - return R.ok(catalogueDetails, "对象创建成功"); - } - else { - return R.failed(catalogueDetails, "对象创建失败"); - } - } - - /** - * 修改(采购目录明细) - * @param catalogueDetails (采购目录明细) - * @return R - */ - @ApiOperation(value = "修改(采购目录明细)", notes = "修改(采购目录明细)") - @SysLog("修改(采购目录明细)" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_catalogue_details_edit')" ) - public R putUpdateById(@RequestBody CatalogueDetails catalogueDetails, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (catalogueDetailsService.updateById(catalogueDetails)) { - return R.ok(catalogueDetails, "保存对象成功"); - } - else { - return R.failed(catalogueDetails, "保存对象失败"); - } - } - - /** - * 通过id删除(采购目录明细) - * @param catalogueDetailsId id - * @return R - */ - @ApiOperation(value = "通过id删除(采购目录明细)", notes = "通过id删除(采购目录明细)") - @SysLog("通过id删除(采购目录明细)" ) - @DeleteMapping("/{catalogueDetailsId}" ) - @PreAuthorize("@pms.hasPermission('reagent_catalogue_details_del')" ) - public R deleteById(@PathVariable String catalogueDetailsId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - CatalogueDetails oldCatalogueDetails = catalogueDetailsService.getById(catalogueDetailsId); - - if (catalogueDetailsService.removeById(catalogueDetailsId)) { - return R.ok(oldCatalogueDetails, "对象删除成功"); - } - else { - return R.failed(oldCatalogueDetails, "对象删除失败"); - } - - } - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/CentralizedRequestController.java b/src/main/java/digital/laboratory/platform/reagent/controller/CentralizedRequestController.java index ebad411..b2daa19 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/CentralizedRequestController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/CentralizedRequestController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fasterxml.jackson.annotation.JsonFormat; import digital.laboratory.platform.common.core.util.R; import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; @@ -24,6 +25,7 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.security.Principal; +import java.sql.Date; import java.util.List; /** @@ -58,9 +60,9 @@ public class CentralizedRequestController { * @return R */ @ApiOperation(value = "通过id查询集中采购申请", notes = "通过id查询集中采购申请") - @GetMapping("/{centralizedRequestId}") + @GetMapping() // @PreAuthorize("@pms.hasPermission('reagent_centralized_request_get')") - public R getById(@PathVariable("centralizedRequestId") String centralizedRequestId, HttpServletRequest theHttpServletRequest) { + public R getById(String centralizedRequestId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -85,17 +87,17 @@ public class CentralizedRequestController { @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page") // @PreAuthorize("@pms.hasPermission('CentralizedPurchaseRequestList')") - public R> getCentralizedRequestPage(Page page,String orgName, CentralizedRequest centralizedRequest, HttpServletRequest theHttpServletRequest) { + public R> getCentralizedRequestPage(Page page, String orgName, CentralizedRequest centralizedRequest, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - if (orgName!=null){ + if (orgName != null) { IPage centralizedRequestVOPage = centralizedRequestService.getCentralizedRequestVOPage(page, Wrappers.query() .eq("create_by", dlpUser.getId()).orderByDesc("create_time") - .eq("orgName",orgName)); + .eq("orgName", orgName)); return R.ok(centralizedRequestVOPage); } @@ -111,29 +113,21 @@ public class CentralizedRequestController { /** * 分页查询 * - * @param orgName 分页对象 - * @param orgName 集中采购申请 * @return */ @ApiOperation(value = "采购计划整合集中采购申请分页查询", notes = "采购计划整合集中采购申请分页查询") @GetMapping("/list") -// @PreAuthorize("@pms.hasPermission('CentralizedPurchaseRequestList')") - public R> getCentralizedRequestVOPage(String orgName,HttpServletRequest theHttpServletRequest) { +// @PreAuthorize("@pms.hasPermission('centralized_request_list_plan')") + public R> getCentralizedRequestVOPage(@JsonFormat(pattern = "yyyy-MM-dd") Date startTime, @JsonFormat(pattern = "yyyy-MM-dd") Date endTime, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - if (orgName!=null){ - - - List centralizedRequestVOList = centralizedRequestService.getOrgVOList(Wrappers.query().orderByDesc("create_time"),orgName); + List centralizedRequestVOList = centralizedRequestService.getVOList(Wrappers.query() + .ge("create_time", startTime) + .le("create_time", endTime).orderByDesc("create_time")); - return R.ok(centralizedRequestVOList); - } - - List centralizedRequestVOList = centralizedRequestService.getCentralizedRequestVOList(Wrappers.query() - .orderByDesc("create_time")); return R.ok(centralizedRequestVOList); @@ -179,7 +173,7 @@ public class CentralizedRequestController { DetailsOfCentralized detailsOfCentralized = centralizedRequestService.addDetailsById(centralizedRequestDto); - if (detailsOfCentralized!=null) { + if (detailsOfCentralized != null) { return R.ok(detailsOfCentralized, "添加成功"); } else { return R.failed(detailsOfCentralized, "添加失败"); @@ -245,9 +239,9 @@ public class CentralizedRequestController { */ @ApiOperation(value = "通过id删除集中采购申请", notes = "通过id删除集中采购申请") @SysLog("通过id删除集中采购申请") - @DeleteMapping("/{centralizedRequestId}") + @DeleteMapping() // @PreAuthorize("@pms.hasPermission('reagent_centralized_request_del')") - public R deleteById(@PathVariable String centralizedRequestId, HttpServletRequest theHttpServletRequest) { + public R deleteById(String centralizedRequestId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -267,9 +261,9 @@ public class CentralizedRequestController { */ @ApiOperation(value = "通过id删除集中采购申请明细", notes = "通过id删除集中采购申请明细") @SysLog("通过id删除(集中采购申请)") - @DeleteMapping("/details/{detailsOfCentralizedId}") + @DeleteMapping("/details") // @PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_del')") - public R deleteDetailsById(@PathVariable String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) { + public R deleteDetailsById(String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) { DetailsOfCentralized oldDetailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/CheckContentController.java b/src/main/java/digital/laboratory/platform/reagent/controller/CheckContentController.java deleted file mode 100644 index afad97b..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/controller/CheckContentController.java +++ /dev/null @@ -1,151 +0,0 @@ -package digital.laboratory.platform.reagent.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import digital.laboratory.platform.common.core.util.R; -import digital.laboratory.platform.common.log.annotation.SysLog; -import digital.laboratory.platform.common.mybatis.security.service.DLPUser; -import digital.laboratory.platform.reagent.entity.CheckContent; -import digital.laboratory.platform.reagent.service.CheckContentService; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.security.Principal; - -/** - * (检查内容) - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe (检查内容) 前端控制器 - * - * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 - * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 - * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/check_content" ) -@Api(value = "check_content", tags = "(检查内容)管理") -public class CheckContentController { - - private final CheckContentService checkContentService; - - /** - * 通过id查询(检查内容) - * @param checkContentId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{checkContentId}" ) - @PreAuthorize("@pms.hasPermission('reagent_check_content_get')" ) - public R getById(@PathVariable("checkContentId" ) String checkContentId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - CheckContent checkContent = checkContentService.getById(checkContentId); - return R.ok(checkContent); - //return R.ok(checkContentService.getById(checkContentId)); - } - - /** - * 分页查询 - * @param page 分页对象 - * @param checkContent (检查内容) - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_check_content_get')" ) - public R> getCheckContentPage(Page page, CheckContent checkContent, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage checkContentSList = checkContentService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(checkContentSList); -// return R.ok(checkContentService.page(page, Wrappers.query(checkContent))); - } - - - /** - * 新增(检查内容) - * @param checkContent (检查内容) - * @return R - */ - @ApiOperation(value = "新增(检查内容)", notes = "新增(检查内容)") - @SysLog("新增(检查内容)" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_check_content_add')" ) - public R postAddObject(@RequestBody CheckContent checkContent, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - checkContent.setCheckContentId(IdWorker.get32UUID().toUpperCase()); - if (checkContentService.save(checkContent)) { - return R.ok(checkContent, "对象创建成功"); - } - else { - return R.failed(checkContent, "对象创建失败"); - } - } - - /** - * 修改(检查内容) - * @param checkContent (检查内容) - * @return R - */ - @ApiOperation(value = "修改(检查内容)", notes = "修改(检查内容)") - @SysLog("修改(检查内容)" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_check_content_edit')" ) - public R putUpdateById(@RequestBody CheckContent checkContent, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (checkContentService.updateById(checkContent)) { - return R.ok(checkContent, "保存对象成功"); - } - else { - return R.failed(checkContent, "保存对象失败"); - } - } - - /** - * 通过id删除(检查内容) - * @param checkContentId id - * @return R - */ - @ApiOperation(value = "通过id删除(检查内容)", notes = "通过id删除(检查内容)") - @SysLog("通过id删除(检查内容)" ) - @DeleteMapping("/{checkContentId}" ) - @PreAuthorize("@pms.hasPermission('reagent_check_content_del')" ) - public R deleteById(@PathVariable String checkContentId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - CheckContent oldCheckContent = checkContentService.getById(checkContentId); - - if (checkContentService.removeById(checkContentId)) { - return R.ok(oldCheckContent, "对象删除成功"); - } - else { - return R.failed(oldCheckContent, "对象删除失败"); - } - - } - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/CheckScheduleController.java b/src/main/java/digital/laboratory/platform/reagent/controller/CheckScheduleController.java index 17fd477..eaf394b 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/CheckScheduleController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/CheckScheduleController.java @@ -1,5 +1,6 @@ package digital.laboratory.platform.reagent.controller; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -40,7 +41,7 @@ import java.util.List; @RestController @RequiredArgsConstructor @RequestMapping("/check_schedule") -@Api(value = "check_schedule", tags = "管理") +@Api(value = "check_schedule", tags = "期间核查计划制定管理") public class CheckScheduleController { private final CheckScheduleService checkScheduleService; @@ -51,10 +52,10 @@ public class CheckScheduleController { * @param checkScheduleId id * @return R */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{checkScheduleId}") + @ApiOperation(value = "通过id查询新增标准物质期间核查计划和确认表", notes = "通过id查询新增标准物质期间核查计划和确认表") + @GetMapping() // @PreAuthorize("@pms.hasPermission('reagent_check_schedule_get')" ) - public R getById(@PathVariable("checkScheduleId") String checkScheduleId, HttpServletRequest theHttpServletRequest) { + public R getById(String checkScheduleId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -70,38 +71,42 @@ public class CheckScheduleController { * @param checkSchedule * @return */ - @ApiOperation(value = "分页查询", notes = "分页查询") + @ApiOperation(value = "分页查询新增标准物质期间核查计划和确认表", notes = "分页查询新增标准物质期间核查计划和确认表") @GetMapping("/page") // @PreAuthorize("@pms.hasPermission('reagent_check_schedule_get')" ) - public R> getCheckSchedulePage(Page page, CheckSchedule checkSchedule, HttpServletRequest theHttpServletRequest) { + public R> getCheckSchedulePage(Page page, CheckSchedule checkSchedule,String status, String number,HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - IPage checkScheduleSList = checkScheduleService.getCheckScheduleVOPage(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(checkScheduleSList); -// return R.ok(checkScheduleService.page(page, Wrappers.query(checkSchedule))); - } + QueryWrapper checkScheduleQueryWrapper = new QueryWrapper<>(); + if (!status.equals("")){ + checkScheduleQueryWrapper.eq("status",status); + } + if (!number.equals("")){ + checkScheduleQueryWrapper.eq("number",number); + } + IPage checkScheduleVOPage = checkScheduleService.getCheckScheduleVOPage(page, checkScheduleQueryWrapper + .orderByAsc("create_time")); + return R.ok(checkScheduleVOPage); + } /** * 新增 * * @param periodVerificationPlanDTOS * @return R */ - @ApiOperation(value = "新增", notes = "新增") + @ApiOperation(value = "新增标准物质期间核查计划和确认表", notes = "新增标准物质期间核查计划和确认表") @SysLog("新增") @PostMapping // @PreAuthorize("@pms.hasPermission('reagent_check_schedule_add')" ) - public R postAddObject(@RequestBody List periodVerificationPlanDTOS, HttpServletRequest theHttpServletRequest) { + public R postAddObject(@RequestBody List periodVerificationPlanDTOS, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser); + CheckScheduleVO checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser); if (checkSchedule != null) { return R.ok(checkSchedule, "计划创建成功"); @@ -116,7 +121,7 @@ public class CheckScheduleController { * @param periodVerificationPlanDTOS * @return R */ - @ApiOperation(value = "修改", notes = "修改") + @ApiOperation(value = "修改标准物质期间核查计划和确认表", notes = "修改标准物质期间核查计划和确认表") @SysLog("修改") @PutMapping // @PreAuthorize("@pms.hasPermission('reagent_check_schedule_edit')" ) @@ -137,7 +142,7 @@ public class CheckScheduleController { * @param periodVerificationPlanDTOS * @return R */ - @ApiOperation(value = "提交计划", notes = "提交计划") + @ApiOperation(value = "提交计划标准物质期间核查计划和确认表", notes = "提交计划标准物质期间核查计划和确认表") @SysLog("提交计划") @PostMapping("/commit") // @PreAuthorize("@pms.hasPermission('reagent_check_schedule_edit')" ) @@ -145,45 +150,20 @@ public class CheckScheduleController { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - CheckSchedule checkSchedule = checkScheduleService.commitPlan(periodVerificationPlanDTOS,dlpUser); + CheckSchedule checkSchedule = checkScheduleService.commitPlan(periodVerificationPlanDTOS, dlpUser); if (checkSchedule != null) { return R.ok(checkSchedule, "提交成功"); } else return R.failed("提交失败"); } - -// /** -// * 通过id删除 -// * -// * @param periodVerificationPlanDTOS id -// * @return R -// */ -// @ApiOperation(value = "通过id删除", notes = "通过id删除") -// @SysLog("通过id删除") -// @PostMapping("/commit") -//// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_del')" ) -// public R deleteById(@RequestBody List periodVerificationPlanDTOS, HttpServletRequest theHttpServletRequest) { -// Principal principal = theHttpServletRequest.getUserPrincipal(); -// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); -// -// CheckSchedule checkSchedule = checkScheduleService.commitPlan(periodVerificationPlanDTOS, dlpUser); -// -// if (checkSchedule != null) { -// return R.ok(checkSchedule, "提交成功"); -// } else { -// return R.failed("提交失败"); -// } -// -// } - /** * 审核 * * @param auditAndApproveDTO * @return R */ - @ApiOperation(value = "审核", notes = "审核") + @ApiOperation(value = "审核标准物质期间核查计划和确认表", notes = "审核标准物质期间核查计划和确认表") @SysLog("修改") @PutMapping("/audit") // @PreAuthorize("@pms.hasPermission('reagent_check_schedule_edit')" ) diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/ComplianceCheckController.java b/src/main/java/digital/laboratory/platform/reagent/controller/ComplianceCheckController.java index 522b83b..9274e80 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ComplianceCheckController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ComplianceCheckController.java @@ -54,9 +54,9 @@ public class ComplianceCheckController { * @return R */ @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{complianceCheckId}") + @GetMapping() // @PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')" ) - public R getById(@PathVariable("complianceCheckId") String complianceCheckId, HttpServletRequest theHttpServletRequest) { + public R getById( String complianceCheckId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -74,42 +74,41 @@ public class ComplianceCheckController { */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page") -// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')") +// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_page)") public R> getComplianceCheckPage(Page page, ComplianceCheck complianceCheck, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); IPage complianceCheckSList = complianceCheckService.getComplianceCheckVOPage(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") + .orderByAsc("create_time") ); return R.ok(complianceCheckSList); // return R.ok(complianceCheckService.page(page, Wrappers.query(complianceCheck))); } - /** - * 新增符合性检查记录表(试剂耗材) - * - * @param complianceCheckDTO (符合性检查记录表) - * @return R - */ - @ApiOperation(value = "新增符合性检查记录表(试剂耗材)", notes = "新增符合性检查记录表(试剂耗材)") - @SysLog("新增(符合性检查记录表)") - @PostMapping -// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_add')") - public R postAddObject(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - ComplianceCheck complianceCheck = complianceCheckService.addCheck(complianceCheckDTO, dlpUser); - - if (complianceCheck != null) { - return R.ok(complianceCheck, "保存成功"); - } else { - return R.failed(complianceCheck, "保存失败"); - } - } +// /** +// * 新增符合性检查记录表(试剂耗材) +// * +// * @param complianceCheckDTO (符合性检查记录表) +// * @return R +// */ +// @ApiOperation(value = "新增符合性检查记录表(试剂耗材)", notes = "新增符合性检查记录表(试剂耗材)") +// @SysLog("新增(符合性检查记录表)") +// @PostMapping +//// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_add')") +// public R postAddObject(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) { +// Principal principal = theHttpServletRequest.getUserPrincipal(); +// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); +// +// ComplianceCheck complianceCheck = complianceCheckService.addCheck(complianceCheckDTO, dlpUser); +// +// if (complianceCheck != null) { +// return R.ok(complianceCheck, "保存成功"); +// } else { +// return R.failed(complianceCheck, "保存失败"); +// } +// } /** * 手动新增符合性检查记录表(试剂耗材) * @@ -142,9 +141,9 @@ public class ComplianceCheckController { */ @ApiOperation(value = "通过id删除(符合性检查记录表)", notes = "通过id删除(符合性检查记录表)") @SysLog("通过id删除(符合性检查记录表)") - @DeleteMapping("/{complianceCheckId}") + @DeleteMapping() // @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" ) - public R deleteById(@PathVariable String complianceCheckId, HttpServletRequest theHttpServletRequest) { + public R deleteById( String complianceCheckId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -167,7 +166,7 @@ public class ComplianceCheckController { @ApiOperation(value = "编辑符合性检查记录表", notes = "编辑符合性检查记录表") @SysLog("编辑符合性检查记录表") @PutMapping("/edit") -// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" ) +// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_edit)" ) public R editCheckById(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -191,12 +190,12 @@ public class ComplianceCheckController { @ApiOperation(value = "录入符合性检查方案", notes = "录入符合性检查方案") @SysLog("编辑符合性检查记录表") @PutMapping("/addScheme") -// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" ) +// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_input')" ) public R addScheme(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - ComplianceCheck complianceCheck = complianceCheckService.addScheme(complianceCheckDTO); + ComplianceCheck complianceCheck = complianceCheckService.addScheme(complianceCheckDTO,dlpUser); if (complianceCheck != null) { return R.ok("保存成功"); @@ -214,8 +213,8 @@ public class ComplianceCheckController { */ @ApiOperation(value = "提交符合性检查记录表", notes = "提交符合性检查记录表") @SysLog("提交符合性检查记录表") - @PutMapping("/commit/{complianceCheckId}") -// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" ) + @PutMapping("/commit") +// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_commit)" ) public R commitCheck(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -239,7 +238,7 @@ public class ComplianceCheckController { @ApiOperation(value = "一级审核符合性检查记录表", notes = "一级审核符合性检查记录表") @SysLog("一级审核符合性检查记录表") @PutMapping("/primaryAudit") -// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" ) +// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_primaryAudit')" ) public R primaryAuditCheck(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -262,7 +261,7 @@ public class ComplianceCheckController { @ApiOperation(value = "二级审核符合性检查记录表", notes = "二级审核符合性检查记录表") @SysLog("二级审核符合性检查记录表") @PutMapping("/secondaryAudit") -// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" ) +// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_secondaryAudit)" ) public R secondaryAuditCheck(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/DecentralizeDetailsController.java b/src/main/java/digital/laboratory/platform/reagent/controller/DecentralizeDetailsController.java deleted file mode 100644 index 1d38dea..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/controller/DecentralizeDetailsController.java +++ /dev/null @@ -1,151 +0,0 @@ -package digital.laboratory.platform.reagent.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import digital.laboratory.platform.common.core.util.R; -import digital.laboratory.platform.common.log.annotation.SysLog; -import digital.laboratory.platform.common.mybatis.security.service.DLPUser; -import digital.laboratory.platform.reagent.entity.DecentralizeDetails; -import digital.laboratory.platform.reagent.service.DecentralizeDetailsService; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.security.Principal; - -/** - * 分散采购申请明细 - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe 分散采购申请明细 前端控制器 - * - * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 - * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 - * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/decentralize_details" ) -@Api(value = "decentralize_details", tags = "分散采购申请明细管理") -public class DecentralizeDetailsController { - - private final DecentralizeDetailsService decentralizeDetailsService; - - /** - * 通过id查询分散采购申请明细 - * @param decentralizeDetailsId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{decentralizeDetailsId}" ) - @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_get')" ) - public R getById(@PathVariable("decentralizeDetailsId" ) String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - DecentralizeDetails decentralizeDetails = decentralizeDetailsService.getById(decentralizeDetailsId); - return R.ok(decentralizeDetails); - //return R.ok(decentralizeDetailsService.getById(decentralizeDetailsId)); - } - - /** - * 分页查询 - * @param page 分页对象 - * @param decentralizeDetails 分散采购申请明细 - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_get')" ) - public R> getDecentralizeDetailsPage(Page page, DecentralizeDetails decentralizeDetails, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage decentralizeDetailsSList = decentralizeDetailsService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(decentralizeDetailsSList); -// return R.ok(decentralizeDetailsService.page(page, Wrappers.query(decentralizeDetails))); - } - - - /** - * 新增分散采购申请明细 - * @param decentralizeDetails 分散采购申请明细 - * @return R - */ - @ApiOperation(value = "新增分散采购申请明细", notes = "新增分散采购申请明细") - @SysLog("新增分散采购申请明细" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_add')" ) - public R postAddObject(@RequestBody DecentralizeDetails decentralizeDetails, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - decentralizeDetails.setDecentralizeDetailsId(IdWorker.get32UUID().toUpperCase()); - if (decentralizeDetailsService.save(decentralizeDetails)) { - return R.ok(decentralizeDetails, "对象创建成功"); - } - else { - return R.failed(decentralizeDetails, "对象创建失败"); - } - } - - /** - * 修改分散采购申请明细 - * @param decentralizeDetails 分散采购申请明细 - * @return R - */ - @ApiOperation(value = "修改分散采购申请明细", notes = "修改分散采购申请明细") - @SysLog("修改分散采购申请明细" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_edit')" ) - public R putUpdateById(@RequestBody DecentralizeDetails decentralizeDetails, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (decentralizeDetailsService.updateById(decentralizeDetails)) { - return R.ok(decentralizeDetails, "保存对象成功"); - } - else { - return R.failed(decentralizeDetails, "保存对象失败"); - } - } - - /** - * 通过id删除分散采购申请明细 - * @param decentralizeDetailsId id - * @return R - */ - @ApiOperation(value = "通过id删除分散采购申请明细", notes = "通过id删除分散采购申请明细") - @SysLog("通过id删除分散采购申请明细" ) - @DeleteMapping("/{decentralizeDetailsId}" ) - @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_del')" ) - public R deleteById(@PathVariable String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - DecentralizeDetails oldDecentralizeDetails = decentralizeDetailsService.getById(decentralizeDetailsId); - - if (decentralizeDetailsService.removeById(decentralizeDetailsId)) { - return R.ok(oldDecentralizeDetails, "对象删除成功"); - } - else { - return R.failed(oldDecentralizeDetails, "对象删除失败"); - } - - } - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/DecentralizedRequestController.java b/src/main/java/digital/laboratory/platform/reagent/controller/DecentralizedRequestController.java index 52b9f15..9e204a3 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/DecentralizedRequestController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/DecentralizedRequestController.java @@ -1,24 +1,28 @@ package digital.laboratory.platform.reagent.controller; +import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import digital.laboratory.platform.common.core.util.R; import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; -import digital.laboratory.platform.reagent.dto.AuditDecentralizedRequestDTO; import digital.laboratory.platform.reagent.dto.DecentralizedRequestDTO; +import digital.laboratory.platform.reagent.dto.PurchaseListDTO; import digital.laboratory.platform.reagent.entity.DecentralizeDetails; import digital.laboratory.platform.reagent.entity.DecentralizedRequest; +import digital.laboratory.platform.reagent.entity.PurchaseList; import digital.laboratory.platform.reagent.service.DecentralizeDetailsService; import digital.laboratory.platform.reagent.service.DecentralizedRequestService; +import digital.laboratory.platform.reagent.service.PurchaseListService; import digital.laboratory.platform.reagent.vo.DecentralizedRequestVO; import org.springframework.beans.factory.annotation.Autowired; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.oauth2.provider.OAuth2Authentication; import org.springframework.web.bind.annotation.*; @@ -50,6 +54,9 @@ public class DecentralizedRequestController { @Autowired private final DecentralizeDetailsService decentralizeDetailsService; + @Autowired + private PurchaseListService purchaseListService; + /** * 通过id查询(分散采购申请) * @@ -57,9 +64,9 @@ public class DecentralizedRequestController { * @return R */ @ApiOperation(value = "通过id查询分散采购申请", notes = "通过id查询分散采购申请") - @GetMapping("/{decentralizedRequestId}") + @GetMapping() // @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')") - public R getById(@PathVariable("decentralizedRequestId") String decentralizedRequestId, HttpServletRequest theHttpServletRequest) { + public R getById(String decentralizedRequestId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -78,11 +85,11 @@ public class DecentralizedRequestController { @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page") // @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')") - public R> getDecentralizedRequestPage(Page page, DecentralizedRequest decentralizedRequest, HttpServletRequest theHttpServletRequest) { + public R> getDecentralizedRequestPage(Page page, DecentralizedRequest decentralizedRequest, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - IPage decentralizedRequestSList = decentralizedRequestService.page(page, Wrappers.query() + IPage decentralizedRequestSList = decentralizedRequestService.getDecentralizedRequestVOPage(page, Wrappers.query() .eq("create_by", dlpUser.getId()) .orderByDesc("create_time") ); @@ -178,12 +185,12 @@ public class DecentralizedRequestController { */ @ApiOperation(value = "通过id删除分散采购申请", notes = "通过id删除分散采购申请") @SysLog("通过id删除(分散采购申请)") - @DeleteMapping("/{decentralizedRequestId}") + @DeleteMapping() // @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_del')") - public R deleteById(@PathVariable String decentralizedRequestId, HttpServletRequest theHttpServletRequest) { + public R deleteById(String decentralizedRequestId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - DecentralizedRequest oldDecentralizedRequest = decentralizedRequestService.getById(decentralizedRequestId); + if (decentralizedRequestService.delRequestById(decentralizedRequestId)) { return R.ok("删除成功"); } else return R.failed("删除失败"); @@ -199,9 +206,9 @@ public class DecentralizedRequestController { */ @ApiOperation(value = "通过id删除分散采购申请明细", notes = "通过id删除分散采购申请明细") @SysLog("通过id删除分散采购申请明细") - @DeleteMapping("details/{decentralizeDetailsId}") + @DeleteMapping("/details") // @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_del')") - public R deleteDetailsById(@PathVariable String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) { + public R deleteDetailsById(String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -288,20 +295,20 @@ public class DecentralizedRequestController { /** * 三级审核分散采购申请 * - * @param auditDecentralizedRequestDTO + * @param auditAndApproveDTO * @return R */ @ApiOperation(value = "三级审核分散采购申请", notes = "三级审核分散采购申请") @SysLog("审核分散采购申请明细") @PutMapping("/threeLevel/audit") // @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_threeLevel')") - public R threeLevelAuditRequest(@RequestBody AuditDecentralizedRequestDTO auditDecentralizedRequestDTO, HttpServletRequest theHttpServletRequest) { + public R threeLevelAuditRequest(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - DecentralizedRequest decentralizedRequest = decentralizedRequestService.threeLevelAuditRequest(dlpUser, auditDecentralizedRequestDTO); + DecentralizedRequest decentralizedRequest = decentralizedRequestService.threeLevelAuditRequest(dlpUser, auditAndApproveDTO); if (decentralizedRequest != null) { return R.ok(decentralizedRequest, "审核成功"); @@ -326,6 +333,9 @@ public class DecentralizedRequestController { DecentralizedRequest decentralizedRequest = decentralizedRequestService.approveRequest(dlpUser, auditAndApproveDto); + + + if (decentralizedRequest != null) { return R.ok(decentralizedRequest, "审批成功"); } else return R.failed("审批失败"); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/DeliveryRegistrationFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/DeliveryRegistrationFormController.java index fc58e2a..9d6b5de 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/DeliveryRegistrationFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/DeliveryRegistrationFormController.java @@ -1,5 +1,6 @@ package digital.laboratory.platform.reagent.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -9,7 +10,11 @@ import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.dto.OutgoingContentsDTO; import digital.laboratory.platform.reagent.entity.DeliveryRegistrationForm; +import digital.laboratory.platform.reagent.entity.OutgoingContents; import digital.laboratory.platform.reagent.service.DeliveryRegistrationFormService; +import digital.laboratory.platform.reagent.service.OutgoingContentsService; +import digital.laboratory.platform.reagent.vo.DeliveryRegistrationFormVO; +import digital.laboratory.platform.reagent.vo.ReagentConsumablesVO; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -44,19 +49,21 @@ public class DeliveryRegistrationFormController { private final DeliveryRegistrationFormService deliveryRegistrationFormService; + private final OutgoingContentsService outgoingContentsService; + /** * 通过id查询(试剂耗材出库登记表) * @param deliveryRegistrationFormId id * @return R */ @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{deliveryRegistrationFormId}" ) + @GetMapping( ) // @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" ) - public R getById(@PathVariable("deliveryRegistrationFormId" ) String deliveryRegistrationFormId, HttpServletRequest theHttpServletRequest) { + public R getById(String deliveryRegistrationFormId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - DeliveryRegistrationForm deliveryRegistrationForm = deliveryRegistrationFormService.getById(deliveryRegistrationFormId); + DeliveryRegistrationFormVO deliveryRegistrationForm = deliveryRegistrationFormService.getDeliveryRegistrationFormVOById(deliveryRegistrationFormId); return R.ok(deliveryRegistrationForm); //return R.ok(deliveryRegistrationFormService.getById(deliveryRegistrationFormId)); } @@ -69,15 +76,26 @@ public class DeliveryRegistrationFormController { */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page" ) -// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" ) - public R> getDeliveryRegistrationFormPage(Page page, DeliveryRegistrationForm deliveryRegistrationForm, HttpServletRequest theHttpServletRequest) { +// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_page')" ) + public R> getDeliveryRegistrationFormPage(Page page, DeliveryRegistrationForm deliveryRegistrationForm, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - IPage deliveryRegistrationFormSList = deliveryRegistrationFormService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) + IPage deliveryRegistrationFormSList = deliveryRegistrationFormService.getDeliveryRegistrationFormVOPage(page, Wrappers.query() + .eq("status",0) .orderByDesc("create_time") ); + + List records = deliveryRegistrationFormSList.getRecords(); + + for (DeliveryRegistrationFormVO record : records) { + + LambdaQueryWrapper outgoingContentsLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId,record.getId()); + + record.setTypeOfDelivery(outgoingContentsService.list(outgoingContentsLambdaQueryWrapper).size()); + } return R.ok(deliveryRegistrationFormSList); // return R.ok(deliveryRegistrationFormService.page(page, Wrappers.query(deliveryRegistrationForm))); } @@ -91,7 +109,7 @@ public class DeliveryRegistrationFormController { @ApiOperation(value = "提交(试剂耗材出库登记表)", notes = "提交(试剂耗材出库登记表)") @SysLog("提交(试剂耗材出库登记表)" ) @PostMapping -// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_add')" ) +// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_commit')" ) public R postAddObject(@RequestBody List outgoingContentsDTOS, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -103,4 +121,5 @@ public class DeliveryRegistrationFormController { }else return R.failed("提交失败"); } + } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/DetailsOfCentralizedController.java b/src/main/java/digital/laboratory/platform/reagent/controller/DetailsOfCentralizedController.java deleted file mode 100644 index be2e556..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/controller/DetailsOfCentralizedController.java +++ /dev/null @@ -1,151 +0,0 @@ -package digital.laboratory.platform.reagent.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import digital.laboratory.platform.common.core.util.R; -import digital.laboratory.platform.common.log.annotation.SysLog; -import digital.laboratory.platform.common.mybatis.security.service.DLPUser; -import digital.laboratory.platform.reagent.entity.DetailsOfCentralized; -import digital.laboratory.platform.reagent.service.DetailsOfCentralizedService; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.security.Principal; - -/** - * (集中采购申请明细) - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe (集中采购申请明细) 前端控制器 - * - * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 - * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 - * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/details_of_centralized" ) -@Api(value = "details_of_centralized", tags = "(集中采购申请明细)管理") -public class DetailsOfCentralizedController { - - private final DetailsOfCentralizedService detailsOfCentralizedService; - - /** - * 通过id查询(集中采购申请明细) - * @param detailsOfCentralizedId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{detailsOfCentralizedId}" ) - @PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_get')" ) - public R getById(@PathVariable("detailsOfCentralizedId" ) String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId); - return R.ok(detailsOfCentralized); - //return R.ok(detailsOfCentralizedService.getById(detailsOfCentralizedId)); - } - - /** - * 分页查询 - * @param page 分页对象 - * @param detailsOfCentralized (集中采购申请明细) - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_get')" ) - public R> getDetailsOfCentralizedPage(Page page, DetailsOfCentralized detailsOfCentralized, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage detailsOfCentralizedSList = detailsOfCentralizedService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(detailsOfCentralizedSList); -// return R.ok(detailsOfCentralizedService.page(page, Wrappers.query(detailsOfCentralized))); - } - - - /** - * 新增(集中采购申请明细) - * @param detailsOfCentralized (集中采购申请明细) - * @return R - */ - @ApiOperation(value = "新增(集中采购申请明细)", notes = "新增(集中采购申请明细)") - @SysLog("新增(集中采购申请明细)" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_add')" ) - public R postAddObject(@RequestBody DetailsOfCentralized detailsOfCentralized, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - detailsOfCentralized.setDetailsOfCentralizedId(IdWorker.get32UUID().toUpperCase()); - if (detailsOfCentralizedService.save(detailsOfCentralized)) { - return R.ok(detailsOfCentralized, "对象创建成功"); - } - else { - return R.failed(detailsOfCentralized, "对象创建失败"); - } - } - - /** - * 修改(集中采购申请明细) - * @param detailsOfCentralized (集中采购申请明细) - * @return R - */ - @ApiOperation(value = "修改(集中采购申请明细)", notes = "修改(集中采购申请明细)") - @SysLog("修改(集中采购申请明细)" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_edit')" ) - public R putUpdateById(@RequestBody DetailsOfCentralized detailsOfCentralized, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (detailsOfCentralizedService.updateById(detailsOfCentralized)) { - return R.ok(detailsOfCentralized, "保存对象成功"); - } - else { - return R.failed(detailsOfCentralized, "保存对象失败"); - } - } - - /** - * 通过id删除(集中采购申请明细) - * @param detailsOfCentralizedId id - * @return R - */ - @ApiOperation(value = "通过id删除(集中采购申请明细)", notes = "通过id删除(集中采购申请明细)") - @SysLog("通过id删除(集中采购申请明细)" ) - @DeleteMapping("/{detailsOfCentralizedId}" ) - @PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_del')" ) - public R deleteById(@PathVariable String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - DetailsOfCentralized oldDetailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId); - - if (detailsOfCentralizedService.removeById(detailsOfCentralizedId)) { - return R.ok(oldDetailsOfCentralized, "对象删除成功"); - } - else { - return R.failed(oldDetailsOfCentralized, "对象删除失败"); - } - - } - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/EvaluationFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/EvaluationFormController.java index fb77b90..aad26ec 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/EvaluationFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/EvaluationFormController.java @@ -11,6 +11,7 @@ import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.dto.EvaluationFormDTO; import digital.laboratory.platform.reagent.entity.EvaluationForm; import digital.laboratory.platform.reagent.service.EvaluationFormService; +import digital.laboratory.platform.reagent.vo.EvaluationFormVO; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -46,44 +47,24 @@ public class EvaluationFormController { /** * 通过id查询(服务商/供应商评价表) - * @param evaluationFormId id + * @param supplierInformationId id * @return R */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{evaluationFormId}" ) + @ApiOperation(value = "通过id查询(服务商/供应商评价表)", notes = "通过id查询(服务商/供应商评价表)") + @SysLog("通过id查询(服务商/供应商评价表)" ) + @GetMapping() // @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_get')" ) - public R getById(@PathVariable("evaluationFormId" ) String evaluationFormId, HttpServletRequest theHttpServletRequest) { + public R getById(String supplierInformationId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - EvaluationForm evaluationForm = evaluationFormService.getById(evaluationFormId); +// EvaluationFormVO formById = evaluationFormService.getFormById(supplierInformationId); - return R.ok(evaluationForm); - //return R.ok(evaluationFormService.getById(evaluationFormId)); + return R.ok(null); } - /** - * 分页查询 - * @param page 分页对象 - * @param evaluationForm (服务商/供应商评价表) - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) -// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_get')" ) - public R> getEvaluationFormPage(Page page, EvaluationForm evaluationForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage evaluationFormSList = evaluationFormService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(evaluationFormSList); -// return R.ok(evaluationFormService.page(page, Wrappers.query(evaluationForm))); - } /** @@ -91,8 +72,8 @@ public class EvaluationFormController { * @param evaluationFormDTO (服务商/供应商评价表) * @return R */ - @ApiOperation(value = "录入(服务商/供应商评价表)", notes = "录入(服务商/供应商评价表)") - @SysLog("录入(服务商/供应商评价表)" ) + @ApiOperation(value = "录入并提交(服务商/供应商评价表)", notes = "录入并提交(服务商/供应商评价表)") + @SysLog("录入并提交(服务商/供应商评价表)" ) @PostMapping // @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_add')" ) public R postAddObject(@RequestBody EvaluationFormDTO evaluationFormDTO, HttpServletRequest theHttpServletRequest) { @@ -101,12 +82,12 @@ public class EvaluationFormController { DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - EvaluationForm evaluationForm = evaluationFormService.editFormById(evaluationFormDTO); + EvaluationForm evaluationForm = evaluationFormService.editFormById(evaluationFormDTO,dlpUser); if (evaluationForm!=null) { - return R.ok(evaluationForm,"保存成功"); + return R.ok(evaluationForm,"提交成功"); }else { - return R.failed("保存失败"); + return R.failed("提交失败"); } } @@ -118,7 +99,7 @@ public class EvaluationFormController { @ApiOperation(value = "二级审核(服务商/供应商评价表)", notes = "二级审核(服务商/供应商评价表)") @SysLog("二级审核(服务商/供应商评价表)" ) @PutMapping("/secondary") -// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_add')" ) +// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_secondaryAudit')" ) public R auditFormOfSecondary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -142,7 +123,7 @@ public class EvaluationFormController { @ApiOperation(value = "三级审核(服务商/供应商评价表)", notes = "三级审核(服务商/供应商评价表)") @SysLog("三级审核(服务商/供应商评价表)" ) @PutMapping("/three_level") -// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_add')" ) +// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_three_level_audit')" ) public R auditFormOfThreeLevel(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java b/src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java index fdf0aac..dcb0c3e 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java @@ -94,7 +94,7 @@ public class InstructionBookController { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - instructionBook.setInstructionBookId(IdWorker.get32UUID().toUpperCase()); + instructionBook.setId(IdWorker.get32UUID().toUpperCase()); if (instructionBookService.save(instructionBook)) { return R.ok(instructionBook, "对象创建成功"); } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/LatticeFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/LatticeFormController.java deleted file mode 100644 index 8c65968..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/controller/LatticeFormController.java +++ /dev/null @@ -1,151 +0,0 @@ -package digital.laboratory.platform.reagent.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import digital.laboratory.platform.common.core.util.R; -import digital.laboratory.platform.common.log.annotation.SysLog; -import digital.laboratory.platform.common.mybatis.security.service.DLPUser; -import digital.laboratory.platform.reagent.entity.LatticeForm; -import digital.laboratory.platform.reagent.service.LatticeFormService; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.security.Principal; - -/** - * - * - * @author Zhang Xiaolong created at 2023-03-22 - * @describe 前端控制器 - * - * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 - * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 - * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/lattice_form" ) -@Api(value = "lattice_form", tags = "管理") -public class LatticeFormController { - - private final LatticeFormService latticeFormService; - - /** - * 通过id查询 - * @param latticeFormId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{latticeFormId}" ) - @PreAuthorize("@pms.hasPermission('reagent_lattice_form_get')" ) - public R getById(@PathVariable("latticeFormId" ) String latticeFormId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - LatticeForm latticeForm = latticeFormService.getById(latticeFormId); - return R.ok(latticeForm); - //return R.ok(latticeFormService.getById(latticeFormId)); - } - - /** - * 分页查询 - * @param page 分页对象 - * @param latticeForm - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_lattice_form_get')" ) - public R> getLatticeFormPage(Page page, LatticeForm latticeForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage latticeFormSList = latticeFormService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(latticeFormSList); -// return R.ok(latticeFormService.page(page, Wrappers.query(latticeForm))); - } - - - /** - * 新增 - * @param latticeForm - * @return R - */ - @ApiOperation(value = "新增", notes = "新增") - @SysLog("新增" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_lattice_form_add')" ) - public R postAddObject(@RequestBody LatticeForm latticeForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - latticeForm.setLatticeFormId(IdWorker.get32UUID().toUpperCase()); - if (latticeFormService.save(latticeForm)) { - return R.ok(latticeForm, "对象创建成功"); - } - else { - return R.failed(latticeForm, "对象创建失败"); - } - } - - /** - * 修改 - * @param latticeForm - * @return R - */ - @ApiOperation(value = "修改", notes = "修改") - @SysLog("修改" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_lattice_form_edit')" ) - public R putUpdateById(@RequestBody LatticeForm latticeForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (latticeFormService.updateById(latticeForm)) { - return R.ok(latticeForm, "保存对象成功"); - } - else { - return R.failed(latticeForm, "保存对象失败"); - } - } - - /** - * 通过id删除 - * @param latticeFormId id - * @return R - */ - @ApiOperation(value = "通过id删除", notes = "通过id删除") - @SysLog("通过id删除" ) - @DeleteMapping("/{latticeFormId}" ) - @PreAuthorize("@pms.hasPermission('reagent_lattice_form_del')" ) - public R deleteById(@PathVariable String latticeFormId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - LatticeForm oldLatticeForm = latticeFormService.getById(latticeFormId); - - if (latticeFormService.removeById(latticeFormId)) { - return R.ok(oldLatticeForm, "对象删除成功"); - } - else { - return R.failed(oldLatticeForm, "对象删除失败"); - } - - } - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/OutgoingContentsController.java b/src/main/java/digital/laboratory/platform/reagent/controller/OutgoingContentsController.java index b7e1992..368c01a 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/OutgoingContentsController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/OutgoingContentsController.java @@ -94,7 +94,7 @@ public class OutgoingContentsController { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - outgoingContents.setOutgoingContentsId(IdWorker.get32UUID().toUpperCase()); + outgoingContents.setId(IdWorker.get32UUID().toUpperCase()); if (outgoingContentsService.save(outgoingContents)) { return R.ok(outgoingContents, "对象创建成功"); } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java index 9dc87aa..a254888 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java @@ -72,10 +72,18 @@ public class PeriodVerificationImplementationController { @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page" ) // @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" ) - public R> getPeriodVerificationImplementationPage(Page page, PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) { + public R> getPeriodVerificationImplementationPage(Page page, String name,PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + if (name!=null){ + + IPage periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.query() + .orderByDesc("create_time") + ); + return R.ok(periodVerificationImplementationSList); + } + IPage periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.query() .eq("create_by", dlpUser.getId()) .orderByDesc("create_time") diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationPlanController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationPlanController.java deleted file mode 100644 index 0c0b174..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationPlanController.java +++ /dev/null @@ -1,151 +0,0 @@ -package digital.laboratory.platform.reagent.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import digital.laboratory.platform.common.core.util.R; -import digital.laboratory.platform.common.log.annotation.SysLog; -import digital.laboratory.platform.common.mybatis.security.service.DLPUser; -import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan; -import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.security.Principal; - -/** - * (标准物质期间核查计划和确认表) - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe (标准物质期间核查计划和确认表) 前端控制器 - * - * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 - * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 - * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/period_verification_plan" ) -@Api(value = "period_verification_plan", tags = "(标准物质期间核查计划和确认表)管理") -public class PeriodVerificationPlanController { - - private final PeriodVerificationPlanService periodVerificationPlanService; - - /** - * 通过id查询(标准物质期间核查计划和确认表) - * @param periodVerificationPlanId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{periodVerificationPlanId}" ) - @PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_get')" ) - public R getById(@PathVariable("periodVerificationPlanId" ) String periodVerificationPlanId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - PeriodVerificationPlan periodVerificationPlan = periodVerificationPlanService.getById(periodVerificationPlanId); - return R.ok(periodVerificationPlan); - //return R.ok(periodVerificationPlanService.getById(periodVerificationPlanId)); - } - - /** - * 分页查询 - * @param page 分页对象 - * @param periodVerificationPlan (标准物质期间核查计划和确认表) - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_get')" ) - public R> getPeriodVerificationPlanPage(Page page, PeriodVerificationPlan periodVerificationPlan, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage periodVerificationPlanSList = periodVerificationPlanService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(periodVerificationPlanSList); -// return R.ok(periodVerificationPlanService.page(page, Wrappers.query(periodVerificationPlan))); - } - - - /** - * 新增(标准物质期间核查计划和确认表) - * @param periodVerificationPlan (标准物质期间核查计划和确认表) - * @return R - */ - @ApiOperation(value = "新增(标准物质期间核查计划和确认表)", notes = "新增(标准物质期间核查计划和确认表)") - @SysLog("新增(标准物质期间核查计划和确认表)" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_add')" ) - public R postAddObject(@RequestBody PeriodVerificationPlan periodVerificationPlan, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - periodVerificationPlan.setPeriodVerificationPlanId(IdWorker.get32UUID().toUpperCase()); - if (periodVerificationPlanService.save(periodVerificationPlan)) { - return R.ok(periodVerificationPlan, "对象创建成功"); - } - else { - return R.failed(periodVerificationPlan, "对象创建失败"); - } - } - - /** - * 修改(标准物质期间核查计划和确认表) - * @param periodVerificationPlan (标准物质期间核查计划和确认表) - * @return R - */ - @ApiOperation(value = "修改(标准物质期间核查计划和确认表)", notes = "修改(标准物质期间核查计划和确认表)") - @SysLog("修改(标准物质期间核查计划和确认表)" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_edit')" ) - public R putUpdateById(@RequestBody PeriodVerificationPlan periodVerificationPlan, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (periodVerificationPlanService.updateById(periodVerificationPlan)) { - return R.ok(periodVerificationPlan, "保存对象成功"); - } - else { - return R.failed(periodVerificationPlan, "保存对象失败"); - } - } - - /** - * 通过id删除(标准物质期间核查计划和确认表) - * @param periodVerificationPlanId id - * @return R - */ - @ApiOperation(value = "通过id删除(标准物质期间核查计划和确认表)", notes = "通过id删除(标准物质期间核查计划和确认表)") - @SysLog("通过id删除(标准物质期间核查计划和确认表)" ) - @DeleteMapping("/{periodVerificationPlanId}" ) - @PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_del')" ) - public R deleteById(@PathVariable String periodVerificationPlanId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - PeriodVerificationPlan oldPeriodVerificationPlan = periodVerificationPlanService.getById(periodVerificationPlanId); - - if (periodVerificationPlanService.removeById(periodVerificationPlanId)) { - return R.ok(oldPeriodVerificationPlan, "对象删除成功"); - } - else { - return R.failed(oldPeriodVerificationPlan, "对象删除失败"); - } - - } - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/ProvideServicesOrSuppliesController.java b/src/main/java/digital/laboratory/platform/reagent/controller/ProvideServicesOrSuppliesController.java index a14afcb..724f5b4 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ProvideServicesOrSuppliesController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ProvideServicesOrSuppliesController.java @@ -9,6 +9,7 @@ import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies; import digital.laboratory.platform.reagent.service.ProvideServicesOrSuppliesService; +import digital.laboratory.platform.reagent.vo.ProvideServicesOrSuppliesVO; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -20,6 +21,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; +import java.util.List; /** * 提供服务或供应品 @@ -44,108 +46,21 @@ public class ProvideServicesOrSuppliesController { /** * 通过id查询提供服务或供应品 - * @param provideServicesOrSuppliesId id + * @param supplierInformationId id * @return R */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{provideServicesOrSuppliesId}" ) - @PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_get')" ) - public R getById(@PathVariable("provideServicesOrSuppliesId" ) String provideServicesOrSuppliesId, HttpServletRequest theHttpServletRequest) { + @ApiOperation(value = "通过供应商id查询该供应商提供的所有物品", notes = "通过供应商id查询该供应商提供的所有物品") + @GetMapping() +// @PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_get')" ) + public R> getById(String supplierInformationId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - ProvideServicesOrSupplies provideServicesOrSupplies = provideServicesOrSuppliesService.getById(provideServicesOrSuppliesId); - return R.ok(provideServicesOrSupplies); + List voList = provideServicesOrSuppliesService.getVOList(supplierInformationId); + return R.ok(voList); //return R.ok(provideServicesOrSuppliesService.getById(provideServicesOrSuppliesid)); } - /** - * 分页查询 - * @param page 分页对象 - * @param provideServicesOrSupplies 提供服务或供应品 - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_get')" ) - public R> getProvideServicesOrSuppliesPage(Page page, ProvideServicesOrSupplies provideServicesOrSupplies, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage provideServicesOrSuppliesSList = provideServicesOrSuppliesService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(provideServicesOrSuppliesSList); -// return R.ok(provideServicesOrSuppliesService.page(page, Wrappers.query(provideServicesOrSupplies))); - } - - - /** - * 新增提供服务或供应品 - * @param provideServicesOrSupplies 提供服务或供应品 - * @return R - */ - @ApiOperation(value = "新增提供服务或供应品", notes = "新增提供服务或供应品") - @SysLog("新增提供服务或供应品" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_add')" ) - public R postAddObject(@RequestBody ProvideServicesOrSupplies provideServicesOrSupplies, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - provideServicesOrSupplies.setEvaluationFormId(IdWorker.get32UUID().toUpperCase()); - if (provideServicesOrSuppliesService.save(provideServicesOrSupplies)) { - return R.ok(provideServicesOrSupplies, "对象创建成功"); - } - else { - return R.failed(provideServicesOrSupplies, "对象创建失败"); - } - } - - /** - * 修改提供服务或供应品 - * @param provideServicesOrSupplies 提供服务或供应品 - * @return R - */ - @ApiOperation(value = "修改提供服务或供应品", notes = "修改提供服务或供应品") - @SysLog("修改提供服务或供应品" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_edit')" ) - public R putUpdateById(@RequestBody ProvideServicesOrSupplies provideServicesOrSupplies, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (provideServicesOrSuppliesService.updateById(provideServicesOrSupplies)) { - return R.ok(provideServicesOrSupplies, "保存对象成功"); - } - else { - return R.failed(provideServicesOrSupplies, "保存对象失败"); - } - } - - /** - * 通过id删除提供服务或供应品 - * @param provideServicesOrSuppliesid id - * @return R - */ - @ApiOperation(value = "通过id删除提供服务或供应品", notes = "通过id删除提供服务或供应品") - @SysLog("通过id删除提供服务或供应品" ) - @DeleteMapping("/{provideServicesOrSuppliesid}" ) - @PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_del')" ) - public R deleteById(@PathVariable String provideServicesOrSuppliesid, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - ProvideServicesOrSupplies oldProvideServicesOrSupplies = provideServicesOrSuppliesService.getById(provideServicesOrSuppliesid); - - if (provideServicesOrSuppliesService.removeById(provideServicesOrSuppliesid)) { - return R.ok(oldProvideServicesOrSupplies, "对象删除成功"); - } - else { - return R.failed(oldProvideServicesOrSupplies, "对象删除失败"); - } - } } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java index da4d843..b49dca1 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fasterxml.jackson.annotation.JsonFormat; import digital.laboratory.platform.common.core.util.R; import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; @@ -17,6 +18,7 @@ import digital.laboratory.platform.reagent.service.CatalogueDetailsService; import digital.laboratory.platform.reagent.service.PurchaseCatalogueService; import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.annotation.DateTimeFormat; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -27,6 +29,10 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; import javax.servlet.http.HttpServletRequest; import java.security.Principal; +import java.sql.Date; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; import java.util.List; /** @@ -56,19 +62,18 @@ public class PurchaseCatalogueController { * 分页查询 * * @param - * @return */ @ApiOperation(value = "分页查询已发布的采购目录明细", notes = "分页查询已发布的采购目录明细") @GetMapping("/page") // @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')") - public R getPurchaseCataloguePage(HttpServletRequest theHttpServletRequest) { + public R getPurchaseCataloguePage(HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - PurchaseCatalogueVO vOpage = purchaseCatalogueService.getVOpage(); + Page vOpage = purchaseCatalogueService.getVOpage(); return R.ok(vOpage); @@ -77,27 +82,25 @@ public class PurchaseCatalogueController { /** * 分页查询 * - * @param page 分页对象 - + * @param page 分页对象 * @return */ @ApiOperation(value = "分页查询制定编辑的采购目录", notes = "分页查询制定编辑的采购目录") @GetMapping("/pages") // @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')") - public R> getPurchaseCatalogueVOPage(Page page, Integer status, HttpServletRequest theHttpServletRequest) { + public R> getPurchaseCatalogueVOPage(Page page, @JsonFormat(pattern = "yyyy-MM-dd") Date startTime, @JsonFormat(pattern = "yyyy-MM-dd") Date endTime, HttpServletRequest theHttpServletRequest) { IPage purchaseCatalogueVOPage = purchaseCatalogueService.getPurchaseCatalogueVOPage(page, Wrappers.query().orderByDesc("create_time")); Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - if (status!=null){ + if (startTime != null && endTime != null) { - IPage purchaseCatalogueVOPage1 = purchaseCatalogueService.getPurchaseCatalogueVOPage(page, Wrappers.query().eq("status",status).orderByDesc("create_time")); + IPage purchaseCatalogueVOPage1 = purchaseCatalogueService.getPurchaseCatalogueVOPage(page, Wrappers.query().ge("create_time", startTime).le("create_time", endTime).orderByDesc("create_time")); - List records = purchaseCatalogueVOPage.getRecords(); - - return R.ok(purchaseCatalogueVOPage1);} + return R.ok(purchaseCatalogueVOPage1); + } return R.ok(purchaseCatalogueVOPage); @@ -130,10 +133,6 @@ public class PurchaseCatalogueController { } - - - - /** * 新增(采购目录) * @@ -153,7 +152,7 @@ public class PurchaseCatalogueController { PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.addCatalogue(dlpUser, purchaseCatalogueDTOList); - if (purchaseCatalogue!=null) { + if (purchaseCatalogue != null) { return R.ok(purchaseCatalogue, "保存成功"); } else { return R.failed(purchaseCatalogue, "保存失败"); @@ -178,7 +177,7 @@ public class PurchaseCatalogueController { CatalogueDetails catalogueDetails = purchaseCatalogueService.editCatalogue(purchaseCatalogueDto); - if (catalogueDetails!=null) { + if (catalogueDetails != null) { return R.ok(catalogueDetails, "修改成功"); } else { return R.failed(catalogueDetails, "修改失败"); @@ -203,7 +202,7 @@ public class PurchaseCatalogueController { CatalogueDetails catalogueDetails = purchaseCatalogueService.addDetails(purchaseCatalogueDto); - if (catalogueDetails!=null) { + if (catalogueDetails != null) { return R.ok(catalogueDetails, "创建成功"); } else { return R.failed(catalogueDetails, "创建失败"); @@ -220,7 +219,7 @@ public class PurchaseCatalogueController { @SysLog("通过id删除采购目录") @DeleteMapping("/catalogue") // @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_del')") - public R deleteById( String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) { + public R deleteById(String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -228,9 +227,9 @@ public class PurchaseCatalogueController { Boolean aBoolean = purchaseCatalogueService.delCatalogue(purchaseCatalogueId); - if (aBoolean){ + if (aBoolean) { return R.ok("删除采购"); - }else return R.failed("删除失败"); + } else return R.failed("删除失败"); } @@ -252,9 +251,9 @@ public class PurchaseCatalogueController { CatalogueDetails byId = catalogueDetailsService.getById(catalogueDetailsId); - if (catalogueDetailsService.removeById(byId)){ - return R.ok(byId,"删除明细成功"); - }else { + if (catalogueDetailsService.removeById(byId)) { + return R.ok(byId, "删除明细成功"); + } else { return R.failed("删除失败"); } } @@ -269,17 +268,17 @@ public class PurchaseCatalogueController { @SysLog("提交采购目录") @PostMapping("/commit") // @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_commit')") - public R commitById(@RequestBody List purchaseCatalogueDTOList , HttpServletRequest theHttpServletRequest) { + public R commitById(@RequestBody List purchaseCatalogueDTOList, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.commitById(purchaseCatalogueDTOList,dlpUser); + PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.commitById(purchaseCatalogueDTOList, dlpUser); - if (purchaseCatalogue!=null){ - return R.ok(purchaseCatalogue,"提交成功"); - }else { + if (purchaseCatalogue != null) { + return R.ok(purchaseCatalogue, "提交成功"); + } else { return R.failed("提交失败"); } } @@ -300,11 +299,11 @@ public class PurchaseCatalogueController { DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.primaryAuditCatalogue(auditAndApproveDto,dlpUser); + PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.primaryAuditCatalogue(auditAndApproveDto, dlpUser); - if (purchaseCatalogue!=null){ - return R.ok(purchaseCatalogue,"审核成功"); - }else { + if (purchaseCatalogue != null) { + return R.ok(purchaseCatalogue, "审核成功"); + } else { return R.failed("审核失败"); } } @@ -325,11 +324,11 @@ public class PurchaseCatalogueController { DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.secondaryAuditCatalogue(auditAndApproveDto,dlpUser); + PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.secondaryAuditCatalogue(auditAndApproveDto, dlpUser); - if (purchaseCatalogue!=null){ - return R.ok(purchaseCatalogue,"审核成功"); - }else { + if (purchaseCatalogue != null) { + return R.ok(purchaseCatalogue, "审核成功"); + } else { return R.failed("审核失败"); } } @@ -342,18 +341,18 @@ public class PurchaseCatalogueController { */ @ApiOperation(value = "发布采购目录", notes = "发布采购目录") @SysLog("发布采购目录") - @PutMapping("/release/{purchaseCatalogueId}") + @PutMapping("/release") // @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_release')") - public R releaseById(@PathVariable String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) { + public R releaseById( String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) { PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.releaseCatalogue(purchaseCatalogueId); - if (purchaseCatalogue!=null){ - return R.ok(purchaseCatalogue,"发布成功"); - }else { + if (purchaseCatalogue != null) { + return R.ok(purchaseCatalogue, "发布成功"); + } else { return R.failed("发布失败"); } } - } +} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListController.java index 4ad63ff..3c87ad4 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListController.java @@ -11,6 +11,8 @@ import digital.laboratory.platform.reagent.dto.PurchaseListDTO; import digital.laboratory.platform.reagent.entity.PurchaseList; import digital.laboratory.platform.reagent.entity.PurchaseListDetails; import digital.laboratory.platform.reagent.service.PurchaseListService; +import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO; +import digital.laboratory.platform.reagent.vo.PurchaseListPageVO; import digital.laboratory.platform.reagent.vo.PurchaseListVO; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; @@ -52,9 +54,9 @@ public class PurchaseListController { * @return R */ @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{purchaseListId}" ) + @GetMapping( ) // @PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')" ) - public R getById(@PathVariable("purchaseListId" ) String purchaseListId, HttpServletRequest theHttpServletRequest) { + public R getById(String purchaseListId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -73,43 +75,66 @@ public class PurchaseListController { */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page" ) -// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')" ) +// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_page')" ) public R> getPurchaseListPage(Page page, PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); IPage purchaseListSList = purchaseListService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) .orderByDesc("create_time") ); return R.ok(purchaseListSList); // return R.ok(purchaseListService.page(page, Wrappers.query(purchaseList))); } - /** * 新增(采购清单) - * @param purchaseListDTOList (采购清单) + * @param purchaseListDTO (采购清单) * @return R */ - @ApiOperation(value = "新增采购清单", notes = "新增采购清单") - @SysLog("新增采购清单" ) + @ApiOperation(value = "修改采购清单明细", notes = "修改采购清单明细") + @SysLog("修改采购清单明细" ) @PostMapping // @PreAuthorize("@pms.hasPermission('reagent_purchase_list_add')" ) - public R postAddObject(@RequestBody List purchaseListDTOList, HttpServletRequest theHttpServletRequest) { + public R postAddObject(@RequestBody PurchaseListDTO purchaseListDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - PurchaseList purchaseList = new PurchaseList(); + PurchaseListDetailsVO purchaseListDetailsVO = purchaseListService.addDetails(purchaseListDTO); - if (purchaseListService.addListById(purchaseListDTOList, purchaseList)!=null) { - return R.ok(purchaseList, "创建成功"); + if (purchaseListDetailsVO!=null) { + return R.ok(purchaseListDetailsVO, "保存成功"); } else { - return R.failed(purchaseList, "创建失败"); + return R.failed(purchaseListDetailsVO, "保存失败"); } - }} + } + /** + * 新增(采购清单) + * @param id (采购清单) + * @return R + */ + @ApiOperation(value = "提交采购清单明细", notes = "提交采购清单明细") + @SysLog("提交采购清单明细" ) + @PutMapping("/commit") +// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_commit)" ) + public R commitById( String id, HttpServletRequest theHttpServletRequest) { + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + PurchaseList purchaseList = purchaseListService.commitById(id); + + if (purchaseList!=null) { + return R.ok(purchaseList, "提交成功"); + } + else { + return R.failed(purchaseList, "提交失败"); + } + } +} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListDetailsController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListDetailsController.java deleted file mode 100644 index 8729f62..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListDetailsController.java +++ /dev/null @@ -1,149 +0,0 @@ -package digital.laboratory.platform.reagent.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import digital.laboratory.platform.common.core.util.R; -import digital.laboratory.platform.common.log.annotation.SysLog; -import digital.laboratory.platform.common.mybatis.security.service.DLPUser; -import digital.laboratory.platform.reagent.entity.PurchaseListDetails; -import digital.laboratory.platform.reagent.service.PurchaseListDetailsService; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.security.oauth2.provider.OAuth2Authentication; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import java.security.Principal; - -/** - * (采购清单明细) - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe (采购清单明细) 前端控制器 - * - * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 - * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 - * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/purchaselist_details" ) -@Api(value = "purchaselist_details", tags = "(采购清单明细)管理") -public class PurchaseListDetailsController { - - private final PurchaseListDetailsService purchaselistDetailsService; - - /** - * 通过id查询(采购清单明细) - * @param purchaselistDetailsId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{purchaselistDetailsId}" ) - @PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_get')" ) - public R getById(@PathVariable("purchaselistDetailsId" ) String purchaselistDetailsId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - PurchaseListDetails purchaselistDetails = purchaselistDetailsService.getById(purchaselistDetailsId); - return R.ok(purchaselistDetails); - //return R.ok(purchaselistDetailsService.getById(purchaselistDetailsId)); - } - - /** - * 分页查询 - * @param page 分页对象 - * @param purchaselistDetails (采购清单明细) - * @return - */ - @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_get')" ) - public R> getPurchaselistDetailsPage(Page page, PurchaseListDetails purchaselistDetails, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage purchaselistDetailsSList = purchaselistDetailsService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(purchaselistDetailsSList); -// return R.ok(purchaselistDetailsService.page(page, Wrappers.query(purchaselistDetails))); - } - - - /** - * 新增(采购清单明细) - * @param purchaselistDetails (采购清单明细) - * @return R - */ - @ApiOperation(value = "新增(采购清单明细)", notes = "新增(采购清单明细)") - @SysLog("新增(采购清单明细)" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_add')" ) - public R postAddObject(@RequestBody PurchaseListDetails purchaselistDetails, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - purchaselistDetails.setPurchaselistDetailsId(IdWorker.get32UUID().toUpperCase()); - if (purchaselistDetailsService.save(purchaselistDetails)) { - return R.ok(purchaselistDetails, "对象创建成功"); - } - else { - return R.failed(purchaselistDetails, "对象创建失败"); - } - } - - /** - * 修改(采购清单明细) - * @param purchaselistDetails (采购清单明细) - * @return R - */ - @ApiOperation(value = "修改(采购清单明细)", notes = "修改(采购清单明细)") - @SysLog("修改(采购清单明细)" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_edit')" ) - public R putUpdateById(@RequestBody PurchaseListDetails purchaselistDetails, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (purchaselistDetailsService.updateById(purchaselistDetails)) { - return R.ok(purchaselistDetails, "保存对象成功"); - } - else { - return R.failed(purchaselistDetails, "保存对象失败"); - } - } - - /** - * 通过id删除(采购清单明细) - * @param purchaselistDetailsId id - * @return R - */ - @ApiOperation(value = "通过id删除(采购清单明细)", notes = "通过id删除(采购清单明细)") - @SysLog("通过id删除(采购清单明细)" ) - @DeleteMapping("/{purchaselistDetailsId}" ) - @PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_del')" ) - public R deleteById(@PathVariable String purchaselistDetailsId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - PurchaseListDetails oldPurchaseListDetails = purchaselistDetailsService.getById(purchaselistDetailsId); - - if (purchaselistDetailsService.removeById(purchaselistDetailsId)) { - return R.ok(oldPurchaseListDetails, "对象删除成功"); - } - else { - return R.failed(oldPurchaseListDetails, "对象删除失败"); - } - - } - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java index d85522f..6436d9d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java @@ -1,17 +1,22 @@ package digital.laboratory.platform.reagent.controller; +import cn.hutool.core.date.DateTime; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fasterxml.jackson.annotation.JsonFormat; import digital.laboratory.platform.common.core.util.R; import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.dto.PurchasingPlanDTO; import digital.laboratory.platform.reagent.entity.ProcurementContent; +import digital.laboratory.platform.reagent.entity.PurchaseCatalogue; import digital.laboratory.platform.reagent.entity.PurchasingPlan; import digital.laboratory.platform.reagent.service.PurchasingPlanService; +import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO; import digital.laboratory.platform.reagent.vo.PurchasingPlanVO; +import lombok.Data; import org.springframework.beans.factory.annotation.Autowired; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -22,6 +27,7 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.security.Principal; +import java.sql.Date; import java.util.List; /** @@ -53,9 +59,9 @@ public class PurchasingPlanController { * @return R */ @ApiOperation(value = "点击一行通过id查询采购计划明细", notes = "点击一行通过id查询采购计划明细") - @GetMapping("/{purchasingPlanId}") + @GetMapping() // @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')") - public R getById(@PathVariable("purchasingPlanId") String purchasingPlanId, HttpServletRequest theHttpServletRequest) { + public R getById(String purchasingPlanId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -67,26 +73,35 @@ public class PurchasingPlanController { /** * 分页查询 * - * @param page 分页对象 + * @param page 分页对象 * @return */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page") // @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')") - public R> getPurchasingPlanPage(Page page, HttpServletRequest theHttpServletRequest) { + public R> getPurchasingPlanPage(Page page, @JsonFormat(pattern = "yyyy-MM-dd") Date startTime, + @JsonFormat(pattern = "yyyy-MM-dd") Date endTime, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + if (startTime != null && endTime != null) { + + IPage purchasingPlanVOPage = purchasingPlanService.getPurchasingPlanVOPage(page, Wrappers.query(). + ge("create_time", startTime) + .le("create_time", endTime).orderByDesc("create_time")); + + return R.ok(purchasingPlanVOPage); + }else { + IPage purchasingPlanVOPage = purchasingPlanService.getPurchasingPlanVOPage(page, Wrappers.query() .orderByDesc("create_time")); return R.ok(purchasingPlanVOPage); } - - - +} /** * 新增(采购计划) @@ -103,7 +118,7 @@ public class PurchasingPlanController { DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); PurchasingPlanVO purchasingPlanVO = purchasingPlanService.addById(purchasingPlanDTOList, dlpUser); - if (purchasingPlanVO!=null) { + if (purchasingPlanVO != null) { return R.ok(purchasingPlanVO, "保存成功"); } else { return R.failed("保存失败"); @@ -130,7 +145,7 @@ public class PurchasingPlanController { ProcurementContent procurementContent = purchasingPlanService.editById(purchasingPlanDTO); if (procurementContent != null) { - return R.ok(procurementContent,"修改成功"); + return R.ok(procurementContent, "修改成功"); } else { return R.failed("修改失败"); } @@ -145,7 +160,7 @@ public class PurchasingPlanController { @ApiOperation(value = "修改采购计划合并明细", notes = "修改采购计划合并明细") @SysLog("修改(采购计划)") @PutMapping("/details") -// @PreAuthorize("@pms.hasPermission('reagent_procurement_content_edit')") +// @PreAuthorize("@pms.hasPermission('reagent_procurement_content_merge')") public R editDetails(@RequestBody PurchasingPlanDTO purchasingPlanDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -155,7 +170,7 @@ public class PurchasingPlanController { ProcurementContent procurementContent = purchasingPlanService.editDetails(purchasingPlanDTO); if (procurementContent != null) { - return R.ok(procurementContent,"修改成功"); + return R.ok(procurementContent, "修改成功"); } else { return R.failed("修改失败"); } @@ -169,9 +184,9 @@ public class PurchasingPlanController { */ @ApiOperation(value = "通过id删除采购计划明细", notes = "通过id删除采购计划明细") @SysLog("通过id删除采购计划明细") - @DeleteMapping("content/{procurementContentId}") + @DeleteMapping("/content") // @PreAuthorize("@pms.hasPermission('reagent_procurement_content_del')") - public R deleteContentById(@PathVariable String procurementContentId, HttpServletRequest theHttpServletRequest) { + public R deleteContentById(String procurementContentId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -194,8 +209,8 @@ public class PurchasingPlanController { @ApiOperation(value = "提交采购计划", notes = "提交采购计划") @SysLog("修改(采购计划)") @PutMapping("/commit") -// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')") - public R commitById( String purchasingPlanId, HttpServletRequest theHttpServletRequest) { +// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_commit')") + public R commitById(String purchasingPlanId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -204,7 +219,7 @@ public class PurchasingPlanController { PurchasingPlan purchasingPlan = purchasingPlanService.commitById(purchasingPlanId); if (purchasingPlan != null) { - return R.ok(purchasingPlan,"提交成功"); + return R.ok(purchasingPlan, "提交成功"); } else { return R.failed("提交失败"); } @@ -219,7 +234,7 @@ public class PurchasingPlanController { @ApiOperation(value = "换货", notes = "换货") @SysLog("(换货)") @PutMapping("/replacement") -// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')") +// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_replacemen')") public R replacementById(@RequestBody PurchasingPlanDTO purchasingPlanDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -229,7 +244,7 @@ public class PurchasingPlanController { ProcurementContent procurementContent = purchasingPlanService.replacementById(purchasingPlanDTO); if (procurementContent != null) { - return R.ok(procurementContent,"换货成功"); + return R.ok(procurementContent, "换货成功"); } else { return R.failed("换货成功"); } @@ -244,17 +259,17 @@ public class PurchasingPlanController { @ApiOperation(value = "审核采购计划", notes = "审核采购计划") @SysLog("修改(采购计划)") @PutMapping("/audit") -// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')") +// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_audit')") public R auditById(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - PurchasingPlan purchasingPlan = purchasingPlanService.auditById(auditAndApproveDto,dlpUser); + PurchasingPlan purchasingPlan = purchasingPlanService.auditById(auditAndApproveDto, dlpUser); if (purchasingPlan != null) { - return R.ok(purchasingPlan,"审核成功"); + return R.ok(purchasingPlan, "审核成功"); } else { return R.failed("审核失败"); } @@ -269,46 +284,23 @@ public class PurchasingPlanController { @ApiOperation(value = "审批采购计划", notes = "审批采购计划") @SysLog("修改(采购计划)") @PutMapping("/approve") -// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')") +// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_approve)") public R approveById(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - PurchasingPlan purchasingPlan = purchasingPlanService.approveById(auditAndApproveDto,dlpUser); + PurchasingPlan purchasingPlan = purchasingPlanService.approveById(auditAndApproveDto, dlpUser); if (purchasingPlan != null) { - return R.ok(purchasingPlan,"审批成功"); + return R.ok(purchasingPlan, "审批成功"); } else { return R.failed("审批失败"); } } - /** - * 发布采购计划 - * - * @param purchasingPlanId (采购计划) - * @return R - */ - @ApiOperation(value = "发布采购计划", notes = "发布采购计划") - @SysLog("修改(采购计划)") - @PutMapping("/release") -// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')") - public R releaseById(@PathVariable String purchasingPlanId, HttpServletRequest theHttpServletRequest) { - - Principal principal = theHttpServletRequest.getUserPrincipal(); - - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - PurchasingPlan purchasingPlan = purchasingPlanService.releaseById(purchasingPlanId); - if (purchasingPlan != null) { - return R.ok(purchasingPlan,"发布成功"); - } else { - return R.failed("发布失败"); - } - } } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java index 2a821dc..64c9586 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java @@ -9,6 +9,7 @@ import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService; +import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO; import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; @@ -63,36 +64,57 @@ public class ReagentConsumableInventoryController { /** - * @param reagentConsumableInventory 试剂耗材库存 + * @param * @return */ - @ApiOperation(value = "耗材列表集合", notes = "耗材列表集合") + @ApiOperation(value = "标准物质列表", notes = "标准物质列表") @GetMapping("/RList" ) // @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" ) - public R> getReagentConsumableInventoryPage(Page page, ReagentConsumableInventory reagentConsumableInventory, HttpServletRequest theHttpServletRequest) { + public R> getReagentConsumableInventoryPage(Integer current,Integer size, String reagentConsumableName,HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - List reagentConsumableInventorySList = reagentConsumableInventoryService.getReagentConsumableInventoryVOList(); - return R.ok(reagentConsumableInventorySList); + Page allList = reagentConsumableInventoryService.getAllList(current,size,reagentConsumableName); + return R.ok(allList); // return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory))); } + @ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表") + @GetMapping("/standardList" ) +// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" ) + public R> getReagentConsumableInventoryList(Page page,String name,HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + Page reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page,name); + return R.ok(reagentConsumableInventoryRMVOList); +// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory))); + } + + @ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表") + @GetMapping("/List" ) +// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" ) + public R> getList(Page page,String name,HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + Page reagentConsumableInventoryVOList = reagentConsumableInventoryService.getReagentConsumableInventoryVOList(page,name); + return R.ok(reagentConsumableInventoryVOList); +// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory))); + } + /** * 分页查询 * * @return */ - @ApiOperation(value = "标准物质列表", notes = "标准物质列表") + @ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表") @GetMapping("/MList" ) // @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" ) - public R> getReferenceMaterialVOList(HttpServletRequest theHttpServletRequest) { + public R> getReferenceMaterialVOList(Integer current,Integer size,String reagentConsumableName,HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - List referenceMaterialVOList = reagentConsumableInventoryService.getReferenceMaterialVOList(); - return R.ok(referenceMaterialVOList); -// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory))); + Page allRM = reagentConsumableInventoryService.getAllRM(current, size,reagentConsumableName); + return R.ok(allRM); } @@ -146,9 +168,9 @@ public class ReagentConsumableInventoryController { */ @ApiOperation(value = "通过id删除试剂耗材库存", notes = "通过id删除试剂耗材库存") @SysLog("通过id删除试剂耗材库存" ) - @DeleteMapping("/{reagentConsumableInventoryId}" ) + @DeleteMapping() // @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_del')" ) - public R deleteById(@PathVariable String reagentConsumableInventoryId, HttpServletRequest theHttpServletRequest) { + public R deleteById(String reagentConsumableInventoryId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumablesController.java b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumablesController.java index bee13ee..f17c704 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumablesController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumablesController.java @@ -42,22 +42,6 @@ public class ReagentConsumablesController { private final ReagentConsumablesService reagentConsumablesService; - /** - * 通过id查询(试剂耗材类) - * @param reagentConsumablesId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("" ) -// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" ) - public R getById(String reagentConsumablesId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - ReagentConsumables reagentConsumables = reagentConsumablesService.getById(reagentConsumablesId); - return R.ok(reagentConsumables); - //return R.ok(reagentConsumablesService.getById(reagentConsumablesId)); - } /** * 分页查询 @@ -65,87 +49,17 @@ public class ReagentConsumablesController { * @param reagentConsumables (试剂耗材类) * @return */ - @ApiOperation(value = "分页查询", notes = "分页查询") + @ApiOperation(value = "分页查询试剂耗材类(包括标准物质)", notes = "分页查询试剂耗材类(包括标准物质)") @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" ) +// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" ) public R> getReagentConsumablesPage(Page page, ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); IPage reagentConsumablesSList = reagentConsumablesService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) .orderByDesc("create_time") ); return R.ok(reagentConsumablesSList); // return R.ok(reagentConsumablesService.page(page, Wrappers.query(reagentConsumables))); } - - - /** - * 新增(试剂耗材类) - * @param reagentConsumables (试剂耗材类) - * @return R - */ - @ApiOperation(value = "新增(试剂耗材类)", notes = "新增(试剂耗材类)") - @SysLog("新增(试剂耗材类)" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_add')" ) - public R postAddObject(@RequestBody ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - reagentConsumables.setReagentConsumableId(IdWorker.get32UUID().toUpperCase()); - if (reagentConsumablesService.save(reagentConsumables)) { - return R.ok(reagentConsumables, "对象创建成功"); - } - else { - return R.failed(reagentConsumables, "对象创建失败"); - } - } - - /** - * 修改(试剂耗材类) - * @param reagentConsumables (试剂耗材类) - * @return R - */ - @ApiOperation(value = "修改(试剂耗材类)", notes = "修改(试剂耗材类)") - @SysLog("修改(试剂耗材类)" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_edit')" ) - public R putUpdateById(@RequestBody ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (reagentConsumablesService.updateById(reagentConsumables)) { - return R.ok(reagentConsumables, "保存对象成功"); - } - else { - return R.failed(reagentConsumables, "保存对象失败"); - } - } - - /** - * 通过id删除(试剂耗材类) - * @param reagentConsumablesId id - * @return R - */ - @ApiOperation(value = "通过id删除(试剂耗材类)", notes = "通过id删除(试剂耗材类)") - @SysLog("通过id删除(试剂耗材类)" ) - @DeleteMapping("/{reagentConsumablesId}" ) - @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_del')" ) - public R deleteById(@PathVariable String reagentConsumablesId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - ReagentConsumables oldReagentConsumables = reagentConsumablesService.getById(reagentConsumablesId); - - if (reagentConsumablesService.removeById(reagentConsumablesId)) { - return R.ok(oldReagentConsumables, "对象删除成功"); - } - else { - return R.failed(oldReagentConsumables, "对象删除失败"); - } - - } - } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java b/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java index eefcdee..99b1d03 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java @@ -43,22 +43,6 @@ public class RequisitionRecordController { private final RequisitionRecordService requisitionRecordService; -// /** -// * 通过id查询(试剂耗材领用记录表) -// * @param requisitionRecordId id -// * @return R -// */ -// @ApiOperation(value = "通过id查询", notes = "通过id查询") -// @GetMapping("/{requisitionRecordId}" ) -// @PreAuthorize("@pms.hasPermission('reagent_requisition_record_get')" ) -// public R getById(@PathVariable("requisitionRecordId" ) String requisitionRecordId, HttpServletRequest theHttpServletRequest) { -// Principal principal = theHttpServletRequest.getUserPrincipal(); -// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); -// -// RequisitionRecord requisitionRecord = requisitionRecordService.getById(requisitionRecordId); -// return R.ok(requisitionRecord); -// //return R.ok(requisitionRecordService.getById(requisitionRecordId)); -// } /** * 分页查询 @@ -74,7 +58,6 @@ public class RequisitionRecordController { DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); IPage requisitionRecordSList = requisitionRecordService.getRequisitionRecordVOPage(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) .orderByDesc("create_time") ); return R.ok(requisitionRecordSList); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java index 13f5413..651f453 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java @@ -75,7 +75,6 @@ public class StandardMaterialApplicationController { DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); IPage standardMaterialApplicationSList = standardMaterialApplicationService.getPage(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) .orderByDesc("create_time") ); return R.ok(standardMaterialApplicationSList); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java index 58d1843..e7382d6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import digital.laboratory.platform.common.core.util.R; import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; +import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.dto.StandardMaterialApprovalFormDTO; import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm; import digital.laboratory.platform.reagent.service.StandardMaterialApprovalFormService; @@ -69,7 +70,7 @@ public class StandardMaterialApprovalFormController { */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" ) +// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" ) public R> getStandardMaterialApprovalFormPage(Page page, StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -113,7 +114,7 @@ public class StandardMaterialApprovalFormController { @ApiOperation(value = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)") @SysLog("修改(标准物质停用/报废销毁/恢复/降级使用审批表)" ) @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" ) +// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" ) public R putUpdateById(@RequestBody StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -128,6 +129,94 @@ public class StandardMaterialApprovalFormController { } } + /** + * 修改(标准物质停用/报废销毁/恢复/降级使用审批表) + * @param standardMaterialApprovalFormDTO (标准物质停用/报废销毁/恢复/降级使用审批表) + * @return R + */ + @ApiOperation(value = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)") + @SysLog("修改(标准物质停用/报废销毁/恢复/降级使用审批表)" ) + @PostMapping("/commit") +// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" ) + public R commitById(@RequestBody StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.commitById(standardMaterialApprovalFormDTO, dlpUser); + + if (standardMaterialApprovalForm!=null) { + return R.ok(standardMaterialApprovalForm, "提交成功"); + } + else { + return R.failed(standardMaterialApprovalForm, "提交失败"); + } + } + /** + * 一级审核(标准物质停用/报废销毁/恢复/降级使用审批表) + * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表) + * @return R + */ + @ApiOperation(value = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)") + @SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" ) + @PutMapping("/auditPrimary") + @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" ) + public R auditPrimary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.auditPrimary(auditAndApproveDTO,dlpUser); + + if (standardMaterialApprovalForm!=null) { + return R.ok(standardMaterialApprovalForm, "审核成功"); + } + else { + return R.failed(standardMaterialApprovalForm, "审核失败"); + } + } + /** + * 二级审核(标准物质停用/报废销毁/恢复/降级使用审批表) + * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表) + * @return R + */ + @ApiOperation(value = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)") + @SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" ) + @PutMapping("/auditSecondary") + @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" ) + public R auditSecondary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.auditSecondary(auditAndApproveDTO,dlpUser); + + if (standardMaterialApprovalForm!=null) { + return R.ok(standardMaterialApprovalForm, "审核成功"); + } + else { + return R.failed(standardMaterialApprovalForm, "审核失败"); + } + } + /** + * 审批(标准物质停用/报废销毁/恢复/降级使用审批表) + * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表) + * @return R + */ + @ApiOperation(value = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)") + @SysLog("审批(标准物质停用/报废销毁/恢复/降级使用审批表)" ) + @PutMapping("/approve") + @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" ) + public R approveById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.approveById(auditAndApproveDTO,dlpUser); + + if (standardMaterialApprovalForm!=null) { + return R.ok(standardMaterialApprovalForm, "审批成功"); + } + else { + return R.failed(standardMaterialApprovalForm, "审批失败"); + } + } } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java index 838081e..4456bef 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java @@ -94,7 +94,7 @@ public class StandardReserveSolutionController { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - standardReserveSolution.setStandardReserveSolutionId(IdWorker.get32UUID().toUpperCase()); + standardReserveSolution.setId(IdWorker.get32UUID().toUpperCase()); if (standardReserveSolutionService.save(standardReserveSolution)) { return R.ok(standardReserveSolution, "对象创建成功"); } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/StandardSolutionCurveController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StandardSolutionCurveController.java index a411f2a..e8b34ef 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardSolutionCurveController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardSolutionCurveController.java @@ -7,8 +7,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import digital.laboratory.platform.common.core.util.R; import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; +import digital.laboratory.platform.reagent.dto.StandardSolutionCurveDTO; import digital.laboratory.platform.reagent.entity.StandardSolutionCurve; import digital.laboratory.platform.reagent.service.StandardSolutionCurveService; +import digital.laboratory.platform.reagent.vo.StandardSolutionCurveVO; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -42,110 +44,48 @@ public class StandardSolutionCurveController { private final StandardSolutionCurveService standardSolutionCurveService; - /** - * 通过id查询(标准工作曲线溶液配置记录表) - * @param standardSolutionCurveId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{standardSolutionCurveId}" ) - @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" ) - public R getById(@PathVariable("standardSolutionCurveId" ) String standardSolutionCurveId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - StandardSolutionCurve standardSolutionCurve = standardSolutionCurveService.getById(standardSolutionCurveId); - return R.ok(standardSolutionCurve); - //return R.ok(standardSolutionCurveService.getById(standardSolutionCurveId)); - } - /** * 分页查询 * @param page 分页对象 - * @param standardSolutionCurve (标准工作曲线溶液配置记录表) * @return */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" ) - public R> getStandardSolutionCurvePage(Page page, StandardSolutionCurve standardSolutionCurve, HttpServletRequest theHttpServletRequest) { +// @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" ) + public R> getStandardSolutionCurvePage(Page page, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - IPage standardSolutionCurveSList = standardSolutionCurveService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) + IPage standardSolutionCurveVOPage = standardSolutionCurveService.getStandardSolutionCurveVOPage(page, Wrappers.query() .orderByDesc("create_time") ); - return R.ok(standardSolutionCurveSList); -// return R.ok(standardSolutionCurveService.page(page, Wrappers.query(standardSolutionCurve))); + return R.ok(standardSolutionCurveVOPage); } /** * 新增(标准工作曲线溶液配置记录表) - * @param standardSolutionCurve (标准工作曲线溶液配置记录表) + * @param standardSolutionCurveDTO (标准工作曲线溶液配置记录表) * @return R */ @ApiOperation(value = "新增(标准工作曲线溶液配置记录表)", notes = "新增(标准工作曲线溶液配置记录表)") @SysLog("新增(标准工作曲线溶液配置记录表)" ) @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_add')" ) - public R postAddObject(@RequestBody StandardSolutionCurve standardSolutionCurve, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - standardSolutionCurve.setStandardSolutionCurveId(IdWorker.get32UUID().toUpperCase()); - if (standardSolutionCurveService.save(standardSolutionCurve)) { - return R.ok(standardSolutionCurve, "对象创建成功"); - } - else { - return R.failed(standardSolutionCurve, "对象创建失败"); - } - } +// @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_add')" ) + public R postAddObject(@RequestBody StandardSolutionCurveDTO standardSolutionCurveDTO, HttpServletRequest theHttpServletRequest) { - /** - * 修改(标准工作曲线溶液配置记录表) - * @param standardSolutionCurve (标准工作曲线溶液配置记录表) - * @return R - */ - @ApiOperation(value = "修改(标准工作曲线溶液配置记录表)", notes = "修改(标准工作曲线溶液配置记录表)") - @SysLog("修改(标准工作曲线溶液配置记录表)" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_edit')" ) - public R putUpdateById(@RequestBody StandardSolutionCurve standardSolutionCurve, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (standardSolutionCurveService.updateById(standardSolutionCurve)) { - return R.ok(standardSolutionCurve, "保存对象成功"); - } - else { - return R.failed(standardSolutionCurve, "保存对象失败"); - } - } - /** - * 通过id删除(标准工作曲线溶液配置记录表) - * @param standardSolutionCurveId id - * @return R - */ - @ApiOperation(value = "通过id删除(标准工作曲线溶液配置记录表)", notes = "通过id删除(标准工作曲线溶液配置记录表)") - @SysLog("通过id删除(标准工作曲线溶液配置记录表)" ) - @DeleteMapping("/{standardSolutionCurveId}" ) - @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_del')" ) - public R deleteById(@PathVariable String standardSolutionCurveId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - StandardSolutionCurve oldStandardSolutionCurve = standardSolutionCurveService.getById(standardSolutionCurveId); + StandardSolutionCurve standardSolutionCurve = standardSolutionCurveService.addById(standardSolutionCurveDTO, dlpUser); - if (standardSolutionCurveService.removeById(standardSolutionCurveId)) { - return R.ok(oldStandardSolutionCurve, "对象删除成功"); - } - else { - return R.failed(oldStandardSolutionCurve, "对象删除失败"); - } + if (standardSolutionCurve!=null){ + return R.ok(standardSolutionCurve); + }else return R.failed("配置失败"); + } - } } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/StorageRegistrationFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StorageRegistrationFormController.java index a734ee2..93a8fb0 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StorageRegistrationFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StorageRegistrationFormController.java @@ -49,7 +49,7 @@ public class StorageRegistrationFormController { */ @ApiOperation(value = "通过id查询", notes = "通过id查询") @GetMapping("/{storageRegistrationFormId}" ) - @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" ) +// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" ) public R getById(@PathVariable("storageRegistrationFormId" ) String storageRegistrationFormId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -67,7 +67,7 @@ public class StorageRegistrationFormController { */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" ) +// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" ) public R> getStorageRegistrationFormPage(Page page, StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); @@ -89,7 +89,7 @@ public class StorageRegistrationFormController { @ApiOperation(value = "新增(试剂耗材入库登记表)", notes = "新增(试剂耗材入库登记表)") @SysLog("新增(试剂耗材入库登记表)" ) @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_add')" ) +// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_add')" ) public R postAddObject(@RequestBody StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/StorageRoomFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StorageRoomFormController.java index 3fc105a..e975c66 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StorageRoomFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StorageRoomFormController.java @@ -9,6 +9,7 @@ import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.entity.StorageRoomForm; import digital.laboratory.platform.reagent.service.StorageRoomFormService; +import digital.laboratory.platform.reagent.vo.StorageRoomFormVO; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -22,129 +23,142 @@ import java.io.IOException; import java.security.Principal; /** - * - * * @author Zhang Xiaolong created at 2023-03-22 - * @describe 前端控制器 - * + * @describe 前端控制器 + *

* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 + * 为前端提供数据, 接受前端的数据 + * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 + * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 */ @RestController @RequiredArgsConstructor -@RequestMapping("/storage_room_form" ) -@Api(value = "storage_room_form", tags = "管理") +@RequestMapping("/storage_room_form") +@Api(value = "storage_room_form", tags = "仓库存储室管理") public class StorageRoomFormController { - private final StorageRoomFormService storageRoomFormService; - - /** - * 通过id查询 - * @param storageRoomFormId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{storageRoomFormId}" ) - @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" ) - public R getById(@PathVariable("storageRoomFormId" ) String storageRoomFormId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - StorageRoomForm storageRoomForm = storageRoomFormService.getById(storageRoomFormId); - return R.ok(storageRoomForm); - //return R.ok(storageRoomFormService.getById(storageRoomFormId)); - } - - /** + private final StorageRoomFormService storageRoomFormService; + + /** + * 通过id查询 + * + * @param storageRoomFormId id + * @return R + */ + @ApiOperation(value = "通过id查询存储室信息", notes = "通过id查询存储室") + @GetMapping() +// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" ) + public R getById(String storageRoomFormId, HttpServletRequest theHttpServletRequest) { + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StorageRoomFormVO formById = storageRoomFormService.getFormById(storageRoomFormId); + + if (formById != null) { + return R.ok(formById); + } else { + return R.failed("不存在该ID对应的存储室"); + } + } + + /** * 分页查询 - * @param page 分页对象 - * @param storageRoomForm + * + * @param page 分页对象 + * @param storageRoomForm * @return */ @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" ) + @GetMapping("/page") +// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" ) public R> getStorageRoomFormPage(Page page, StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage storageRoomFormSList = storageRoomFormService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(storageRoomFormSList); -// return R.ok(storageRoomFormService.page(page, Wrappers.query(storageRoomForm))); + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + IPage storageRoomFormSList = storageRoomFormService.page(page, Wrappers.query() + .orderByDesc("create_time") + ); + return R.ok(storageRoomFormSList); } /** * 新增 - * @param storageRoomForm + * + * @param storageRoomForm * @return R */ - @ApiOperation(value = "新增", notes = "新增") - @SysLog("新增" ) + @ApiOperation(value = "新增存储室信息", notes = "新增存储室信息") + @SysLog("新增存储室信息") @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_add')" ) +// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_add')") public R postAddObject(@RequestBody StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - storageRoomForm.setStorageRoomFormId(IdWorker.get32UUID().toUpperCase()); - if (storageRoomFormService.save(storageRoomForm)) { - return R.ok(storageRoomForm, "对象创建成功"); - } - else { - return R.failed(storageRoomForm, "对象创建失败"); - } + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StorageRoomForm roomForm = storageRoomFormService.addById(storageRoomForm); + + if (roomForm!=null) { + return R.ok(storageRoomForm, "保存成功"); + } else { + return R.failed(storageRoomForm, "保存失败"); + } } /** * 修改 - * @param storageRoomForm + * + * @param storageRoomForm * @return R */ - @ApiOperation(value = "修改", notes = "修改") - @SysLog("修改" ) + @ApiOperation(value = "修改存储室信息", notes = "修改存储室信息") + @SysLog("修改存储室信息") @PutMapping - @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_edit')" ) +// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_edit')") public R putUpdateById(@RequestBody StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - if (storageRoomFormService.updateById(storageRoomForm)) { - return R.ok(storageRoomForm, "保存对象成功"); - } - else { - return R.failed(storageRoomForm, "保存对象失败"); - } + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StorageRoomForm roomForm = storageRoomFormService.editById(storageRoomForm); + + if (roomForm!=null) { + return R.ok(storageRoomForm, "保存成功"); + } else { + return R.failed(storageRoomForm, "保存失败"); + } } /** * 通过id删除 + * * @param storageRoomFormId id * @return R */ @ApiOperation(value = "通过id删除", notes = "通过id删除") - @SysLog("通过id删除" ) - @DeleteMapping("/{storageRoomFormId}" ) - @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_del')" ) - public R deleteById(@PathVariable String storageRoomFormId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - StorageRoomForm oldStorageRoomForm = storageRoomFormService.getById(storageRoomFormId); - - if (storageRoomFormService.removeById(storageRoomFormId)) { - return R.ok(oldStorageRoomForm, "对象删除成功"); - } - else { - return R.failed(oldStorageRoomForm, "对象删除失败"); - } + @SysLog("通过id删除") + @DeleteMapping("/{storageRoomFormId}") +// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_del')") + public R deleteById(@PathVariable String storageRoomFormId, HttpServletRequest theHttpServletRequest) { + + Principal principal = theHttpServletRequest.getUserPrincipal(); + + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + if (storageRoomFormService.delById(storageRoomFormId)) { + return R.ok("删除成功"); + } else { + return R.failed("删除失败"); + } } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/SupplierInformationController.java b/src/main/java/digital/laboratory/platform/reagent/controller/SupplierInformationController.java index 51ac646..fba7fef 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/SupplierInformationController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/SupplierInformationController.java @@ -1,137 +1,184 @@ package digital.laboratory.platform.reagent.controller; +import cn.hutool.core.io.file.FileNameUtil; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import digital.laboratory.platform.common.core.util.R; +//import digital.laboratory.platform.common.oss.service.OssFile; import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.dto.SupplierInformationDTO; import digital.laboratory.platform.reagent.entity.SupplierInformation; import digital.laboratory.platform.reagent.service.SupplierInformationService; +import digital.laboratory.platform.reagent.vo.SupplierInformationVO; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.security.oauth2.provider.OAuth2Authentication; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; +import java.util.HashMap; +import java.util.Map; /** * (服务商/供应商信息) * * @author Zhang Xiaolong created at 2023-03-10 - * @describe (服务商/供应商信息) 前端控制器 - * + * @describe (服务商 / 供应商信息) 前端控制器 + *

* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 + * 为前端提供数据, 接受前端的数据 + * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 + * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 */ @RestController @RequiredArgsConstructor -@RequestMapping("/supplier_information" ) +@RequestMapping("/supplier_information") @Api(value = "supplier_information", tags = "(服务商/供应商信息)管理") public class SupplierInformationController { - private final SupplierInformationService supplierInformationService; + private final SupplierInformationService supplierInformationService; + +// private final OssFile ossFile; - /** - * 通过id查询(服务商/供应商信息) - * @param supplierInformationId id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{supplierInformationId}" ) + /** + * 通过id查询(服务商/供应商信息) + * + * @param supplierInformationId id + * @return R + */ + @ApiOperation(value = "通过id查询(服务商/供应商信息)", notes = "通过id查询(服务商/供应商信息)") + @GetMapping() // @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" ) - public R getById(@PathVariable("supplierInformationId" ) String supplierInformationId, HttpServletRequest theHttpServletRequest) { + public R getById(String supplierInformationId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); + Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - SupplierInformation supplierInformation = supplierInformationService.getById(supplierInformationId); + SupplierInformationVO voById = supplierInformationService.getVOById(supplierInformationId); - return R.ok(supplierInformation); + return R.ok(voById); - } + } - /** + /** * 分页查询 - * @param page 分页对象 + * + * @param page 分页对象 * @param supplierInformation (服务商/供应商信息) * @return */ @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) -// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" ) + @GetMapping("/page") +// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_page')" ) public R> getSupplierInformationPage(Page page, SupplierInformation supplierInformation, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage supplierInformationSList = supplierInformationService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time") - ); - return R.ok(supplierInformationSList); + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + IPage supplierInformationSList = supplierInformationService.page(page, Wrappers.query() + .orderByDesc("create_time") + ); + return R.ok(supplierInformationSList); // return R.ok(supplierInformationService.page(page, Wrappers.query(supplierInformation))); } /** * 新增(服务商/供应商信息) + * * @param supplierInformationDTO (服务商/供应商信息) * @return R */ @ApiOperation(value = "新增服务商/供应商信息", notes = "新增服务商/供应商信息") - @SysLog("新增服务商/供应商信息" ) + @SysLog("新增服务商/供应商信息") @PostMapping + @Transactional // @PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" ) public R postAddObject(@RequestBody SupplierInformationDTO supplierInformationDTO, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); + Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - SupplierInformation supplierInformation = new SupplierInformation(); + SupplierInformation supplierInformation = supplierInformationService.addInfoById(supplierInformationDTO); - if (supplierInformationService.addInfoById(supplierInformationDTO,supplierInformation)) { - return R.ok(supplierInformation, "保存成功"); - } - else { - return R.failed("保存失败"); - } + if (supplierInformation != null) { + return R.ok(supplierInformation, "保存成功"); + } else { + return R.failed("保存失败"); + } } + /** * 修改(服务商/供应商信息) + * * @param supplierInformationDTO (服务商/供应商信息) * @return R */ @ApiOperation(value = "修改服务商/供应商信息", notes = "修改服务商/供应商信息") - @SysLog("修改服务商/供应商信息" ) + @SysLog("修改服务商/供应商信息") @PutMapping // @PreAuthorize("@pms.hasPermission('reagent_supplier_information_edit')" ) public R putUpdateById(@RequestBody SupplierInformationDTO supplierInformationDTO, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); + Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - SupplierInformation supplierInformation = supplierInformationService.editInfoById(supplierInformationDTO); + SupplierInformation supplierInformation = supplierInformationService.editInfoById(supplierInformationDTO); - if (supplierInformation!=null) { - return R.ok(supplierInformation, "修改成功"); - } - else { - return R.failed("修改失败"); - } + if (supplierInformation != null) { + return R.ok(supplierInformation, "修改成功"); + } else { + return R.failed("修改失败"); + } } + + /** + * 修改(服务商/供应商信息) + * + * @param id (服务商/供应商信息) + * @return R + */ +// @ApiOperation(value = "上传供应人照片", notes = "上传供应人照片/供应商信息") +// @SysLog("修改服务商/供应商信息") +// @PostMapping("/upload") +//// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_edit')" ) +// public R putUpdateById(String id, @RequestPart("file") MultipartFile file, HttpServletRequest theHttpServletRequest) { +// +// Principal principal = theHttpServletRequest.getUserPrincipal(); +// +// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); +// +// SupplierInformation supplierInformation = supplierInformationService.getById(id); +// +// String path = "reagent_managment" + " /" + "supplierInformation" + "/" + "picture_"+supplierInformation.getId(); +// String fileName = FileNameUtil.getName(file.getOriginalFilename()); +// boolean r = ossFile.fileUpload(file, path); +// Map ResultData = new HashMap<>(); +// ResultData.put("fileName", fileName); +// ResultData.put("path", path); +// +// if (r) { +// //修改数据库 +// supplierInformation.setPhotographOfSupplier(path); +// supplierInformationService.updateById(supplierInformation); +// return R.ok(supplierInformation, "上传成功"); +// } else return R.failed("上传失败"); +// +// } + } diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java index e09b698..35994e1 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java @@ -49,10 +49,10 @@ public class WarehousingRecordFormController { * @param warehousingRecordFormId id * @return R */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping("/{warehousingRecordFormId}") -// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_get')" ) - public R getById(@PathVariable("warehousingRecordFormId") String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) { + @ApiOperation(value = "通过id查询入库信息", notes = "通过id查询入库信息") + @GetMapping() +// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_get')" ) + public R getById( String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -65,25 +65,20 @@ public class WarehousingRecordFormController { /** * 分页查询 - * - * @param page 分页对象 - * @param signingRecordForm 签收记录表 * @return */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page") -// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_get')") - public R> getWarehousingRecordFormVOPage(Page page, WarehousingRecordForm signingRecordForm, HttpServletRequest theHttpServletRequest) { +// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')") + public R> getWarehousingRecordFormVOPage( HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - IPage signingRecordFormPage = warehousingRecordFormService.page(page, Wrappers.query() - .eq("create_by", dlpUser.getId()) - .orderByDesc("create_time")); + List warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOList(); - return R.ok(signingRecordFormPage); + return R.ok(warehousingRecordFormVOList); } @@ -97,71 +92,19 @@ public class WarehousingRecordFormController { @ApiOperation(value = "新增签收记录表", notes = "新增签收记录表") @SysLog("新增签收记录表") @PostMapping -// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_add')") - public R postAddObject(@RequestBody List warehousingRecordFormDTOList, HttpServletRequest theHttpServletRequest) { +// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')") + public R postAddObject(@RequestBody List warehousingRecordFormDTOList, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - Boolean aBoolean = warehousingRecordFormService.addFormById(warehousingRecordFormDTOList, dlpUser); - + WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.addFormById(warehousingRecordFormDTOList, dlpUser); - if (aBoolean) { - return R.ok("保存成功"); + if (warehousingRecordFormVO != null) { + return R.ok(warehousingRecordFormVO, "入库成功"); } else { - return R.failed("保存失败"); + return R.failed("入库失败"); } } - -// /** -// * 修改签收记录表 -// * -// * @param warehousingRecordFormDTO 签收记录表 -// * @return R -// */ -// @ApiOperation(value = "修改签收记录表", notes = "修改签收记录表") -// @SysLog("修改签收记录表") -// @PutMapping -//// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_edit')") -// public R putUpdateById(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) { -// -// Principal principal = theHttpServletRequest.getUserPrincipal(); -// -// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); -// -// WarehousingRecordFormDTO warehousingRecordFormDTO1 = warehousingRecordFormDTO; -// -// -// if ( != null) { -// return R.ok(signedBatchList, "修改成功"); -// } else { -// return R.failed(signedBatchList, "修改失败"); -// } -// } - -// /** -// * 通过id删除签收记录表 -// * -// * @param signingRecordFormId id -// * @return R -// */ -// @ApiOperation(value = "通过id删除签收记录表", notes = "通过id删除签收记录表") -// @SysLog("通过id删除签收记录表") -// @DeleteMapping("/{signingRecordFormId}") -// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_del')") -// public R deleteById(@PathVariable String signingRecordFormId, HttpServletRequest theHttpServletRequest) { -// Principal principal = theHttpServletRequest.getUserPrincipal(); -// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); -// -// SigningRecordForm oldSigningRecordForm = warehousingRecordFormService.getById(signingRecordFormId); -// -// if (warehousingRecordFormService.removeById(signingRecordFormId)) { -// return R.ok(oldSigningRecordForm, "对象删除成功"); -// } else { -// return R.failed(oldSigningRecordForm, "对象删除失败"); -// } -// -// } - } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/AcceptanceRecordFormDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/AcceptanceRecordFormDTO.java index 872870c..0503299 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/AcceptanceRecordFormDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/AcceptanceRecordFormDTO.java @@ -1,5 +1,6 @@ package digital.laboratory.platform.reagent.dto; +import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -8,18 +9,46 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor public class AcceptanceRecordFormDTO { + + @ApiModelProperty(value = "(后续处理情况)") private String followUpTreatment; + + @ApiModelProperty(value = "(验收记录表ID)") private String acceptanceRecordFormId; - private boolean theSameBrandAndModel; + + @ApiModelProperty(value = "(品牌型号一致)") + private String theSameBrandAndModel; + + @ApiModelProperty(value = "(品牌型号一致备注)") private String bam_remarks; - private boolean consistentQuantity; + + @ApiModelProperty(value = "(数量一致)") + private String consistentQuantity; + + @ApiModelProperty(value = "(数量一致备注)") private String cq_remarks; - private boolean packingInGoodCondition; + + @ApiModelProperty(value = "(包装完好)") + private String packingInGoodCondition; + + @ApiModelProperty(value = "(包装完好备注)") private String pcg_remarks; - private boolean validityPeriod; + + @ApiModelProperty(value = "(有效期)") + private String validityPeriod; + + @ApiModelProperty(value = "(有效期备注)") private String vp_remarks; - private boolean deliveryCycle; + + @ApiModelProperty(value = "(供货周期)") + private String deliveryCycle; + + @ApiModelProperty(value = "(供货周期备注)") private String dc_remarks; + + @ApiModelProperty(value = "(验收结论)") private String acceptanceConclusion; + + @ApiModelProperty(value = "(不合格项目)") private String nonconformingItem; } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/ApplicationForUseDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/ApplicationForUseDTO.java index 2f60d6b..d2ed100 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/ApplicationForUseDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/ApplicationForUseDTO.java @@ -1,5 +1,6 @@ package digital.laboratory.platform.reagent.dto; +import io.swagger.annotations.ApiModelProperty; import io.swagger.models.auth.In; import lombok.Data; @@ -7,13 +8,35 @@ import java.time.LocalDateTime; import java.util.List; @Data public class ApplicationForUseDTO { + + @ApiModelProperty(value = "(标准物质编号)") + private String referenceMaterialNumber; + + @ApiModelProperty(value = "(是否归还)") + private boolean returnOrNot; + + @ApiModelProperty(value = "(备注)") private String remarks; + + @ApiModelProperty(value = "(用途)") private Integer purpose; + + @ApiModelProperty(value = "(领用申请ID)") private String applicationForUseId; + + @ApiModelProperty(value = "(数量)") private Integer quantity; + + @ApiModelProperty(value = "(试剂耗材ID)") private String reagentConsumableId; + + @ApiModelProperty(value = "(规格型号)") private String specificationAndModel; + + @ApiModelProperty(value = "(标准物质领用归还/登记表ID)") private String standardMaterialApplicationId; + + @ApiModelProperty(value = "(批次ID)") private String batchDetailsId; } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/AuditDecentralizedRequestDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/AuditDecentralizedRequestDTO.java deleted file mode 100644 index 20344c0..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/dto/AuditDecentralizedRequestDTO.java +++ /dev/null @@ -1,12 +0,0 @@ -package digital.laboratory.platform.reagent.dto; - -import lombok.Data; - -@Data -public class AuditDecentralizedRequestDTO { - - private Boolean auditResult; - private String auditOpinion; - private Boolean haveCheck; - private String uuId; -} diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/CentralizedRequestDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/CentralizedRequestDTO.java index 801a492..152a769 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/CentralizedRequestDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/CentralizedRequestDTO.java @@ -13,22 +13,22 @@ import lombok.NoArgsConstructor; @ApiModel(value = "集中采购申请DTO") public class CentralizedRequestDTO { - @ApiModelProperty(value="集中采购申请ID") + @ApiModelProperty(value="集中采购申请ID") private String centralizedRequestId; - @ApiModelProperty(value="采购目录编号") + @ApiModelProperty(value="采购目录编号") private String purchaseCatalogueNumber; @ApiModelProperty(value="申请数量") - private Integer numberOfApplications; - @ApiModelProperty(value="试剂耗材ID") + @ApiModelProperty(value="试剂耗材ID") private String reagentConsumableId; - @ApiModelProperty(value="备注") + @ApiModelProperty(value="备注") private String remarks; + @ApiModelProperty(value="集中采购申请明细Id") private String detailsOfCentralizedId; diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/CheckContentDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/CheckContentDTO.java index 2927e86..6ad4e4c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/CheckContentDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/CheckContentDTO.java @@ -13,4 +13,6 @@ public class CheckContentDTO { + + } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/ComplianceCheckDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/ComplianceCheckDTO.java index c889cb4..220eaba 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/ComplianceCheckDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/ComplianceCheckDTO.java @@ -1,6 +1,7 @@ package digital.laboratory.platform.reagent.dto; import digital.laboratory.platform.reagent.entity.DisqualificationForm; +import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -12,14 +13,32 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor public class ComplianceCheckDTO { + + @ApiModelProperty(value="(录入检查结论)") private String examinationConclusion; + + @ApiModelProperty(value="(录入检查方案)") private String inspectionScheme; + + @ApiModelProperty(value="(符合性检查ID,录入方案与结论时传输)") private String complianceCheckId; + + @ApiModelProperty(value="(品牌)") private String brand; + + @ApiModelProperty(value="(试剂耗材Id)") private String reagentConsumableId; + + @ApiModelProperty(value="(规格型号)") private String specificationAndModel; + + @ApiModelProperty(value="(不合格项目,录入检查结论时传输)") private String nonconformingItem; + + @ApiModelProperty(value="(标准物质编号,若选择的物质为标准物质,则需传输编号)") private String reagentConsumableNumber; + + @ApiModelProperty(value="(批次ID)") private String batchDetailsId; diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java index 60e8022..bce0c74 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java @@ -45,7 +45,11 @@ public class DecentralizedRequestDTO { @ApiModelProperty(value="(用途)") private String purpose; + @ApiModelProperty(value="(分散采购申请ID)") + private String decentralizedRequestId; + @ApiModelProperty(value="(分散采购申请明细.ID)") + private String decentralizeDetailsId; @ApiModelProperty(value="单价") diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/EvaluationFormDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/EvaluationFormDTO.java index 3149221..c0bcd82 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/EvaluationFormDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/EvaluationFormDTO.java @@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.dto; import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies; import digital.laboratory.platform.reagent.mapper.ProvideServicesOrSuppliesMapper; +import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -14,20 +15,49 @@ import java.util.List; @NoArgsConstructor public class EvaluationFormDTO { + + @ApiModelProperty(value = "(联系电话)") private String contactNumber; + + @ApiModelProperty(value = "(联系人)") private String contactPerson; - private String serviceProviderAndSupplierId; + + @ApiModelProperty(value="供应商信息评价表id") + private String evaluationFormId; + @ApiModelProperty(value = "(供应商营业执照)") + private String supplierBusinessLicense; + @ApiModelProperty(value = "(供应商通过质量保证体系)") + private String supplierPassesQualityAssuranceSystem; + @ApiModelProperty(value = "(供应商产品认证)") + private String supplierProductCertification; + @ApiModelProperty(value = "(对供应品检验校准效率)") + private String checkAndCalibrateEfficiencyOfSupplies; + @ApiModelProperty(value = "(对供应商总体服务是否满意)") + private String overallSupplierServiceSatisfaction; + @ApiModelProperty(value = "(供应商态度)") + private String supplierAttitude; + @ApiModelProperty(value = "(供应商设备与设施)") + private String supplierEquipmentAndFacilities; + @ApiModelProperty(value = "(供应商技术与管理能力)") + private String supplierTechnologyAndManagementCapability; + @ApiModelProperty(value = "(供应商交货是否及时)") + private String whetherTheSupplierDeliversOnTime; + @ApiModelProperty(value = "(供应商ID") + private String supplierInformationId; + + @ApiModelProperty(value = "(一级评价意见//该意见为当前登录用户的评价意见,不同于审核)") + private String commentsFromPrimary; diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/OutgoingContentsDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/OutgoingContentsDTO.java index b7abb50..c345cb5 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/OutgoingContentsDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/OutgoingContentsDTO.java @@ -12,5 +12,6 @@ public class OutgoingContentsDTO { private String deliveryRegistrationFormId; private String referenceMaterialId; private String number; + private boolean returnOrNot; } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationImplementationDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationImplementationDTO.java index 721c61e..32e981f 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationImplementationDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationImplementationDTO.java @@ -1,25 +1,52 @@ package digital.laboratory.platform.reagent.dto; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.time.LocalDate; import java.time.LocalDateTime; @Data public class PeriodVerificationImplementationDTO { + @ApiModelProperty(value="(不满足应用要求原因分析)") private String causeOfDissatisfaction; - private LocalDateTime checkingTime; + + @ApiModelProperty(value="(核查时间)") + private LocalDate checkingTime; + + @ApiModelProperty(value="(偏差/不确定度)") private String deviationAndUncertainty; + + @ApiModelProperty(value="(核查实施情况及结果)") private String implementationAndResults; - private String number; + + @ApiModelProperty(value="(标准物质编号)") private String referenceMaterialNumber; + + @ApiModelProperty(value="(标准物质ID)") private String referenceMaterialId; + + @ApiModelProperty(value="(标准物质名称)") + private String referenceMaterialName; + + @ApiModelProperty(value="(备注)") private String remarks; + + @ApiModelProperty(value="(标准值/纯度)") private String standardValueAndPurity; + + @ApiModelProperty(value="(核查方法)") private String verificationMethod; + + @ApiModelProperty(value="(期间核查计划明细ID)") private String periodVerificationPlanId; + + @ApiModelProperty(value="(核查人ID)") private Integer opinionOfInspector; - private String result; - private String periodVerificationImplementationId; + @ApiModelProperty(value="(标准物质期间核查实施情况及结果记录表ID)") + private String periodVerificationImplementationId; + @ApiModelProperty(value="(核查结果:PDF)") + private String result; } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationPlanDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationPlanDTO.java index 24c62f1..b14b106 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationPlanDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationPlanDTO.java @@ -2,27 +2,46 @@ package digital.laboratory.platform.reagent.dto; import com.alibaba.fastjson.annotation.JSONField; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDate; import java.time.LocalDateTime; @Data @NoArgsConstructor @AllArgsConstructor public class PeriodVerificationPlanDTO { + + @ApiModelProperty(value="(偏差/不确定度)") private String deviationAndUncertainty; + + @ApiModelProperty(value="(核查人ID)") private String inspectorId; + + @ApiModelProperty(value="(计划核查周期)") private Integer plannedVerificationCycle; + + @ApiModelProperty(value="(标准物质ID)") private String referenceMaterialId; + + @ApiModelProperty(value="(标准物质编号)") private String referenceMaterialNumber; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime scheduledVerificationDate; + + @DateTimeFormat(pattern = "yyyy-MM-dd ") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value="(计划核查日期)") + private LocalDate scheduledVerificationDate; + + @ApiModelProperty(value="(标准值/纯度)") private String standardValueAndPurity; - private String verificationBasis; - private String checkScheduleId; + @ApiModelProperty(value="(核查依据)") + private String verificationBasis; + @ApiModelProperty(value="(计划制定表ID)") + private String checkScheduleId; } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/PurchaseListDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/PurchaseListDTO.java index 73bb4e6..a068fe2 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/PurchaseListDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/PurchaseListDTO.java @@ -9,20 +9,19 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor public class PurchaseListDTO { - @ApiModelProperty(value="(采购清单ID)·") + @ApiModelProperty(value="(采购清单ID)") private String purchaseListId; - @ApiModelProperty(value="(采购量)") + @ApiModelProperty(value="(采购量)") private Integer purchaseQuantity; - @ApiModelProperty(value="(试剂耗材ID)") + @ApiModelProperty(value="(试剂耗材ID)") private String reagentConsumableId; - @ApiModelProperty(value="(备注)") - private String remarks; @ApiModelProperty(value="(供应商ID)") - private String supplierId; + @ApiModelProperty(value="(采购清单明细ID)") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java index 5c01c70..1a618d7 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java @@ -12,34 +12,35 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @ApiModel(value = "(采购计划DTO)") public class PurchasingPlanDTO { - @ApiModelProperty(value="集中采购申请明细ID") + @ApiModelProperty(value = "集中采购申请明细ID") private String detailsOfCentralizedId; - @ApiModelProperty(value="采购计划id") + @ApiModelProperty(value = "采购计划id") private String purchasingPlanId; - @ApiModelProperty(value="申请数量)") + @ApiModelProperty(value = "申请数量)") private Integer numberOfApplications; - @ApiModelProperty(value="采购数量)") - + @ApiModelProperty(value = "采购数量)") private Integer quantityPurchased; - @ApiModelProperty(value="试剂耗材ID") + @ApiModelProperty(value = "试剂耗材ID") private String reagentConsumableId; - @ApiModelProperty(value="集中采购申请明细ID") - + @ApiModelProperty(value = "采购计划明细ID") private String procurementContentId; - @ApiModelProperty(value="换货试剂耗材ID") + @ApiModelProperty(value = "换货试剂耗材ID") private String replacementReagentConsumableId; - @ApiModelProperty(value="换货数量") + @ApiModelProperty(value = "换货数量") private Integer replacementQuantity; - @ApiModelProperty(value="换货单价") + @ApiModelProperty(value = "换货单价") private Double replacementPrice; + @ApiModelProperty(value = "采购计划明细修改备注") + private String planRemark; + } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java index 29c2642..d439a83 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java @@ -7,6 +7,7 @@ public class StandardMaterialApplicationDTO { private String standardMaterialApplicationId; private String userId; - private double useQuantity; + private String useQuantity; private String latticeId; + private Boolean outOfUse; } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/SupplierInformationDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/SupplierInformationDTO.java index 7bccadc..c7dd9ff 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/SupplierInformationDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/SupplierInformationDTO.java @@ -42,5 +42,7 @@ public class SupplierInformationDTO { @ApiModelProperty(value="(供应人电话)") private String supplierTelephone; - private String supplierInformationId; + @ApiModelProperty(value="(供应商ID)") + + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java index fd269e8..b22a1d1 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java @@ -1,11 +1,15 @@ package digital.laboratory.platform.reagent.dto; +import cn.hutool.core.date.DateTime; import com.alibaba.fastjson.annotation.JSONField; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; +import java.sql.Date; +import java.time.LocalDate; import java.time.LocalDateTime; @Data @@ -13,29 +17,41 @@ import java.time.LocalDateTime; @NoArgsConstructor public class WarehousingRecordFormDTO { + @ApiModelProperty(value="批号") private String batchNumber; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime dateOfProduction; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @JSONField(format = "yyyy-MM-dd") + @ApiModelProperty(value="(生产日期)") + private LocalDate dateOfProduction; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value="入库日期") private LocalDateTime dateOfReceipt; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime expirationDate; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @JSONField(format = "yyyy-MM-dd") + @ApiModelProperty(value="(有效日期)") + private LocalDate expirationDate; + @ApiModelProperty(value="(数量)") private Integer quantity; - private String supplierId; + @ApiModelProperty(value="(预警值)") private Integer warningValue; + + @ApiModelProperty(value="(入库批次明细ID)") private String warehousingBatchListId; + + @ApiModelProperty(value="(入库内容ID)") private String warehousingContentId; + + @ApiModelProperty(value="(格子ID)") private String latticeId; - private String remarks; + @ApiModelProperty(value="(备注)") + private String remark; + @ApiModelProperty(value="(存储期限)") + private String limitDate; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceContent.java b/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceContent.java index 66c8a84..8dedd78 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceContent.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceContent.java @@ -37,11 +37,6 @@ public class AcceptanceContent extends BaseEntity { @ApiModelProperty(value="(不合格项目)") private String nonconformingItem; - - - - - /** * acceptanceContentId */ diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java index 095b173..7fc85e5 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java @@ -106,18 +106,13 @@ public class AcceptanceRecordForm extends BaseEntity { @ApiModelProperty(value = "(一级审核人ID)") private String primaryAuditorId; - /** - * 签收批次明细ID - */ - @ApiModelProperty(value = "签收批次明细ID") - private String signedBatchListId; /** * acceptanceRecordFormId */ - @TableId(value = "acceptance_record_form_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value = "acceptanceRecordFormId") - private String acceptanceRecordFormId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value = "id") + private String id; /** * 一级审核结果 @@ -140,7 +135,7 @@ public class AcceptanceRecordForm extends BaseEntity { * (品牌型号一致) */ @ApiModelProperty(value = "(品牌型号一致)") - private boolean theSameBrandAndModel; + private String theSameBrandAndModel; /** * (品牌型号一致备注) @@ -152,7 +147,7 @@ public class AcceptanceRecordForm extends BaseEntity { * (数量一致) */ @ApiModelProperty(value = "(数量一致)") - private boolean consistentQuantity; + private String consistentQuantity; /** * (数量一致备注) @@ -163,7 +158,7 @@ public class AcceptanceRecordForm extends BaseEntity { * (包装完好) */ @ApiModelProperty(value = "(包装完好)") - private boolean packingInGoodCondition; + private String packingInGoodCondition; /** * (包装完好备注) */ @@ -173,7 +168,7 @@ public class AcceptanceRecordForm extends BaseEntity { * (有效期) */ @ApiModelProperty(value = "(有效期)") - private boolean validityPeriod; + private String validityPeriod; /** * (有效期备注) @@ -185,7 +180,7 @@ public class AcceptanceRecordForm extends BaseEntity { * (供货周期) */ @ApiModelProperty(value = "(供货周期)") - private boolean deliveryCycle; + private String deliveryCycle; /** * (供货周期备注) @@ -207,7 +202,7 @@ public class AcceptanceRecordForm extends BaseEntity { /** * (状态) */ - @ApiModelProperty(value = "(状态)") + @ApiModelProperty(value = "状态(0:未提交,1:已提交,2:一级审核通过,3:二级审核通过,4:三级审核通过)") private Integer status; /** * (签收物品明细Id) @@ -216,4 +211,8 @@ public class AcceptanceRecordForm extends BaseEntity { private String warehousingContentId; + @ApiModelProperty(value = "(验收人名称)") + private String userName; + + } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ApplicationForUse.java b/src/main/java/digital/laboratory/platform/reagent/entity/ApplicationForUse.java index 02d3e2e..748d39b 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ApplicationForUse.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ApplicationForUse.java @@ -49,9 +49,9 @@ public class ApplicationForUse extends BaseEntity { /** * applicationForUseId */ - @TableId(value = "application_for_use_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="applicationForUseId") - private String applicationForUseId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="id") + private String id; /** * 出库记录表 diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java b/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java index 31f7baf..ed54528 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java @@ -114,6 +114,9 @@ public class BatchDetails extends BaseEntity { @ApiModelProperty(value="(预警值)") private Integer warningValue; + @ApiModelProperty(value="(预警信息)") + private String warningInformation; + diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/CabinetForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/CabinetForm.java index 5770975..a3a0d7d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/CabinetForm.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/CabinetForm.java @@ -21,51 +21,55 @@ import lombok.EqualsAndHashCode; @Data @TableName(value = "cabinet_form", autoResultMap = true) @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "") +@ApiModel(value = "柜子记录表") public class CabinetForm extends BaseEntity { /** * cabinetFormId */ - @TableId(value = "cabinet_form_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="cabinetFormId") - private String cabinetFormId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="柜子ID:创建时,不用传入,修改时,需传入柜子ID") + private String id; /** * storageRoomFormId */ - @ApiModelProperty(value="storageRoomFormId") + @ApiModelProperty(value="存储室ID") private String storageRoomFormId; /** * name */ - @ApiModelProperty(value="name") + @ApiModelProperty(value="柜子名称") private String name; /** * number */ - @ApiModelProperty(value="number") + @ApiModelProperty(value="柜子编号") private String number; /** * specification */ - @ApiModelProperty(value="specification") - private String specification; + @ApiModelProperty(value="柜子规格:为数字类型") + private Integer specification; /** * status */ - @ApiModelProperty(value="status") + @ApiModelProperty(value="状态(0:未存满,1:已存满)") private Integer status; /** * picture */ - @ApiModelProperty(value="picture") + @ApiModelProperty(value="图片路径") private String picture; - + /** + * type + */ + @ApiModelProperty(value="柜子类型") + private String type; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java b/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java index 1fd0c23..fc440f6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java @@ -51,14 +51,9 @@ public class CentralizedRequest extends BaseEntity { /** * (状态) */ - @ApiModelProperty(value="状态(0:未提交,1:已提交)") + @ApiModelProperty(value="状态(0:未提交,1:已提交,2:已被制定采购计划)") private Integer status; - /** - * (部门名称) - */ - @ApiModelProperty(value="部门名称") - private String orgName; /** * (申请人名称) */ @@ -67,16 +62,12 @@ public class CentralizedRequest extends BaseEntity { - - - - /** * centralizedRequestId */ - @TableId(value = "centralized_request_id", type = IdType.ASSIGN_UUID) + @TableId(value = "id", type = IdType.ASSIGN_UUID) @ApiModelProperty(value="集中采购申请ID") - private String centralizedRequestId; + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/CheckContent.java b/src/main/java/digital/laboratory/platform/reagent/entity/CheckContent.java deleted file mode 100644 index 1f0e55f..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/entity/CheckContent.java +++ /dev/null @@ -1,41 +0,0 @@ -package digital.laboratory.platform.reagent.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import digital.laboratory.platform.common.mybatis.base.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import java.time.LocalDateTime; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -/** - * (检查内容) - * - * @author Zhang Xiaolong created at 2023-03-10 14:25:06 - * @describe (检查内容) 实体类 - */ -@Data -@TableName(value = "check_content", autoResultMap = true) -@EqualsAndHashCode(callSuper = true) -@ApiModel(value = "(检查内容)") -public class CheckContent extends BaseEntity { - - - - /** - * checkContentId - */ - @TableId(value = "check_content_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="checkContentId") - private String checkContentId; - - - - - - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/CheckSchedule.java b/src/main/java/digital/laboratory/platform/reagent/entity/CheckSchedule.java index 968e9e9..5b8f4f9 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/CheckSchedule.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/CheckSchedule.java @@ -50,12 +50,12 @@ public class CheckSchedule extends BaseEntity { private String auditOpinionOfTechnical; - @TableId(value = "check_schedule_id", type = IdType.ASSIGN_UUID) + @TableId(value = "id", type = IdType.ASSIGN_UUID) /** * checkScheduleId */ @ApiModelProperty(value="计划制定表") - private String checkScheduleId; + private String id; /** * (技术负责人ID) */ diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ComplianceCheck.java b/src/main/java/digital/laboratory/platform/reagent/entity/ComplianceCheck.java index 616bda4..3da6573 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ComplianceCheck.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ComplianceCheck.java @@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName; import digital.laboratory.platform.common.mybatis.base.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; + import java.io.Serializable; import java.time.LocalDateTime; + import lombok.Data; import lombok.EqualsAndHashCode; @@ -27,120 +29,125 @@ public class ComplianceCheck extends BaseEntity { /** * (一级审核意见) */ - @ApiModelProperty(value="(一级审核意见)") + @ApiModelProperty(value = "(一级审核意见)") private String auditOpinionOfPrimary; /** * (编号) */ - @ApiModelProperty(value="(编号)") + @ApiModelProperty(value = "(编号)") private String number; /** * (二级审核意见) */ - @ApiModelProperty(value="(二级审核意见)") + @ApiModelProperty(value = "(二级审核意见)") private String auditOpinionOfSecondary; /** * (一级审核结果) */ - @ApiModelProperty(value="(一级审核结果)") + @ApiModelProperty(value = "(一级审核结果)") private Boolean auditResultOfPrimary; /** * (二级审核结果) */ - @ApiModelProperty(value="(二级审核结果)") + @ApiModelProperty(value = "(二级审核结果)") private Boolean auditResultOfSecondary; /** * (一级审核时间) */ - @ApiModelProperty(value="(一级审核时间)") + @ApiModelProperty(value = "(一级审核时间)") private LocalDateTime auditTimeOfPrimary; /** * (二级审核时间) */ - @ApiModelProperty(value="(二级审核时间)") + @ApiModelProperty(value = "(二级审核时间)") private LocalDateTime auditTimeOfSecondary; /** * (检查日期) */ - @ApiModelProperty(value="(检查日期)") + @ApiModelProperty(value = "(检查日期)") private LocalDateTime dateOfInspection; /** * (检查结论) */ - @ApiModelProperty(value="(检查结论)") + @ApiModelProperty(value = "(检查结论)") private String examinationConclusion; /** * (一级审核人ID) */ - @ApiModelProperty(value="(一级审核人ID)") + @ApiModelProperty(value = "(一级审核人ID)") private String primaryAuditorId; /** * (检查方案) */ - @ApiModelProperty(value="(检查方案)") + @ApiModelProperty(value = "(检查方案)") private String inspectionScheme; /** * (状态) */ - @ApiModelProperty(value="(状态)") + @ApiModelProperty(value = "状态(0:计划创建,1:已录入方案,2:已提交,3:一级审核通过,4:二级审核通过,-1:审核不通过)") private Integer status; /** * (二级审核人ID) */ - @ApiModelProperty(value="(二级审核人ID)") + @ApiModelProperty(value = "(二级审核人ID)") private String secondaryAuditorId; /** * 品牌 */ - @ApiModelProperty(value="品牌") + @ApiModelProperty(value = "品牌") private String brand; /** * (试剂耗材ID) */ - @ApiModelProperty(value="(试剂耗材ID)") + @ApiModelProperty(value = "(试剂耗材ID)") private String reagentConsumableId; /** * (标准物质编号) */ - @ApiModelProperty(value="(标准物质编号)") + @ApiModelProperty(value = "(标准物质编号)") private String reagentConsumableNumber; /** * (规格型号) */ - @ApiModelProperty(value="(规格型号)") + @ApiModelProperty(value = "(规格型号)") private String specificationAndModel; /** * (不合格项目) */ - @ApiModelProperty(value="(不合格项目)") + @ApiModelProperty(value = "(不合格项目)") private String nonconformingItem; /** * complianceCheckId */ - @TableId(value = "compliance_check_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="complianceCheckId") - private String complianceCheckId; - - + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value = "id") + private String id; + /** + * (不合格项目) + */ + @ApiModelProperty(value = "(执行者ID)") + private String executorId; + @ApiModelProperty(value = "(批次ID)") + private String batchDetailsId; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java b/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java index eecb0e3..ee674b7 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java @@ -56,9 +56,9 @@ public class DecentralizeDetails extends BaseEntity { /** * decentralizeDetailsId */ - @TableId(value = "decentralize_details_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="decentralizeDetailsId") - private String decentralizeDetailsId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="分散采购明细ID") + private String id; /** * 包装份数 @@ -132,7 +132,7 @@ public class DecentralizeDetails extends BaseEntity { */ @ApiModelProperty(value="备注") - private String remark; + private String remarks; /** * 包装单位 */ diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizedRequest.java b/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizedRequest.java index 9211f39..fa65c9b 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizedRequest.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizedRequest.java @@ -129,9 +129,9 @@ public class DecentralizedRequest extends BaseEntity { /** * decentralizedRequestId */ - @TableId(value = "decentralized_request_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="decentralizedRequestId") - private String decentralizedRequestId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="id") + private String id; /** * (采购清单ID) @@ -148,7 +148,7 @@ public class DecentralizedRequest extends BaseEntity { /** * (提交状态) */ - @ApiModelProperty(value="(提交状态)") + @ApiModelProperty(value="(状态(0:未提交,1:已提交,2:一级审核通过,3:二级审核通过,4:三级审核通过,5:审批通过,6:已被制定为采购清单))") private Integer status; diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/DeliveryRegistrationForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/DeliveryRegistrationForm.java index 84c4c99..5812e52 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/DeliveryRegistrationForm.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/DeliveryRegistrationForm.java @@ -42,6 +42,12 @@ public class DeliveryRegistrationForm extends BaseEntity { @ApiModelProperty(value="(出库申请人)") private String outgoingApplicantId; + /** + * (状态) + */ + @ApiModelProperty(value="(状态)") + private Integer status; + @@ -49,9 +55,9 @@ public class DeliveryRegistrationForm extends BaseEntity { /** * deliveryRegistrationFormId */ - @TableId(value = "delivery_registration_form_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="deliveryRegistrationFormId") - private String deliveryRegistrationFormId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="id") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/DetailsOfCentralized.java b/src/main/java/digital/laboratory/platform/reagent/entity/DetailsOfCentralized.java index 8149603..95fe6bc 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/DetailsOfCentralized.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/DetailsOfCentralized.java @@ -81,9 +81,13 @@ public class DetailsOfCentralized extends BaseEntity { * detailsOfCentralizedId */ - @TableId(value = "details_of_centralized_id", type = IdType.ASSIGN_UUID) + @TableId(value = "id", type = IdType.ASSIGN_UUID) @ApiModelProperty(value="集中采购明细ID") - private String detailsOfCentralizedId; - + private String id; + /** + * (备注) + */ + @ApiModelProperty(value="采购计划修改备注") + private String detailsRemark; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/EvaluationForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/EvaluationForm.java index 4a22108..9609f70 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/EvaluationForm.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/EvaluationForm.java @@ -109,9 +109,9 @@ public class EvaluationForm extends BaseEntity { /** * evaluationFormId */ - @TableId(value = "evaluation_form_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="evaluationFormId") - private String evaluationFormId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="供应商信息评价表id") + private String id; /** * (供应商营业执照) @@ -170,7 +170,7 @@ public class EvaluationForm extends BaseEntity { /** * supplierInformationId */ - @ApiModelProperty(value="supplierInformationId") + @ApiModelProperty(value="供应商ID") private String supplierInformationId; /** @@ -182,7 +182,7 @@ public class EvaluationForm extends BaseEntity { /** * supplierInformationId */ - @ApiModelProperty(value="supplierInformationId") + @ApiModelProperty(value="状态:(0:未提交,1:已提交,2:二级审核通过,3:三级审核通过)") private Integer status; diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/InstructionBook.java b/src/main/java/digital/laboratory/platform/reagent/entity/InstructionBook.java index 92bbdf9..d8cfd1a 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/InstructionBook.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/InstructionBook.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableName; import digital.laboratory.platform.common.mybatis.base.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; + +import java.io.File; import java.io.Serializable; import java.time.LocalDateTime; import lombok.Data; @@ -52,7 +54,7 @@ public class InstructionBook extends BaseEntity { * (指导书) */ @ApiModelProperty(value="(指导书)") - private String instructionBook; + private String instructionBook; /** * (制定人) @@ -78,16 +80,12 @@ public class InstructionBook extends BaseEntity { @ApiModelProperty(value="技术负责人ID") private String technicalDirectorId; - - - - /** * instructionBookId */ - @TableId(value = "instruction_book_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="instructionBookId") - private String instructionBookId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="id") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/LatticeForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/LatticeForm.java index 568286f..a5dcc2b 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/LatticeForm.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/LatticeForm.java @@ -27,32 +27,29 @@ public class LatticeForm extends BaseEntity { /** * number */ - @ApiModelProperty(value="number") + @ApiModelProperty(value="格子编号") private String number; /** * status */ - @ApiModelProperty(value="status") - private String status; + @ApiModelProperty(value="状态(0:未存入,1:已存入)") + private Integer status; /** * latticeFormId */ - @TableId(value = "lattice_form_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="latticeFormId") - private String latticeFormId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="格子ID") + private String id; /** * cabinetFormId */ - @ApiModelProperty(value="cabinetFormId") + @ApiModelProperty(value="柜子ID") private String cabinetFormId; - /** - * picture - */ - @ApiModelProperty(value="picture") + @ApiModelProperty(value="图片路径") private String picture; diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/OutgoingContents.java b/src/main/java/digital/laboratory/platform/reagent/entity/OutgoingContents.java index 6dbe836..fc6e24c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/OutgoingContents.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/OutgoingContents.java @@ -54,22 +54,24 @@ public class OutgoingContents extends BaseEntity { @ApiModelProperty(value="(试剂耗材类型)") private String reagentConsumableType; - /** - * (备注) - */ @ApiModelProperty(value="(备注)") private String remarks; + @ApiModelProperty(value = "(是否归还)") + private boolean returnOrNot; + @ApiModelProperty(value = "(标准物质编号)") + private String referenceMaterialNumber; - + @ApiModelProperty(value = "(标准物质ID)") + private String referenceMaterialId; /** * outgoingContentsId */ - @TableId(value = "outgoing_contents_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="outgoingContentsId") - private String outgoingContentsId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="id") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationImplementation.java b/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationImplementation.java index dddf604..3baabfc 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationImplementation.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationImplementation.java @@ -7,6 +7,7 @@ import digital.laboratory.platform.common.mybatis.base.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; +import java.time.LocalDate; import java.time.LocalDateTime; import lombok.Data; import lombok.EqualsAndHashCode; @@ -40,7 +41,7 @@ public class PeriodVerificationImplementation extends BaseEntity { * (技术负责人审核时间) */ @ApiModelProperty(value="(技术负责人审核时间)") - private LocalDateTime auditTimeOfTechnical; + private LocalDate auditTimeOfTechnical; /** * (不满足应用要求原因分析) @@ -52,7 +53,7 @@ public class PeriodVerificationImplementation extends BaseEntity { * (核查时间) */ @ApiModelProperty(value="(核查时间)") - private LocalDateTime checkingTime; + private LocalDate checkingTime; /** * (提交状态) @@ -103,6 +104,9 @@ public class PeriodVerificationImplementation extends BaseEntity { @ApiModelProperty(value="(标准物质ID)") private String referenceMaterialId; + @ApiModelProperty(value="(标准物质名称)") + private String referenceMaterialName; + /** * (备注) */ diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java b/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java index 97e41dd..fe8b2fb 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java @@ -3,13 +3,16 @@ package digital.laboratory.platform.reagent.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import digital.laboratory.platform.common.mybatis.base.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; +import java.time.LocalDate; import java.time.LocalDateTime; import lombok.Data; import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; /** @@ -21,14 +24,16 @@ import lombok.EqualsAndHashCode; @Data @TableName(value = "period_verification_plan", autoResultMap = true) @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "(标准物质期间核查计划和确认表)") +@ApiModel(value = "(标准物质期间核查计划和确认表明细)") public class PeriodVerificationPlan extends BaseEntity { /** * (下次核查日期) */ + @DateTimeFormat(pattern = "yyyy-MM-dd ") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @ApiModelProperty(value="(下次核查日期)") - private LocalDateTime dateOfNextCheck; + private LocalDate dateOfNextCheck; /** * (偏差/不确定度) @@ -55,7 +60,6 @@ public class PeriodVerificationPlan extends BaseEntity { @ApiModelProperty(value="(计划核查周期)") private Integer plannedVerificationCycle; - /** * (标准物质ID) */ @@ -70,8 +74,10 @@ public class PeriodVerificationPlan extends BaseEntity { /** * (计划核查日期) */ + @DateTimeFormat(pattern = "yyyy-MM-dd ") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @ApiModelProperty(value="(计划核查日期)") - private LocalDateTime scheduledVerificationDate; + private LocalDate scheduledVerificationDate; /** * (标准值/纯度) @@ -88,8 +94,10 @@ public class PeriodVerificationPlan extends BaseEntity { /** * (核查实施日期) */ + @DateTimeFormat(pattern = "yyyy-MM-dd ") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @ApiModelProperty(value="(核查实施日期)") - private LocalDateTime implementationDate; + private LocalDate implementationDate; /** * (核查结果) @@ -103,14 +111,12 @@ public class PeriodVerificationPlan extends BaseEntity { @ApiModelProperty(value="checkScheduleId") private String checkScheduleId; - - /** * periodVerificationPlanId */ - @TableId(value = "period_verification_plan_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="periodVerificationPlanId") - private String periodVerificationPlanId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="id") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ProcurementContent.java b/src/main/java/digital/laboratory/platform/reagent/entity/ProcurementContent.java index 397feb3..dad84b7 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ProcurementContent.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ProcurementContent.java @@ -82,8 +82,11 @@ public class ProcurementContent extends BaseEntity { @ApiModelProperty(value="(换货单价)") private Double replacementPrice; - - + /** + * (备注) + */ + @ApiModelProperty(value="(采购计划明细备注)") + private String planRemark; /** diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ProvideServicesOrSupplies.java b/src/main/java/digital/laboratory/platform/reagent/entity/ProvideServicesOrSupplies.java index 1fed9e6..4c6d40a 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ProvideServicesOrSupplies.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ProvideServicesOrSupplies.java @@ -36,16 +36,12 @@ public class ProvideServicesOrSupplies extends BaseEntity { @ApiModelProperty(value="(服务商/供应商评价表ID)") private String evaluationFormId; - - - - /** * provideServicesOrSuppliesId */ - @TableId(value = "provide_services_or_supplies_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="provideServicesOrSuppliesId") - private String provideServicesOrSuppliesId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="提供服务或供应品表ID") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseList.java b/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseList.java index 6f6b384..d13370d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseList.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseList.java @@ -30,20 +30,27 @@ public class PurchaseList extends BaseEntity { @ApiModelProperty(value="清单名称") private String name; - /** * (编号) */ @ApiModelProperty(value="(编号)") private String number; + /** + * (编号) + */ + @ApiModelProperty(value="(状态(0:未提交,1:已提交)") + private Integer status; + /** * purchaseListId */ - @TableId(value = "purchase_list_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="purchaseListId") - private String purchaseListId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="采购清单ID") + private String id; + + private String type; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseListDetails.java b/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseListDetails.java index 270eb3f..3298526 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseListDetails.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseListDetails.java @@ -25,7 +25,7 @@ public class PurchaseListDetails extends BaseEntity { /** * (采购清单ID)· */ - @ApiModelProperty(value="(采购清单ID)·") + @ApiModelProperty(value="(采购清单ID)") private String purchaseListId; /** @@ -40,12 +40,6 @@ public class PurchaseListDetails extends BaseEntity { @ApiModelProperty(value="(试剂耗材ID)") private String reagentConsumableId; - /** - * (备注) - */ - @ApiModelProperty(value="(备注)") - private String remarks; - /** * (供应商ID) */ @@ -53,15 +47,12 @@ public class PurchaseListDetails extends BaseEntity { private String supplierId; - - - /** * purchaselistDetailsId */ - @TableId(value = "purchaselist_details_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="purchaselistDetailsId") - private String purchaselistDetailsId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="采购清单明细ID") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/PurchasingPlan.java b/src/main/java/digital/laboratory/platform/reagent/entity/PurchasingPlan.java index e9933e6..59c4587 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/PurchasingPlan.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/PurchasingPlan.java @@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName; import digital.laboratory.platform.common.mybatis.base.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; + import java.io.Serializable; import java.time.LocalDateTime; + import lombok.Data; import lombok.EqualsAndHashCode; @@ -27,107 +29,100 @@ public class PurchasingPlan extends BaseEntity { /** * (经费预算) */ - @ApiModelProperty(value="经费预算") + @ApiModelProperty(value = "经费预算") private double appropriationBudget; /** * (制定人) */ - @ApiModelProperty(value="制定人") + @ApiModelProperty(value = "制定人") private String CreateId; - - /** - * (部门名称) - */ - @ApiModelProperty(value="部门名称") - private String orgName; /** * (申请人名称) */ - @ApiModelProperty(value="制定人名称") - private String createName; + @ApiModelProperty(value = "制定人名称") + private String createName; /** * (审批意见) */ - @ApiModelProperty(value="审批意见") + @ApiModelProperty(value = "审批意见") private String approvalOpinion; /** * (审批结果) */ - @ApiModelProperty(value="审批结果") + @ApiModelProperty(value = "审批结果") private Boolean approvalResult; /** * (审批时间) */ - @ApiModelProperty(value="审批时间") + @ApiModelProperty(value = "审批时间") private LocalDateTime approvalTime; /** * (一级审核意见) */ - @ApiModelProperty(value="一级审核意见") + @ApiModelProperty(value = "一级审核意见") private String auditOpinionOfPrimary; /** * (一级审核结果) */ - @ApiModelProperty(value="一级审核结果") + @ApiModelProperty(value = "一级审核结果") private Boolean auditResultOfPrimary; /** * (一级审核时间) */ - @ApiModelProperty(value="一级审核时间") + @ApiModelProperty(value = "一级审核时间") private LocalDateTime auditTimeOfPrimary; /** * (审批人ID) */ - @ApiModelProperty(value="审批人ID") + @ApiModelProperty(value = "审批人ID") private String approverId; - /** * (采购清单ID) */ - @ApiModelProperty(value="采购清单ID") + @ApiModelProperty(value = "采购清单ID") private String purchaseListId; /** * (一级审核人ID) */ - @ApiModelProperty(value="一级审核人ID") + @ApiModelProperty(value = "一级审核人ID") private String primaryAuditorId; /** * 发布日期 */ - @ApiModelProperty(value="发布日期") + @ApiModelProperty(value = "发布日期") private LocalDateTime releaseDate; /** * (状态) */ - @ApiModelProperty(value="状态") + @ApiModelProperty(value = "状态(0:未提交,1:已提交,2:审核通过,3:审批通过,-1审核/审批未通过,4:已被制定为采购清单)") private Integer status; /** * (编号) */ - @ApiModelProperty(value="编号") - private String number; + @ApiModelProperty(value = "编号") + private String number; /** * purchasingPlanId */ @TableId(value = "purchasing_plan_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="采购计划ID") + @ApiModelProperty(value = "采购计划ID") private String purchasingPlanId; diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java index b443551..1c8eafa 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName; import digital.laboratory.platform.common.mybatis.base.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; + import java.io.Serializable; import java.time.LocalDateTime; @@ -26,84 +27,138 @@ import lombok.EqualsAndHashCode; @ApiModel(value = "试剂耗材库存") public class ReagentConsumableInventory extends BaseEntity { + /** + * 名称 + */ + @ApiModelProperty(value = "名称") + private String reagentConsumableName; /** * (品牌) */ - @ApiModelProperty(value="(品牌)") + @ApiModelProperty(value = "(品牌)") private String brand; /** * (类别) */ - @ApiModelProperty(value="(类别)") + @ApiModelProperty(value = "(类别)") private String category; /** * (类别) */ - @ApiModelProperty(value="(格子Id)") + @ApiModelProperty(value = "(格子Id)") private String latticeId; /** * 偏差/不确定度 */ - @ApiModelProperty(value="偏差/不确定度") + @ApiModelProperty(value = "偏差/不确定度") private String deviationOrUncertainty; /** * (指导书ID) */ - @ApiModelProperty(value="(指导书ID)") + @ApiModelProperty(value = "(指导书ID)") private String instructionBookId; /** * (试剂耗材Id) */ - @ApiModelProperty(value="(试剂耗材Id)") + @ApiModelProperty(value = "(试剂耗材Id)") private String reagentConsumableId; /** * (规格型号) */ - @ApiModelProperty(value="(规格型号)") + @ApiModelProperty(value = "(规格型号)") private String specificationAndModel; /** * (种类) */ - @ApiModelProperty(value="(种类)") + @ApiModelProperty(value = "(种类)") private String species; /** * (标准值/纯度) */ - @ApiModelProperty(value="(标准值/纯度)") + @ApiModelProperty(value = "(标准值/纯度)") private String standardValueOrPurity; /** * (技术参数) */ - @ApiModelProperty(value="(技术参数)") + @ApiModelProperty(value = "(技术参数)") private String technicalParameter; /** * (总数量) */ - @ApiModelProperty(value="(总数量)") + @ApiModelProperty(value = "(总数量)") private Integer totalQuantity; /** * (包装份数) */ - @ApiModelProperty(value="(包装份数)") + @ApiModelProperty(value = "(包装份数)") private String packagedCopies; /** * reagentConsumableInventoryId */ @TableId(value = "reagent_consumable_inventory_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="reagentConsumableInventoryId") + @ApiModelProperty(value = "reagentConsumableInventoryId") + private String reagentConsumableInventoryId; + /** + * 单价 + */ + @ApiModelProperty(value = "单价") + private Double unitPrice; + + /** + * 别名 + */ + @ApiModelProperty(value = "别名") + private String alias; + + /** + * 存储条件 + */ + @ApiModelProperty(value = "存储条件") + private String storageCondition; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + /** + * 包装单位 + */ + @ApiModelProperty(value = "包装单位") + private String minimumUnit; + /** + * (溶液浓度) + */ + @ApiModelProperty(value = "(溶液浓度)") + private String configurationConcentration; + /** + * 英文名 + */ + @ApiModelProperty(value = "英文名") + private String englishName; + /** + * 存储期限 + */ + @ApiModelProperty(value = "存储期限") + private LocalDateTime storageLife; +/** + * 状态 + */ + @ApiModelProperty(value = "状态") + private Integer status; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java index 12d48d5..6c71980 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java @@ -111,6 +111,11 @@ public class ReagentConsumables extends BaseEntity { */ @ApiModelProperty(value="包装单位") private String minimumUnit; + /** + * 溶液浓度 + */ + @ApiModelProperty(value="溶液浓度") + private String configurationConcentration; /** diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java index c61b86d..91dd249 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java @@ -33,6 +33,11 @@ public class ReagentConsumablesSet extends BaseEntity { @ApiModelProperty(value = "(试剂耗材领用申请表ID)") private String applicationForUseId; + @ApiModelProperty(value = "(是否归还)") + private boolean returnOrNot; + + @ApiModelProperty(value = "(标准物质编号)") + private String referenceMaterialNumber; /** * (数量) */ @@ -70,9 +75,9 @@ public class ReagentConsumablesSet extends BaseEntity { /** * reagentConsumablesSetId */ - @TableId(value = "reagent_consumables_set_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value = "reagentConsumablesSetId") - private String reagentConsumablesSetId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value = "id") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java b/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java index 6bc1aec..cf10cb6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java @@ -52,5 +52,7 @@ public class ReferenceMaterial extends BaseEntity { @ApiModelProperty(value="id") private String id; + @ApiModelProperty(value="试剂耗材(含标准物质)仓库表ID") + private String reagentConsumableInventoryId; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java b/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java index 23ce1a0..6244764 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java @@ -23,7 +23,7 @@ import lombok.EqualsAndHashCode; @Data @TableName(value = "standard_material_application", autoResultMap = true) @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "(标准物质领用/归还登记表)") +@ApiModel(value = "(标准物质领用归还登记表)") public class StandardMaterialApplication extends BaseEntity { /** @@ -61,7 +61,7 @@ public class StandardMaterialApplication extends BaseEntity { * (使用数量) */ @ApiModelProperty(value="(使用数量)") - private Double purposeAndQuantity; + private String purposeAndQuantity; /** * (领用人ID) @@ -75,11 +75,17 @@ public class StandardMaterialApplication extends BaseEntity { @ApiModelProperty(value="(标准物质编号)") private String referenceMaterialNumber; + /** + * (标准物质类ID) + */ + @ApiModelProperty(value="(标准物质类ID)") + private String referenceSubstanceId; + /** * (标准物质ID) */ @ApiModelProperty(value="(标准物质ID)") - private String referenceSubstanceId; + private String referenceMaterialId; /** * (领用数量) @@ -120,25 +126,25 @@ public class StandardMaterialApplication extends BaseEntity { /** * deliveryRegistrationFormId */ - @ApiModelProperty(value="deliveryRegistrationFormId") + @ApiModelProperty(value="出库登记表Id") private String deliveryRegistrationFormId; /** * requisitionRecordId */ - @ApiModelProperty(value="requisitionRecordId") + @ApiModelProperty(value="领用登记表ID") private String requisitionRecordId; /** * storageRegistrationFormId */ - @ApiModelProperty(value="storageRegistrationFormId") + @ApiModelProperty(value="入库登记表ID") private String storageRegistrationFormId; /** * claimCode */ - @ApiModelProperty(value="claimCode") + @ApiModelProperty(value="领取码") private String claimCode; diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApprovalForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApprovalForm.java index f303e1c..cd1d0a4 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApprovalForm.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApprovalForm.java @@ -207,9 +207,9 @@ public class StandardMaterialApprovalForm extends BaseEntity { /** * standardMaterialApprovalFormId */ - @TableId(value = "standard_material_approval_form_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="standardMaterialApprovalFormId") - private String standardMaterialApprovalFormId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="id") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java b/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java index 2a0f2db..b39a3c8 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java @@ -8,6 +8,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.time.LocalDateTime; + +import io.swagger.models.auth.In; import lombok.Data; import lombok.EqualsAndHashCode; @@ -28,7 +30,7 @@ public class StandardReserveSolution extends BaseEntity { * (配置浓度(mg/mL)) */ @ApiModelProperty(value="(配置浓度(mg/mL))") - private Double configurationConcentration; + private String configurationConcentration; /** * (配置日期) @@ -40,13 +42,8 @@ public class StandardReserveSolution extends BaseEntity { * (定容体积(mL)) */ @ApiModelProperty(value="(定容体积(mL))") - private Double constantVolume; + private String constantVolume; - /** - * (使用日期) - */ - @ApiModelProperty(value="(使用日期)") - private LocalDateTime dateOfUse; /** * (配制人ID) @@ -54,16 +51,7 @@ public class StandardReserveSolution extends BaseEntity { @ApiModelProperty(value="(配制人ID)") private String dispenserId; - /** - * (使用次序) - */ - @ApiModelProperty(value="(使用次序)") - private Integer orderofuse; - /** - * (使用数量(mL)) - */ - @ApiModelProperty(value="(使用数量(mL))") private String quantityUsed; /** @@ -82,17 +70,18 @@ public class StandardReserveSolution extends BaseEntity { * (标准物质称取量) */ @ApiModelProperty(value="(标准物质称取量)") - private Double referenceMaterialScale; - - - - + private String referenceMaterialScale; /** * (备注) */ @ApiModelProperty(value="(备注)") private String remarks; +/** + * (备注) + */ + @ApiModelProperty(value="(入库备注)") + private String warehousingRemarks; /** * (溶液名称) @@ -112,24 +101,23 @@ public class StandardReserveSolution extends BaseEntity { @ApiModelProperty(value="(使用溶剂)") private String useOfSolvent; - /** - * (使用人ID) - */ - @ApiModelProperty(value="(使用人ID)") - private String userId; - /** * (有效期限) */ @ApiModelProperty(value="(有效期限)") private LocalDateTime validityPeriod; + /** + * (有效期限) + */ + @ApiModelProperty(value="(状态:(0:未入库,1:已入库,-1:停止使用))") + private Integer status; /** * standardReserveSolutionId */ - @TableId(value = "standard_reserve_solution_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="standardReserveSolutionId") - private String standardReserveSolutionId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="标准储备溶液及使用记录表ID") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/StandardSolutionCurve.java b/src/main/java/digital/laboratory/platform/reagent/entity/StandardSolutionCurve.java index eaa8157..6156c53 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/StandardSolutionCurve.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/StandardSolutionCurve.java @@ -60,10 +60,6 @@ public class StandardSolutionCurve extends BaseEntity { @ApiModelProperty(value="(逐级溶液浓度)") private String stepSolutionConcentration; - - - - /** * (工作曲线溶液配置日期) */ @@ -73,15 +69,12 @@ public class StandardSolutionCurve extends BaseEntity { /** * standardSolutionCurveId */ - @TableId(value = "standard_solution_curve_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="standardSolutionCurveId") - private String standardSolutionCurveId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="标准工作曲线溶液配制记录表ID") + private String id; - /** - * storageRegistrationFormId - */ - @ApiModelProperty(value="storageRegistrationFormId") - private String storageRegistrationFormId; + @ApiModelProperty(value="(标准储备溶液ID)") + private String referenceMaterialId; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/StorageRoomForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/StorageRoomForm.java index cdf3063..695048d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/StorageRoomForm.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/StorageRoomForm.java @@ -21,51 +21,38 @@ import lombok.EqualsAndHashCode; @Data @TableName(value = "storage_room_form", autoResultMap = true) @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "") +@ApiModel(value = "存储室记录表") public class StorageRoomForm extends BaseEntity { - - /** - * type - */ - @ApiModelProperty(value="type") - private String type; - - /** - * temperature - */ - @ApiModelProperty(value="temperature") - private String temperature; - /** * 楼层 */ @ApiModelProperty(value="楼层") private String floor; - /** + /** * humidity */ - @ApiModelProperty(value="humidity") - private String humidity; + @ApiModelProperty(value="房间位置") + private String roomLocation; /** * picture */ - @ApiModelProperty(value="picture") + @ApiModelProperty(value="图片路径") private String picture; /** * name */ - @ApiModelProperty(value="name") + @ApiModelProperty(value="存储室名称") private String name; /** * storageRoomFormId */ - @TableId(value = "storage_room_form_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="storageRoomFormId") - private String storageRoomFormId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="存储室ID,创建时,无需传入,修改时需传入存储室ID") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/SupplierInformation.java b/src/main/java/digital/laboratory/platform/reagent/entity/SupplierInformation.java index be63608..6e36823 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/SupplierInformation.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/SupplierInformation.java @@ -100,9 +100,9 @@ public class SupplierInformation extends BaseEntity { /** * supplierInformationId */ - @TableId(value = "supplier_information_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="supplierInformationId") - private String supplierInformationId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="id") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java index 1d8ed34..5be1458 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java @@ -7,6 +7,7 @@ import digital.laboratory.platform.common.mybatis.base.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; +import java.time.LocalDate; import java.time.LocalDateTime; import lombok.Data; import lombok.EqualsAndHashCode; @@ -46,7 +47,7 @@ public class WarehousingBatchList extends BaseEntity { * (生产日期) */ @ApiModelProperty(value="(生产日期)") - private LocalDateTime dateOfProduction; + private LocalDate dateOfProduction; /** @@ -59,7 +60,17 @@ public class WarehousingBatchList extends BaseEntity { * (有效日期) */ @ApiModelProperty(value="(有效日期)") - private LocalDateTime expirationDate; + private LocalDate expirationDate; + /** + * (有效日期) + */ + @ApiModelProperty(value="(存储期限)") + private String limitDate; +/** + * (有效日期) + */ + @ApiModelProperty(value="(备注)") + private String remark; /** * (数量) @@ -79,12 +90,6 @@ public class WarehousingBatchList extends BaseEntity { @ApiModelProperty(value="入库内容表ID") private String warehousingContentId; - /** - * (供应商ID) - */ - @ApiModelProperty(value="(供应商ID)") - private String supplierId; - /** * (预警值) */ @@ -94,9 +99,9 @@ public class WarehousingBatchList extends BaseEntity { /** * signedBatchListId */ - @TableId(value = "warehousing_batch_list_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="warehousingBatchListId") - private String warehousingBatchListId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="入库批次明细ID") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java index 7dd2cd5..13dfb33 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java @@ -18,43 +18,48 @@ public class WarehousingContent extends BaseEntity { /** * (试剂耗材ID) */ - @ApiModelProperty(value="(试剂耗材ID)") + @ApiModelProperty(value = "(试剂耗材ID)") private String reagentConsumableId; /** * (总数量) */ - @ApiModelProperty(value="(总数量)") + @ApiModelProperty(value = "(总数量)") private Integer totalQuantity; /** * (签收记录表ID) */ - @ApiModelProperty(value="(入库记录表ID)") + @ApiModelProperty(value = "(入库记录表ID)") private String warehousingRecordFormId; /** * (签收数量) */ - @ApiModelProperty(value="(入库数量)") + @ApiModelProperty(value = "(入库数量)") private Integer warehousingQuantity; /** * (目录编号) */ - @ApiModelProperty(value="(目录编号)") + @ApiModelProperty(value = "(目录编号)") private String catalogueNumber; - /** + /** * (验收记录ID) */ - @ApiModelProperty(value="(验收记录ID)") + @ApiModelProperty(value = "(验收记录ID)") private String acceptanceRecordFormId; + /** + * (供应商ID) + */ + @ApiModelProperty(value = "(供应商ID)") + private String supplierId; /** * signedContentId */ - @TableId(value = "warehousing_content_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="warehousingContentId") - private String warehousingContentId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value = "id") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingRecordForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingRecordForm.java index 4b58bde..48c72af 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingRecordForm.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingRecordForm.java @@ -45,9 +45,9 @@ public class WarehousingRecordForm extends BaseEntity { /** * signingRecordFormId */ - @TableId(value = "warehousing_record_form_id", type = IdType.ASSIGN_UUID) - @ApiModelProperty(value="warehousingRecordFormId") - private String warehousingRecordFormId; + @TableId(value = "id", type = IdType.ASSIGN_UUID) + @ApiModelProperty(value="id") + private String id; } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java index 0cc7f4c..a0624d5 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java @@ -17,7 +17,7 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface AcceptanceRecordFormMapper extends BaseMapper { - IPage getAcceptanceRecordFormVOPage(IPage page, QueryWrapper qw); + IPage getAcceptanceRecordFormVOPage(IPage page); AcceptanceRecordFormVO getAcceptanceRecordFormVO(String acceptanceRecordFormId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/ApplicationForUseMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/ApplicationForUseMapper.java index 2c129a2..20f4d4e 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/ApplicationForUseMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/ApplicationForUseMapper.java @@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.mapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; import digital.laboratory.platform.reagent.entity.ApplicationForUse; import digital.laboratory.platform.reagent.vo.ApplicationForUseVO; import org.apache.ibatis.annotations.Mapper; @@ -21,7 +22,7 @@ public interface ApplicationForUseMapper extends BaseMapper { ApplicationForUseVO getApplicationForUseVO(String applicationForUseId); - IPage getApplicationForUseVOPage(IPage page, QueryWrapper qw); + IPage getApplicationForUseVOPage(IPage page, @Param(Constants.WRAPPER)QueryWrapper qw); List getApplicationForUseVOList (QueryWrapper qw); diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/CentralizedRequestMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/CentralizedRequestMapper.java index 6d4ff7f..e20df3d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/CentralizedRequestMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/CentralizedRequestMapper.java @@ -23,6 +23,6 @@ public interface CentralizedRequestMapper extends BaseMapper IPage getCentralizedRequestVOPage(@Param("page") IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); List getCentralizedRequestVOList(@Param(Constants.WRAPPER) QueryWrapper qw); - CentralizedRequestVO getCentralizedRequestVO(String centralizedRequestId); + CentralizedRequestVO getCentralizedRequestVO(String id); } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/CheckContentMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/CheckContentMapper.java deleted file mode 100644 index e098905..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/CheckContentMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package digital.laboratory.platform.reagent.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import digital.laboratory.platform.reagent.entity.CheckContent; -import digital.laboratory.platform.reagent.vo.CheckContentVO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * (检查内容) Mapper 接口 - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe (检查内容) Mapper 类 - */ -@Mapper -public interface CheckContentMapper extends BaseMapper { - - List getCheckContentVOList (String complianceCheckId); - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/CheckScheduleMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/CheckScheduleMapper.java index c0a101e..e0380e5 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/CheckScheduleMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/CheckScheduleMapper.java @@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.mapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; import digital.laboratory.platform.reagent.entity.CheckSchedule; import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan; import digital.laboratory.platform.reagent.vo.CheckScheduleVO; @@ -19,7 +20,7 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface CheckScheduleMapper extends BaseMapper { - IPage getCheckScheduleVOPage (IPage page, QueryWrapper qw); + IPage getCheckScheduleVOPage (IPage page,@Param(Constants.WRAPPER) QueryWrapper qw); CheckScheduleVO getCheckScheduleVO (String checkScheduleId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/DecentralizedRequestMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/DecentralizedRequestMapper.java index 32f95f4..d30f65d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/DecentralizedRequestMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/DecentralizedRequestMapper.java @@ -27,7 +27,7 @@ public interface DecentralizedRequestMapper extends BaseMapper getDecentralizedRequestVOList(@Param(Constants.WRAPPER) QueryWrapper qw); - DecentralizedRequestVO getDecentralizedRequest (String decentralizedRequestId); + DecentralizedRequestVO getDecentralizedRequest (String id); } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/DeliveryRegistrationFormMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/DeliveryRegistrationFormMapper.java index 430769a..b15e571 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/DeliveryRegistrationFormMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/DeliveryRegistrationFormMapper.java @@ -1,7 +1,10 @@ package digital.laboratory.platform.reagent.mapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import digital.laboratory.platform.reagent.entity.DeliveryRegistrationForm; +import digital.laboratory.platform.reagent.vo.DeliveryRegistrationFormVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -14,4 +17,8 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface DeliveryRegistrationFormMapper extends BaseMapper { + Page getDeliveryRegistrationFormVOPage (Page page , QueryWrapper qw); + + DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById (String deliveryRegistrationFormId); + } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/EvaluationFormMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/EvaluationFormMapper.java index 8400332..8031218 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/EvaluationFormMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/EvaluationFormMapper.java @@ -1,11 +1,15 @@ package digital.laboratory.platform.reagent.mapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import digital.laboratory.platform.reagent.entity.EvaluationForm; import digital.laboratory.platform.reagent.vo.EvaluationFormVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * (服务商/供应商评价表) Mapper 接口 * @@ -15,6 +19,7 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface EvaluationFormMapper extends BaseMapper { - EvaluationFormVO getEvaluationForm(String evaluationFormId); + EvaluationFormVO getEvaluationForm(String id); + List getEvaluationFormVOList (String supplierInformationId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/PeriodVerificationImplementationMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/PeriodVerificationImplementationMapper.java index cb37338..827f1a4 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/PeriodVerificationImplementationMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/PeriodVerificationImplementationMapper.java @@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.mapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation; import digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO; import org.apache.ibatis.annotations.Mapper; @@ -17,7 +18,7 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface PeriodVerificationImplementationMapper extends BaseMapper { - IPage getPeriodVerificationImplementationVOPage(IPage page, QueryWrapperqw); + IPage getPeriodVerificationImplementationVOPage( IPage page, @Param(Constants.WRAPPER)QueryWrapperqw); PeriodVerificationImplementationVO getPeriodVerificationImplementationVO(String periodVerificationImplementationId); diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/ProvideServicesOrSuppliesMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/ProvideServicesOrSuppliesMapper.java index 5350469..aa60e93 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/ProvideServicesOrSuppliesMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/ProvideServicesOrSuppliesMapper.java @@ -17,6 +17,5 @@ import java.util.List; @Mapper public interface ProvideServicesOrSuppliesMapper extends BaseMapper { - List getProvideServicesOrSuppliesVOList (String provideServicesOrSuppliesId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/PurchaseListDetailsMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/PurchaseListDetailsMapper.java index aa3218c..970fc16 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/PurchaseListDetailsMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/PurchaseListDetailsMapper.java @@ -16,6 +16,8 @@ import java.util.List; @Mapper public interface PurchaseListDetailsMapper extends BaseMapper { - List getPurchaseListDetailsVOList(String purchaseListId); + List getPurchaseListDetailsVOList(String id); + + PurchaseListDetailsVO getPurchaseListDetails (String id); } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardReserveSolutionMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardReserveSolutionMapper.java index 92394f3..a88323f 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardReserveSolutionMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardReserveSolutionMapper.java @@ -1,7 +1,10 @@ package digital.laboratory.platform.reagent.mapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import digital.laboratory.platform.reagent.entity.StandardReserveSolution; +import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -14,4 +17,8 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface StandardReserveSolutionMapper extends BaseMapper { + StandardReserveSolutionVO getStandardReserveSolutionVOById (String id); + + IPage getStandardReserveSolutionVOPage (IPage page , QueryWrapper qw); + } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardSolutionCurveMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardSolutionCurveMapper.java index b8129d9..18ad9e0 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardSolutionCurveMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardSolutionCurveMapper.java @@ -1,7 +1,10 @@ package digital.laboratory.platform.reagent.mapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import digital.laboratory.platform.reagent.entity.StandardSolutionCurve; +import digital.laboratory.platform.reagent.vo.StandardSolutionCurveVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -14,4 +17,6 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface StandardSolutionCurveMapper extends BaseMapper { + IPage getStandardSolutionCurveVOPage(IPage page, QueryWrapper qw); + } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/WarehousingBatchListMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/WarehousingBatchListMapper.java index c968636..13effdc 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/WarehousingBatchListMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/WarehousingBatchListMapper.java @@ -16,6 +16,6 @@ import java.util.List; @Mapper public interface WarehousingBatchListMapper extends BaseMapper { - List getWarehousingBatchListVOList(String signedContentId); + List getWarehousingBatchListVOList(String warehousingContentId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/WarehousingRecordFormMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/WarehousingRecordFormMapper.java index ee0c57b..dfffa92 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/WarehousingRecordFormMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/WarehousingRecordFormMapper.java @@ -17,6 +17,5 @@ import java.util.List; */ @Mapper public interface WarehousingRecordFormMapper extends BaseMapper { - - + List getWarehousingRecordFormVOList (); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/AcceptanceRecordFormService.java b/src/main/java/digital/laboratory/platform/reagent/service/AcceptanceRecordFormService.java index 233a27b..a3bf2ba 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/AcceptanceRecordFormService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/AcceptanceRecordFormService.java @@ -17,13 +17,13 @@ import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO; */ public interface AcceptanceRecordFormService extends IService { - AcceptanceRecordForm editFrom(AcceptanceRecordFormDTO acceptanceRecordFormDTO); + AcceptanceRecordForm commitForm(AcceptanceRecordFormDTO acceptanceRecordFormDTO,DLPUser dlpUser); AcceptanceRecordForm addForm(String reagentConsumableId, String supplierId); - AcceptanceRecordForm commitForm(AcceptanceRecordFormDTO acceptanceRecordFormDTO); + IPage getAcceptanceRecordFormVOPage(IPage page); - IPage getAcceptanceRecordFormVOPage(IPage page, QueryWrapper qw); + IPage getAcceptanceRecordFormVORecordPage(IPage page); AcceptanceRecordFormVO getAcceptanceRecordFormVO(String acceptanceRecordFormId); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/ApplicationForUseService.java b/src/main/java/digital/laboratory/platform/reagent/service/ApplicationForUseService.java index 51d7e75..ae99c88 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/ApplicationForUseService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/ApplicationForUseService.java @@ -24,13 +24,13 @@ public interface ApplicationForUseService extends IService { List getApplicationForUseVOList (QueryWrapper qw); - ApplicationForUse addApplication(List applicationForUseDTOList, DLPUser dlpUser); + ApplicationForUseVO addApplication(List applicationForUseDTOList, DLPUser dlpUser); // - ApplicationForUse editApplication (List applicationForUseDTOList, DLPUser dlpUser); + ApplicationForUseVO editApplication (List applicationForUseDTOList, DLPUser dlpUser); //提交领用申请记录 - ApplicationForUse commitApplication(List applicationForUseDTOList, DLPUser dlpUser); + ApplicationForUseVO commitApplication(List applicationForUseDTOList, DLPUser dlpUser); Boolean delApplication(String applicationForUseId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/BlacklistService.java b/src/main/java/digital/laboratory/platform/reagent/service/BlacklistService.java index 2723e45..b456ec8 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/BlacklistService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/BlacklistService.java @@ -12,4 +12,6 @@ import digital.laboratory.platform.reagent.entity.Blacklist; public interface BlacklistService extends IService { Blacklist addListById(String reagentConsumableId, String supplierId); + + Blacklist addListById2(String reagentConsumableId, String supplierId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/CabinetFormService.java b/src/main/java/digital/laboratory/platform/reagent/service/CabinetFormService.java index 21c2e0a..be34242 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/CabinetFormService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/CabinetFormService.java @@ -2,6 +2,8 @@ package digital.laboratory.platform.reagent.service; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.reagent.entity.CabinetForm; +import digital.laboratory.platform.reagent.vo.CabinetFormVO; +import org.springframework.transaction.annotation.Transactional; /** * 服务类 @@ -11,4 +13,11 @@ import digital.laboratory.platform.reagent.entity.CabinetForm; */ public interface CabinetFormService extends IService { + CabinetForm addById(CabinetForm cabinetForm); + + CabinetForm editById(CabinetForm cabinetForm); + + CabinetFormVO getFormById(String id); + + Boolean delById(String id); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/CentralizedRequestService.java b/src/main/java/digital/laboratory/platform/reagent/service/CentralizedRequestService.java index 758c5fa..1d7c29c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/CentralizedRequestService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/CentralizedRequestService.java @@ -35,5 +35,5 @@ public interface CentralizedRequestService extends IService CentralizedRequestVO getCentralizedRequestVO(String centralizedRequestId); - List getOrgVOList(QueryWrapper qw,String orgName); + List getVOList(QueryWrapper qw); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/CheckContentService.java b/src/main/java/digital/laboratory/platform/reagent/service/CheckContentService.java deleted file mode 100644 index ac32006..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/service/CheckContentService.java +++ /dev/null @@ -1,20 +0,0 @@ -package digital.laboratory.platform.reagent.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import digital.laboratory.platform.reagent.entity.CheckContent; -import digital.laboratory.platform.reagent.vo.CheckContentVO; - -import java.util.List; - -/** - * (检查内容)服务类 - * - * @author Zhang Xiaolong created at 2023-03-10 - * @describe (检查内容) 服务类 - */ -public interface CheckContentService extends IService { - - List getCheckContentVOList (String complianceCheckId); - - -} diff --git a/src/main/java/digital/laboratory/platform/reagent/service/CheckScheduleService.java b/src/main/java/digital/laboratory/platform/reagent/service/CheckScheduleService.java index e2bb2c3..44c0c60 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/CheckScheduleService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/CheckScheduleService.java @@ -19,7 +19,7 @@ import java.util.List; */ public interface CheckScheduleService extends IService { - CheckSchedule addPlan(List periodVerificationPlanDTOS, DLPUser dlpUser); + CheckScheduleVO addPlan(List periodVerificationPlanDTOS, DLPUser dlpUser); CheckSchedule editPlan(List periodVerificationPlanDTOS); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/ComplianceCheckService.java b/src/main/java/digital/laboratory/platform/reagent/service/ComplianceCheckService.java index a088fae..6d892e3 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/ComplianceCheckService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/ComplianceCheckService.java @@ -35,7 +35,7 @@ public interface ComplianceCheckService extends IService { ComplianceCheck editCheckById(ComplianceCheckDTO complianceCheckDTO); - ComplianceCheck addScheme(ComplianceCheckDTO complianceCheckDTO); + ComplianceCheck addScheme(ComplianceCheckDTO complianceCheckDTO,DLPUser dlpUser); //提交符合性检查 ComplianceCheck commitCheck(ComplianceCheckDTO complianceCheckDTO, DLPUser dlpUser); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/DecentralizedRequestService.java b/src/main/java/digital/laboratory/platform/reagent/service/DecentralizedRequestService.java index f7f5bf5..1840be6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/DecentralizedRequestService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/DecentralizedRequestService.java @@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; -import digital.laboratory.platform.reagent.dto.AuditDecentralizedRequestDTO; import digital.laboratory.platform.reagent.dto.DecentralizedRequestDTO; import digital.laboratory.platform.reagent.entity.DecentralizeDetails; import digital.laboratory.platform.reagent.entity.DecentralizedRequest; @@ -44,7 +43,7 @@ public interface DecentralizedRequestService extends IService outgoingContentsDTOS, DLPUser dlpUser); + + Page getDeliveryRegistrationFormVOPage(Page page, QueryWrapper qw); + + DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById(String deliveryRegistrationFormId); + + ReagentConsumablesVO scanById(String reagentConsumableId, String referenceMaterialId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/EvaluationFormService.java b/src/main/java/digital/laboratory/platform/reagent/service/EvaluationFormService.java index 2cb81b6..8290c16 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/EvaluationFormService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/EvaluationFormService.java @@ -1,10 +1,13 @@ package digital.laboratory.platform.reagent.service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.dto.EvaluationFormDTO; import digital.laboratory.platform.reagent.entity.EvaluationForm; +import digital.laboratory.platform.reagent.vo.EvaluationFormVO; import java.util.List; @@ -16,15 +19,18 @@ import java.util.List; */ public interface EvaluationFormService extends IService { - EvaluationForm getFormById(String evaluationFormId); + EvaluationFormVO getFormById(String evaluationFormId); //增加/修改评价表 EvaluationForm addFormById(String supplierInformationId); - EvaluationForm editFormById(EvaluationFormDTO evaluationFormDTO); + EvaluationForm editFormById(EvaluationFormDTO evaluationFormDTO,DLPUser dlpUser); EvaluationForm auditFormOfSecondary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser); EvaluationForm auditFormOfThreeLevel(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser); + + List getEvaluationFormVOList (String supplierInformationId); + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/LatticeFormService.java b/src/main/java/digital/laboratory/platform/reagent/service/LatticeFormService.java index dee7f37..8aa3a51 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/LatticeFormService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/LatticeFormService.java @@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.reagent.entity.LatticeForm; +import digital.laboratory.platform.reagent.vo.LocationVO; /** * 服务类 @@ -11,4 +12,5 @@ import digital.laboratory.platform.reagent.entity.LatticeForm; */ public interface LatticeFormService extends IService { + LocationVO getLocationById(String latticeFormId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/ProvideServicesOrSuppliesService.java b/src/main/java/digital/laboratory/platform/reagent/service/ProvideServicesOrSuppliesService.java index 94e1f13..1b25387 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/ProvideServicesOrSuppliesService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/ProvideServicesOrSuppliesService.java @@ -14,7 +14,7 @@ import java.util.List; */ public interface ProvideServicesOrSuppliesService extends IService { - List getProvideServicesOrSuppliesVOList (String provideServicesOrSuppliesId); + ProvideServicesOrSupplies addById(String evaluationFormId,String reagentConsumableId); - ProvideServicesOrSupplies addById(String supplierInformationId); + List getVOList(String supplierInformationId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/PurchaseCatalogueService.java b/src/main/java/digital/laboratory/platform/reagent/service/PurchaseCatalogueService.java index b255574..aa9522d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/PurchaseCatalogueService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/PurchaseCatalogueService.java @@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; @@ -42,5 +43,5 @@ public interface PurchaseCatalogueService extends IService { PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId); - PurchaseCatalogueVO getVOpage(); + Page getVOpage(); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/PurchaseListDetailsService.java b/src/main/java/digital/laboratory/platform/reagent/service/PurchaseListDetailsService.java index fb180d6..7989f9b 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/PurchaseListDetailsService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/PurchaseListDetailsService.java @@ -16,4 +16,5 @@ public interface PurchaseListDetailsService extends IService getPurchaseListDetailsVOList(String purchaseListId); + PurchaseListDetailsVO getPurchaseListDetailsVO(String id); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/PurchaseListService.java b/src/main/java/digital/laboratory/platform/reagent/service/PurchaseListService.java index 71a337a..9b980cd 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/PurchaseListService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/PurchaseListService.java @@ -3,6 +3,9 @@ package digital.laboratory.platform.reagent.service; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.reagent.dto.PurchaseListDTO; import digital.laboratory.platform.reagent.entity.PurchaseList; +import digital.laboratory.platform.reagent.entity.PurchaseListDetails; +import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO; +import digital.laboratory.platform.reagent.vo.PurchaseListPageVO; import digital.laboratory.platform.reagent.vo.PurchaseListVO; import java.util.List; @@ -19,5 +22,8 @@ public interface PurchaseListService extends IService { PurchaseListVO getPurchaseList(String purchaseListId); // - PurchaseList addListById(List purchaseListDTOList, PurchaseList purchaseList); + PurchaseList commitById(String id); + + PurchaseListDetailsVO addDetails(PurchaseListDTO purchaseListDTO); + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/PurchasingPlanService.java b/src/main/java/digital/laboratory/platform/reagent/service/PurchasingPlanService.java index b77123b..117abb1 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/PurchasingPlanService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/PurchasingPlanService.java @@ -49,5 +49,4 @@ public interface PurchasingPlanService extends IService { PurchasingPlan approveById(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser); - PurchasingPlan releaseById(String purchasingPlanId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java b/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java index f0812ca..74a6f24 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java @@ -1,8 +1,11 @@ package digital.laboratory.platform.reagent.service; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; import digital.laboratory.platform.reagent.entity.ReferenceMaterial; +import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO; import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO; import java.util.List; @@ -15,13 +18,19 @@ import java.util.List; */ public interface ReagentConsumableInventoryService extends IService { - List getReagentConsumableInventoryVOList(); + Page getReagentConsumableInventoryVOList(Page page,String name); ReagentConsumableInventory addById(String reagentConsumableId, Integer quantity); ReagentConsumableInventory reduceById(String reagentConsumableId, Integer quantity); - ListgetReferenceMaterialVOList(); - ReferenceMaterial deactivateById(String referenceMaterialId); -} + + Page getAllList(Integer current,Integer size,String reagentConsumableName); + + //分页查询试剂耗材 + Page getAllRM(Integer current, Integer size,String reagentConsumableName); + + public Page getReagentConsumableInventoryRMVOList(Page page,String name); + + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/StandardReserveSolutionService.java b/src/main/java/digital/laboratory/platform/reagent/service/StandardReserveSolutionService.java index 56b7d97..47460d0 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/StandardReserveSolutionService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/StandardReserveSolutionService.java @@ -1,7 +1,13 @@ package digital.laboratory.platform.reagent.service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; +import digital.laboratory.platform.common.mybatis.security.service.DLPUser; +import digital.laboratory.platform.reagent.dto.StandardReserveSolutionDTO; import digital.laboratory.platform.reagent.entity.StandardReserveSolution; +import digital.laboratory.platform.reagent.vo.StandardReserveSolutionFullVO; +import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO; /** * (标准储备溶液配制及使用记录表)服务类 @@ -11,4 +17,13 @@ import digital.laboratory.platform.reagent.entity.StandardReserveSolution; */ public interface StandardReserveSolutionService extends IService { + StandardReserveSolutionVO getStandardReserveSolutionVOById(String id); + + StandardReserveSolution addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser); + + IPage getStandardReserveSolutionVOList(IPage page, QueryWrapper qw); + + StandardReserveSolution warehousingById(String solutionId, String latticeId); + + StandardReserveSolutionFullVO getByFullVOId(String id); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/StandardSolutionCurveService.java b/src/main/java/digital/laboratory/platform/reagent/service/StandardSolutionCurveService.java index b24a681..590588d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/StandardSolutionCurveService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/StandardSolutionCurveService.java @@ -1,7 +1,12 @@ package digital.laboratory.platform.reagent.service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; +import digital.laboratory.platform.common.mybatis.security.service.DLPUser; +import digital.laboratory.platform.reagent.dto.StandardSolutionCurveDTO; import digital.laboratory.platform.reagent.entity.StandardSolutionCurve; +import digital.laboratory.platform.reagent.vo.StandardSolutionCurveVO; /** * (标准工作曲线溶液配置记录表)服务类 @@ -11,4 +16,7 @@ import digital.laboratory.platform.reagent.entity.StandardSolutionCurve; */ public interface StandardSolutionCurveService extends IService { + IPage getStandardSolutionCurveVOPage(IPage page, QueryWrapper qw); + + StandardSolutionCurve addById(StandardSolutionCurveDTO standardSolutionCurveDTO, DLPUser dlpUser); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/StorageRoomFormService.java b/src/main/java/digital/laboratory/platform/reagent/service/StorageRoomFormService.java index d0ef328..747349c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/StorageRoomFormService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/StorageRoomFormService.java @@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.reagent.entity.StorageRoomForm; +import digital.laboratory.platform.reagent.vo.StorageRoomFormVO; /** * 服务类 @@ -11,4 +12,11 @@ import digital.laboratory.platform.reagent.entity.StorageRoomForm; */ public interface StorageRoomFormService extends IService { + StorageRoomForm addById(StorageRoomForm storageRoomForm); + + StorageRoomForm editById(StorageRoomForm storageRoomForm); + + StorageRoomFormVO getFormById(String id); + + Boolean delById(String id); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/SupplierInformationService.java b/src/main/java/digital/laboratory/platform/reagent/service/SupplierInformationService.java index 4b6c2b2..f319db2 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/SupplierInformationService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/SupplierInformationService.java @@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.service; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.reagent.dto.SupplierInformationDTO; import digital.laboratory.platform.reagent.entity.SupplierInformation; +import digital.laboratory.platform.reagent.vo.SupplierInformationVO; /** * (服务商/供应商信息)服务类 @@ -12,7 +13,9 @@ import digital.laboratory.platform.reagent.entity.SupplierInformation; */ public interface SupplierInformationService extends IService { - Boolean addInfoById(SupplierInformationDTO supplierInformationDTO,SupplierInformation supplierInformation); + SupplierInformation addInfoById(SupplierInformationDTO supplierInformationDTO); SupplierInformation editInfoById(SupplierInformationDTO supplierInformationDTO); + + SupplierInformationVO getVOById(String supplierInformationId); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/WarehousingContentService.java b/src/main/java/digital/laboratory/platform/reagent/service/WarehousingContentService.java index 35e323c..98f01c0 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/WarehousingContentService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/WarehousingContentService.java @@ -1,6 +1,7 @@ package digital.laboratory.platform.reagent.service; import com.baomidou.mybatisplus.extension.service.IService; +import digital.laboratory.platform.reagent.entity.ReagentConsumables; import digital.laboratory.platform.reagent.entity.WarehousingContent; import digital.laboratory.platform.reagent.vo.WarehousingContentVO; @@ -9,4 +10,5 @@ import java.util.List; public interface WarehousingContentService extends IService { List getWarehousingContentVOList(String warehousingRecordFormId); + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java b/src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java index e1ed5a0..a09b081 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java @@ -23,6 +23,7 @@ public interface WarehousingRecordFormService extends IService warehousingRecordFormDTOList, DLPUser dlpUser); + WarehousingRecordFormVO addFormById(List warehousingRecordFormDTOList, DLPUser dlpUser); + List getWarehousingRecordFormVOList(); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/AcceptanceRecordFormServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/AcceptanceRecordFormServiceImpl.java index eaed3e9..d75b728 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/AcceptanceRecordFormServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/AcceptanceRecordFormServiceImpl.java @@ -1,21 +1,28 @@ package digital.laboratory.platform.reagent.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; +import digital.laboratory.platform.reagent.config.PageUtils; import digital.laboratory.platform.reagent.dto.AcceptanceRecordFormDTO; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm; +import digital.laboratory.platform.reagent.entity.ReagentConsumables; import digital.laboratory.platform.reagent.mapper.AcceptanceRecordFormMapper; import digital.laboratory.platform.reagent.service.AcceptanceRecordFormService; +import digital.laboratory.platform.reagent.service.BlacklistService; +import digital.laboratory.platform.reagent.service.ReagentConsumablesService; import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; /** * (验收记录表)服务实现类 @@ -30,13 +37,27 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl getAcceptanceRecordFormVOPage(IPage page) { - AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.editFrom(acceptanceRecordFormDTO); + IPage acceptanceRecordFormVOPage = baseMapper.getAcceptanceRecordFormVOPage(page); - acceptanceRecordForm.setStatus(1); + List records = acceptanceRecordFormVOPage.getRecords(); - if (acceptanceRecordFormService.updateById(acceptanceRecordForm)) { - return acceptanceRecordForm; - } else throw new RuntimeException(String.format("提交失败")); + for (AcceptanceRecordFormVO record : records) { + + ReagentConsumables byId = reagentConsumablesService.getById(record.getReagentConsumableId()); + + record.setReagentConsumables(byId); + } + return acceptanceRecordFormVOPage; } @Override - public IPage getAcceptanceRecordFormVOPage(IPage page, QueryWrapper qw) { + public IPage getAcceptanceRecordFormVORecordPage(IPage page) { - IPage acceptanceRecordFormVOPage = baseMapper.getAcceptanceRecordFormVOPage(page, qw); + LambdaQueryWrapper acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - return acceptanceRecordFormVOPage; + acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,4); + List list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper); + + ArrayList acceptanceRecordFormVOS = new ArrayList<>(); + + if (list.size()!=0){ + + for (AcceptanceRecordForm acceptanceRecordForm : list) { + + AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordForm.getId()); + + acceptanceRecordFormVOS.add(acceptanceRecordFormVO); + }} + PageUtils pageUtils = new PageUtils(); + + Page pages = pageUtils.getPages((int) page.getPages(), (int) page.getSize(), acceptanceRecordFormVOS); + + return pages; } @Override @@ -94,7 +136,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl getApplicationForUseVOPage(IPage page, QueryWrapper qw) { - return baseMapper.getApplicationForUseVOPage(page, qw); + IPage applicationForUseVOPage = baseMapper.getApplicationForUseVOPage(page, qw); + + List records = applicationForUseVOPage.getRecords(); + + for (ApplicationForUseVO record : records) { + + ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(record.getId()); + + BeanUtils.copyProperties(applicationForUseVO,record); + } + + return applicationForUseVOPage; } @Override//列表查询 @@ -81,21 +90,17 @@ public class ApplicationForUseServiceImpl extends ServiceImpl applicationForUseDTOList, DLPUser dlpUser) { + public ApplicationForUseVO addApplication(List applicationForUseDTOList, DLPUser dlpUser) { //录入领用申请表 ApplicationForUse applicationForUse = new ApplicationForUse(); - applicationForUse.setApplicationForUseId(IdWorker.get32UUID().toUpperCase()); + applicationForUse.setId(IdWorker.get32UUID().toUpperCase()); applicationForUse.setStatus(0); applicationForUse.setRecipientId(dlpUser.getId()); - LambdaQueryWrapper reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); - List reagentConsumablesSets = new ArrayList<>(); - - LambdaQueryWrapper reagentConsumableLambdaQueryWrapper = new LambdaQueryWrapper<>(); //录入领用申请内容 for (ApplicationForUseDTO applicationForUseDTO : applicationForUseDTOList) { //生成领用登记表集合 @@ -103,72 +108,55 @@ public class ApplicationForUseServiceImpl extends ServiceImpl reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); - reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,reagentConsumablesSet.getReagentConsumableId()); + reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,applicationForUseDTO.getReagentConsumableId()); + ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper); - Integer totalQuantity = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper).getTotalQuantity(); - if (reagentConsumablesSet.getQuantity()>totalQuantity){ + Integer totalQuantity = one.getTotalQuantity(); + + reagentConsumablesSets.add(reagentConsumablesSet); + + if (reagentConsumablesSet.getQuantity()>totalQuantity){ throw new RuntimeException(String.format("领用数量不能大于库存量")); } - } if (applicationForUseService.save(applicationForUse) & reagentConsumablesSetService.saveBatch(reagentConsumablesSets) ) { - return applicationForUse; + ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(applicationForUse.getId()); + return applicationForUseVO; } else return null; } @Transactional @Override//修改领用申请表 - public ApplicationForUse editApplication(List applicationForUseDTOList, DLPUser dlpUser) { + public ApplicationForUseVO editApplication(List applicationForUseDTOList, DLPUser dlpUser) { ApplicationForUse applicationForUse = applicationForUseService.getById(applicationForUseDTOList.get(0).getApplicationForUseId()); - - LambdaQueryWrapper reagentConsumablesSetLambdaQueryWrapper = new LambdaQueryWrapper<>(); - - reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUse.getApplicationForUseId()); - - List list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper); - //删除领用申请明细 - reagentConsumablesSetService.removeBatchByIds(list); + applicationForUseService.delApplication(applicationForUse.getId()); - ArrayList reagentConsumablesSets = new ArrayList<>(); + ApplicationForUse applicationForUse1 = applicationForUseService.addApplication(applicationForUseDTOList, dlpUser); - LambdaQueryWrapper reagentConsumableLambdaQueryWrapper = new LambdaQueryWrapper<>(); - //录入领用申请内容 - for (ApplicationForUseDTO applicationForUseDTO : applicationForUseDTOList) { - //生成领用登记表集合 - ReagentConsumablesSet reagentConsumablesSet = new ReagentConsumablesSet(); - - BeanUtils.copyProperties(applicationForUseDTO, reagentConsumablesSet); - - reagentConsumablesSet.setReagentConsumablesSetId(IdWorker.get32UUID().toUpperCase()); + if (applicationForUse1!=null){ - reagentConsumablesSet.setApplicationForUseId(applicationForUse.getApplicationForUseId()); + ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(applicationForUse1.getId()); - reagentConsumablesSets.add(reagentConsumablesSet); - - ReagentConsumables reagentConsumables = reagentConsumablesService.getById(reagentConsumablesSet.getReagentConsumableId()); - - - } - if (applicationForUseService.updateById(applicationForUse) & reagentConsumablesSetService.saveBatch(reagentConsumablesSets) - ) { - return applicationForUse; - } else return null; + return applicationForUseVO; + }else throw new RuntimeException(String.format("保存失败")); } @Override//提交领用申请记录 - public ApplicationForUse commitApplication(List applicationForUseDTOList, DLPUser dlpUser) { + public ApplicationForUseVO commitApplication(List applicationForUseDTOList, DLPUser dlpUser) { if (applicationForUseDTOList.get(0).getApplicationForUseId() == null) { @@ -184,7 +172,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl reagentConsumablesSetLambdaQueryWrapper = new LambdaQueryWrapper<>(); - reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUse.getApplicationForUseId()); + reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUse.getId()); List list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper); @@ -192,13 +180,16 @@ public class ApplicationForUseServiceImpl extends ServiceImpl applicationForUseLambdaQueryWrapper = new LambdaQueryWrapper<>(); - applicationForUseLambdaQueryWrapper.eq(ApplicationForUse::getApplicationForUseId, applicationForUseDTOList.get(0).getApplicationForUseId()); + applicationForUseLambdaQueryWrapper.eq(ApplicationForUse::getId, applicationForUseDTOList.get(0).getApplicationForUseId()); ApplicationForUse applicationForUse = applicationForUseService.getOne(applicationForUseLambdaQueryWrapper); @@ -212,30 +203,29 @@ public class ApplicationForUseServiceImpl extends ServiceImpl reagentConsumablesSetLambdaQueryWrapper = new LambdaQueryWrapper<>(); - reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUse.getApplicationForUseId()); + reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUse.getId()); List list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper); - LambdaQueryWrapper standardMaterialApplicationLambdaQueryWrapper = new LambdaQueryWrapper<>(); - - standardMaterialApplicationLambdaQueryWrapper.eq(StandardMaterialApplication::getApplicationForUseId, applicationForUse.getApplicationForUseId()); - - List list1 = standardMaterialApplicationService.list(standardMaterialApplicationLambdaQueryWrapper); + return reagentConsumablesSetService.removeBatchByIds(list) & applicationForUseService.removeById(applicationForUse); - return reagentConsumablesSetService.removeBatchByIds(list) & standardMaterialApplicationService.removeBatchByIds(list1) & applicationForUseService.removeById(applicationForUse); - - } + }else throw new RuntimeException(String.format("当前状态不能删除"));} } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/BatchDetailsServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/BatchDetailsServiceImpl.java index 2d40153..03ffdc2 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/BatchDetailsServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/BatchDetailsServiceImpl.java @@ -55,24 +55,15 @@ public class BatchDetailsServiceImpl extends ServiceImpl supplierInformationLambdaQueryWrapper = new LambdaQueryWrapper<>(); - - supplierInformationLambdaQueryWrapper.eq(SupplierInformation::getSupplierInformationId,batchDetails.getSupplierId()); - - SupplierInformation byId1 = supplierInformationService.getById(supplierInformationLambdaQueryWrapper); + SupplierInformation byId1 = supplierInformationService.getById(batchDetails.getSupplierId()); BatchDetailsVO batchDetailsVO = new BatchDetailsVO(); BeanUtils.copyProperties(batchDetails,batchDetailsVO); - List referenceMaterialVOList = referenceMaterialService.getReferenceMaterialVOList(batchDetailsVO.getBatchDetailsId()); - batchDetailsVO.setSupplierName(byId1.getSupplierName()); - batchDetailsVO.setReferenceMaterialVOS(referenceMaterialVOList); - batchDetailsVOS.add(batchDetailsVO); - } return batchDetailsVOS; } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/BlacklistServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/BlacklistServiceImpl.java index aedcb35..d12ac79 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/BlacklistServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/BlacklistServiceImpl.java @@ -36,4 +36,19 @@ public class BlacklistServiceImpl extends ServiceImpl implements CabinetFormService { + private CabinetFormService cabinetFormService; + + private LatticeFormService latticeFormService; + + @Transactional + @Override//新增柜子 + public CabinetForm addById(CabinetForm cabinetForm){ + + CabinetForm form = new CabinetForm(); + + BeanUtils.copyProperties(cabinetForm,form); + + form.setId(IdWorker.get32UUID().toUpperCase()); + + for (int i = 0; i < cabinetForm.getSpecification(); i++) { + + LatticeForm latticeForm = new LatticeForm(); + + latticeForm.setCabinetFormId(form.getId()); + latticeForm.setId(IdWorker.get32UUID().toUpperCase()); + latticeForm.setNumber(form.getName()+"-"+(i+1)); + + latticeFormService.save(latticeForm); + } + + if (cabinetFormService.save(form)){ + return form; + }else throw new RuntimeException(String.format("保存失败")); + } + + @Override + @Transactional//修改柜子信息 + public CabinetForm editById(CabinetForm cabinetForm){ + + CabinetForm byId = cabinetFormService.getById(cabinetForm.getId()); + + LambdaQueryWrapper latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,byId.getId()); + + List list = latticeFormService.list(latticeFormLambdaQueryWrapper); + //判断柜子是否为空 + for (LatticeForm latticeForm : list) { + + if (latticeForm.getStatus()==1){ + throw new RuntimeException(String.format("当前柜子有物品存放,不允许修改")); + } + } + latticeFormService.removeBatchByIds(list); + + BeanUtils.copyProperties(cabinetForm,byId); + //重新录入格子信息 + for (int i = 0; i < cabinetForm.getSpecification(); i++) { + + LatticeForm latticeForm = new LatticeForm(); + + latticeForm.setCabinetFormId(byId.getId()); + latticeForm.setId(IdWorker.get32UUID().toUpperCase()); + latticeForm.setNumber(byId.getName()+"-"+(i+1)); + + latticeFormService.save(latticeForm); + } + + if (cabinetFormService.updateById(cabinetForm)){ + return byId; + }else throw new RuntimeException(String.format("保存失败")); + } + + @Override//通过ID查询柜子信息 + public CabinetFormVO getFormById(String id){ + + CabinetForm byId = cabinetFormService.getById(id); + + LambdaQueryWrapper latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,id); + + List list = latticeFormService.list(latticeFormLambdaQueryWrapper); + + CabinetFormVO cabinetFormVO = new CabinetFormVO(); + + BeanUtils.copyProperties(byId,cabinetFormVO); + + cabinetFormVO.setLatticeFormList(list); + + return cabinetFormVO; + } + + @Override + @Transactional + public Boolean delById(String id){ + + CabinetForm byId = cabinetFormService.getById(id); + + LambdaQueryWrapper latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,id); + + List list = latticeFormService.list(latticeFormLambdaQueryWrapper); + + for (LatticeForm latticeForm : list) { + + if (latticeForm.getStatus()==1){ + throw new RuntimeException(String.format("当前柜子有物品存放,不允许修改")); + } + } + latticeFormService.removeBatchByIds(list); + + if (cabinetFormService.removeById(byId)){ + return true; + }else throw new RuntimeException(String.format("删除失败")); + } + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/CentralizedRequestServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/CentralizedRequestServiceImpl.java index 81cdf36..ceb5205 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/CentralizedRequestServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/CentralizedRequestServiceImpl.java @@ -47,14 +47,12 @@ public class CentralizedRequestServiceImpl extends ServiceImpl detailsOfCentralizedList = new ArrayList<>(); @@ -65,9 +63,9 @@ public class CentralizedRequestServiceImpl extends ServiceImpl getOrgVOList(QueryWrapper qw,String orgName) { + public List getVOList(QueryWrapper qw) { LambdaQueryWrapper centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>(); //查询状态为1的采购申请:已提交 centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,1); - centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getOrgName,orgName); - List list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper); ArrayList centralizedRequestVOArrayList = new ArrayList<>(); @@ -200,7 +196,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl implements CheckContentService { - - @Override - public List getCheckContentVOList(String complianceCheckId) { - List checkContentVOList = baseMapper.getCheckContentVOList(complianceCheckId); - return checkContentVOList; - } -} diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/CheckScheduleServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/CheckScheduleServiceImpl.java index 188e181..d481c5c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/CheckScheduleServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/CheckScheduleServiceImpl.java @@ -39,13 +39,14 @@ public class CheckScheduleServiceImpl extends ServiceImpl periodVerificationPlanDTOS, DLPUser dlpUser) { + @Transactional//新增计划 + public CheckScheduleVO addPlan(List periodVerificationPlanDTOS, DLPUser dlpUser) { CheckSchedule checkSchedule = new CheckSchedule(); - checkSchedule.setCheckScheduleId(IdWorker.get32UUID().toUpperCase()); + checkSchedule.setId(IdWorker.get32UUID().toUpperCase()); checkSchedule.setManagerId(dlpUser.getId()); + checkSchedule.setStatus(0); List periodVerificationPlans = new ArrayList<>(); @@ -55,14 +56,16 @@ public class CheckScheduleServiceImpl extends ServiceImpl periodVerificationPlanLambdaQueryWrapper = new LambdaQueryWrapper<>(); - periodVerificationPlanLambdaQueryWrapper.eq(PeriodVerificationPlan::getCheckScheduleId, byId.getCheckScheduleId()); + periodVerificationPlanLambdaQueryWrapper.eq(PeriodVerificationPlan::getCheckScheduleId, byId.getId()); List list = periodVerificationPlanService.list(periodVerificationPlanLambdaQueryWrapper); @@ -89,7 +92,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl periodVerificationPlanVOList = periodVerificationPlanService.getPeriodVerificationPlanVOList(checkScheduleVO.getCheckScheduleId()); + List periodVerificationPlanVOList = periodVerificationPlanService.getPeriodVerificationPlanVOList(checkScheduleVO.getId()); checkScheduleVO.setPeriodVerificationPlanVOS(periodVerificationPlanVOList); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/ComplianceCheckServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/ComplianceCheckServiceImpl.java index 4b6bed0..cbce02d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/ComplianceCheckServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/ComplianceCheckServiceImpl.java @@ -56,13 +56,12 @@ public class ComplianceCheckServiceImpl extends ServiceImpl reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); - reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId,record.getReagentConsumableId()); + reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId, record.getReagentConsumableId()); ReagentConsumables one = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); record.setReagentConsumableName(one.getReagentConsumableName()); } - return complianceCheckVOPage; } @@ -79,33 +78,35 @@ public class ComplianceCheckServiceImpl extends ServiceImpl reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); - reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId,complianceCheckVO.getReagentConsumableId()); + reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId, complianceCheckVO.getReagentConsumableId()); ReagentConsumables one = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); complianceCheckVO.setReagentConsumableName(one.getReagentConsumableName()); + complianceCheckVO.setReagentConsumables(one); + return complianceCheckVO; } - @Transactional - @Override//新增符合性检查 + @Override//自动新增符合性检查 public ComplianceCheck addCheck(ComplianceCheckDTO complianceCheckDTO, DLPUser dlpUser) { ComplianceCheck complianceCheck = new ComplianceCheck(); - complianceCheck.setComplianceCheckId(IdWorker.get32UUID().toUpperCase()); + complianceCheck.setId(IdWorker.get32UUID().toUpperCase()); BeanUtils.copyProperties(complianceCheckDTO, complianceCheck); + complianceCheck.setStatus(0); + if (complianceCheckService.save(complianceCheck)) { return complianceCheck; } else { - throw new RuntimeException(String.format("保存失败")); + throw new RuntimeException(String.format("新增失败")); } - } @Override//手动新增符合性检查 @@ -142,29 +143,28 @@ public class ComplianceCheckServiceImpl extends ServiceImpl getDecentralizedRequestVOPage (@Param("page") IPage page, @Param(Constants.WRAPPER) QueryWrapper qw) { @@ -78,7 +81,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl list = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper); - return decentralizedRequestService.removeById(reagentConsumablesService.getById(decentralizedRequestId)) - && decentralizeDetailsService.removeBatchByIds(list); + if (list != null) { + decentralizeDetailsService.removeBatchByIds(list); + } + + return decentralizedRequestService.removeById(decentralizedRequestService.getById(decentralizedRequestId)); } @Override//提交分散采购申请 public DecentralizedRequest commitRequest(List decentralizedRequestDTOList, DLPUser dlpUser) { + String decentralizedRequestId = decentralizedRequestDTOList.get(0).getDecentralizedRequestId(); - DecentralizedRequest decentralizedRequest = decentralizedRequestService.addRequest(decentralizedRequestDTOList, dlpUser); + if (decentralizedRequestId == null) { - decentralizedRequest.setStatus(1); + DecentralizedRequest decentralizedRequest = decentralizedRequestService.addRequest(decentralizedRequestDTOList, dlpUser); + + decentralizedRequest.setStatus(1); + + if (decentralizedRequestService.updateById(decentralizedRequest)) { + return decentralizedRequest; + } else throw new RuntimeException(String.format("提交失败")); + } else { + + DecentralizedRequest byId = decentralizedRequestService.getById(decentralizedRequestId); + + byId.setStatus(1); + + if (decentralizedRequestService.updateById(byId)) { + return byId; + } else throw new RuntimeException(String.format("提交失败")); + } - if (decentralizedRequestService.updateById(decentralizedRequest)) { - return decentralizedRequest; - } else return null; } @Override//一级审核 @@ -162,6 +182,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl decentralizeDetailsLambdaQueryWrapper1 = new LambdaQueryWrapper<>(); - if (byId.getResultOfApproval()==true){ - //如果未购入过该物品,则将该物品信息更新至试剂耗材类 - LambdaQueryWrapper decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); + decentralizeDetailsLambdaQueryWrapper1.eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId()); - decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, byId.getDecentralizedRequestId()); + List list = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper1); - List list = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper); + PurchaseListDTO purchaseListDTO = new PurchaseListDTO(); - LambdaQueryWrapper reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); + PurchaseList purchaseList = new PurchaseList(); + purchaseList.setId(IdWorker.get32UUID().toUpperCase()); + purchaseList.setName(DateTime.now() + "采购清单"); + purchaseList.setStatus(0); + purchaseList.setType("分散采购申请"); + + purchaseListService.save(purchaseList); for (DecentralizeDetails decentralizeDetails : list) { - if (decentralizeDetails.getReagentConsumableId()==null){ + purchaseListDTO.setReagentConsumableId(decentralizeDetails.getReagentConsumableId()); + purchaseListDTO.setPurchaseQuantity(decentralizeDetails.getQuantity()); + purchaseListDTO.setPurchaseListId(purchaseList.getId()); - ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(decentralizeDetails); + purchaseListService.addDetails(purchaseListDTO); + } - decentralizeDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); - decentralizeDetailsService.updateById(decentralizeDetails); - } + if (byId.getResultOfApproval() == true) { + //如果未购入过该物品,则将该物品信息更新至试剂耗材类 + LambdaQueryWrapper decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); + decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId()); + + List decentralizeDetailsList = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper); + + LambdaQueryWrapper reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) { + + if (decentralizeDetails.getReagentConsumableId() == null) { + + ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(decentralizeDetails); + + decentralizeDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); + + decentralizeDetailsService.updateById(decentralizeDetails); + } + } } + + byId.setStatus(5); + } else { + byId.setStatus(-1); } - //是否需要进行符合性检查 -// if (byId.getComplianceTesting()==true){ -// -// LambdaQueryWrapper decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); -// -// decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId,byId.getDecentralizedRequestId()); -// -// List list = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper); -// -// for (DecentralizeDetails decentralizeDetails : list) { -// -// ComplianceCheckDTO complianceCheckDTO = new ComplianceCheckDTO(); -// -// complianceCheckDTO.setBrand(decentralizeDetails.getBrand()); -// -// complianceCheckDTO.setReagentConsumableId(decentralizeDetails.getReagentConsumableId()); -// -// complianceCheckDTO.setSpecificationAndModel(complianceCheckDTO.getSpecificationAndModel()); -// -// complianceCheckService.addCheck(complianceCheckDTO,dlpUser); -// } -// } - - byId.setStatus(3); if (decentralizedRequestService.updateById(byId)) { return byId; } else return null; diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java index 9c14424..d5879bf 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java @@ -1,7 +1,9 @@ package digital.laboratory.platform.reagent.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.dto.ComplianceCheckDTO; @@ -9,6 +11,9 @@ import digital.laboratory.platform.reagent.dto.OutgoingContentsDTO; import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.mapper.DeliveryRegistrationFormMapper; import digital.laboratory.platform.reagent.service.*; +import digital.laboratory.platform.reagent.vo.DeliveryRegistrationFormVO; +import digital.laboratory.platform.reagent.vo.OutgoingContentsVO; +import digital.laboratory.platform.reagent.vo.ReagentConsumablesVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -25,6 +30,7 @@ import java.util.List; * @describe (试剂耗材出库登记表) 服务实现类 */ @Service +@SuppressWarnings("all") public class DeliveryRegistrationFormServiceImpl extends ServiceImpl implements DeliveryRegistrationFormService { @Autowired @@ -43,7 +49,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl reagentConsumablesSetLambdaQueryWrapper = new LambdaQueryWrapper<>(); - - reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, byId.getApplicationForUseId()); + //得到领用集合 + reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, byId.getId()); List list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper); List outgoingContentsList = new ArrayList<>(); - + //循环领用集合,创建出库集合 for (ReagentConsumablesSet reagentConsumablesSet : list) { OutgoingContents outgoingContents = new OutgoingContents(); ReagentConsumables one = reagentConsumablesService.getById(reagentConsumablesSet.getReagentConsumableId()); - outgoingContents.setOutgoingContentsId(IdWorker.get32UUID().toUpperCase()); - outgoingContents.setDeliveryRegistrationFormId(deliveryRegistrationForm.getDeliveryRegistrationFormId()); + if (one.getCategory().equals("标准物质")|one.getCategory().equals("标准储备溶液")){ + + LambdaQueryWrapper referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getNumber,reagentConsumablesSet.getReferenceMaterialNumber()); + + ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper); + + outgoingContents.setReferenceMaterialId(referenceMaterial.getId()); + } + + outgoingContents.setId(IdWorker.get32UUID().toUpperCase()); + outgoingContents.setDeliveryRegistrationFormId(deliveryRegistrationForm.getId()); outgoingContents.setQuantity(reagentConsumablesSet.getQuantity()); outgoingContents.setRemarks(reagentConsumablesSet.getRemarks()); outgoingContents.setOutboundUse(reagentConsumablesSet.getPurpose()); outgoingContents.setReagentConsumableId(reagentConsumablesSet.getReagentConsumableId()); outgoingContents.setReagentConsumableType(one.getCategory()); + outgoingContents.setReturnOrNot(reagentConsumablesSet.isReturnOrNot()); + outgoingContents.setReferenceMaterialNumber(reagentConsumablesSet.getReferenceMaterialNumber()); outgoingContentsList.add(outgoingContents); } - if (deliveryRegistrationFormService.save(deliveryRegistrationForm) && outgoingContentsService.saveBatch(outgoingContentsList)& - applicationForUseService.updateById(byId)) { + if (deliveryRegistrationFormService.save(deliveryRegistrationForm) && outgoingContentsService.saveBatch(outgoingContentsList) & + applicationForUseService.updateById(byId)) { return deliveryRegistrationForm; } else throw new RuntimeException(String.format("创建出库任务失败")); @@ -105,65 +130,104 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl outgoingContentsLambdaQueryWrapper = new LambdaQueryWrapper<>(); - outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId, byId.getDeliveryRegistrationFormId()); + outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId, byId.getId()); //删除修改之前的内容(防止领用为X种,但实际出库只有n种,导致领用出库不一致) outgoingContentsService.removeBatchByIds(outgoingContentsService.list(outgoingContentsLambdaQueryWrapper)); List standardMaterialApplications = new ArrayList<>(); - List outgoingContentsList= new ArrayList<>(); + List outgoingContentsList = new ArrayList<>(); LambdaQueryWrapper applicationForUseLambdaQueryWrapper = new LambdaQueryWrapper<>(); - applicationForUseLambdaQueryWrapper.eq(ApplicationForUse::getDeliveryRegistrationFormId,byId.getDeliveryRegistrationFormId()); + applicationForUseLambdaQueryWrapper.eq(ApplicationForUse::getDeliveryRegistrationFormId, byId.getId()); //查询领用申请表 ApplicationForUse one = applicationForUseService.getOne(applicationForUseLambdaQueryWrapper); + one.setClaimCode("0000"); + for (OutgoingContentsDTO outgoingContentsDTO : outgoingContentsDTOS) { OutgoingContents outgoingContents = new OutgoingContents(); BeanUtils.copyProperties(outgoingContentsDTO, outgoingContents); - outgoingContents.setOutgoingContentsId(IdWorker.get32UUID().toUpperCase()); + outgoingContents.setId(IdWorker.get32UUID().toUpperCase()); ReagentConsumables reagentConsumables = reagentConsumablesService.getById(outgoingContents.getReagentConsumableId()); outgoingContents.setReagentConsumableType(reagentConsumables.getCategory()); - outgoingContents.setDeliveryRegistrationFormId(byId.getDeliveryRegistrationFormId()); + outgoingContents.setDeliveryRegistrationFormId(byId.getId()); - if (reagentConsumables.getCategory().equals("标准物质") | reagentConsumables.getCategory().equals("标准储备溶液")) { + if (reagentConsumables.getCategory().equals("标准物质")&&outgoingContents.isReturnOrNot()) { //生成标准物质领用/归还登记表 StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication(); standardMaterialApplication.setStandardMaterialApplicationId(IdWorker.get32UUID().toUpperCase()); - standardMaterialApplication.setPurpose(outgoingContents.getOutboundUse()); - standardMaterialApplication.setDateOfClaim(LocalDateTime.now()); - standardMaterialApplication.setRecipientId(one.getRecipientId()); + standardMaterialApplication.setReferenceSubstanceId(reagentConsumables.getReagentConsumableId()); + standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel()); + standardMaterialApplication.setRequisitionedQuantity(outgoingContents.getQuantity()); + standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel()); + standardMaterialApplication.setApplicationForUseId(one.getId()); + standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId()); + standardMaterialApplication.setStatus(0); + standardMaterialApplication.setReferenceMaterialNumber(outgoingContents.getReferenceMaterialNumber()); + standardMaterialApplications.add(standardMaterialApplication); - standardMaterialApplication.setReferenceMaterialNumber(outgoingContentsDTO.getNumber()); + ReferenceMaterial byId1 = referenceMaterialService.getById(outgoingContentsDTO.getReferenceMaterialId()); - standardMaterialApplication.setReferenceSubstanceId(reagentConsumables.getReagentConsumableId()); + byId1.setStatus(-1); + //查找出对应的仓库信息,将库存量减少 + ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.reduceById(outgoingContents.getReagentConsumableId(), outgoingContents.getQuantity()); - standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel()); + if (reagentConsumableInventory.getTotalQuantity() < 0) { - standardMaterialApplication.setRequisitionedQuantity(outgoingContents.getQuantity()); + throw new RuntimeException(String.format("出库数量不能超过库存量")); + } + } else if (reagentConsumables.getCategory().equals("标准储备溶液")&&outgoingContents.isReturnOrNot()) { + //创建标准物质领用/归还登记表 + StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication(); + standardMaterialApplication.setReferenceMaterialNumber(outgoingContents.getReferenceMaterialNumber()); + standardMaterialApplication.setStandardMaterialApplicationId(IdWorker.get32UUID().toUpperCase()); + standardMaterialApplication.setPurpose(outgoingContents.getOutboundUse()); + standardMaterialApplication.setDateOfClaim(LocalDateTime.now()); + standardMaterialApplication.setRecipientId(one.getRecipientId()); + standardMaterialApplication.setReferenceSubstanceId(reagentConsumables.getReagentConsumableId()); + standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel()); + standardMaterialApplication.setRequisitionedQuantity(outgoingContents.getQuantity()); standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel()); + standardMaterialApplication.setApplicationForUseId(one.getId()); + standardMaterialApplication.setStatus(0); + standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId()); + standardMaterialApplications.add(standardMaterialApplication); - standardMaterialApplication.setApplicationForUseId(one.getApplicationForUseId()); + solutionUseFormService.useById(outgoingContentsDTO.getReferenceMaterialId(), dlpUser); + //通过标准物质ID,查找出对应的仓库信息,将库存量减少 + String referenceMaterialId = outgoingContentsDTO.getReferenceMaterialId(); - standardMaterialApplications.add(standardMaterialApplication); + ReferenceMaterial referenceMaterial = referenceMaterialService.getById(referenceMaterialId); + + referenceMaterial.setStatus(-1); + + ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId()); + + reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() - outgoingContentsDTO.getQuantity()); + + if (reagentConsumableInventory.getTotalQuantity() < 0) { + throw new RuntimeException(String.format("出库数量不能超过库存量")); + } - standardMaterialApplication.setStatus(0); } else { RequisitionRecord requisitionRecord = requisitionRecordService.addRecord(outgoingContents); @@ -171,8 +235,14 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl getDeliveryRegistrationFormVOPage(Page page, QueryWrapper qw){ - throw new RuntimeException(String.format("领用数量不能超过库存量")); - } + Page deliveryRegistrationFormVOPage = baseMapper.getDeliveryRegistrationFormVOPage(page, qw); - outgoingContentsList.add(outgoingContents); + return deliveryRegistrationFormVOPage; + } + + @Override//通过ID查询出库内容 + public DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById(String deliveryRegistrationFormId){ + + DeliveryRegistrationFormVO deliveryRegistrationFormVOById = baseMapper.getDeliveryRegistrationFormVOById(deliveryRegistrationFormId); + + LambdaQueryWrapper outgoingContentsLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId,deliveryRegistrationFormVOById.getId()); + + List list = outgoingContentsService.list(outgoingContentsLambdaQueryWrapper); + + List outgoingContentsVOS = new ArrayList<>(); + + if (list.size()!=0){ + + for (OutgoingContents outgoingContents : list) { + + OutgoingContentsVO outgoingContentsVO = new OutgoingContentsVO(); + + BeanUtils.copyProperties(outgoingContents,outgoingContentsVO); + + LambdaQueryWrapper reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); + reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,outgoingContents.getReagentConsumableId()); + + ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper); + + outgoingContentsVO.setReagentConsumableInventory(one); + + outgoingContentsVOS.add(outgoingContentsVO); + } + + deliveryRegistrationFormVOById.setOutgoingContentsList(outgoingContentsVOS);} + + return deliveryRegistrationFormVOById; + } + + @Override + public ReagentConsumablesVO scanById(String reagentConsumableId, String referenceMaterialId){ + + if (!(referenceMaterialId.equals("0"))){ + + ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableId); + + ReferenceMaterial byId1 = referenceMaterialService.getById(referenceMaterialId); + + ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO(); + + BeanUtils.copyProperties(byId,reagentConsumablesVO); + + reagentConsumablesVO.setNumber(byId1.getNumber()); + + reagentConsumablesVO.setReferenceMaterialId(referenceMaterialId); + + return reagentConsumablesVO; + }else { + + ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableId); + + ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO(); + + BeanUtils.copyProperties(byId,reagentConsumablesVO); + + return reagentConsumablesVO; } - if (outgoingContentsService.saveBatch(outgoingContentsList)&&standardMaterialApplicationService.saveBatch(standardMaterialApplications)){ - return byId; - }else throw new RuntimeException(String.format("提交失败")); } } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/DetailsOfCentralizedServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/DetailsOfCentralizedServiceImpl.java index 0dffe4a..d6249f9 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/DetailsOfCentralizedServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/DetailsOfCentralizedServiceImpl.java @@ -2,11 +2,16 @@ package digital.laboratory.platform.reagent.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import digital.laboratory.platform.reagent.entity.DecentralizedRequest; import digital.laboratory.platform.reagent.entity.DetailsOfCentralized; import digital.laboratory.platform.reagent.entity.ReagentConsumables; import digital.laboratory.platform.reagent.mapper.DetailsOfCentralizedMapper; +import digital.laboratory.platform.reagent.service.CentralizedRequestService; +import digital.laboratory.platform.reagent.service.DecentralizedRequestService; import digital.laboratory.platform.reagent.service.DetailsOfCentralizedService; import digital.laboratory.platform.reagent.service.ReagentConsumablesService; +import digital.laboratory.platform.reagent.vo.CentralizedRequestVO; +import digital.laboratory.platform.reagent.vo.DecentralizedRequestVO; import digital.laboratory.platform.reagent.vo.DetailsOfCentralizedVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -30,11 +35,25 @@ public class DetailsOfCentralizedServiceImpl extends ServiceImpl getDetailsOfCentralizedVOList(String centralizedRequestId) { List list = baseMapper.getDetailsOfCentralizedVOList(centralizedRequestId); + + for (DetailsOfCentralizedVO detailsOfCentralizedVO : list) { + + ReagentConsumables byId = reagentConsumablesService.getById(detailsOfCentralizedVO.getReagentConsumableId()); + + detailsOfCentralizedVO.setBrand(byId.getBrand()); + detailsOfCentralizedVO.setCategory(byId.getCategory()); + detailsOfCentralizedVO.setSpecificationAndModel(byId.getSpecificationAndModel()); + + } + return list; } @@ -51,6 +70,8 @@ public class DetailsOfCentralizedServiceImpl extends ServiceImpl reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId, detailsOfCentralized.getReagentConsumableId()); @@ -63,9 +84,17 @@ public class DetailsOfCentralizedServiceImpl extends ServiceImpl implements EvaluationFormService { - + @Autowired private EvaluationFormService evaluationFormService; - + @Autowired private ProvideServicesOrSuppliesService provideServicesOrSuppliesService; - - + @Autowired private SupplierInformationService supplierInformationService; + @Autowired + private PurchaseListDetailsService purchaseListDetailsService; + @Override//通过供应商ID查询评价表列表 + public List getEvaluationFormVOList(String supplierInformationId) { - private PurchaseListDetailsService purchaseListDetailsService; + List evaluationFormVOList = baseMapper.getEvaluationFormVOList(supplierInformationId); - @Override//通过ID查询评价表 - public EvaluationForm getFormById(String evaluationFormId) { + return evaluationFormVOList; + } - EvaluationFormVO evaluationForm = baseMapper.getEvaluationForm(evaluationFormId); + @Override + public EvaluationFormVO getFormById(String evaluationFormId) { - evaluationForm.setProvideServicesOrSuppliesVOList(provideServicesOrSuppliesService.getProvideServicesOrSuppliesVOList(evaluationFormId)); + EvaluationFormVO evaluationForm = baseMapper.getEvaluationForm(evaluationFormId); return evaluationForm; } @@ -55,7 +63,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl implements LatticeFormService { + @Autowired + private LatticeFormService latticeFormService; + + @Autowired + private CabinetFormService cabinetFormService; + + @Autowired + private StorageRoomFormService storageRoomFormService; + @Override + public LocationVO getLocationById(String latticeFormId){ + + LatticeForm latticeForm = latticeFormService.getById(latticeFormId); + + CabinetForm cabinetForm = cabinetFormService.getById(latticeForm.getCabinetFormId()); + + StorageRoomForm storageRoomForm = storageRoomFormService.getById(cabinetForm.getStorageRoomFormId()); + + LocationVO locationVO = new LocationVO(); + + locationVO.setLatticeFormNumber(latticeForm.getNumber()); + locationVO.setCabinetFormType(cabinetForm.getType()); + locationVO.setCabinetFormNumber(cabinetForm.getNumber()); + locationVO.setStorageRoomFormName(storageRoomForm.getName()); + + return locationVO; + } + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/PeriodVerificationImplementationServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/PeriodVerificationImplementationServiceImpl.java index 749a827..30b6f9d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/PeriodVerificationImplementationServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/PeriodVerificationImplementationServiceImpl.java @@ -9,14 +9,18 @@ import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.dto.PeriodVerificationImplementationDTO; import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation; import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan; +import digital.laboratory.platform.reagent.entity.ReferenceMaterial; import digital.laboratory.platform.reagent.mapper.PeriodVerificationImplementationMapper; import digital.laboratory.platform.reagent.service.PeriodVerificationImplementationService; import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService; +import digital.laboratory.platform.reagent.service.ReagentConsumablesService; +import digital.laboratory.platform.reagent.service.ReferenceMaterialService; import digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.time.LocalDate; import java.time.LocalDateTime; /** @@ -33,7 +37,13 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl getPeriodVerificationImplementationVOPage(IPage page, QueryWrapper qw) { IPage periodVerificationImplementationVOPage = baseMapper.getPeriodVerificationImplementationVOPage(page, qw); @@ -41,7 +51,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl getProcurementContentVOList(String purchasingPlanId) { List procurementContentVOList = baseMapper.getProcurementContentVOList(purchasingPlanId); + LambdaQueryWrapper reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); + for (ProcurementContentVO procurementContentVO : procurementContentVOList) { List detailsOfCentralizedVOList = detailsOfCentralizedService.getDetailsOfCentralizedList(procurementContentVO.getProcurementContentId()); @@ -47,6 +54,18 @@ public class ProcurementContentServiceImpl extends ServiceImpl getProvideServicesOrSuppliesVOList(String provideServicesOrSuppliesId) { + @Autowired + private SupplierInformationService supplierInformationService; - List provideServicesOrSuppliesVOList = baseMapper.getProvideServicesOrSuppliesVOList(provideServicesOrSuppliesId); + @Autowired + private ReagentConsumablesService reagentConsumablesService; - return provideServicesOrSuppliesVOList; - } @Override - public ProvideServicesOrSupplies addById(String evaluationFormId){ + public ProvideServicesOrSupplies addById(String supplierInformationId,String reagentConsumableId){ ProvideServicesOrSupplies provideServicesOrSupplies = new ProvideServicesOrSupplies(); - provideServicesOrSupplies.setProvideServicesOrSuppliesId(IdWorker.get32UUID().toUpperCase()); + provideServicesOrSupplies.setId(IdWorker.get32UUID().toUpperCase()); + + LambdaQueryWrapper evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSupplierInformationId,supplierInformationId); - provideServicesOrSupplies.setEvaluationFormId(evaluationFormId); + EvaluationForm one = evaluationFormService.getOne(evaluationFormLambdaQueryWrapper); + + provideServicesOrSupplies.setEvaluationFormId(one.getId()); + + provideServicesOrSupplies.setReagentConsumableId(reagentConsumableId); provideServicesOrSuppliesService.save(provideServicesOrSupplies); return provideServicesOrSupplies; + } + @Override + public List getVOList(String supplierInformationId){ + //通过供应商ID找出对应的评价表 + LambdaQueryWrapper evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSupplierInformationId,supplierInformationId); + + EvaluationForm one = evaluationFormService.getOne(evaluationFormLambdaQueryWrapper); + + LambdaQueryWrapper provideServicesOrSuppliesLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + provideServicesOrSuppliesLambdaQueryWrapper.eq(ProvideServicesOrSupplies::getEvaluationFormId,one.getId()); + //通过评价表ID,找出该供应商提供的所有供应品 + List list = provideServicesOrSuppliesService.list(provideServicesOrSuppliesLambdaQueryWrapper); + + List provideServicesOrSuppliesVOS = new ArrayList<>(); + + LambdaQueryWrapper reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + for (ProvideServicesOrSupplies provideServicesOrSupplies : list) { + + ProvideServicesOrSuppliesVO provideServicesOrSuppliesVO = new ProvideServicesOrSuppliesVO(); + + BeanUtils.copyProperties(provideServicesOrSupplies,provideServicesOrSuppliesVO); + + reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId,provideServicesOrSuppliesVO.getReagentConsumableId()); + + ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); + //赋值服务品VO信息 + provideServicesOrSuppliesVO.setCategory(reagentConsumables.getCategory()); + provideServicesOrSuppliesVO.setBrand(reagentConsumables.getBrand()); + provideServicesOrSuppliesVO.setSpecificationAndModel(reagentConsumables.getSpecificationAndModel()); + provideServicesOrSuppliesVO.setReagentConsumableName(reagentConsumables.getReagentConsumableName()); + provideServicesOrSuppliesVOS.add(provideServicesOrSuppliesVO); + } + return provideServicesOrSuppliesVOS; } } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseCatalogueServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseCatalogueServiceImpl.java index d7b38bb..ccbd5c7 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseCatalogueServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseCatalogueServiceImpl.java @@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; +import digital.laboratory.platform.reagent.config.PageUtils; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.dto.PurchaseCatalogueDTO; import digital.laboratory.platform.reagent.entity.CatalogueDetails; @@ -15,6 +17,7 @@ import digital.laboratory.platform.reagent.mapper.PurchaseCatalogueMapper; import digital.laboratory.platform.reagent.service.CatalogueDetailsService; import digital.laboratory.platform.reagent.service.PurchaseCatalogueService; import digital.laboratory.platform.reagent.service.ReagentConsumablesService; +import digital.laboratory.platform.reagent.vo.CatalogueDetailsVO; import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -161,6 +164,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl purchaseCatalogueDTOList, DLPUser dlpUser) { if (purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId().equals("")) { @@ -177,15 +181,8 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); @@ -258,6 +252,10 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); @@ -286,14 +284,25 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl list = purchaseCatalogueService.list(queryWrapper1); + if (list.size()==0){ + return null; + } PurchaseCatalogue purchaseCatalogue = list.get(0); - if (purchaseCatalogue==null){ - throw new RuntimeException(String.format("未存在已发布的采购目录")); - } + LambdaQueryWrapper catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); - PurchaseCatalogueVO purchaseCatalogueVO = purchaseCatalogueService.getPurchaseCatalogueVO(purchaseCatalogue.getPurchaseCatalogueId()); + catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId,purchaseCatalogue.getPurchaseCatalogueId()); - return purchaseCatalogueVO; + List catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper); + + PageUtils pageUtils = new PageUtils(); + + Page pages = pageUtils.getPages(1, 10, catalogueDetailsList); + + if (pages==null){ + + throw new RuntimeException(String.format("未存在已发布的采购目录")); + } + return pages; } } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListDetailsServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListDetailsServiceImpl.java index dfe3a81..d324025 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListDetailsServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListDetailsServiceImpl.java @@ -1,10 +1,11 @@ package digital.laboratory.platform.reagent.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import digital.laboratory.platform.reagent.entity.PurchaseListDetails; +import digital.laboratory.platform.reagent.entity.ReagentConsumables; import digital.laboratory.platform.reagent.mapper.PurchaseListDetailsMapper; import digital.laboratory.platform.reagent.service.PurchaseListDetailsService; +import digital.laboratory.platform.reagent.service.ReagentConsumablesService; import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -22,12 +23,31 @@ public class PurchaseListDetailsServiceImpl extends ServiceImpl getPurchaseListDetailsVOList(String purchaseListId) { List purchaseListDetailsVOList = baseMapper.getPurchaseListDetailsVOList(purchaseListId); + for (PurchaseListDetailsVO purchaseListDetailsVO : purchaseListDetailsVOList) { + + ReagentConsumables byId = reagentConsumablesService.getById(purchaseListDetailsVO.getReagentConsumableId()); + + purchaseListDetailsVO.setBrand(byId.getBrand()); + + purchaseListDetailsVO.setSpecificationAndModel(byId.getSpecificationAndModel()); + } + return purchaseListDetailsVOList; } + @Override + public PurchaseListDetailsVO getPurchaseListDetailsVO(String id){ + + PurchaseListDetailsVO purchaseListDetails = baseMapper.getPurchaseListDetails(id); + + return purchaseListDetails; + } } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListServiceImpl.java index e4ddee6..8016f7e 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListServiceImpl.java @@ -1,5 +1,6 @@ package digital.laboratory.platform.reagent.service.impl; +import cn.hutool.core.date.DateTime; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -8,6 +9,7 @@ import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.mapper.PurchaseListMapper; import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO; +import digital.laboratory.platform.reagent.vo.PurchaseListPageVO; import digital.laboratory.platform.reagent.vo.PurchaseListVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -43,6 +45,10 @@ public class PurchaseListServiceImpl extends ServiceImpl purchaseListDetailsVOList = purchaseListDetailsService.getPurchaseListDetailsVOList(purchaseListId); + BeanUtils.copyProperties(byId, purchaseListVO); + for (PurchaseListDetailsVO purchaseListDetailsVO : purchaseListDetailsVOList) { LambdaQueryWrapper supplierInformationLambdaQueryWrapper = new LambdaQueryWrapper<>(); - supplierInformationLambdaQueryWrapper.eq(SupplierInformation::getSupplierInformationId,purchaseListDetailsVO.getSupplierId()); + if (purchaseListDetailsVO.getSupplierId()!=null){ + + supplierInformationLambdaQueryWrapper.eq(SupplierInformation::getId, purchaseListDetailsVO.getSupplierId()); SupplierInformation one = supplierInformationService.getOne(supplierInformationLambdaQueryWrapper); purchaseListDetailsVO.setSupplierName(one.getSupplierName()); - - } - - BeanUtils.copyProperties(byId, purchaseListVO); + }} purchaseListVO.setPurchaseListDetailsVOS(purchaseListDetailsVOList); @@ -73,61 +80,81 @@ public class PurchaseListServiceImpl extends ServiceImpl purchaseListDTOList, PurchaseList purchaseList){ + @Override//提交采购清单 + public PurchaseList commitById(String id) { + + PurchaseList purchaseList = purchaseListService.getById(id); - purchaseList.setPurchaseListId(IdWorker.get32UUID().toUpperCase()); + purchaseList.setStatus(1); - purchaseList.setName(LocalDate.now()+"采购清单"); + LambdaQueryWrapper purchaseListDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); - List purchaseListDetailsList= new ArrayList<>(); + purchaseListDetailsLambdaQueryWrapper.eq(PurchaseListDetails::getPurchaseListId, purchaseList.getId()); + + List purchaseListDetailsList = purchaseListDetailsService.list(purchaseListDetailsLambdaQueryWrapper); //创建入库内容集合 List warehousingContentList = new ArrayList<>(); //创建入库记录表 WarehousingRecordForm warehousingRecordForm = new WarehousingRecordForm(); //录入入库记录表信息 - warehousingRecordForm.setWarehousingRecordFormId(IdWorker.get32UUID().toUpperCase()); - - warehousingRecordForm.setPurchaseListId(purchaseList.getPurchaseListId() ); + warehousingRecordForm.setId(IdWorker.get32UUID().toUpperCase()); - warehousingRecordForm.setPurchaseNumber(LocalDate.now()+"入库任务"); + warehousingRecordForm.setPurchaseListId(purchaseList.getId()); - for (PurchaseListDTO purchaseListDTO : purchaseListDTOList) { + warehousingRecordForm.setPurchaseNumber(LocalDate.now() + "入库任务"); - PurchaseListDetails purchaseListDetails = new PurchaseListDetails(); + warehousingRecordForm.setStatus(0); - BeanUtils.copyProperties(purchaseListDTO,purchaseListDetails); - - purchaseListDetails.setPurchaseListId(purchaseList.getPurchaseListId()); - - purchaseListDetails.setPurchaselistDetailsId(IdWorker.get32UUID().toUpperCase()); - - purchaseListDetailsList.add(purchaseListDetails); + for (PurchaseListDetails purchaseListDetails : purchaseListDetailsList) { WarehousingContent warehousingContent = new WarehousingContent(); //完善入库内容信息 - warehousingContent.setWarehousingContentId(IdWorker.get32UUID().toUpperCase()); + warehousingContent.setId(IdWorker.get32UUID().toUpperCase()); warehousingContent.setTotalQuantity(purchaseListDetails.getPurchaseQuantity()); warehousingContent.setReagentConsumableId(purchaseListDetails.getReagentConsumableId()); - warehousingContent.setWarehousingRecordFormId(warehousingRecordForm.getWarehousingRecordFormId()); + warehousingContent.setWarehousingRecordFormId(warehousingRecordForm.getId()); + + warehousingContent.setSupplierId(purchaseListDetails.getSupplierId()); + + warehousingContent.setWarehousingQuantity(0); LambdaQueryWrapper catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); - catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getReagentConsumableId,warehousingContent.getReagentConsumableId()); + catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getReagentConsumableId, warehousingContent.getReagentConsumableId()); List list = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper); warehousingContentList.add(warehousingContent); - } - if (purchaseListService.save(purchaseList)&purchaseListDetailsService.saveBatch(purchaseListDetailsList)& warehousingRecordFormService.save(warehousingRecordForm) - & warehousingContentService.saveBatch(warehousingContentList)){ + + if (purchaseListService.updateById(purchaseList) & warehousingRecordFormService.save(warehousingRecordForm) + & warehousingContentService.saveBatch(warehousingContentList)) { return purchaseList; - }else { + } else { return null; } } + + @Transactional + @Override//录入采购清单明细 + public PurchaseListDetailsVO addDetails(PurchaseListDTO purchaseListDTO) { + + String purchaseListId = purchaseListDTO.getPurchaseListId(); + + PurchaseList byId = purchaseListService.getById(purchaseListId); + + PurchaseListDetails purchaseListDetails = purchaseListDetailsService.getById(purchaseListDTO.getId()); + + BeanUtils.copyProperties(purchaseListDTO, purchaseListDetails); + + purchaseListDetailsService.updateById(purchaseListDetails); + + PurchaseListDetailsVO purchaseListDetailsVO = purchaseListDetailsService.getPurchaseListDetailsVO(purchaseListDetails.getId()); + + return purchaseListDetailsVO; + } + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java index 21a0542..3c9589c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java @@ -1,5 +1,6 @@ package digital.laboratory.platform.reagent.service.impl; +import cn.hutool.core.date.DateTime; import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -8,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; +import digital.laboratory.platform.reagent.dto.PurchaseListDTO; import digital.laboratory.platform.reagent.dto.PurchasingPlanDTO; import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.mapper.PurchasingPlanMapper; @@ -43,8 +45,15 @@ public class PurchasingPlanServiceImpl extends ServiceImpl getPurchasingPlanVOPage(IPage page, QueryWrapper qw) { IPage purchasingPlanVOPage = baseMapper.getPurchasingPlanVOPage(page, qw); @@ -87,8 +96,6 @@ public class PurchasingPlanServiceImpl extends ServiceImpl list = new ArrayList<>();//需要整合的集合 boolean flag = true; @@ -107,13 +114,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl 0 & -// purchasingPlanDTO.getUnitPrice() < 1000000 & -// purchasingPlanDTO.getQuantity() > 0 & -// purchasingPlanDTO.getQuantity() < 1000 & -// purchasingPlanDTO.getReagentConsumableId() != null)) { -// throw new RuntimeException(String.format("您输入的值有误,请重新输入")); -// } +// //合并相同的采购内容 if (list.size() != 0) { @@ -124,13 +125,15 @@ public class PurchasingPlanServiceImpl extends ServiceImpl detailsOfCentralizedLambdaQueryWrapper = new LambdaQueryWrapper<>(); - detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getDetailsOfCentralizedId, byId.getDetailsOfCentralizedId()); + detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getId, byId.getDetailsOfCentralizedId()); DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getOne(detailsOfCentralizedLambdaQueryWrapper); @@ -249,6 +264,8 @@ public class PurchasingPlanServiceImpl extends ServiceImpl procurementContentLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + procurementContentLambdaQueryWrapper.eq(ProcurementContent::getPurchasingPlanId, purchasingPlan.getPurchasingPlanId()); + + List list1 = procurementContentService.list(procurementContentLambdaQueryWrapper); + + if (list1.size() == 0) { + + purchasingPlanService.removeById(purchasingPlan); + + return null; + } calculatedAmount(byId.getPurchasingPlanId()); return true; @@ -313,7 +349,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl detailsOfCentralizedLambdaQueryWrapper = new LambdaQueryWrapper<>(); - detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getDetailsOfCentralizedId, byId.getDetailsOfCentralizedId()); + detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getId, byId.getDetailsOfCentralizedId()); DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getOne(detailsOfCentralizedLambdaQueryWrapper); //将换货信息补充至集中采购申请明细 @@ -330,19 +366,18 @@ public class PurchasingPlanServiceImpl extends ServiceImpl procurementContentLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + procurementContentLambdaQueryWrapper.eq(ProcurementContent::getPurchasingPlanId, purchasingPlan.getPurchasingPlanId()); + + List list = procurementContentService.list(procurementContentLambdaQueryWrapper); - PurchasingPlan byId = purchasingPlanService.getById(purchasingPlanId); - if (byId.getStatus() != 3) { - throw new RuntimeException(String.format("当前状态无法发布")); + PurchaseListDTO purchaseListDTO = new PurchaseListDTO(); + + PurchaseList purchaseList = new PurchaseList(); + purchaseList.setId(IdWorker.get32UUID().toUpperCase()); + purchaseList.setName(DateTime.now() + "采购清单"); + purchaseList.setStatus(0); + purchaseList.setType("采购计划"); + + purchaseListService.save(purchaseList); + + for (ProcurementContent procurementContent : list) { + + PurchaseListDetails purchaseListDetails = new PurchaseListDetails(); + + purchaseListDetails.setPurchaseListId(purchaseList.getId()); + purchaseListDetails.setPurchaseQuantity(procurementContent.getQuantityPurchased()); + purchaseListDetails.setReagentConsumableId(procurementContent.getReagentConsumableId()); + purchaseListDetails.setId(IdWorker.get32UUID().toUpperCase()); + + purchaseListDetailsService.save(purchaseListDetails); + } + } else { + + purchasingPlan.setStatus(-1); } - byId.setStatus(4); - if (purchasingPlanService.updateById(byId)) { - return byId; + if (purchasingPlanService.updateById(purchasingPlan)) { + return purchasingPlan; } else { return null; } } - + //计算经费预算方法 public PurchasingPlan calculatedAmount(String purchasingPlanId) { PurchasingPlan purchasingPlan = purchasingPlanService.getById(purchasingPlanId); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java index 33cab7f..3ddd265 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java @@ -2,17 +2,17 @@ package digital.laboratory.platform.reagent.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; -import digital.laboratory.platform.reagent.entity.ReagentConsumables; -import digital.laboratory.platform.reagent.entity.ReferenceMaterial; +import digital.laboratory.platform.common.core.util.R; +import digital.laboratory.platform.reagent.config.PageUtils; +import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper; -import digital.laboratory.platform.reagent.service.BatchDetailsService; -import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService; -import digital.laboratory.platform.reagent.service.ReagentConsumablesService; -import digital.laboratory.platform.reagent.service.ReferenceMaterialService; +import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.vo.BatchDetailsVO; +import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO; import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO; +import io.swagger.models.auth.In; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -39,14 +39,26 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImplgetReagentConsumableInventoryVOList(){ + @Autowired + private SupplierInformationService supplierInformationService; - LambdaQueryWrapper reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); + @Override//试剂耗材管理列表 + public Page getReagentConsumableInventoryVOList(Page page, String name) { QueryWrapper reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); - List list = reagentConsumableInventoryService.list(reagentConsumableInventoryLambdaQueryWrapper); + if (name != null) { + + reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or() + .eq("category", "耗材") + .like("reagentConsumableInventory_name",name); + } else { + + reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or() + .eq("category", "耗材"); + } + + List list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper); ArrayList reagentConsumableInventoryVOS = new ArrayList<>(); @@ -56,99 +68,294 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); + ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableInventory.getReagentConsumableId()); + //赋值试剂耗材名称 + reagentConsumableInventoryVO.setReagentConsumablesName(byId.getReagentConsumableName()); - reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId,reagentConsumableInventoryVO.getReagentConsumableInventoryId()); + reagentConsumableInventoryVOS.add(reagentConsumableInventoryVO); + } + if (reagentConsumableInventoryVOS != null) { + PageUtils pageUtils = new PageUtils(); + + Page pages = pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), reagentConsumableInventoryVOS); + + return pages; + } else return null; + + } + + @Override//标准物质管理列表 + public Page getReagentConsumableInventoryRMVOList(Page page, String name) { + + QueryWrapper reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); + + if (name != null) { + reagentConsumableInventoryQueryWrapper.eq("category", "标准物质").or() + .eq("category", "标准储备溶液") + .like("reagentConsumable_name", name); + } else { + reagentConsumableInventoryQueryWrapper.eq("category", "标准物质").or() + .eq("category", "标准储备溶液"); + } + + List list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper); + + ArrayList reagentConsumableInventoryVOS = new ArrayList<>(); + + for (ReagentConsumableInventory reagentConsumableInventory : list) { + + List batchDetailsVOList = batchDetailsService.getBatchDetailsList(reagentConsumableInventory.getReagentConsumableInventoryId()); + + ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO(); + + BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryVO); + //赋值试剂耗材批次明细 + reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsVOList); + + ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableInventory.getReagentConsumableId()); //赋值试剂耗材名称 - reagentConsumableInventoryVO.setReagentConsumablesName(reagentConsumablesService.getById(reagentConsumablesLambdaQueryWrapper).getReagentConsumableName()); + reagentConsumableInventoryVO.setReagentConsumablesName(byId.getReagentConsumableName()); reagentConsumableInventoryVOS.add(reagentConsumableInventoryVO); } - return reagentConsumableInventoryVOS; + if (reagentConsumableInventoryVOS != null) { + PageUtils pageUtils = new PageUtils(); + + Page pages = pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), reagentConsumableInventoryVOS); + + return pages; + } else return null; } + @Override//领用减少库存 - public ReagentConsumableInventory addById (String reagentConsumableId, Integer quantity){ + public ReagentConsumableInventory addById(String reagentConsumableId, Integer quantity) { LambdaQueryWrapper reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); - reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,reagentConsumableId); + reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, reagentConsumableId); ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper); - one.setTotalQuantity(one.getTotalQuantity()+quantity); + one.setTotalQuantity(one.getTotalQuantity() + quantity); - if (reagentConsumableInventoryService.updateById(one)){ + if (reagentConsumableInventoryService.updateById(one)) { return one; - }else throw new RuntimeException(String.format("库存添加失败")); + } else throw new RuntimeException(String.format("库存添加失败")); } @Override//归还/入库增加库存 - public ReagentConsumableInventory reduceById(String reagentConsumableId, Integer quantity){ + public ReagentConsumableInventory reduceById(String reagentConsumableId, Integer quantity) { LambdaQueryWrapper reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); - reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,reagentConsumableId); + reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, reagentConsumableId); ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper); - one.setTotalQuantity(one.getTotalQuantity()-quantity); + one.setTotalQuantity(one.getTotalQuantity() - quantity); - if (reagentConsumableInventoryService.updateById(one)){ + if (reagentConsumableInventoryService.updateById(one)) { return one; - }else throw new RuntimeException(String.format("库存减少失败")); + } else throw new RuntimeException(String.format("库存减少失败")); } - @Override - public ListgetReferenceMaterialVOList(){ - LambdaQueryWrapper reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); + @Override//标准物质/溶液停用 + public ReferenceMaterial deactivateById(String referenceMaterialId) { - QueryWrapper reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); + ReferenceMaterial byId = referenceMaterialService.getById(referenceMaterialId); - reagentConsumableInventoryQueryWrapper.eq("category","标准物质"); + byId.setStatus(-1); - reagentConsumableInventoryQueryWrapper.eq("category","标准溶液"); + return byId; + } - List list = reagentConsumableInventoryService.list(reagentConsumableInventoryLambdaQueryWrapper); + @Override//分页查询标准物质 + public Page getAllList(Integer current, Integer size, String reagentConsumableName) { - ArrayList reagentConsumableInventoryVOS = new ArrayList<>(); + if (reagentConsumableName != null) { - for (ReagentConsumableInventory reagentConsumableInventory : list) { + QueryWrapper reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); - List batchDetailsVOList = batchDetailsService.getBatchDetailsList(reagentConsumableInventory.getReagentConsumableInventoryId()); + reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", reagentConsumableName); - ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO(); + List list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper); - BeanUtils.copyProperties(reagentConsumableInventory,reagentConsumableInventoryVO); - //赋值试剂耗材批次明细 - reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsVOList); + List reagentConsumableInventoryFullVOList = new ArrayList<>(); - LambdaQueryWrapper reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); + for (ReagentConsumableInventory reagentConsumableInventory : list) { - reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId,reagentConsumableInventoryVO.getReagentConsumableInventoryId()); - //赋值试剂耗材名称 - reagentConsumableInventoryVO.setReagentConsumablesName(reagentConsumablesService.getById(reagentConsumablesLambdaQueryWrapper).getReagentConsumableName()); + LambdaQueryWrapper referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>(); - reagentConsumableInventoryVOS.add(reagentConsumableInventoryVO); + referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId()); + + List list1 = referenceMaterialService.list(referenceMaterialLambdaQueryWrapper); + + for (ReferenceMaterial referenceMaterial : list1) { + + ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO(); + + BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO); + + reagentConsumableInventoryFullVO.setNumber(referenceMaterial.getNumber()); + + reagentConsumableInventoryFullVO.setBatchDetailsId(referenceMaterial.getBatchDetailsId()); + + BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId()); + + SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId()); + + reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName()); + + reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch()); + + reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO); + + } + } + PageUtils pageUtils = new PageUtils(); + + Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList); + + return pages; + } + + + List reagentConsumableInventoryFullVOList = new ArrayList<>(); + + List referenceMaterialList = referenceMaterialService.list(); + + for (ReferenceMaterial referenceMaterial : referenceMaterialList) { + + if (referenceMaterial.getStatus() == 0) { + + ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO(); + + ReagentConsumableInventory byId = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId()); + + BeanUtils.copyProperties(byId, reagentConsumableInventoryFullVO); + + reagentConsumableInventoryFullVO.setNumber(referenceMaterial.getNumber()); + + reagentConsumableInventoryFullVO.setBatchDetailsId(referenceMaterial.getBatchDetailsId()); + + BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId()); + + SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId()); + + reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName()); + + reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch()); + + reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO); + } } - return reagentConsumableInventoryVOS; + + PageUtils pageUtils = new PageUtils(); + + Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList); + + return pages; + } - @Override//标准物质/溶液停用 - public ReferenceMaterial deactivateById(String referenceMaterialId){ + //分页查询试剂耗材 + @Override + public Page getAllRM(Integer current, Integer size, String reagentConsumableName) { - ReferenceMaterial byId = referenceMaterialService.getById(referenceMaterialId); + List reagentConsumableInventoryFullVOList = new ArrayList<>(); - byId.setStatus(-1); + if (reagentConsumableName != null) { + + QueryWrapper reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); + + reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", reagentConsumableName); + + List list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper); + + for (ReagentConsumableInventory reagentConsumableInventory : list) { + + LambdaQueryWrapper batchDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId()); + + List list1 = batchDetailsService.list(batchDetailsLambdaQueryWrapper); + + for (BatchDetails batchDetails : list1) { + + ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO(); + + BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO); + + SupplierInformation byId = supplierInformationService.getById(batchDetails.getSupplierId()); + + reagentConsumableInventoryFullVO.setSupplierName(byId.getSupplierName()); + + reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch()); + + reagentConsumableInventoryFullVO.setBatchDetailsId(batchDetails.getBatchDetailsId()); + + reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO); + } + + } + + PageUtils pageUtils = new PageUtils(); + + Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList); + + return pages; + } + + QueryWrapper reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); + + reagentConsumableInventoryQueryWrapper.eq("category", "试剂") + .or().eq("category", "耗材"); + + List list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper); + + LambdaQueryWrapper batchDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + for (ReagentConsumableInventory reagentConsumableInventory : list) { + + if (reagentConsumableInventory.getTotalQuantity() > 0) { + + batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId()); + + List batchDetailsList = batchDetailsService.list(batchDetailsLambdaQueryWrapper); + + for (BatchDetails batchDetails : batchDetailsList) { + + ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO(); + + BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO); + + SupplierInformation byId = supplierInformationService.getById(batchDetails.getSupplierId()); + + reagentConsumableInventoryFullVO.setSupplierName(byId.getSupplierName()); + + reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch()); + + reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO); + + reagentConsumableInventoryFullVO.setBatchDetailsId(batchDetails.getBatchDetailsId()); + } + + } + } + PageUtils pageUtils = new PageUtils(); + + Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList); + + return pages; - return byId; } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesServiceImpl.java index a4a7319..d403ec6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesServiceImpl.java @@ -35,4 +35,5 @@ public class ReagentConsumablesServiceImpl extends ServiceImpl list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper); List reagentConsumablesSetVOS = new ArrayList<>(); + + if (list.size()!=0){ //查找出试剂耗材名称 for (ReagentConsumablesSet reagentConsumablesSet : list) { @@ -48,16 +50,12 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); - - reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId,reagentConsumablesSet.getReagentConsumableId()); - - ReagentConsumables one = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); + ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumablesSetVO.getReagentConsumableId()); - reagentConsumablesSetVO.setReagentConsumableName(one.getReagentConsumableName()); + reagentConsumablesSetVO.setReagentConsumables(byId); reagentConsumablesSetVOS.add(reagentConsumablesSetVO); - } + }} return reagentConsumablesSetVOS; } } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApplicationServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApplicationServiceImpl.java index e45332e..064cf3f 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApplicationServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApplicationServiceImpl.java @@ -1,15 +1,16 @@ package digital.laboratory.platform.reagent.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import digital.laboratory.platform.reagent.dto.StandardMaterialApplicationDTO; import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; +import digital.laboratory.platform.reagent.entity.ReferenceMaterial; +import digital.laboratory.platform.reagent.entity.SolutionUseForm; import digital.laboratory.platform.reagent.entity.StandardMaterialApplication; import digital.laboratory.platform.reagent.mapper.StandardMaterialApplicationMapper; -import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService; -import digital.laboratory.platform.reagent.service.ReagentConsumablesService; -import digital.laboratory.platform.reagent.service.StandardMaterialApplicationService; +import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -20,9 +21,10 @@ import java.time.LocalDateTime; * (标准物质领用/归还登记表)服务实现类 * * @author Zhang Xiaolong created at 2023-03-10 - * @describe (标准物质领用/归还登记表) 服务实现类 + * @describe (标准物质领用 / 归还登记表) 服务实现类 */ @Service +@SuppressWarnings("all") public class StandardMaterialApplicationServiceImpl extends ServiceImpl implements StandardMaterialApplicationService { @Autowired @@ -34,8 +36,14 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl solutionUseFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + solutionUseFormLambdaQueryWrapper.eq(SolutionUseForm::getStandardMaterialApplicationId, byId.getStandardMaterialApplicationId()); - if (standardMaterialApplicationService.updateById(byId)){ + SolutionUseForm one = solutionUseFormService.getOne(solutionUseFormLambdaQueryWrapper); + //如果是标准储备溶液,则需补充完善标准储备溶液使用记录表的使用数量 + if (one != null) { + one.setQuantityUsed(byId.getPurposeAndQuantity()); + solutionUseFormService.updateById(one); + } + if (standardMaterialApplicationDTO.getOutOfUse()==false){ + + reagentConsumableInventoryService.addById(byId.getReferenceSubstanceId(), byId.getRequisitionedQuantity()); + + } + + if (standardMaterialApplicationService.updateById(byId)) { return byId; - }else throw new RuntimeException(String.format("归还失败")); + } else throw new RuntimeException(String.format("归还失败")); } @Override//领用记录 - public IPage getPage(IPage page, QueryWrapper qw){ + public IPage getPage(IPage page, QueryWrapper qw) { IPage standardMaterialApplicationVOPage = baseMapper.getStandardMaterialApplicationVOPage(page, qw); return standardMaterialApplicationVOPage; } + //归还记录 @Override//归还记录 - public IPage getList(IPage page, QueryWrapper qw){ + public IPage getList(IPage page, QueryWrapper qw) { IPage standardMaterialApplicationVOList = baseMapper.getStandardMaterialApplicationVOList(page, qw); @@ -69,5 +92,5 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl implements StandardReserveSolutionService { + @Autowired + private StandardReserveSolutionService standardReserveSolutionService; + + @Autowired + private SolutionUseFormService solutionUseFormService; + + @Autowired + private LatticeFormService latticeFormService; + + @Autowired + private StorageRoomFormService storageRoomFormService; + + @Autowired + private CabinetFormService cabinetFormService; + + @Autowired + private ReagentConsumablesService reagentConsumablesService; + @Autowired + private ReagentConsumableInventoryService reagentConsumableInventoryService; + + @Autowired + private ReferenceMaterialService referenceMaterialService; + + @Override//通过ID查询标准溶液的配置记录 + public StandardReserveSolutionVO getStandardReserveSolutionVOById(String id) { + + StandardReserveSolutionVO standardReserveSolutionVOById = baseMapper.getStandardReserveSolutionVOById(id); + //查出该标准储备溶液对应的所有使用记录 + List solutionUseFormVOList = solutionUseFormService.getSolutionUseFormVOList(standardReserveSolutionVOById.getId()); + + standardReserveSolutionVOById.setSolutionUseFormVOList(solutionUseFormVOList); + + return standardReserveSolutionVOById; + } + + @Override//配置标准储备溶液 + @Transactional + public StandardReserveSolution addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser) { + + StandardReserveSolution standardReserveSolution = new StandardReserveSolution(); + + BeanUtils.copyProperties(standardReserveSolutionDTO, standardReserveSolution); + + standardReserveSolution.setId(IdWorker.get32UUID().toUpperCase()); + + standardReserveSolution.setDispenserId(dlpUser.getId()); + + standardReserveSolution.setConfigurationDate(LocalDateTime.now()); + + standardReserveSolution.setStatus(0); + + LambdaQueryWrapper reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName,standardReserveSolution.getSolutionName()); + reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration,standardReserveSolution.getConfigurationConcentration()); + + ReagentConsumables one = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); + //判断是否存在过该标准储备溶液,若未存在,则将其存入试剂耗材类 + if (one==null){ + + ReagentConsumables reagentConsumables = new ReagentConsumables(); + + ReferenceMaterial byId = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId()); + + ReagentConsumables reagentConsumables1 = reagentConsumablesService.getById(byId.getReagentConsumableId()); + + BeanUtils.copyProperties(reagentConsumables1,reagentConsumables); + + reagentConsumables1.setReagentConsumableId(IdWorker.get32UUID().toUpperCase()); + reagentConsumables1.setReagentConsumableName(standardReserveSolution.getSolutionName()); + reagentConsumables1.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration()); + + reagentConsumablesService.save(reagentConsumables1); + } + + if (standardReserveSolutionService.save(standardReserveSolution)) { + return standardReserveSolution; + } else throw new RuntimeException(String.format("配置失败")); + } + + @Override//标准储备溶液入库任务(查询的为状态为0的标准储备溶液) + public IPage getStandardReserveSolutionVOList(IPage page, QueryWrapper qw) { + + IPage standardReserveSolutionVOPage = baseMapper.getStandardReserveSolutionVOPage(page, qw); + + return standardReserveSolutionVOPage; + } + + @Override//标准储备溶液配置入库 + public StandardReserveSolutionVO warehousingById(String solutionId, String latticeId) { + //提供格子位置与标准储备溶液配置表ID + StandardReserveSolution byId = standardReserveSolutionService.getById(solutionId); + + LambdaQueryWrapper reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName,byId.getSolutionName()); + + reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration,byId.getConfigurationConcentration()); + //查询出该标准储备溶液的对象 + ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); + + LambdaQueryWrapper reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, reagentConsumables.getReagentConsumableId()); + //判断仓库是否存在过该标准储备溶液 (标准储备溶液ID与标准物质共用一个RMID,但标准储备溶液具有) + ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper); + //若不存在,则创建一条该标准储备溶液的仓库信息记录表 + if (one == null) { + + ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory(); + + BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory); + + ReferenceMaterial referenceMaterial = new ReferenceMaterial(); + //获取当前年月日 + Date date = new Date(); + + SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); + + formatter.format(date); + //创建标准溶液对象,并生成编号 + referenceMaterial.setStatus(0); + referenceMaterial.setId(IdWorker.get32UUID().toUpperCase()); + referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId()); + referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); + referenceMaterial.setNumber(reagentConsumableInventory.getEnglishName() + "-" + formatter.format(date)); + + referenceMaterialService.save(referenceMaterial); + + reagentConsumableInventory.setLatticeId(latticeId); + reagentConsumableInventory.setTotalQuantity(1); + reagentConsumableInventory.setStorageLife(byId.getValidityPeriod()); + + byId.setStatus(1); + + if (reagentConsumableInventoryService.save(reagentConsumableInventory)&&standardReserveSolutionService + .updateById(byId)) { + StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId()); + return byFullVOId; + } else { + throw new RuntimeException(String.format("入库失败")); + } + + } else { + + ReferenceMaterial referenceMaterial = new ReferenceMaterial(); + //获取当前年月日 + Date date = new Date(); + + SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); + + formatter.format(date); + //创建标准溶液对象,并生成编号 + referenceMaterial.setStatus(0); + referenceMaterial.setId(IdWorker.get32UUID().toUpperCase()); + referenceMaterial.setReagentConsumableId(one.getReagentConsumableId()); + referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId()); + referenceMaterial.setNumber(one.getEnglishName() + "-" + formatter.format(date)); + + referenceMaterialService.save(referenceMaterial); + //将存储信息录入仓库表 + one.setLatticeId(latticeId); + one.setTotalQuantity(one.getTotalQuantity() + 1); + one.setStorageLife(byId.getValidityPeriod()); + } + + byId.setStatus(1); + + if (standardReserveSolutionService.updateById(byId) && reagentConsumableInventoryService.updateById(one)) { + + StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId()); + return byFullVOId; + } else { + throw new RuntimeException(String.format("入库失败")); + } + } + + @Override//通过ID查找已入库的标准储备溶液信息 + public StandardReserveSolutionFullVO getByFullVOId(String id) { + + StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id); + + StandardReserveSolutionFullVO standardReserveSolutionFullVO = new StandardReserveSolutionFullVO(); + + LambdaQueryWrapper reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); + //更新库存信息 + reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, standardReserveSolutionVOById.getReferenceMaterialId()); + reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getConfigurationConcentration, standardReserveSolutionVOById.getConfigurationConcentration()); + + ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper); + + String latticeId = one.getLatticeId(); + + LocationVO locationById = latticeFormService.getLocationById(latticeId); + //赋值FullVO对象 + standardReserveSolutionFullVO.setStorageRoomFormName(locationById.getStorageRoomFormName()); + standardReserveSolutionFullVO.setCabinetFormNumber(locationById.getCabinetFormNumber()); + standardReserveSolutionFullVO.setLatticeFormNumber(locationById.getLatticeFormNumber()); + standardReserveSolutionFullVO.setCabinetFormType(locationById.getCabinetFormType()); + standardReserveSolutionFullVO.setStorageLife(one.getStorageLife()); + + return standardReserveSolutionFullVO; + } + + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardSolutionCurveServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardSolutionCurveServiceImpl.java index 71d360d..71c9163 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardSolutionCurveServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardSolutionCurveServiceImpl.java @@ -1,11 +1,24 @@ package digital.laboratory.platform.reagent.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import digital.laboratory.platform.common.mybatis.security.service.DLPUser; +import digital.laboratory.platform.reagent.dto.StandardSolutionCurveDTO; +import digital.laboratory.platform.reagent.entity.ReagentConsumables; +import digital.laboratory.platform.reagent.entity.ReferenceMaterial; import digital.laboratory.platform.reagent.entity.StandardSolutionCurve; import digital.laboratory.platform.reagent.mapper.StandardSolutionCurveMapper; +import digital.laboratory.platform.reagent.service.ReagentConsumablesService; +import digital.laboratory.platform.reagent.service.ReferenceMaterialService; import digital.laboratory.platform.reagent.service.StandardSolutionCurveService; +import digital.laboratory.platform.reagent.vo.StandardSolutionCurveVO; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; + /** * (标准工作曲线溶液配置记录表)服务实现类 * @@ -15,4 +28,47 @@ import org.springframework.stereotype.Service; @Service public class StandardSolutionCurveServiceImpl extends ServiceImpl implements StandardSolutionCurveService { + @Autowired + private StandardSolutionCurveService standardSolutionCurveService; + + @Autowired + private ReferenceMaterialService referenceMaterialService; + + @Autowired + private ReagentConsumablesService reagentConsumablesService; + + @Override + public IPage getStandardSolutionCurveVOPage(IPage page, QueryWrapper qw){ + + IPage standardSolutionCurveVOPage = baseMapper.getStandardSolutionCurveVOPage(page, qw); + + return standardSolutionCurveVOPage; + } + + @Override + public StandardSolutionCurve addById(StandardSolutionCurveDTO standardSolutionCurveDTO, DLPUser dlpUser){ + + StandardSolutionCurve standardSolutionCurve = new StandardSolutionCurve(); + + String referenceMaterialId = standardSolutionCurveDTO.getReferenceMaterialId(); + + ReferenceMaterial referenceMaterial = referenceMaterialService.getById(referenceMaterialId); + + standardSolutionCurve.setId(IdWorker.get32UUID().toUpperCase()); + + ReagentConsumables reagentConsumables = reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId()); + + standardSolutionCurve.setSolutionName(reagentConsumables.getReagentConsumableName()); + standardSolutionCurve.setSolutionConcentration(reagentConsumables.getConfigurationConcentration()); + standardSolutionCurve.setConfigurationDate(LocalDateTime.now()); + standardSolutionCurve.setConcentrationNumbering(referenceMaterial.getNumber()); + standardSolutionCurve.setStepSolutionConcentration(standardSolutionCurveDTO.getStepSolutionConcentration()); + standardSolutionCurve.setReferenceMaterialId(referenceMaterialId); + standardSolutionCurve.setDispenserId(dlpUser.getId()); + + if (standardSolutionCurveService.save(standardSolutionCurve)){ + return standardSolutionCurve; + }else throw new RuntimeException(String.format("配置失败")); + + } } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/StorageRoomFormServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/StorageRoomFormServiceImpl.java index 3c72a5a..fab2fdd 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/StorageRoomFormServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/StorageRoomFormServiceImpl.java @@ -1,18 +1,117 @@ package digital.laboratory.platform.reagent.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import digital.laboratory.platform.reagent.entity.CabinetForm; +import digital.laboratory.platform.reagent.entity.LatticeForm; import digital.laboratory.platform.reagent.entity.StorageRoomForm; import digital.laboratory.platform.reagent.mapper.StorageRoomFormMapper; +import digital.laboratory.platform.reagent.service.CabinetFormService; +import digital.laboratory.platform.reagent.service.LatticeFormService; import digital.laboratory.platform.reagent.service.StorageRoomFormService; +import digital.laboratory.platform.reagent.vo.StorageRoomFormVO; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; /** * 服务实现类 * * @author Zhang Xiaolong created at 2023-03-22 - * @describe 服务实现类 + * @describe 服务实现类 */ @Service +@RequiredArgsConstructor public class StorageRoomFormServiceImpl extends ServiceImpl implements StorageRoomFormService { + private StorageRoomFormService storageRoomFormService; + + private CabinetFormService cabinetFormService; + + private LatticeFormService latticeFormService; + + @Override//新增存储室信息 + public StorageRoomForm addById(StorageRoomForm storageRoomForm) { + + StorageRoomForm roomForm = new StorageRoomForm(); + + BeanUtils.copyProperties(storageRoomForm, roomForm); + + roomForm.setId(IdWorker.get32UUID().toUpperCase()); + + if (storageRoomFormService.save(roomForm)) { + return roomForm; + } else throw new RuntimeException(String.format("保存失败")); + } + + @Override//修改存储室信息 + public StorageRoomForm editById(StorageRoomForm storageRoomForm) { + + StorageRoomForm byId = storageRoomFormService.getById(storageRoomForm.getId()); + + BeanUtils.copyProperties(storageRoomForm, byId); + + if (storageRoomFormService.updateById(byId)) { + return byId; + } else throw new RuntimeException(String.format("保存失败")); + } + @Override//通过ID查询存储室 + public StorageRoomFormVO getFormById(String id){ + + StorageRoomForm byId = storageRoomFormService.getById(id); + + LambdaQueryWrapper cabinetFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + cabinetFormLambdaQueryWrapper.eq(CabinetForm::getStorageRoomFormId,id); + + List list = cabinetFormService.list(cabinetFormLambdaQueryWrapper); + + StorageRoomFormVO storageRoomFormVO = new StorageRoomFormVO(); + + BeanUtils.copyProperties(byId,storageRoomFormVO); + + storageRoomFormVO.setCabinetFormList(list); + + return storageRoomFormVO; + } + @Override + @Transactional + public Boolean delById(String id){ + + StorageRoomForm byId = storageRoomFormService.getById(id); + + LambdaQueryWrapper cabinetFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + cabinetFormLambdaQueryWrapper.eq(CabinetForm::getStorageRoomFormId,id); + + List list = cabinetFormService.list(cabinetFormLambdaQueryWrapper); + //删除格子信息 + for (CabinetForm cabinetForm : list) { + + LambdaQueryWrapper latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,cabinetForm.getId()); + + List latticeFormList = latticeFormService.list(latticeFormLambdaQueryWrapper); + + for (LatticeForm latticeForm : latticeFormList) { + + if (latticeForm.getStatus()==1){ + throw new RuntimeException(String.format("当前柜子有物品存放,不允许删除")); + } + } + + latticeFormService.removeBatchByIds(latticeFormList); + } + + if (cabinetFormService.removeBatchByIds(list)&&storageRoomFormService.removeById(byId)){ + return true; + }else throw new RuntimeException(String.format("删除失败")); + } + + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/SupplierInformationServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/SupplierInformationServiceImpl.java index cce0fb3..5e76d01 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/SupplierInformationServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/SupplierInformationServiceImpl.java @@ -1,7 +1,6 @@ package digital.laboratory.platform.reagent.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import digital.laboratory.platform.reagent.dto.SupplierInformationDTO; @@ -11,6 +10,8 @@ import digital.laboratory.platform.reagent.mapper.SupplierInformationMapper; import digital.laboratory.platform.reagent.service.EvaluationFormService; import digital.laboratory.platform.reagent.service.ProvideServicesOrSuppliesService; import digital.laboratory.platform.reagent.service.SupplierInformationService; +import digital.laboratory.platform.reagent.vo.EvaluationFormVO; +import digital.laboratory.platform.reagent.vo.SupplierInformationVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -38,7 +39,9 @@ public class SupplierInformationServiceImpl extends ServiceImpl supplierInformationQueryWrapper = new LambdaQueryWrapper(); @@ -52,19 +55,20 @@ public class SupplierInformationServiceImpl extends ServiceImpl evaluationFormVOList = evaluationFormService.getEvaluationFormVOList(supplierInformationId); + + supplierInformationVO.setEvaluationFormVOList(evaluationFormVOList); + + return supplierInformationVO; + } + + } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingContentServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingContentServiceImpl.java index e2c788e..51a0a8d 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingContentServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingContentServiceImpl.java @@ -1,8 +1,10 @@ package digital.laboratory.platform.reagent.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import digital.laboratory.platform.reagent.entity.ReagentConsumables; import digital.laboratory.platform.reagent.entity.WarehousingContent; import digital.laboratory.platform.reagent.mapper.WarehousingContentMapper; +import digital.laboratory.platform.reagent.service.ReagentConsumablesService; import digital.laboratory.platform.reagent.service.WarehousingBatchListService; import digital.laboratory.platform.reagent.service.WarehousingContentService; import digital.laboratory.platform.reagent.vo.WarehousingBatchListVO; @@ -18,6 +20,9 @@ public class WarehousingContentServiceImpl extends ServiceImpl getWarehousingContentVOList(String warehousingRecordFormId) { @@ -25,10 +30,17 @@ public class WarehousingContentServiceImpl extends ServiceImpl warehousingBatchListVOList = warehousingBatchListService.getWarehousingBatchListVOList(warehousingContentVO.getWarehousingContentId()); + List warehousingBatchListVOList = warehousingBatchListService.getWarehousingBatchListVOList(warehousingContentVO.getId()); warehousingContentVO.setWarehousingBatchListVOList(warehousingBatchListVOList); + ReagentConsumables byId = reagentConsumablesService.getById(warehousingContentVO.getReagentConsumableId()); + + warehousingContentVO.setCategory(byId.getCategory()); + warehousingContentVO.setBrand(byId.getBrand()); + warehousingContentVO.setSpecificationAndModel(byId.getSpecificationAndModel()); + warehousingContentVO.setReagentConsumables(byId); + } return warehousingContentVOList; } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java index 2d6fcfb..2ad27b4 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java @@ -63,6 +63,8 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl warehousingRecordFormDTOList, DLPUser dlpUser) { + public WarehousingRecordFormVO addFormById(List warehousingRecordFormDTOList, DLPUser dlpUser) { boolean flag = true; int i = 0; //签收内容循环 for (WarehousingRecordFormDTO warehousingRecordFormDTO : warehousingRecordFormDTOList) { - + //录入签收批次信息 WarehousingBatchList warehousingBatchList = new WarehousingBatchList(); BeanUtils.copyProperties(warehousingRecordFormDTO, warehousingBatchList); - warehousingBatchList.setWarehousingBatchListId(IdWorker.get32UUID().toUpperCase()); + warehousingBatchList.setId(IdWorker.get32UUID().toUpperCase()); warehousingBatchList.setDepositorId(dlpUser.getId()); + warehousingBatchList.setDateOfReceipt(LocalDateTime.now()); + LambdaQueryWrapper warehousingBatchListLambdaQueryWrapper = new LambdaQueryWrapper<>(); warehousingBatchListLambdaQueryWrapper.eq(WarehousingBatchList::getWarehousingContentId, warehousingBatchList.getWarehousingContentId()); @@ -107,8 +111,10 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl byId.getTotalQuantity()) { throw new RuntimeException(String.format("入库数量不能大于采购数量")); } @@ -128,7 +134,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl reagentConsumableInventoryLambdaQueryWrapper1 = new LambdaQueryWrapper<>(); - - reagentConsumableInventoryLambdaQueryWrapper1.eq(ReagentConsumableInventory::getReagentConsumableId, byId.getReagentConsumableId()); - - ReagentConsumableInventory one1 = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper1); LambdaQueryWrapper reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); @@ -255,11 +263,13 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl warehousingContentLambdaQueryWrapper = new LambdaQueryWrapper<>(); - String warehousingRecordFormId = warehousingContentService.getById(warehousingRecordFormDTOList.get(0).getWarehousingContentId()).getWarehousingRecordFormId(); + WarehousingContent byId = warehousingContentService.getById(warehousingRecordFormDTOList.get(0).getWarehousingContentId()); + + String warehousingRecordFormId = byId.getWarehousingRecordFormId(); warehousingContentLambdaQueryWrapper.eq(WarehousingContent::getWarehousingRecordFormId, warehousingRecordFormId); @@ -328,15 +343,15 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl warehousingBatchListLambdaQueryWrapper = new LambdaQueryWrapper<>(); - warehousingBatchListLambdaQueryWrapper.eq(WarehousingBatchList::getWarehousingContentId, warehousingContent.getWarehousingContentId()); + warehousingBatchListLambdaQueryWrapper.eq(WarehousingBatchList::getWarehousingContentId, warehousingContent.getId()); List list1 = warehousingBatchListService.list(warehousingBatchListLambdaQueryWrapper); if (warehousingContent.getAcceptanceRecordFormId() == null) { - AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.addForm(warehousingContent.getReagentConsumableId(), list1.get(0).getSupplierId()); + AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.addForm(warehousingContent.getReagentConsumableId(), warehousingContent.getSupplierId()); - warehousingContent.setAcceptanceRecordFormId(acceptanceRecordForm.getAcceptanceRecordFormId()); + warehousingContent.setAcceptanceRecordFormId(acceptanceRecordForm.getId()); warehousingContentService.updateById(warehousingContent); } @@ -353,7 +368,42 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl getWarehousingRecordFormVOList() { + + List warehousingRecordFormVOList = baseMapper.getWarehousingRecordFormVOList(); + + for (WarehousingRecordFormVO warehousingRecordFormVO : warehousingRecordFormVOList) { + + LambdaQueryWrapper warehousingContentLambdaQueryWrapper = new LambdaQueryWrapper<>(); + + warehousingContentLambdaQueryWrapper.eq(WarehousingContent::getWarehousingRecordFormId, warehousingRecordFormVO.getId()); + + List list = warehousingContentService.list(warehousingContentLambdaQueryWrapper); + + Integer x = 0; + Integer y = 0; + for (WarehousingContent warehousingContent : list) { + Integer totalQuantity = warehousingContent.getTotalQuantity(); + + if (totalQuantity != null) { + x = x + totalQuantity; + } + + Integer warehousingQuantity = warehousingContent.getWarehousingQuantity(); + if (warehousingQuantity != null) { + y = y + warehousingContent.getWarehousingQuantity(); + } + } + warehousingRecordFormVO.setWarehousingQuantity(y); + warehousingRecordFormVO.setQuantityPurchased(x); + } + return warehousingRecordFormVOList; } } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/AcceptanceRecordFormVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/AcceptanceRecordFormVO.java index 6fcaee9..b9d37f5 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/AcceptanceRecordFormVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/AcceptanceRecordFormVO.java @@ -1,14 +1,37 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm; +import digital.laboratory.platform.reagent.entity.ReagentConsumables; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; @Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "验收记录表VO") public class AcceptanceRecordFormVO extends AcceptanceRecordForm { + @ApiModelProperty(value = "(试剂耗材名称)") private String reagentConsumableName; + + @ApiModelProperty(value = "(供应商名称)") private String supplierName; + + @ApiModelProperty(value = "(一级审核人名称)") private String primaryAuditorName; + + @ApiModelProperty(value = "(二级审核人名称)") private String secondaryAuditorName; + + @ApiModelProperty(value = "(三级审核人名称)") private String threeLevelAuditorName; + + @ApiModelProperty(value = "(试剂耗材对象)") + private ReagentConsumables reagentConsumables; + } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/ApplicationForUseVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/ApplicationForUseVO.java index 069df72..1eaced5 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/ApplicationForUseVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/ApplicationForUseVO.java @@ -1,12 +1,17 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.ApplicationForUse; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data +@ApiModel(value = "领用申请表VO") public class ApplicationForUseVO extends ApplicationForUse { - + @ApiModelProperty(value = "(领用人名称)") private String recipientName; + + @ApiModelProperty(value = "(领用内容数组)") List reagentConsumablesSetVOList; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/BatchDetailsVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/BatchDetailsVO.java index e43a530..785bcce 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/BatchDetailsVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/BatchDetailsVO.java @@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.BatchDetails; import digital.laboratory.platform.reagent.entity.ReferenceMaterial; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @@ -9,8 +10,10 @@ import java.util.List; @Data public class BatchDetailsVO extends BatchDetails { + @ApiModelProperty(value="供应商名称") private String supplierName; + @ApiModelProperty(value="标准物质列表") List referenceMaterialVOS; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/CentralizedRequestVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/CentralizedRequestVO.java index 5651e89..b97f178 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/CentralizedRequestVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/CentralizedRequestVO.java @@ -21,7 +21,7 @@ import java.util.List; public class CentralizedRequestVO extends CentralizedRequest { @ApiModelProperty(value="部门名称") - private String orgName; + private String department; private List detailsOfCentralizedVOList; @ApiModelProperty(value="申请人名称") @@ -32,4 +32,6 @@ public class CentralizedRequestVO extends CentralizedRequest { + + } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/CheckContentVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/CheckContentVO.java deleted file mode 100644 index 39576fe..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/vo/CheckContentVO.java +++ /dev/null @@ -1,10 +0,0 @@ -package digital.laboratory.platform.reagent.vo; - -import digital.laboratory.platform.reagent.entity.CheckContent; -import lombok.Data; - -@Data -public class CheckContentVO extends CheckContent { - - private String reagentConsumableName; -} diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/CheckScheduleVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/CheckScheduleVO.java index 03b6db1..250c2f3 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/CheckScheduleVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/CheckScheduleVO.java @@ -1,6 +1,7 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.CheckSchedule; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @@ -8,7 +9,12 @@ import java.util.List; @Data public class CheckScheduleVO extends CheckSchedule { + @ApiModelProperty(value="(制定人名称)") private String managerName; + + @ApiModelProperty(value="(审核人名称)") private String technicalDirectorName; + + @ApiModelProperty(value="(期间核查计划明细数组)") List periodVerificationPlanVOS; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/ComplianceCheckVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/ComplianceCheckVO.java index 343e7e8..90fa378 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/ComplianceCheckVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/ComplianceCheckVO.java @@ -1,16 +1,31 @@ package digital.laboratory.platform.reagent.vo; - -import digital.laboratory.platform.reagent.entity.CheckContent; import digital.laboratory.platform.reagent.entity.ComplianceCheck; +import digital.laboratory.platform.reagent.entity.ReagentConsumables; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data public class ComplianceCheckVO extends ComplianceCheck { + @ApiModelProperty(value="(执行人名称)") private String executorName; + + @ApiModelProperty(value="(执行人名称)") + private String makerName; + + @ApiModelProperty(value="(一级审核人名称)") private String primaryAuditorName; + + @ApiModelProperty(value="(二级审核人名称)") private String secondaryAuditorName; + + @ApiModelProperty(value="(试剂耗材名称)") private String reagentConsumableName; + @ApiModelProperty(value="(试剂耗材对象)") + private ReagentConsumables reagentConsumables; + + + } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/DecentralizeDetailsVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/DecentralizeDetailsVO.java index 40408bb..4795339 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/DecentralizeDetailsVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/DecentralizeDetailsVO.java @@ -11,4 +11,6 @@ import lombok.NoArgsConstructor; public class DecentralizeDetailsVO extends DecentralizeDetails { private String reagentConsumableName; + + private String department; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/DecentralizedRequestVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/DecentralizedRequestVO.java index 9c54905..2478d4c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/DecentralizedRequestVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/DecentralizedRequestVO.java @@ -17,23 +17,28 @@ import java.util.List; @ApiModel(value = "分散采购申请VO") public class DecentralizedRequestVO extends DecentralizedRequest { - @ApiModelProperty(value="三级审核人名称") + @ApiModelProperty(value="三级审核人名称") private String threeLevelAuditName; - @ApiModelProperty(value="二级审核人名称") + @ApiModelProperty(value="二级审核人名称") private String secondaryAuditorName; - @ApiModelProperty(value="一级级审核人名称") + @ApiModelProperty(value="一级级审核人名称") private String primaryAuditorName; - @ApiModelProperty(value="申请人名称") + @ApiModelProperty(value="申请人名称") private String applicantName; - @ApiModelProperty(value="审批人名称") + @ApiModelProperty(value="审批人名称") private String approverName; + @ApiModelProperty(value="部门名称") + private String department; - private String ogrName; + @ApiModelProperty(value="分散采购明细集合") private List decentralizeDetailsVOList; + + private String type = "分散采购申请"; + } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/DetailsOfCentralizedVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/DetailsOfCentralizedVO.java index 44e9382..a0c54b6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/DetailsOfCentralizedVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/DetailsOfCentralizedVO.java @@ -19,5 +19,33 @@ public class DetailsOfCentralizedVO extends DetailsOfCentralized { private String replacementReagentConsumableName; + @ApiModelProperty(value="品牌)") + private String brand; + @ApiModelProperty(value="类别)") + private String category; + + @ApiModelProperty(value="规格型号)") + private String specificationAndModel; + + @ApiModelProperty(value="部门)") + private String department; + + @ApiModelProperty(value="申请人名称)") + private String applicantName; + + @ApiModelProperty(value="包装份数") + private String packagedCopies; + + @ApiModelProperty(value="(标准值/纯度)") + private String standardValueOrPurity; + + @ApiModelProperty(value="包装单位") + private String minimumUnit; + + @ApiModelProperty(value="偏差/不确定度") + private String deviationOrUncertainty; + + @ApiModelProperty(value="种类") + private String species; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/EvaluationFormVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/EvaluationFormVO.java index a36ee70..aef2e61 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/EvaluationFormVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/EvaluationFormVO.java @@ -1,6 +1,8 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.EvaluationForm; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import jdk.internal.dynalink.linker.LinkerServices; import lombok.AllArgsConstructor; import lombok.Data; @@ -12,12 +14,16 @@ import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor -public class EvaluationFormVO extends EvaluationForm { +@ApiModel(value = "(服务商/供应商评价表)") +public class EvaluationFormVO extends EvaluationForm { + @ApiModelProperty(value="(一级评价人名称)") private String primaryUserName; + + @ApiModelProperty(value="(二级评价人名称)") private String secondaryUserName; - private String threeLevelUserName; - List provideServicesOrSuppliesVOList; + @ApiModelProperty(value="(三级评价人名称)") + private String threeLevelUserName; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/PeriodVerificationImplementationVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/PeriodVerificationImplementationVO.java index f5df927..b2aa270 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/PeriodVerificationImplementationVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/PeriodVerificationImplementationVO.java @@ -2,13 +2,19 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation; import digital.laboratory.platform.reagent.service.impl.PeriodVerificationImplementationServiceImpl; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data public class PeriodVerificationImplementationVO extends PeriodVerificationImplementation { + @ApiModelProperty(value = "核查人名称") private String inspectorName; + + @ApiModelProperty(value = "标准物质名称") private String referenceMaterialName; + + @ApiModelProperty(value = "技术负责人名称") private String technicalDirectorName; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/PeriodVerificationPlanVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/PeriodVerificationPlanVO.java index d511c37..203ffc1 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/PeriodVerificationPlanVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/PeriodVerificationPlanVO.java @@ -1,11 +1,15 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data public class PeriodVerificationPlanVO extends PeriodVerificationPlan { + @ApiModelProperty(value="(标准物质名称)") private String referenceMaterialName; + + @ApiModelProperty(value="(核查人名称)") private String inspectorName; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/ProcurementContentVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/ProcurementContentVO.java index 6cfa27d..399fb19 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/ProcurementContentVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/ProcurementContentVO.java @@ -14,18 +14,27 @@ import java.util.List; @NoArgsConstructor @ApiModel(value = "采购计划明细VO") public class ProcurementContentVO extends ProcurementContent { - @ApiModelProperty(value="试剂耗材名称") + @ApiModelProperty(value="试剂耗材名称") private String reagentConsumableName; - @ApiModelProperty(value="换货试剂耗材名称") + @ApiModelProperty(value="品牌") private String Brand; + @ApiModelProperty(value="类型") private String category; + @ApiModelProperty(value="采购目录编号") private String purchaseCatalogueNumber; + + @ApiModelProperty(value="规格型号") private String specificationAndModel; + @ApiModelProperty(value="换货试剂耗材名称") private String replacementReagentConsumableName; + + @ApiModelProperty(value="总数量") + private Integer totalQuantity; + private List detailsOfCentralizedVOS; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/ProvideServicesOrSuppliesVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/ProvideServicesOrSuppliesVO.java index f792a69..734b63c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/ProvideServicesOrSuppliesVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/ProvideServicesOrSuppliesVO.java @@ -1,6 +1,7 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies; +import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -9,7 +10,18 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor public class ProvideServicesOrSuppliesVO extends ProvideServicesOrSupplies { + @ApiModelProperty(value="(试剂耗材名称)") private String reagentConsumableName; + @ApiModelProperty(value="(品牌)") + + private String brand; + @ApiModelProperty(value="(类别)") + + private String category; + @ApiModelProperty(value="(规格型号)") + + private String specificationAndModel; + } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseListDetailsVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseListDetailsVO.java index 127f02e..17a19d5 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseListDetailsVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseListDetailsVO.java @@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.vo; import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A; import digital.laboratory.platform.reagent.entity.PurchaseListDetails; +import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -11,7 +12,16 @@ import lombok.NoArgsConstructor; @NoArgsConstructor public class PurchaseListDetailsVO extends PurchaseListDetails { + @ApiModelProperty(value="品牌") + private String brand; + + @ApiModelProperty(value="规格型号") + private String specificationAndModel; + + @ApiModelProperty(value="试剂耗材名称") private String reagentConsumableName; + + @ApiModelProperty(value="供应商名称") private String supplierName; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseListVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseListVO.java index a86b774..17b0b7a 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseListVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseListVO.java @@ -14,4 +14,5 @@ import java.util.List; public class PurchaseListVO extends PurchaseList { private List purchaseListDetailsVOS; + } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/PurchasingPlanVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/PurchasingPlanVO.java index 36afd24..7101f7b 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/PurchasingPlanVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/PurchasingPlanVO.java @@ -15,20 +15,22 @@ import java.util.List; @ApiModel(value = "采购计划VO") public class PurchasingPlanVO extends PurchasingPlan { @ApiModelProperty(value="一级审核人名称") - private String primaryAuditorName; - @ApiModelProperty(value="审批人名称") + @ApiModelProperty(value="审批人名称") private String approverName; - @ApiModelProperty(value="申请人名称") + @ApiModelProperty(value="申请人名称") private String createName; @ApiModelProperty(value="部门名称") - private String orgName; + + @ApiModelProperty(value="采购计划明细") private List procurementContentVOList; + private String type = "采购计划"; + diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/ReagentConsumableInventoryVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/ReagentConsumableInventoryVO.java index 6d3d178..f0619c4 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/ReagentConsumableInventoryVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/ReagentConsumableInventoryVO.java @@ -1,13 +1,23 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; import java.util.List; @Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "库存信息VO") public class ReagentConsumableInventoryVO extends ReagentConsumableInventory { + @ApiModelProperty(value="试剂耗材名称") private String reagentConsumablesName; + + @ApiModelProperty(value="批次信息数组") List batchDetailsVOS; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/ReagentConsumablesSetVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/ReagentConsumablesSetVO.java index 1598394..7dfd9fc 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/ReagentConsumablesSetVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/ReagentConsumablesSetVO.java @@ -1,11 +1,15 @@ package digital.laboratory.platform.reagent.vo; +import digital.laboratory.platform.reagent.entity.ReagentConsumables; import digital.laboratory.platform.reagent.entity.ReagentConsumablesSet; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data +@ApiModel(value = "试剂耗材集合VO") public class ReagentConsumablesSetVO extends ReagentConsumablesSet { - private String reagentConsumableName; + public ReagentConsumables reagentConsumables; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/ReferenceMaterialVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/ReferenceMaterialVO.java index a121bf3..560c57f 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/ReferenceMaterialVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/ReferenceMaterialVO.java @@ -1,10 +1,12 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.ReferenceMaterial; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data public class ReferenceMaterialVO extends ReferenceMaterial { + @ApiModelProperty(value="标准物质名称") private String referenceMaterialName; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApplicationVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApplicationVO.java index f774c60..3aa6611 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApplicationVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApplicationVO.java @@ -2,11 +2,18 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.dto.StandardMaterialApplicationDTO; import digital.laboratory.platform.reagent.entity.StandardMaterialApplication; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; @Data +@ApiModel(value = "(标准物质领用归还登记表)") +@EqualsAndHashCode(callSuper = true) public class StandardMaterialApplicationVO extends StandardMaterialApplication { + @ApiModelProperty(value = "(标准物质名称)") private String referenceSubstanceName; + private String recipientName; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApprovalFormVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApprovalFormVO.java index 0024f15..5278b75 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApprovalFormVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApprovalFormVO.java @@ -7,5 +7,8 @@ import lombok.Data; public class StandardMaterialApprovalFormVO extends StandardMaterialApprovalForm { private String manufacturerName; - private String name; + private String approverName; + private String secondaryAuditorName; + private String primaryAuditorName; + } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/SupplierInformationVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/SupplierInformationVO.java deleted file mode 100644 index 8686127..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/vo/SupplierInformationVO.java +++ /dev/null @@ -1,6 +0,0 @@ -package digital.laboratory.platform.reagent.vo; - -import digital.laboratory.platform.reagent.entity.SupplierInformation; - -public class SupplierInformationVO extends SupplierInformation { -} diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingBatchListVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingBatchListVO.java index 4502ea9..3968d89 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingBatchListVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingBatchListVO.java @@ -2,12 +2,13 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.WarehousingBatchList; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data public class WarehousingBatchListVO extends WarehousingBatchList { - private String supplierName; + @ApiModelProperty(value="入库人名称") private String depositorName; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingContentVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingContentVO.java index 53eb7b8..bda6ab4 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingContentVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingContentVO.java @@ -1,6 +1,8 @@ package digital.laboratory.platform.reagent.vo; +import digital.laboratory.platform.reagent.entity.ReagentConsumables; import digital.laboratory.platform.reagent.entity.WarehousingContent; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @@ -8,7 +10,26 @@ import java.util.List; @Data public class WarehousingContentVO extends WarehousingContent { + @ApiModelProperty(value = "(试剂耗材名称)") private String reagentConsumableName; + @ApiModelProperty(value = "(入库批次明细数组)") List warehousingBatchListVOList; + + @ApiModelProperty(value = "(制定人名称)") + private String applicantName; + + @ApiModelProperty(value = "(供应商名称)") + private String supplierName; + + @ApiModelProperty(value = "(品牌)") + private String brand; + + @ApiModelProperty(value = "(类别)") + private String category; + + @ApiModelProperty(value = "(规格型号)") + private String specificationAndModel; + + private ReagentConsumables reagentConsumables; } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingRecordFormVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingRecordFormVO.java index 476a92e..33b0977 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingRecordFormVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/WarehousingRecordFormVO.java @@ -1,5 +1,6 @@ package digital.laboratory.platform.reagent.vo; import digital.laboratory.platform.reagent.entity.WarehousingRecordForm; +import io.swagger.models.auth.In; import lombok.Data; import java.util.List; @@ -7,5 +8,11 @@ import java.util.List; @Data public class WarehousingRecordFormVO extends WarehousingRecordForm { - List warehousingContentVOList; ; + private String userName; + + List warehousingContentVOList; + + private Integer quantityPurchased; + + private Integer warehousingQuantity; } diff --git a/src/main/resources/bootstrap.yml b/src/main/resources/bootstrap.yml index 78969a0..9d929dc 100644 --- a/src/main/resources/bootstrap.yml +++ b/src/main/resources/bootstrap.yml @@ -20,6 +20,15 @@ spring: file-extension: yml shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + mvc: + date-format: yyyy-MM-dd HH:mm:ss + throw-exception-if-no-handler-found: true + jackson: + date-format: yyyy-MM-dd HH:mm:ss + time-zone: GMT+8 + serialization: + write-dates-as-timestamps: true + profiles: active: @profiles.active@ datasource: @@ -28,3 +37,29 @@ spring: username: root password: 7990016 url: jdbc:mysql://dlp-mysql:3306/reagent_managment?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + + + servlet: + multipart: + # 根据实际需求作调整 + # 默认最大上传文件大小为1M, 单个文件大小 + max-file-size: 20MB + # 默认最大请求大小为10M, 总上传的数据大小 + max-request-size: 55MB + + # minio 文件存储配置信息 + # 文件上传相关 支持阿里云、华为云、腾讯、minio +# oss: +# endpoint: http://127.0.0.1:9000 +# accessKey: dlp-yhh +# secretKey: 87990016 +# bucket-name: bucket1 + +# 文件上传相关 支持阿里云、华为云、腾讯、minio +# oss: +# endpoint: http://192.168.9.73:9000 +# accessKey: dlp +# secretKey: 87990016 +# bucket-name: dlpfiles + + diff --git a/src/main/resources/mapper/AcceptanceContentMapper.xml b/src/main/resources/mapper/AcceptanceContentMapper.xml index 365fb8c..e1f95d3 100644 --- a/src/main/resources/mapper/AcceptanceContentMapper.xml +++ b/src/main/resources/mapper/AcceptanceContentMapper.xml @@ -5,7 +5,7 @@ - + diff --git a/src/main/resources/mapper/AcceptanceRecordFormMapper.xml b/src/main/resources/mapper/AcceptanceRecordFormMapper.xml index cb0b4f0..430bda2 100644 --- a/src/main/resources/mapper/AcceptanceRecordFormMapper.xml +++ b/src/main/resources/mapper/AcceptanceRecordFormMapper.xml @@ -5,7 +5,7 @@ - + @@ -20,7 +20,6 @@ - @@ -41,6 +40,7 @@ + + + @@ -59,7 +61,7 @@ where rc.reagent_consumable_id = arf.reagent_consumable_id) as reagent_consumable_name, (select si.supplier_name from supplier_information si - where si.supplier_information_id = arf.supplier_id) as supplier_name, + where si.id = arf.supplier_id) as supplier_name, (SELECT user.name FROM dlp_base.sys_user user WHERE user.user_id=arf.primary_auditor_id @@ -89,8 +91,8 @@ where rc.reagent_consumable_id = arf.reagent_consumable_id) as reagent_consumable_name, (select si.supplier_name from supplier_information si - where si.supplier_id = arf.supplier_id)as supplier_name + where si.id = arf.supplier_id)as supplier_name FROM acceptance_record_form arf - WHERE arf.acceptance_record_form_id = #{acceptanceRecordFormId} + WHERE arf.id = #{acceptanceRecordFormId} diff --git a/src/main/resources/mapper/ApplicationForUseMapper.xml b/src/main/resources/mapper/ApplicationForUseMapper.xml index 25791b2..d5e1692 100644 --- a/src/main/resources/mapper/ApplicationForUseMapper.xml +++ b/src/main/resources/mapper/ApplicationForUseMapper.xml @@ -5,7 +5,7 @@ - + @@ -40,7 +40,7 @@ - SELECT cc.*, - (select rc.name - from reagent_consumables rc - where rc.reagent_consumable_id = cc.reagent_consumable_id) - FROM check_content cc - WHERE cc.compliance_check_id = #{complianceCheckId} - - diff --git a/src/main/resources/mapper/CheckScheduleMapper.xml b/src/main/resources/mapper/CheckScheduleMapper.xml index 85fed69..37c6433 100644 --- a/src/main/resources/mapper/CheckScheduleMapper.xml +++ b/src/main/resources/mapper/CheckScheduleMapper.xml @@ -5,7 +5,7 @@ - + @@ -27,19 +27,14 @@ SELECT cs.*, - (SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=cs.technical_director_id ) as technical_director_name - , ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=cs.manager_id ) as manager_mame + (SELECT user.name FROM dlp_base.sys_user user WHERE user.user_id=cs.technical_director_id ) as technical_director_name, + (SELECT user.name FROM dlp_base.sys_user user WHERE user.user_id=cs.manager_id ) as manager_mame FROM check_schedule cs - diff --git a/src/main/resources/mapper/ComplianceCheckMapper.xml b/src/main/resources/mapper/ComplianceCheckMapper.xml index b50f1cf..ae97187 100644 --- a/src/main/resources/mapper/ComplianceCheckMapper.xml +++ b/src/main/resources/mapper/ComplianceCheckMapper.xml @@ -4,73 +4,90 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - SELECT cc.*, - (SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id =cc.executor_id) AS executor_name, - (SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id =cc.primary_auditor_id) AS primary_auditor_name , - (SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id =cc.secondary_auditor_id) AS secondary_auditor_name - FROM compliance_check cc - + + + + + + + + SELECT cc.*, + (SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id =cc.executor_id) AS executor_name + , ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id =cc.create_by) AS maker_name + , ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id =cc.primary_auditor_id) AS primary_auditor_name + , ( + SELECT user.name + FROM dlp_base.sys_user user + WHERE user.user_id =cc.secondary_auditor_id) AS secondary_auditor_name + FROM compliance_check cc + - + - + - + diff --git a/src/main/resources/mapper/DecentralizeDetailsMapper.xml b/src/main/resources/mapper/DecentralizeDetailsMapper.xml index bd1c831..61dd069 100644 --- a/src/main/resources/mapper/DecentralizeDetailsMapper.xml +++ b/src/main/resources/mapper/DecentralizeDetailsMapper.xml @@ -5,7 +5,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/src/main/resources/mapper/DecentralizedRequestMapper.xml b/src/main/resources/mapper/DecentralizedRequestMapper.xml index 65b2bc2..bf748cf 100644 --- a/src/main/resources/mapper/DecentralizedRequestMapper.xml +++ b/src/main/resources/mapper/DecentralizedRequestMapper.xml @@ -5,7 +5,7 @@ - + @@ -37,14 +37,12 @@ - + SELECT dr.*, - (SELECT org.name - FROM dlp_base.sys_org org - WHERE org.org_id in (select org_id from dlp_base.sys_user where user_id = dr.applicant_id)) AS org_name, + (select department from dlp_base.sys_user where user_id = dr.applicant_id) AS department, (SELECT user.name FROM dlp_base.sys_user user WHERE user.user_id =dr.three_level_audit_id) AS three_level_audit_name @@ -101,7 +99,7 @@ FROM dlp_base.sys_user user WHERE user.user_id =dr.approver_id) As approver_name FROM decentralized_request dr - WHERE dr.decentralized_request_id = #{decentralizedRequestId} + WHERE dr.id = #{id} diff --git a/src/main/resources/mapper/DeliveryRegistrationFormMapper.xml b/src/main/resources/mapper/DeliveryRegistrationFormMapper.xml index c7f3a6d..5829838 100644 --- a/src/main/resources/mapper/DeliveryRegistrationFormMapper.xml +++ b/src/main/resources/mapper/DeliveryRegistrationFormMapper.xml @@ -5,7 +5,7 @@ - + @@ -13,6 +13,29 @@ + + + + + + + + + + + diff --git a/src/main/resources/mapper/DetailsOfCentralizedMapper.xml b/src/main/resources/mapper/DetailsOfCentralizedMapper.xml index b845933..1319e7a 100644 --- a/src/main/resources/mapper/DetailsOfCentralizedMapper.xml +++ b/src/main/resources/mapper/DetailsOfCentralizedMapper.xml @@ -5,7 +5,7 @@ - + @@ -14,6 +14,7 @@ + - + @@ -60,6 +60,25 @@ where user.user_id = ef.three_level_user_id) AS three_level_user_name FROM evaluation_form ef - WHERE ef.evaluation_form_id = #{evaluationFormId} + WHERE ef.id = #{id} + + + diff --git a/src/main/resources/mapper/InstructionBookMapper.xml b/src/main/resources/mapper/InstructionBookMapper.xml index d595f33..096a220 100644 --- a/src/main/resources/mapper/InstructionBookMapper.xml +++ b/src/main/resources/mapper/InstructionBookMapper.xml @@ -5,7 +5,7 @@ - + diff --git a/src/main/resources/mapper/OutgoingContentsMapper.xml b/src/main/resources/mapper/OutgoingContentsMapper.xml index d805f8a..ccf5bc7 100644 --- a/src/main/resources/mapper/OutgoingContentsMapper.xml +++ b/src/main/resources/mapper/OutgoingContentsMapper.xml @@ -5,7 +5,7 @@ - + @@ -16,6 +16,9 @@ + + + diff --git a/src/main/resources/mapper/PeriodVerificationImplementationMapper.xml b/src/main/resources/mapper/PeriodVerificationImplementationMapper.xml index abc7be2..039e8ad 100644 --- a/src/main/resources/mapper/PeriodVerificationImplementationMapper.xml +++ b/src/main/resources/mapper/PeriodVerificationImplementationMapper.xml @@ -29,20 +29,17 @@ + - select pvi.*, - (select rc.reagent_consumable_name - from reagent_consumables rc - where rc.reagent_consumable_id = pvi.reference_material_id) as reference_material_name, (SELECT user.name FROM dlp_base.sys_user user WHERE user.user_id=pvi.inspector_id ) as inspector_nam @@ -56,6 +53,7 @@ - SELECT ps.*, - (select rc.name - from reagent_consumables rc - where rc.reagent_consumable_id = ps.reagent_consumable_id) AS reagent_consumable_name - FROM provide_services_or_supplies ps - WHERE ps.provide_services_or_supplies_id = #{provideServicesOrSuppliesId} - diff --git a/src/main/resources/mapper/PurchaseListMapper.xml b/src/main/resources/mapper/PurchaseListMapper.xml index a454a30..8e4b716 100644 --- a/src/main/resources/mapper/PurchaseListMapper.xml +++ b/src/main/resources/mapper/PurchaseListMapper.xml @@ -5,13 +5,15 @@ - + + + diff --git a/src/main/resources/mapper/PurchaselistDetailsMapper.xml b/src/main/resources/mapper/PurchaselistDetailsMapper.xml index fc08265..546989a 100644 --- a/src/main/resources/mapper/PurchaselistDetailsMapper.xml +++ b/src/main/resources/mapper/PurchaselistDetailsMapper.xml @@ -5,12 +5,11 @@ - + - @@ -27,8 +26,19 @@ + + diff --git a/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml b/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml index db96452..836c594 100644 --- a/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml +++ b/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml @@ -21,6 +21,17 @@ - + + + + + + + + + + + + diff --git a/src/main/resources/mapper/ReagentConsumablesMapper.xml b/src/main/resources/mapper/ReagentConsumablesMapper.xml index 9bb98ad..324e5c7 100644 --- a/src/main/resources/mapper/ReagentConsumablesMapper.xml +++ b/src/main/resources/mapper/ReagentConsumablesMapper.xml @@ -26,6 +26,7 @@ + diff --git a/src/main/resources/mapper/ReagentConsumablesSetMapper.xml b/src/main/resources/mapper/ReagentConsumablesSetMapper.xml index af1f659..95aa92f 100644 --- a/src/main/resources/mapper/ReagentConsumablesSetMapper.xml +++ b/src/main/resources/mapper/ReagentConsumablesSetMapper.xml @@ -5,7 +5,7 @@ - + @@ -16,5 +16,7 @@ + + diff --git a/src/main/resources/mapper/ReferenceMaterialMapper.xml b/src/main/resources/mapper/ReferenceMaterialMapper.xml index 6cf03c7..007462c 100644 --- a/src/main/resources/mapper/ReferenceMaterialMapper.xml +++ b/src/main/resources/mapper/ReferenceMaterialMapper.xml @@ -14,5 +14,6 @@ + diff --git a/src/main/resources/mapper/RequisitionRecordMapper.xml b/src/main/resources/mapper/RequisitionRecordMapper.xml index eac09eb..44d3718 100644 --- a/src/main/resources/mapper/RequisitionRecordMapper.xml +++ b/src/main/resources/mapper/RequisitionRecordMapper.xml @@ -35,7 +35,6 @@ FROM dlp_base.sys_user user WHERE user.user_id=rr.recipient_id ) AS recipient_name - FROM requisition_record rr diff --git a/src/main/resources/mapper/StandardMaterialApplicationMapper.xml b/src/main/resources/mapper/StandardMaterialApplicationMapper.xml index 32973b3..3fbe474 100644 --- a/src/main/resources/mapper/StandardMaterialApplicationMapper.xml +++ b/src/main/resources/mapper/StandardMaterialApplicationMapper.xml @@ -29,6 +29,7 @@ + - + @@ -16,15 +16,14 @@ - - - - - - + + + + + + - @@ -33,24 +32,28 @@ - + - + + - + + + diff --git a/src/main/resources/mapper/StandardReserveSolutionMapper.xml b/src/main/resources/mapper/StandardReserveSolutionMapper.xml index cb982ab..c951ab2 100644 --- a/src/main/resources/mapper/StandardReserveSolutionMapper.xml +++ b/src/main/resources/mapper/StandardReserveSolutionMapper.xml @@ -5,13 +5,13 @@ - + - + @@ -26,6 +26,25 @@ + + + + + + + + + diff --git a/src/main/resources/mapper/StandardSolutionCurveMapper.xml b/src/main/resources/mapper/StandardSolutionCurveMapper.xml index b04d2cd..bc33759 100644 --- a/src/main/resources/mapper/StandardSolutionCurveMapper.xml +++ b/src/main/resources/mapper/StandardSolutionCurveMapper.xml @@ -5,7 +5,7 @@ - + @@ -17,7 +17,16 @@ + + - + + + + diff --git a/src/main/resources/mapper/StorageRoomFormMapper.xml b/src/main/resources/mapper/StorageRoomFormMapper.xml index 61b78c2..669014c 100644 --- a/src/main/resources/mapper/StorageRoomFormMapper.xml +++ b/src/main/resources/mapper/StorageRoomFormMapper.xml @@ -5,10 +5,7 @@ - - - - + @@ -16,5 +13,6 @@ + diff --git a/src/main/resources/mapper/SupplierInformationMapper.xml b/src/main/resources/mapper/SupplierInformationMapper.xml index ad294ff..215b70e 100644 --- a/src/main/resources/mapper/SupplierInformationMapper.xml +++ b/src/main/resources/mapper/SupplierInformationMapper.xml @@ -5,7 +5,7 @@ - + diff --git a/src/main/resources/mapper/WarehousingBatchListMapper.xml b/src/main/resources/mapper/WarehousingBatchListMapper.xml index d400b50..de68303 100644 --- a/src/main/resources/mapper/WarehousingBatchListMapper.xml +++ b/src/main/resources/mapper/WarehousingBatchListMapper.xml @@ -5,7 +5,7 @@ - + @@ -19,31 +19,23 @@ - + + - diff --git a/src/main/resources/mapper/WarehousingContentMapper.xml b/src/main/resources/mapper/WarehousingContentMapper.xml index bd59904..3fefd1b 100644 --- a/src/main/resources/mapper/WarehousingContentMapper.xml +++ b/src/main/resources/mapper/WarehousingContentMapper.xml @@ -5,7 +5,7 @@ - + @@ -16,17 +16,22 @@ + + + + + diff --git a/src/main/resources/mapper/WarehousingRecordFormMapper.xml b/src/main/resources/mapper/WarehousingRecordFormMapper.xml index 0bc84af..3049985 100644 --- a/src/main/resources/mapper/WarehousingRecordFormMapper.xml +++ b/src/main/resources/mapper/WarehousingRecordFormMapper.xml @@ -5,7 +5,7 @@ - + @@ -16,40 +16,15 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +