From 2d22c458d77f84e033a6d0ce5a4de62ca51c90eb Mon Sep 17 00:00:00 2001 From: yanghh <1344638791@qq.com> Date: Sun, 18 Jun 2023 18:44:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=EF=BC=8C=E6=94=AF=E6=8C=81=E6=89=B9=E9=87=8F=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 - .../AcceptanceRecordFormController.java | 88 ++++---- .../ApplicationForUseController.java | 6 +- .../reagent/entity/AcceptanceRecordForm.java | 3 + .../reagent/entity/ApplicationForUse.java | 4 +- .../reagent/entity/WarehousingContent.java | 10 + .../mapper/AcceptanceRecordFormMapper.java | 2 +- .../service/AcceptanceRecordFormService.java | 11 +- .../impl/AcceptanceRecordFormServiceImpl.java | 205 +++++++++++------- .../impl/ApplicationForUseServiceImpl.java | 4 +- .../impl/CatalogueDetailsServiceImpl.java | 12 +- .../impl/CentralizedRequestServiceImpl.java | 1 - .../service/impl/PurchaseListServiceImpl.java | 15 ++ .../impl/ReviewAndApproveServiceImpl.java | 120 +++++----- .../StandardReserveSolutionServiceImpl.java | 8 +- .../StandardSolutionCurveServiceImpl.java | 2 +- .../WarehousingRecordFormServiceImpl.java | 67 ++++-- .../reagent/vo/WarehousingContentVO.java | 2 + src/main/resources/bootstrap.yml | 18 +- .../mapper/AcceptanceRecordFormMapper.xml | 2 + .../mapper/ApplicationForUseMapper.xml | 2 +- .../mapper/WarehousingContentMapper.xml | 3 + 22 files changed, 343 insertions(+), 250 deletions(-) diff --git a/pom.xml b/pom.xml index 0e48b50..09b05d9 100644 --- a/pom.xml +++ b/pom.xml @@ -163,14 +163,6 @@ spring-test - - org.springframework - spring-jms - - - org.apache.activemq - activemq-client - digital.laboratory.platform 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 3653546..6552054 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java @@ -11,6 +11,7 @@ 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.common.oss.service.OssFile; +import digital.laboratory.platform.reagent.dto.AcceptanceRecordFormAuditDTO; import digital.laboratory.platform.reagent.dto.AcceptanceRecordFormDTO; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.entity.*; @@ -53,6 +54,8 @@ import java.util.List; @Api(value = "acceptance_record_form", tags = "(验收记录表)管理") public class AcceptanceRecordFormController { + private final AcceptanceSignForService acceptanceSignForService; + private final AcceptanceRecordFormService acceptanceRecordFormService; private final ReagentConsumablesService reagentConsumablesService; @@ -107,48 +110,23 @@ public class AcceptanceRecordFormController { @ApiOperation(value = "分页查询验收任务", notes = "分页查询验收任务") @GetMapping("/page") @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_page')") - public R> getAcceptanceRecordFormPage(Page page, Integer status, String reagentConsumableName, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) { + public R> getAcceptanceRecordFormPage(Page page, Integer status, String reagentConsumableName, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest, String acceptanceSignForId) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); IPage acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVOPage(page, Wrappers.query() - .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) - .ge(startTime != null, "create_time", startTime) - .le(endTime != null, "create_time", endTime) - .ne("status", 4) - .eq(status != null, "status", status) - .orderByDesc("create_time") - ); + .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) + .ge(startTime != null, "create_time", startTime) + .le(endTime != null, "create_time", endTime) + .eq(status != null, "status", status) + .orderByDesc("create_time") + , acceptanceSignForId); return R.ok(acceptanceRecordFormVOPage); // return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm))); } - /** - * 分页查询 - * - * @param page 分页对象 - * @param reagentConsumableName (验收记录表) - * @return - */ - @ApiOperation(value = "分页查询验收记录", notes = "分页查询验收记录") - @GetMapping("/recordPage") - @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_recordPage')") - public R> getAcceptanceRecordFormRecordPage(Page page, String rid, String reagentConsumableName, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVOPage(page, Wrappers.query() - .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) - .eq("status", 4) - .ge(startTime != null, "create_time", startTime) - .le(endTime != null, "create_time", endTime) - ); - return R.ok(acceptanceRecordFormVOPage); -// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm))); - } - /** * 录入(验收记录表) @@ -195,63 +173,60 @@ public class AcceptanceRecordFormController { /** * 一级审核(验收记录表) * - * @param auditAndApproveDTO (验收记录表) + * @param acceptanceRecordFormAuditDTO (验收记录表) * @return R */ @ApiOperation(value = "一级审核(验收记录表)", notes = "一级审核(验收记录表)") @SysLog("一级审核(验收记录表)") @PutMapping("/primary") @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_primary')") - public R primaryAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { + public R primaryAudit(@RequestBody AcceptanceRecordFormAuditDTO acceptanceRecordFormAuditDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.primaryAudit(auditAndApproveDTO, dlpUser); - if (acceptanceRecordForm != null) { - return R.ok(acceptanceRecordForm, "审核成功"); + if (acceptanceRecordFormService.primaryAudit(acceptanceRecordFormAuditDTO, dlpUser)) { + return R.ok("审核成功"); } else return R.failed("审核失败"); } /** * 二级审核(验收记录表) * - * @param auditAndApproveDTO (验收记录表) + * @param acceptanceRecordFormAuditDTO (验收记录表) * @return R */ @ApiOperation(value = "二级审核(验收记录表)", notes = "二级审核(验收记录表)") @SysLog("二级审核(验收记录表)") @PutMapping("/secondary") @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_secondary')") - public R secondaryAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { + public R secondaryAudit(@RequestBody AcceptanceRecordFormAuditDTO acceptanceRecordFormAuditDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.secondaryAudit(auditAndApproveDTO, dlpUser); - if (acceptanceRecordForm != null) { - return R.ok(acceptanceRecordForm, "审核成功"); + if (acceptanceRecordFormService.secondaryAudit(acceptanceRecordFormAuditDTO, dlpUser)) { + return R.ok("审核成功"); } else return R.failed("审核失败"); } /** * 三级审核(验收记录表) * - * @param auditAndApproveDTO (验收记录表) + * @param acceptanceRecordFormAuditDTO (验收记录表) * @return R */ @ApiOperation(value = "三级审核(验收记录表)", notes = "三级审核(验收记录表)") @SysLog("三级审核(验收记录表)") @PutMapping("/three_level") @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_threeLevel')") - public R threeLevelAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) { + public R threeLevelAudit(@RequestBody AcceptanceRecordFormAuditDTO acceptanceRecordFormAuditDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.threeLevelAudit(auditAndApproveDTO, dlpUser); - if (acceptanceRecordForm != null) { - return R.ok(acceptanceRecordForm, "审核成功"); + if (acceptanceRecordFormService.threeLevelAudit(acceptanceRecordFormAuditDTO, dlpUser)) { + return R.ok("审核成功"); } else return R.failed("审核失败"); } @@ -298,4 +273,23 @@ public class AcceptanceRecordFormController { } } + /** + * 分页查询 + * + * @param page 分页对象 + * @return + */ + @ApiOperation(value = "分页查询验收集合主表", notes = "分页查询验收集合主表") + @GetMapping("/acceptanceSignFor/Page") + @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_recordPage')") + public R> getacceptanceSignForPage(Page page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, String acceptanceSignForId, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + IPage page1 = acceptanceSignForService.page(page); + + return R.ok(page1); +// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm))); + } + } 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 47b2664..1a8917a 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ApplicationForUseController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ApplicationForUseController.java @@ -241,9 +241,9 @@ public class ApplicationForUseController { * @param id (批量提交试剂耗材领用申请表) * @return R */ - @ApiOperation(value = "通过实验模板ID查询领用情况", notes = "通过实验模板ID查询领用情况") - @SysLog("通过实验模板ID查询领用情况") - @GetMapping("/get/template") + @ApiOperation(value = "通过实验ID查询领用情况", notes = "通过实验ID查询领用情况") + @SysLog("通过实验ID查询领用情况") + @GetMapping("/get/experiment") @PreAuthorize("@pms.hasPermission('reagent_application_for_use_get')") public R> getReagentConsumablesSets(String id, HttpServletRequest theHttpServletRequest) { 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 fafafe9..bbbffa3 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java @@ -218,5 +218,8 @@ public class AcceptanceRecordForm extends BaseEntity { @ApiModelProperty(value = "(验收人名称)") private String userName; + @ApiModelProperty(value = "(验收中间表ID)") + private String acceptanceSignForId; + } 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 ce3fd90..91fa2d9 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ApplicationForUse.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ApplicationForUse.java @@ -74,8 +74,8 @@ public class ApplicationForUse extends BaseEntity { /** * 实验模板ID */ - @ApiModelProperty(value="实验模板ID") - private String templateId; + @ApiModelProperty(value="实验ID") + private String experimentId; } 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 2eb2954..e4e5788 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java @@ -83,5 +83,15 @@ public class WarehousingContent extends BaseEntity { @ApiModelProperty(value = "预警值") private Integer warningValue; + + @ApiModelProperty(value = "上次存放位置") + private String lastStorageLocation; + + @ApiModelProperty(value="格子ID") + private String latticeId; + + @ApiModelProperty(value="柜子ID") + private String boxId; + } 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 3ba305e..ef23b8c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java @@ -18,7 +18,7 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface AcceptanceRecordFormMapper extends BaseMapper { - IPage getAcceptanceRecordFormVOPage(IPage page, @Param(Constants.WRAPPER)QueryWrapper qw); + IPage getAcceptanceRecordFormVOPage(IPage page, @Param(Constants.WRAPPER)QueryWrapper qw,String acceptanceSignForId); AcceptanceRecordFormVO getAcceptanceRecordFormVO(String acceptanceRecordFormId); } 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 e96ea13..326c331 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/AcceptanceRecordFormService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/AcceptanceRecordFormService.java @@ -4,6 +4,7 @@ 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.AcceptanceRecordFormAuditDTO; import digital.laboratory.platform.reagent.dto.AcceptanceRecordFormDTO; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm; @@ -27,19 +28,19 @@ public interface AcceptanceRecordFormService extends IService getAcceptanceRecordFormVOPage(IPage page, QueryWrapperqw); + IPage getAcceptanceRecordFormVOPage(IPage page, QueryWrapperqw,String acceptanceSignForId); IPage getAcceptanceRecordFormVORecordPage(IPage page); AcceptanceRecordFormVO getAcceptanceRecordFormVO(String acceptanceRecordFormId); - AcceptanceRecordForm primaryAudit(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser); + boolean primaryAudit(AcceptanceRecordFormAuditDTO acceptanceRecordFormAuditDTO, DLPUser dlpUser); - AcceptanceRecordForm secondaryAudit(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser); + boolean secondaryAudit(AcceptanceRecordFormAuditDTO acceptanceRecordFormAuditDTO, DLPUser dlpUser); - AcceptanceRecordForm threeLevelAudit(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser); + boolean threeLevelAudit(AcceptanceRecordFormAuditDTO acceptanceRecordFormAuditDTO, DLPUser dlpUser); void acceptanceRecordFormTablePDF(AcceptanceRecordFormVO acceptanceRecordFormVO, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception; } 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 e71b2c4..9199cb5 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 @@ -6,6 +6,7 @@ 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.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.deepoove.poi.XWPFTemplate; @@ -15,16 +16,18 @@ import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy; import digital.laboratory.platform.common.feign.RemoteWord2PDFService; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.common.oss.service.OssFile; +import digital.laboratory.platform.reagent.dto.AcceptanceRecordFormAuditDTO; +import digital.laboratory.platform.reagent.entity.WarehousingRecordForm; +import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.utils.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.AcceptanceRecordFormFullVO; import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO; +import digital.laboratory.platform.reagent.vo.WarehousingContentVO; import feign.Response; import org.apache.commons.io.output.ByteArrayOutputStream; import org.springframework.beans.BeanUtils; @@ -57,15 +60,21 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl acceptanceRecordFormDTOList,DLPUser dlpUser){ + public void culkCommit(List acceptanceRecordFormDTOList, DLPUser dlpUser) { for (AcceptanceRecordFormDTO acceptanceRecordFormDTO : acceptanceRecordFormDTOList) { @@ -80,7 +89,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl getAcceptanceRecordFormVOPage(IPage page, QueryWrapperqw) { + public IPage getAcceptanceRecordFormVOPage(IPage page, QueryWrapper qw,String acceptanceSignForId) { - IPage acceptanceRecordFormVOPage = baseMapper.getAcceptanceRecordFormVOPage(page,qw); + IPage acceptanceRecordFormVOPage = baseMapper.getAcceptanceRecordFormVOPage(page, qw,acceptanceSignForId); List records = acceptanceRecordFormVOPage.getRecords(); @@ -236,74 +249,101 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl uuId = acceptanceRecordFormAuditDTO.getUuId(); - if (byId.getStatus() != 1) { - throw new RuntimeException(String.format("当前状态不能审核")); - } - byId.setPrimaryAuditorId(dlpUser.getId()); - byId.setAuditOpinionOfPrimary(auditAndApproveDTO.getAuditOpinion()); - byId.setAuditTimeOfPrimary(LocalDateTime.now()); - byId.setAuditResultOfPrimary(auditAndApproveDTO.getAuditResult()); + List acceptanceRecordForms = new ArrayList<>(); - if (auditAndApproveDTO.getAuditResult() == true) { - byId.setStatus(2); - } else byId.setStatus(-2); + for (String s : uuId) { + AcceptanceRecordForm byId = this.getById(s); - if (this.updateById(byId)) { - return byId; + if (byId.getStatus() != 1) { + throw new RuntimeException(String.format("当前状态不能审核")); + } + byId.setPrimaryAuditorId(dlpUser.getId()); + byId.setAuditOpinionOfPrimary(acceptanceRecordFormAuditDTO.getAuditOpinion()); + byId.setAuditTimeOfPrimary(LocalDateTime.now()); + byId.setAuditResultOfPrimary(acceptanceRecordFormAuditDTO.getAuditResult()); + + if (acceptanceRecordFormAuditDTO.getAuditResult() == true) { + byId.setStatus(2); + } else byId.setStatus(-2); + + acceptanceRecordForms.add(byId); + + } + + if (this.updateBatchById(acceptanceRecordForms)) { + return true; } else throw new RuntimeException(String.format("审核失败")); } + @Override//二级审核 - public AcceptanceRecordForm secondaryAudit(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) { + @Transactional + public boolean secondaryAudit(AcceptanceRecordFormAuditDTO acceptanceRecordFormAuditDTO, DLPUser dlpUser) { - AcceptanceRecordForm byId = this.getById(auditAndApproveDTO.getUuId()); + List uuId = acceptanceRecordFormAuditDTO.getUuId(); + List acceptanceRecordForms = new ArrayList<>(); - if (byId.getStatus() != 2) { - throw new RuntimeException(String.format("当前状态不能审核")); - } - byId.setSecondaryAuditorId(dlpUser.getId()); - byId.setAuditOpinionOfSecondary(auditAndApproveDTO.getAuditOpinion()); - byId.setAuditTimeOfSecondary(LocalDateTime.now()); - byId.setAuditResultOfSecondary(auditAndApproveDTO.getAuditResult()); - if (auditAndApproveDTO.getAuditResult() == true) { - byId.setStatus(3); - } else byId.setStatus(-3); + for (String s : uuId) { - if (this.updateById(byId)) { - return byId; + AcceptanceRecordForm byId = this.getById(s); + + if (byId.getStatus() != 2) { + throw new RuntimeException(String.format("当前状态不能审核")); + } + byId.setSecondaryAuditorId(dlpUser.getId()); + byId.setAuditOpinionOfSecondary(acceptanceRecordFormAuditDTO.getAuditOpinion()); + byId.setAuditTimeOfSecondary(LocalDateTime.now()); + byId.setAuditResultOfSecondary(acceptanceRecordFormAuditDTO.getAuditResult()); + + if (acceptanceRecordFormAuditDTO.getAuditResult() == true) { + byId.setStatus(3); + } else byId.setStatus(-3); + acceptanceRecordForms.add(byId); + } + if (this.updateBatchById(acceptanceRecordForms)) { + return true; } else throw new RuntimeException(String.format("审核失败")); } - @Override//三级审核 - public AcceptanceRecordForm threeLevelAudit(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) { - AcceptanceRecordForm byId = this.getById(auditAndApproveDTO.getUuId()); + @Override//三级审核 + @Transactional + public boolean threeLevelAudit(AcceptanceRecordFormAuditDTO acceptanceRecordFormAuditDTO, DLPUser dlpUser) { - if (byId.getStatus() != 3) { - throw new RuntimeException(String.format("当前状态不能审核")); - } - byId.setThreeLevelAuditorId(dlpUser.getId()); - byId.setAuditOpinionOfThreeLevel(auditAndApproveDTO.getAuditOpinion()); - byId.setAuditTimeOfThreeLevel(LocalDateTime.now()); - byId.setAuditResultOfThreeLevel(auditAndApproveDTO.getAuditResult()); + List uuId = acceptanceRecordFormAuditDTO.getUuId(); + List acceptanceRecordForms = new ArrayList<>(); - if (auditAndApproveDTO.getAuditResult() == true) { + for (String s : uuId) { - if (byId.getNonconformingItem() != null) { + AcceptanceRecordForm byId = this.getById(s); - blacklistService.addListById2(byId.getReagentConsumableId(), byId.getSupplierId()); + if (byId.getStatus() != 3) { + throw new RuntimeException(String.format("当前状态不能审核")); } - byId.setStatus(6); - } else byId.setStatus(-4); + byId.setThreeLevelAuditorId(dlpUser.getId()); + byId.setAuditOpinionOfThreeLevel(acceptanceRecordFormAuditDTO.getAuditOpinion()); + byId.setAuditTimeOfThreeLevel(LocalDateTime.now()); + byId.setAuditResultOfThreeLevel(acceptanceRecordFormAuditDTO.getAuditResult()); - if (this.updateById(byId)) { - return byId; + if (acceptanceRecordFormAuditDTO.getAuditResult() == true) { + + if (byId.getNonconformingItem() != null) { + + blacklistService.addListById2(byId.getReagentConsumableId(), byId.getSupplierId()); + } + byId.setStatus(6); + } else byId.setStatus(-4); + acceptanceRecordForms.add(byId); + } + if (this.updateBatchById(acceptanceRecordForms)) { + return true; } else throw new RuntimeException(String.format("审核失败")); } @@ -376,31 +416,31 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl() {{ put("theSameBrandAndModelPrint", acceptanceRecordFormVO.getTheSameBrandAndModelPrint()); put("reagentConsumableName", acceptanceRecordFormVO.getReagentConsumableName()); - put("dateOfAcceptance", LocalDateTimeUtil.format(acceptanceRecordFormVO.getDateOfAcceptance(),"yyyy年MM月dd日")); - put("supplierName",acceptanceRecordFormVO.getSupplierName()); - put("consistentQuantityPrint",acceptanceRecordFormVO.getConsistentQuantityPrint()); - put("packingInGoodConditionPrint",acceptanceRecordFormVO.getPackingInGoodConditionPrint()); - put("validityPeriodPrint",acceptanceRecordFormVO.getValidityPeriodPrint()); - put("deliveryCyclePrint",acceptanceRecordFormVO.getDeliveryCyclePrint()); - put("nonconformingItem",acceptanceRecordFormVO.getNonconformingItem()); - put("followUpTreatment",acceptanceRecordFormVO.getFollowUpTreatment()); - put("acceptanceConclusion",acceptanceRecordFormVO.getAcceptanceConclusion()); - put("secondaryAuditorName",acceptanceRecordFormVO.getSecondaryAuditorName()); - put("auditOpinionOfSecondary",acceptanceRecordFormVO.getAuditOpinionOfSecondary()); - put("auditTimeOfSecondary",LocalDateTimeUtil.format(acceptanceRecordFormVO.getAuditTimeOfSecondary(),"yyyy年MM月dd日")); - put("threeLevelAuditorName",acceptanceRecordFormVO.getThreeLevelAuditorName()); - put("auditOpinionOfThreeLevel",acceptanceRecordFormVO.getAuditOpinionOfThreeLevel()); - put("auditTimeOfThreeLevel",LocalDateTimeUtil.format(acceptanceRecordFormVO.getAuditTimeOfThreeLevel(),"yyyy年MM月dd日")); - put("id",acceptanceRecordFormVO.getId()); - put("size",1); - put("bam_remarks",acceptanceRecordFormVO.getBam_remarks()); - put("cq_remarks",acceptanceRecordFormVO.getCq_remarks()); - put("pgc_remarks",acceptanceRecordFormVO.getPgc_remarks()); - put("vp_remarks",acceptanceRecordFormVO.getVp_remarks()); - put("dc_remarks",acceptanceRecordFormVO.getDc_remarks()); - put("primaryAuditorName",acceptanceRecordFormVO.getPrimaryAuditorName()); - put("auditOpinionOfPrimary",acceptanceRecordFormVO.getAuditOpinionOfPrimary()); - put("auditTimeOfPrimary",LocalDateTimeUtil.format(acceptanceRecordFormVO.getAuditTimeOfPrimary(),"yyyy年MM月dd日")); + put("dateOfAcceptance", LocalDateTimeUtil.format(acceptanceRecordFormVO.getDateOfAcceptance(), "yyyy年MM月dd日")); + put("supplierName", acceptanceRecordFormVO.getSupplierName()); + put("consistentQuantityPrint", acceptanceRecordFormVO.getConsistentQuantityPrint()); + put("packingInGoodConditionPrint", acceptanceRecordFormVO.getPackingInGoodConditionPrint()); + put("validityPeriodPrint", acceptanceRecordFormVO.getValidityPeriodPrint()); + put("deliveryCyclePrint", acceptanceRecordFormVO.getDeliveryCyclePrint()); + put("nonconformingItem", acceptanceRecordFormVO.getNonconformingItem()); + put("followUpTreatment", acceptanceRecordFormVO.getFollowUpTreatment()); + put("acceptanceConclusion", acceptanceRecordFormVO.getAcceptanceConclusion()); + put("secondaryAuditorName", acceptanceRecordFormVO.getSecondaryAuditorName()); + put("auditOpinionOfSecondary", acceptanceRecordFormVO.getAuditOpinionOfSecondary()); + put("auditTimeOfSecondary", LocalDateTimeUtil.format(acceptanceRecordFormVO.getAuditTimeOfSecondary(), "yyyy年MM月dd日")); + put("threeLevelAuditorName", acceptanceRecordFormVO.getThreeLevelAuditorName()); + put("auditOpinionOfThreeLevel", acceptanceRecordFormVO.getAuditOpinionOfThreeLevel()); + put("auditTimeOfThreeLevel", LocalDateTimeUtil.format(acceptanceRecordFormVO.getAuditTimeOfThreeLevel(), "yyyy年MM月dd日")); + put("id", acceptanceRecordFormVO.getId()); + put("size", 1); + put("bam_remarks", acceptanceRecordFormVO.getBam_remarks()); + put("cq_remarks", acceptanceRecordFormVO.getCq_remarks()); + put("pgc_remarks", acceptanceRecordFormVO.getPgc_remarks()); + put("vp_remarks", acceptanceRecordFormVO.getVp_remarks()); + put("dc_remarks", acceptanceRecordFormVO.getDc_remarks()); + put("primaryAuditorName", acceptanceRecordFormVO.getPrimaryAuditorName()); + put("auditOpinionOfPrimary", acceptanceRecordFormVO.getAuditOpinionOfPrimary()); + put("auditTimeOfPrimary", LocalDateTimeUtil.format(acceptanceRecordFormVO.getAuditTimeOfPrimary(), "yyyy年MM月dd日")); }} ); bis.close(); @@ -434,5 +474,4 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl reagentConsumablesSets = new ArrayList<>(); @@ -299,7 +299,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl getReagentConsumablesSets(String id) { - List applicationForUseList = this.list(Wrappers.query().eq("template_id", id)); + List applicationForUseList = this.list(Wrappers.query().eq("experiment_id", id)); List reagentConsumablesSetList = new ArrayList<>(); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/CatalogueDetailsServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/CatalogueDetailsServiceImpl.java index 166503c..217c799 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/CatalogueDetailsServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/CatalogueDetailsServiceImpl.java @@ -10,6 +10,8 @@ import digital.laboratory.platform.reagent.vo.CatalogueDetailsVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Collections; +import java.util.Comparator; import java.util.List; /** @@ -27,8 +29,16 @@ public class CatalogueDetailsServiceImpl extends ServiceImpl catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); - List list = this.list(Wrappers.query().eq("purchase_catalogue_id",purchaseCatalogueId).orderByDesc("create_time")); + List list = this.list(Wrappers.query().eq("purchase_catalogue_id",purchaseCatalogueId).orderByDesc("purchase_catalogue_number")); + Collections.sort(list, new Comparator() { + + + @Override + public int compare(CatalogueDetails o1, CatalogueDetails o2) { + return Integer.valueOf(o1.getPurchaseCatalogueNumber().substring(5)) - Integer.valueOf(o2.getPurchaseCatalogueNumber().substring(5)); + } + }); return list; } 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 b395401..fe634ce 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 @@ -309,7 +309,6 @@ public class CentralizedRequestServiceImpl extends ServiceImplquery() .eq("reagent_consumable_id", byId.getReagentConsumableId())); + List batchDetailsList = batchDetailsService.list(Wrappers.query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId()) + .orderByDesc("create_time")); + + WarehousingContent warehousingContent = new WarehousingContent(); + + if (batchDetailsList.size() != 0 && batchDetailsList != null) { + + warehousingContent.setLastStorageLocation(batchDetailsList.get(0).getLocation()); + warehousingContent.setBoxId(batchDetailsList.get(0).getBoxId()); + warehousingContent.setLatticeId(batchDetailsList.get(0).getLatticeId()); + } //完善入库内容信息 warehousingContent.setId(IdWorker.get32UUID().toUpperCase()); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReviewAndApproveServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReviewAndApproveServiceImpl.java index 32fb3d8..c036d3f 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReviewAndApproveServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReviewAndApproveServiceImpl.java @@ -81,11 +81,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl centralizedRequestVOList = new ArrayList<>(); - if (permissions.contains("reagent_centralized_request_audit")){ + if (permissions.contains("reagent_centralized_request_audit")) { LambdaQueryWrapper centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>(); - centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,1); + centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus, 1); List list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper); @@ -257,12 +257,12 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,1); + acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus, 1); List list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper); @@ -279,11 +279,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,2); + acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus, 2); List list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper); @@ -300,11 +300,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,3); + acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus, 3); List list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper); @@ -320,11 +320,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>(); - complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus,1); + complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus, 1); List list = complianceCheckService.list(complianceCheckLambdaQueryWrapper); @@ -340,11 +340,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>(); - complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus,2); + complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus, 2); List list = complianceCheckService.list(complianceCheckLambdaQueryWrapper); @@ -359,11 +359,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl checkScheduleLambdaQueryWrapper = new LambdaQueryWrapper<>(); - checkScheduleLambdaQueryWrapper.eq(CheckSchedule::getStatus,1); + checkScheduleLambdaQueryWrapper.eq(CheckSchedule::getStatus, 1); List list = checkScheduleService.list(checkScheduleLambdaQueryWrapper); @@ -378,11 +378,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl periodVerificationImplementationLambdaQueryWrapper = new LambdaQueryWrapper<>(); - periodVerificationImplementationLambdaQueryWrapper.eq(PeriodVerificationImplementation::getCommitStatus,1); + periodVerificationImplementationLambdaQueryWrapper.eq(PeriodVerificationImplementation::getCommitStatus, 1); List list = periodVerificationImplementationService.list(periodVerificationImplementationLambdaQueryWrapper); @@ -398,11 +398,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,1); + standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus, 1); List list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper); @@ -417,11 +417,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,4); + standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus, 4); List list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper); @@ -436,11 +436,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus,2); + evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus, 2); List list = evaluationFormService.list(evaluationFormLambdaQueryWrapper); @@ -454,11 +454,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus,3); + evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus, 3); List list = evaluationFormService.list(evaluationFormLambdaQueryWrapper); @@ -473,11 +473,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl instructionBookLambdaQueryWrapper = new LambdaQueryWrapper<>(); - instructionBookLambdaQueryWrapper.eq(InstructionBook::getCommitStatus,1); + instructionBookLambdaQueryWrapper.eq(InstructionBook::getCommitStatus, 1); List list = instructionBookService.list(instructionBookLambdaQueryWrapper); @@ -537,11 +537,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl centralizedRequestVOList = new ArrayList<>(); - if (permissions.contains("reagent_centralized_request_audit")){ + if (permissions.contains("reagent_centralized_request_audit")) { LambdaQueryWrapper centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>(); - centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,2).or().eq(CentralizedRequest::getStatus, -2); + centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getAuditId, dlpUser.getId()); List list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper); @@ -559,7 +559,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>(); - decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getPrimaryAuditorId,dlpUser.getId()); + decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getPrimaryAuditorId, dlpUser.getId()); List decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper); @@ -599,7 +599,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>(); - decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getThreeLevelAuditId,dlpUser.getId()); + decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getThreeLevelAuditId, dlpUser.getId()); List decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper); @@ -618,7 +618,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>(); - decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getApproverId,dlpUser.getId()); + decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getApproverId, dlpUser.getId()); List decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper); @@ -637,7 +637,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>(); - purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getAuditorId,dlpUser.getId()); + purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getAuditorId, dlpUser.getId()); List list = purchaseCatalogueService.list(purchaseCatalogueLambdaQueryWrapper); @@ -657,7 +657,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>(); - purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getAuditorId,dlpUser.getId()); + purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getAuditorId, dlpUser.getId()); List list = purchaseCatalogueService.list(purchaseCatalogueLambdaQueryWrapper); @@ -678,7 +678,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>(); - purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getPrimaryAuditorId,dlpUser.getId()); + purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getPrimaryAuditorId, dlpUser.getId()); List list = purchasingPlanService.list(purchasingPlanLambdaQueryWrapper); @@ -697,7 +697,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>(); - purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getApproverId,dlpUser.getId()); + purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getApproverId, dlpUser.getId()); List list = purchasingPlanService.list(purchasingPlanLambdaQueryWrapper); @@ -713,11 +713,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getPrimaryAuditorId,dlpUser.getId()); + acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getPrimaryAuditorId, dlpUser.getId()); List list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper); @@ -734,11 +734,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getSecondaryAuditorId,dlpUser.getId()); + acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getSecondaryAuditorId, dlpUser.getId()); List list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper); @@ -755,11 +755,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getThreeLevelAuditorId,dlpUser.getId()); + acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getThreeLevelAuditorId, dlpUser.getId()); List list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper); @@ -775,11 +775,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>(); - complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getPrimaryAuditorId,dlpUser.getId()); + complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getPrimaryAuditorId, dlpUser.getId()); List list = complianceCheckService.list(complianceCheckLambdaQueryWrapper); @@ -795,11 +795,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>(); - complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getSecondaryAuditorId,dlpUser.getId()); + complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getSecondaryAuditorId, dlpUser.getId()); List list = complianceCheckService.list(complianceCheckLambdaQueryWrapper); @@ -814,11 +814,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl checkScheduleLambdaQueryWrapper = new LambdaQueryWrapper<>(); - checkScheduleLambdaQueryWrapper.eq(CheckSchedule::getTechnicalDirectorId,dlpUser.getId()); + checkScheduleLambdaQueryWrapper.eq(CheckSchedule::getTechnicalDirectorId, dlpUser.getId()); List list = checkScheduleService.list(checkScheduleLambdaQueryWrapper); @@ -833,11 +833,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl periodVerificationImplementationLambdaQueryWrapper = new LambdaQueryWrapper<>(); - periodVerificationImplementationLambdaQueryWrapper.eq(PeriodVerificationImplementation::getTechnicalDirectorId,dlpUser.getId()); + periodVerificationImplementationLambdaQueryWrapper.eq(PeriodVerificationImplementation::getTechnicalDirectorId, dlpUser.getId()); List list = periodVerificationImplementationService.list(periodVerificationImplementationLambdaQueryWrapper); @@ -854,11 +854,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getSecondaryAuditorId,dlpUser.getId()); + standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getSecondaryAuditorId, dlpUser.getId()); List list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper); ArrayList standardMaterialApprovalFormVOS1 = new ArrayList<>(); @@ -872,11 +872,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getApproverId,dlpUser.getId()); + standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getApproverId, dlpUser.getId()); List list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper); @@ -891,11 +891,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSecondaryUserId,dlpUser.getId()); + evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSecondaryUserId, dlpUser.getId()); List list = evaluationFormService.list(evaluationFormLambdaQueryWrapper); @@ -910,11 +910,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getThreeLevelUserId,dlpUser.getId()); + evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getThreeLevelUserId, dlpUser.getId()); List list = evaluationFormService.list(evaluationFormLambdaQueryWrapper); @@ -929,11 +929,11 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl instructionBookLambdaQueryWrapper = new LambdaQueryWrapper<>(); - instructionBookLambdaQueryWrapper.eq(InstructionBook::getTechnicalDirectorId,dlpUser.getId()); + instructionBookLambdaQueryWrapper.eq(InstructionBook::getTechnicalDirectorId, dlpUser.getId()); List list = instructionBookService.list(instructionBookLambdaQueryWrapper); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardReserveSolutionServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardReserveSolutionServiceImpl.java index 4a4baaf..d5ef60b 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardReserveSolutionServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardReserveSolutionServiceImpl.java @@ -167,7 +167,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl list = referenceMaterialService.list(Wrappers.query() .likeRight("number", prefix) @@ -191,7 +191,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl list = referenceMaterialService.list(Wrappers.query() .likeRight("number", prefix) @@ -258,7 +258,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl byId.getTotalQuantity()) { throw new RuntimeException(String.format("入库数量不能大于采购数量")); } - warehousingContentService.updateById(byId); - ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.query().eq("reagent_consumable_id", byId.getReagentConsumableId())); //录入仓库批次信息,若仓库不存在该物品,则新增该物品的库存信息 @@ -179,6 +190,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl list = referenceMaterialService.list(Wrappers.query() .likeRight("number", prefix) @@ -278,7 +293,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); @@ -311,13 +325,13 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl batchDetailsList = batchDetailsService.list(Wrappers.query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId()) .eq("supplier_id", byId.getSupplierId()) - .like( "batch",years)); + .like("batch", years)); if (batchDetailsList.size() == 0) { batchDetails.setBatch(year + "-" + 1); } else { Integer x = batchDetailsList.size() + 1; - batchDetails.setBatch(year + "-" +x ); + batchDetails.setBatch(year + "-" + x); } if (one.getCategory().equals("试剂") | one.getCategory().equals("耗材")) { batchDetails.setLocation(warehousingRecordFormDTO.getLocation()); @@ -331,6 +345,9 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl list = referenceMaterialService.list(Wrappers.query() .likeRight("number", prefix) @@ -379,14 +396,15 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl warehousingContentLambdaQueryWrapper = new LambdaQueryWrapper<>(); - WarehousingContent byId1 = warehousingContentService.getById(warehousingRecordFormDTO.getWarehousingContentId()); - - String warehousingRecordFormId = byId1.getWarehousingRecordFormId(); + String warehousingRecordFormId = byId.getWarehousingRecordFormId(); warehousingContentLambdaQueryWrapper.eq(WarehousingContent::getWarehousingRecordFormId, warehousingRecordFormId); @@ -405,9 +423,24 @@ public class WarehousingRecordFormServiceImpl extends ServiceImplquery().eq("warehousing_record_form_id", warehousingRecordFormId)); + + if (acceptanceSignForServiceOne == null) { + + AcceptanceSignFor acceptanceSignFor = new AcceptanceSignFor(); + + acceptanceSignFor.setWarehousingRecordFormId(warehousingRecordFormId); + acceptanceSignFor.setId(IdWorker.get32UUID().toUpperCase()); + acceptanceSignFor.setQuantity(list.size()); + acceptanceSignForService.save(acceptanceSignFor); + AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.addForm(warehousingContent.getReagentConsumableId(), warehousingContent.getSupplierId(), acceptanceSignFor.getId()); + warehousingContent.setAcceptanceRecordFormId(acceptanceRecordForm.getId()); + + } else { + AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.addForm(warehousingContent.getReagentConsumableId(), warehousingContent.getSupplierId(), acceptanceSignForServiceOne.getId()); + warehousingContent.setAcceptanceRecordFormId(acceptanceRecordForm.getId()); + } - warehousingContent.setAcceptanceRecordFormId(acceptanceRecordForm.getId()); warehousingContentService.updateById(warehousingContent); } @@ -501,11 +534,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl decentralizeDetailsVOList = requestById.getDecentralizeDetailsVOList(); - - } - - for (WarehousingContent warehousingContent : warehousingContentList) { PurchaseListDetails purchaseListDetails = purchaseListDetailsService.getById(warehousingContent.getPurchaseListDetailsId()); @@ -527,7 +556,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl +