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 ce4c89f..c3b36b9 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java @@ -84,18 +84,19 @@ public class AcceptanceRecordFormController { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); //通过标准物质ID查询该标准物质类的验收记录 - if (rid != null) { - //只能从标准物质ID——》逐级查询出验收记录ID - AcceptanceRecordFormVO acceptanceRecordFormVO = - acceptanceRecordFormService.getAcceptanceRecordFormVO - (warehousingContentService.getById - (warehousingBatchListService.getById - (batchDetailsService.getById - (referenceMaterialService.getById(rid)).getWarehousingBatchListId()).getWarehousingContentId()).getAcceptanceRecordFormId()); - if (acceptanceRecordFormVO.getStatus() == 6) { - return R.ok(acceptanceRecordFormVO); - } else return R.failed(null); - + if (StrUtil.isNotBlank(rid)) { + ReferenceMaterial referenceMaterial = referenceMaterialService.getById(rid); + BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId()); + WarehousingBatchList warehousingBatchList = warehousingBatchListService.getById(batchDetails.getWarehousingBatchListId()); + if (warehousingBatchList != null) { + WarehousingContent warehousingContent = warehousingContentService.getById(warehousingBatchList.getWarehousingContentId()); + if (warehousingContent != null) { + AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(warehousingContent.getAcceptanceRecordFormId()); + if (acceptanceRecordFormVO != null && acceptanceRecordFormVO.getStatus() == 6) { + return R.ok(acceptanceRecordFormVO); + } else return R.ok(null); + } + } } AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordFormId); return R.ok(acceptanceRecordFormVO); @@ -114,11 +115,11 @@ public class AcceptanceRecordFormController { 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) 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 ac1ac6b..24e0f19 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java @@ -83,23 +83,24 @@ public class ReagentConsumableInventoryController { @ApiOperation(value = "标准物质列表", notes = "标准物质列表") @GetMapping("/RList") // @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')") - public R> getReagentConsumableInventoryPage(Integer current, Integer size, String reagentConsumableName, Integer referenceMaterialStatus, HttpServletRequest theHttpServletRequest) { + public R> getReagentConsumableInventoryPage(Page page, String reagentConsumableName, Integer referenceMaterialStatus, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - QueryWrapper reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); QueryWrapper referenceMaterialQueryWrapper = new QueryWrapper<>(); String number = reagentConsumableName; - if (reagentConsumableName != null) { - - reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", reagentConsumableName).or() - .like("species", reagentConsumableName); - } - - - Page allList = reagentConsumableInventoryService.getAllList(current, size, reagentConsumableInventoryQueryWrapper, referenceMaterialStatus, number); + referenceMaterialQueryWrapper + .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) + .ne(referenceMaterialStatus==null,"status",-4) + .eq(referenceMaterialStatus != null, "status", referenceMaterialStatus) + .or() + .ne(referenceMaterialStatus==null,"status",-4) + .like(StrUtil.isNotBlank(reagentConsumableName), "number", reagentConsumableName) + .eq(referenceMaterialStatus != null, "status", referenceMaterialStatus); + + IPage allList = reagentConsumableInventoryService.getAllList(page, referenceMaterialQueryWrapper, referenceMaterialStatus, number); return R.ok(allList); // return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory))); } @@ -164,7 +165,7 @@ public class ReagentConsumableInventoryController { .like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName) .like(warning != null && warning == 1, "warning_information", "库存不足") - .eq("category", "耗材") + .eq("category", "耗材").or() .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) .like(warning != null && warning == 1, "species", "库存不足") 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 6d93946..c9dd4c6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java @@ -1,10 +1,12 @@ package digital.laboratory.platform.reagent.controller; +import cn.hutool.core.date.DateTime; import cn.hutool.core.util.StrUtil; 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.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; @@ -14,6 +16,7 @@ import digital.laboratory.platform.reagent.service.RequisitionRecordService; import digital.laboratory.platform.reagent.vo.ProcurementContentVO; import digital.laboratory.platform.reagent.vo.PurchasingPlanVO; import digital.laboratory.platform.reagent.vo.RequisitionRecordVO; +import org.springframework.format.annotation.DateTimeFormat; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -21,10 +24,12 @@ import lombok.RequiredArgsConstructor; import org.springframework.security.oauth2.provider.OAuth2Authentication; import org.springframework.web.bind.annotation.*; +import javax.activation.MimetypesFileTypeMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.Principal; +import java.time.LocalDate; import java.util.List; /** @@ -54,26 +59,25 @@ public class RequisitionRecordController { @SysLog("试剂耗材领用申请表打印") @PostMapping("/print") @PreAuthorize("@pms.hasPermission('reagent_application_for_use_print')") - public void bizGetPDFInventory(String []idList, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) { + public void bizGetPDFInventory(String[] idList, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) { System.out.println("bizApplyWord................."); Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); List voList = requisitionRecordService.getRequisitionRecordVO(idList); - if (voList.isEmpty()) { throw new RuntimeException("未查询到相关信息"); } String id = IdWorker.get32UUID().toUpperCase(); - String applyFileName = "试剂耗材领用记录表-"+id ; + String applyFileName = "试剂耗材领用记录表-" + id; String pdfFilePath = "document" + "/" + "requisitionRecord" + "/" + id + "/" + applyFileName + ".pdf"; try { //直接调用pdf方法 requisitionRecordService.rquisitionRecordTablePDF(voList, id, theHttpServletRequest, httpServletResponse); ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream()); - httpServletResponse.setContentType(applyFileName); + httpServletResponse.setContentType(new MimetypesFileTypeMap().getContentType(applyFileName)); } catch (Exception e) { System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage())); e.printStackTrace(); @@ -84,19 +88,20 @@ public class RequisitionRecordController { * 分页查询 * * @param page 分页对象 - * @param requisitionRecord (试剂耗材领用记录表) * @return */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page") // @PreAuthorize("@pms.hasPermission('reagent_requisition_record_get')" ) - public R> getRequisitionRecordPage(Page page, String name, RequisitionRecord requisitionRecord, HttpServletRequest theHttpServletRequest) { + public R> getRequisitionRecordPage(Page page, String name, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); IPage requisitionRecordSList = requisitionRecordService.getRequisitionRecordVOPage(page, Wrappers.query() .like(StrUtil.isNotBlank(name), "reagent_consumable_name", name) .orderByDesc("date_of_claim") + .ge(startTime != null, "create_time", startTime) + .le(endTime != null, "create_time", endTime) ); return R.ok(requisitionRecordSList); // return R.ok(requisitionRecordService.page(page, Wrappers.query(requisitionRecord))); 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 bebd06c..c4eba29 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java @@ -82,11 +82,11 @@ public class StandardMaterialApplicationController { } else return R.failed("没有查询到该标准物质领用/归还的信息"); } - StandardMaterialApplicationVO standardMaterialApplicationVO = standardMaterialApplicationService.getStandardMaterialApplicationVO(id); + StandardMaterialApplicationVO standardMaterialApplicationVO = standardMaterialApplicationService.getStandardMaterialApplicationVO(id); return R.ok(standardMaterialApplicationVO); - //return R.ok(standardMaterialApplicationService.getById(standardMaterialApplicationId)); -} + //return R.ok(standardMaterialApplicationService.getById(standardMaterialApplicationId)); + } /** * 分页查询 @@ -102,7 +102,8 @@ public class StandardMaterialApplicationController { DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); IPage standardMaterialApplicationSList = standardMaterialApplicationService.getPage(page, Wrappers.query() - .like(StrUtil.isNotBlank(name), "reference_substance_name", name) + .like(StrUtil.isNotBlank(name), "reference_substance_name", name).or() + .like(StrUtil.isNotBlank(name), "reference_material_number", name) .orderByDesc("date_of_claim") ); return R.ok(standardMaterialApplicationSList); @@ -153,7 +154,14 @@ public class StandardMaterialApplicationController { .like(StrUtil.isNotBlank(name), "reference_substance_name", name) .ge(startTime != null, "create_time", startTime) .le(endTime != null, "create_time", endTime) + .orderByDesc("create_time").or() + .eq("status", 1) + .eq(StrUtil.isNotBlank(rid), "reference_material_id", rid) + .like(StrUtil.isNotBlank(name), "reference_material_number", name) + .ge(startTime != null, "create_time", startTime) + .le(endTime != null, "create_time", endTime) .orderByDesc("create_time") + ); return R.ok(standardMaterialApplicationSList); // return R.ok(standardMaterialApplicationService.page(page, Wrappers.query(standardMaterialApplication))); 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 445c723..f9b4290 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/ApplicationForUseDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/ApplicationForUseDTO.java @@ -40,7 +40,7 @@ public class ApplicationForUseDTO { @ApiModelProperty(value = "(领用物品明细ID)") private String reagentConsumableSetId; - - + @ApiModelProperty(value = "(领用物品仓库ID)") + private String reagentConsumableStashId; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/AngleMark.java b/src/main/java/digital/laboratory/platform/reagent/entity/AngleMark.java index d163b6c..bb4f620 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/AngleMark.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/AngleMark.java @@ -13,6 +13,9 @@ public class AngleMark { @ApiModelProperty(value = "审核审批角标") private Integer review = 0; + @ApiModelProperty(value = "采购计划") + private Integer procurementApplyList = 0; + @ApiModelProperty(value = "采购清单角标") private Integer PurchaseList = 0; 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 2f4ba6b..5a415db 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java @@ -85,6 +85,15 @@ public class BatchDetails extends BaseEntity { @ApiModelProperty(value="签收批次ID") private String warehousingBatchListId; + @ApiModelProperty(value="仓库号(房间号)") + private String roomNo; + + @ApiModelProperty(value="试剂耗材名称") + private String reagentConsumableName; + + @ApiModelProperty(value="试剂耗材仓库ID") + private String reagentConsumableStashId; + @TableId(value = "batch_details_id", type = IdType.ASSIGN_UUID) @ApiModelProperty(value="batchDetailsId") private String batchDetailsId; 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 9d7aaaf..fa6bd46 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/OutgoingContents.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/OutgoingContents.java @@ -90,5 +90,8 @@ public class OutgoingContents extends BaseEntity { @ApiModelProperty(value="id") private String id; + @ApiModelProperty(value = "(领用物品仓库ID)") + private String reagentConsumableStashId; + } 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 8974b78..9a066be 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java @@ -84,5 +84,7 @@ public class ReagentConsumablesSet extends BaseEntity { @ApiModelProperty(value = "id") private String id; + @ApiModelProperty(value = "(领用物品仓库ID)") + private String reagentConsumableStashId; } 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 9d419c3..c9de048 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java @@ -62,4 +62,7 @@ public class ReferenceMaterial extends BaseEntity { @ApiModelProperty(value="保管人名称") private String custodianName; + @ApiModelProperty(value="标准物质名称") + private String reagentConsumableName; + } diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java index b8048f0..c3a2ed5 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java @@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import digital.laboratory.platform.reagent.entity.Cabinetcell; 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 digital.laboratory.platform.reagent.vo.ReferenceMaterialFullVO; import digital.laboratory.platform.reagent.vo.UserVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -29,4 +31,6 @@ public interface ReagentConsumableInventoryMapper extends BaseMapper getUserList(); Cabinetcell getCabinetCell(String location); + + IPage getReferenceMaterialPage (IPagepage, @Param (Constants.WRAPPER) QueryWrapper qw); } 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 a6c759b..5a9fd4f 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/ComplianceCheckService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/ComplianceCheckService.java @@ -29,7 +29,7 @@ public interface ComplianceCheckService extends IService { @Transactional //新增标准物质符合性检查 - ComplianceCheck addCheck(ComplianceCheckDTO complianceCheckDTO, DLPUser dlpUser); + ComplianceCheck addCheck(ComplianceCheckDTO complianceCheckDTO, String userId); List addCheckList(List list, DLPUser dlpUser); 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 88b1054..9007294 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java @@ -7,10 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO; 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 digital.laboratory.platform.reagent.vo.ReferenceMaterialVO; -import digital.laboratory.platform.reagent.vo.UserVO; +import digital.laboratory.platform.reagent.vo.*; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; @@ -32,7 +29,7 @@ public interface ReagentConsumableInventoryService extends IService getAllList(Integer current, Integer size, QueryWrapper qw,Integer status,String number); + IPage getAllList(Page page, QueryWrapper qw, Integer status, String number); ReagentConsumableInventoryFullVO getByCode(String id); 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 85d3e93..b31502a 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 @@ -234,6 +234,10 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImplquery() + .eq("status", 6)).size());} + return angleMark; } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/ApplicationForUseServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/ApplicationForUseServiceImpl.java index 1fa50f8..a4bf4d1 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/ApplicationForUseServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/ApplicationForUseServiceImpl.java @@ -64,13 +64,12 @@ public class ApplicationForUseServiceImpl extends ServiceImpl getApplicationForUseVOPage(IPage page, QueryWrapper qw) { + IPage applicationForUseVOPage = baseMapper.getApplicationForUseVOPage(page, qw); List records = applicationForUseVOPage.getRecords(); @@ -81,7 +80,6 @@ public class ApplicationForUseServiceImpl extends ServiceImpl getReagentConsumablesSets(String id) { 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 4490ef5..f97d89d 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 @@ -19,6 +19,7 @@ import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.dto.CentralizedRequestDTO; import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.mapper.CentralizedRequestMapper; +import digital.laboratory.platform.reagent.mapper.PurchasingPlanMapper; import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.vo.*; import feign.Response; @@ -77,6 +78,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl centralizedRequestDTOList, DLPUser dlpUser) { 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 c1e45c6..5fbf941 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 @@ -107,14 +107,14 @@ public class ComplianceCheckServiceImpl extends ServiceImpl referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>(); ReferenceMaterial referenceMaterial = referenceMaterialService.getById(reagentConsumablesSet.getReferenceMaterialId());//标准物质 - outgoingContents.setReferenceMaterialId(referenceMaterial.getId());//标准物质ID outgoingContents.setId(IdWorker.get32UUID().toUpperCase()); outgoingContents.setDeliveryRegistrationFormId(deliveryRegistrationForm.getId());//关联出库登记表 @@ -117,14 +119,13 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImplquery().eq("reagent_consumable_id", reagentConsumableId)); //所有批次集合 - List batchDetailsList = batchDetailsService.list(Wrappers.query().eq("reagent_consumable_inventory_id", reagentConsumableInventory.getReagentConsumableInventoryId()) + List batchDetailsList = batchDetailsService.list(Wrappers.query().eq("reagent_consumable_stash_id", reagentConsumablesSet.getReagentConsumableStashId()) .orderByAsc("create_time") - .gt("quantity", 0)); + .ne("quantity", 0)); //新建批次集合,用于存放需出库的物品批次 List batchDetails = new ArrayList<>(); @@ -175,7 +176,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl outgoingContentsDTOS, DLPUser dlpUser) { DeliveryRegistrationForm deliveryRegistrationForm = this.getById(outgoingContentsDTOS.get(0).getDeliveryRegistrationFormId());//得到出库登记表 @@ -253,7 +254,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl getReagentConsumableInventoryREVOList(IPage page, QueryWrapper qw, Integer warning) { - if (warning != null) { if (warning == 2) { @@ -169,8 +172,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl reagentConsumableInventoryVOPage = baseMapper.getReagentConsumableInventoryVOPage(page, qw); List records = reagentConsumableInventoryVOPage.getRecords(); @@ -227,8 +228,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl getAllList(Integer current, Integer size, QueryWrapper qw, Integer status, String number) { + public IPage getAllList(Page page, QueryWrapper qw, Integer status, String number) { //如果扫码 + if (StrUtil.isNotBlank(number)) { ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.query().eq("number", number)); @@ -243,142 +245,34 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl list = referenceMaterialService.list(qw); -// -// List reagentConsumableInventoryFullVOList = new ArrayList<>(); -// -// -// for (ReferenceMaterial referenceMaterial : list) { -// -// ReagentConsumableInventory reagentConsumableInventory = this.getById(referenceMaterial.getReagentConsumableInventoryId()); -// -// 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()); + + IPage referenceMaterialPage = baseMapper.getReferenceMaterialPage(page, qw); + +// List referenceMaterialPageRecords = referenceMaterialPage.getRecords(); // -// LambdaQueryWrapper standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>(); +// LambdaQueryWrapper standardReserveSolutionQueryWrapper = new LambdaQueryWrapper<>(); // -// standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, referenceMaterial.getId()); +// for (ReferenceMaterialFullVO referenceMaterialPageRecord : referenceMaterialPageRecords) { +// standardReserveSolutionQueryWrapper.eq(StandardReserveSolution::getReferenceMaterialId,referenceMaterialPageRecord.getReferenceMaterialId()); +// StandardReserveSolution standardReserveSolution = standardReserveSolutionService.getOne(standardReserveSolutionQueryWrapper); // -// StandardReserveSolution one1 = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper); +// if (standardReserveSolution != null) { // -// reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName()); -// reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch()); -// reagentConsumableInventoryFullVO.setBatchNumber(batchDetails.getBatchNumber()); -// reagentConsumableInventoryFullVO.setManufacturerId(batchDetails.getSupplierId()); -// reagentConsumableInventoryFullVO.setPurchaseTime(batchDetails.getPurchaseTime()); -// reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId()); -// reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus()); -// reagentConsumableInventoryFullVO.setStorageLife(Integer.valueOf(batchDetails.getLimitDate())); -// reagentConsumableInventoryFullVO.setFixedResult(referenceMaterial.getFixedResult()); -// if (one1 != null) { // -// reagentConsumableInventoryFullVO.setConfigurationConcentration(one1.getConfigurationConcentration()); -// reagentConsumableInventoryFullVO.setConfigurationDate(one1.getConfigurationDate()); -// reagentConsumableInventoryFullVO.setSolutionNumbering(referenceMaterial.getNumber()); -// reagentConsumableInventoryFullVO.setValidityPeriod(one1.getValidityPeriod()); +// referenceMaterialPageRecord.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration()); +// referenceMaterialPageRecord.setConfigurationDate(standardReserveSolution.getConfigurationDate()); +// referenceMaterialPageRecord.setSolutionNumbering(standardReserveSolution.getSolutionNumbering()); +// referenceMaterialPageRecord.setValidityPeriod(standardReserveSolution.getValidityPeriod()); // } -// reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO); -// -// // } -// PageUtils pageUtils = new PageUtils(); -//// -// Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList); -// -// return pages; -// } - - - List reagentConsumableInventoryFullVOList = new ArrayList<>(); - - List list = this.list(qw); - - ArrayList referenceMaterialList = new ArrayList<>(); - //通过仓库类信息,查找对应的该类所有标准物质 - for (ReagentConsumableInventory reagentConsumableInventory : list) { - - if (reagentConsumableInventory.getTotalQuantity() >= 0) { - - LambdaQueryWrapper referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>(); - - if (status != null) { - - referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getStatus, status). - eq(ReferenceMaterial::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId()) - .ne(ReferenceMaterial::getStatus, -4); - } else { - referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId()) - .ne(ReferenceMaterial::getStatus, -4); - } - List list1 = referenceMaterialService.list(referenceMaterialLambdaQueryWrapper); - - referenceMaterialList.addAll(list1); - } - } - - if (referenceMaterialList.size() != 0) { - //提供多余字段 - for (ReferenceMaterial referenceMaterial : referenceMaterialList) { - - ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO(); - - ReagentConsumableInventory byId = this.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()); - - LambdaQueryWrapper standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>(); - - standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, referenceMaterial.getId()); - - StandardReserveSolution one1 = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper); - - reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName()); - reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch()); - reagentConsumableInventoryFullVO.setBatchNumber(batchDetails.getBatchNumber()); - reagentConsumableInventoryFullVO.setManufacturerId(batchDetails.getSupplierId()); - reagentConsumableInventoryFullVO.setPurchaseTime(batchDetails.getPurchaseTime()); - reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId()); - reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus()); - reagentConsumableInventoryFullVO.setFixedResult(referenceMaterial.getFixedResult()); - if (one1 != null) { - - reagentConsumableInventoryFullVO.setConfigurationConcentration(one1.getConfigurationConcentration()); - reagentConsumableInventoryFullVO.setConfigurationDate(one1.getConfigurationDate()); - reagentConsumableInventoryFullVO.setSolutionNumbering(referenceMaterial.getNumber()); - reagentConsumableInventoryFullVO.setValidityPeriod(one1.getValidityPeriod()); - } - reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO); - } - } - - PageUtils pageUtils = new PageUtils(); - - Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList); - - return pages; + return referenceMaterialPage; } @@ -472,7 +366,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl reagentConsumableInventoryFullVOList = new ArrayList<>(); - //找出对应的仓库信息 for (ReagentConsumableInventory reagentConsumableInventory : list) { @@ -519,8 +412,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl getUserList() { @@ -659,12 +551,24 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl reagentConsumableInventoryDTOList) { for (ReagentConsumableInventoryDTO reagentConsumableInventoryDTO : reagentConsumableInventoryDTOList) { - String location = "F" + reagentConsumableInventoryDTO.getRoomNo().charAt(0) + "_试剂柜-" + reagentConsumableInventoryDTO + String location = "F" + reagentConsumableInventoryDTO.getRoomNo().charAt(0) + "-" + reagentConsumableInventoryDTO.getRoomNo() + "_试剂柜-" + reagentConsumableInventoryDTO .getLocation().charAt(0) + "_" + reagentConsumableInventoryDTO.getLocation(); - ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory(); - BeanUtils.copyProperties(reagentConsumableInventoryDTO, reagentConsumableInventory); - reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase()); - reagentConsumableInventory.setWarningValue(1); + + ReagentConsumableInventory one = this.getOne(Wrappers.query() + .eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()),"brand", reagentConsumableInventoryDTO.getBrand()) + .eq("category", reagentConsumableInventoryDTO.getCategory()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecificationAndModel()),"specification_and_model", reagentConsumableInventoryDTO.getSpecificationAndModel()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getStandardValueOrPurity()), "standard_value_or_purity", reagentConsumableInventoryDTO.getStandardValueOrPurity()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCasNumber()), "cas_number", reagentConsumableInventoryDTO.getCasNumber()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecies()), "species", reagentConsumableInventoryDTO.getSpecies()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getEnglishName()), "english_name", reagentConsumableInventoryDTO.getEnglishName()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getPackagedCopies()), "packaged_copies", reagentConsumableInventoryDTO.getPackagedCopies()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getAlias()), "alias", reagentConsumableInventoryDTO.getAlias()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getPurityGrade()), "purity_grade", reagentConsumableInventoryDTO.getPurityGrade()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getDeviationOrUncertainty()), "deviation_or_uncertainty", reagentConsumableInventoryDTO.getDeviationOrUncertainty()) + .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getMinimumUnit()), "minimum_unit", reagentConsumableInventoryDTO.getMinimumUnit()) + ); BatchDetails batchDetails = new BatchDetails(); @@ -684,8 +588,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl batchDetailsList = batchDetailsService.list(Wrappers.query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId())); + if (batchDetailsList != null & batchDetailsList.size() > 0) { + int x = batchDetailsList.size() + 1; + batchDetails.setBatch("2023-" + x); + one.setTotalQuantity(one.getTotalQuantity() + reagentConsumableInventoryDTO.getTotalQuantity()); + this.updateById(one); + } + + batchDetails.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId()); + ReagentConsumables reagentConsumables = reagentConsumablesService.getById(one.getReagentConsumableId()); + + if (!one.getCategory().equals("标准物质")) { + ReagentConsumableStash reagentConsumableStash = reagentConsumableStashService.getOne(Wrappers.query() + .eq("room_no", reagentConsumableInventoryDTO.getRoomNo()) + .eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId())); + + if (reagentConsumableStash != null) { + reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + reagentConsumableInventoryDTO.getTotalQuantity()); + batchDetails.setReagentConsumableStashId(reagentConsumableStash.getId()); + reagentConsumableStashService.updateById(reagentConsumableStash); + } else { + ReagentConsumableStash consumableStash = new ReagentConsumableStash(); + BeanUtils.copyProperties(reagentConsumableInventoryDTO, consumableStash); + consumableStash.setId(IdWorker.get32UUID().toUpperCase()); + consumableStash.setTotalQuantity(reagentConsumableInventoryDTO.getTotalQuantity()); + consumableStash.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); + batchDetails.setReagentConsumableStashId(consumableStash.getId()); + reagentConsumableStashService.save(consumableStash); + } + } + + if (reagentConsumableInventoryDTO.getCategory().equals("标准物质")) { + ReferenceMaterial referenceMaterial = new ReferenceMaterial(); + referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); + referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId()); + referenceMaterial.setLocation(location); + referenceMaterial.setStatus(0); + referenceMaterial.setLatticeId(cabinetCell.getId()); + referenceMaterial.setBoxId(cabinetCell.getCabinetId()); + Calendar instance = Calendar.getInstance(); + int year = instance.get(Calendar.YEAR); + String roomNo = reagentConsumableInventoryDTO.getRoomNo(); + referenceMaterial.setNumber(reagentConsumableInventoryDTO.getAlias() + "-" + year + "-" + roomNo.charAt(0) + "-1");//自动生成编号 + referenceMaterial.setCode(referenceMaterial.getNumber()); + referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId()); + referenceMaterial.setId(IdWorker.get32UUID().toUpperCase()); + referenceMaterial.setReagentConsumableName(reagentConsumableInventoryDTO.getReagentConsumableName()); + referenceMaterialService.save(referenceMaterial); + this.updateCabinet(cabinetCell.getId(), referenceMaterial.getId(), 1); + } + this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1); + + } else { + ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory(); + BeanUtils.copyProperties(reagentConsumableInventoryDTO, reagentConsumableInventory); + reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase()); + reagentConsumableInventory.setWarningValue(1); + if (reagentConsumableInventoryDTO.getSpecificationAndModel().equals("/")) { + reagentConsumableInventory.setSpecificationAndModel(""); + } + + batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); + ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(reagentConsumableInventory); + reagentConsumableInventory.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); + this.save(reagentConsumableInventory); + this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1); + + if (!reagentConsumableInventory.getCategory().equals("标准物质")){ + ReagentConsumableStash reagentConsumableStash = reagentConsumableStashService.getOne(Wrappers.query() + .eq("room_no", reagentConsumableInventoryDTO.getRoomNo()) + .eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId())); + + if (reagentConsumableStash != null) { + reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + reagentConsumableInventoryDTO.getTotalQuantity()); + batchDetails.setReagentConsumableStashId(reagentConsumableStash.getId()); + reagentConsumableStashService.updateById(reagentConsumableStash); + } else { + ReagentConsumableStash consumableStash = new ReagentConsumableStash(); + BeanUtils.copyProperties(reagentConsumableInventoryDTO, consumableStash); + consumableStash.setId(IdWorker.get32UUID().toUpperCase()); + consumableStash.setTotalQuantity(reagentConsumableInventoryDTO.getTotalQuantity()); + consumableStash.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); + batchDetails.setReagentConsumableStashId(consumableStash.getId()); + reagentConsumableStashService.save(consumableStash); + } + } + + + + if (reagentConsumableInventoryDTO.getCategory().equals("标准物质")) { + ReferenceMaterial referenceMaterial = new ReferenceMaterial(); + referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); + referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); + referenceMaterial.setLocation(location); + referenceMaterial.setStatus(0); + referenceMaterial.setLatticeId(cabinetCell.getId()); + referenceMaterial.setBoxId(cabinetCell.getCabinetId()); + referenceMaterial.setReagentConsumableName(reagentConsumableInventoryDTO.getReagentConsumableName()); + Calendar instance = Calendar.getInstance(); + int year = instance.get(Calendar.YEAR); + String roomNo = reagentConsumableInventoryDTO.getRoomNo(); + referenceMaterial.setNumber(reagentConsumableInventoryDTO.getAlias() + "-" + year + "-" + roomNo.charAt(0) + "-1");//自动生成编号 + referenceMaterial.setCode(referenceMaterial.getNumber()); + referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId()); + referenceMaterial.setId(IdWorker.get32UUID().toUpperCase()); + referenceMaterialService.save(referenceMaterial); + this.updateCabinet(cabinetCell.getId(), referenceMaterial.getId(), 1); + } + this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1); } - this.save(reagentConsumableInventory); batchDetailsService.save(batchDetails); - } } 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 d952663..6fdd81e 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 @@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.reagent.entity.*; -import digital.laboratory.platform.reagent.mapper.ReviewAndApproveMapper; +import digital.laboratory.platform.reagent.mapper.*; import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.vo.*; import org.springframework.beans.factory.annotation.Autowired; @@ -21,9 +21,6 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl list = referenceMaterialService.list(Wrappers.query() @@ -273,7 +298,28 @@ public class WarehousingRecordFormServiceImpl extends ServiceImplquery() + .eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId()) + .eq("room_no", roomNo)); + if (reagentConsumableStash == null) { + ReagentConsumableStash newReagentConsumableStash = new ReagentConsumableStash(); + BeanUtils.copyProperties(one, newReagentConsumableStash); + newReagentConsumableStash.setId(IdWorker.get32UUID().toUpperCase()); + newReagentConsumableStash.setRoomNo(roomNo); + newReagentConsumableStash.setTotalQuantity(quantity); + batchDetails.setReagentConsumableStashId(newReagentConsumableStash.getId()); + reagentConsumableStashService.save(newReagentConsumableStash); + } else { + reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + quantity); + batchDetails.setReagentConsumableStashId(reagentConsumableStash.getId()); + reagentConsumableStashService.updateById(reagentConsumableStash); + } + } int year = Calendar.getInstance().get(Calendar.YEAR); Integer years = Integer.valueOf(year);//进行包装,方便运算 @@ -290,7 +336,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl list = referenceMaterialService.list(Wrappers.query() @@ -412,7 +459,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl getWarehousingRecordFormVOPage(Page page, QueryWrapper qw) { @@ -437,8 +483,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl - + + + diff --git a/src/main/resources/mapper/OutgoingContentsMapper.xml b/src/main/resources/mapper/OutgoingContentsMapper.xml index 1827dae..c672235 100644 --- a/src/main/resources/mapper/OutgoingContentsMapper.xml +++ b/src/main/resources/mapper/OutgoingContentsMapper.xml @@ -24,10 +24,7 @@ - - - - + diff --git a/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml b/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml index d7d367b..60be163 100644 --- a/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml +++ b/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml @@ -53,7 +53,8 @@ - SELECT * FROM dlp_cabinet.b_cabinetcell - WHERE cabinet_Id in (SELECT id FROM dlp_cabinet.b_cabinet WHERE room_no = '706') + WHERE cabinet_Id in (SELECT id FROM dlp_cabinet.b_cabinet WHERE room_no = '707') and location = #{location} + + + + + + + + + + + + + + diff --git a/src/main/resources/mapper/ReagentConsumablesSetMapper.xml b/src/main/resources/mapper/ReagentConsumablesSetMapper.xml index e0e1cfb..9f42217 100644 --- a/src/main/resources/mapper/ReagentConsumablesSetMapper.xml +++ b/src/main/resources/mapper/ReagentConsumablesSetMapper.xml @@ -19,5 +19,6 @@ + diff --git a/src/main/resources/mapper/ReferenceMaterialMapper.xml b/src/main/resources/mapper/ReferenceMaterialMapper.xml index f43e3f0..d923694 100644 --- a/src/main/resources/mapper/ReferenceMaterialMapper.xml +++ b/src/main/resources/mapper/ReferenceMaterialMapper.xml @@ -22,6 +22,7 @@ +