From 0c1bf7fadf0952c02e515b6e6c901a7006aa0dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B5=B7=E8=88=AA?= <1344638791@qq.com> Date: Fri, 15 Sep 2023 14:34:48 +0800 Subject: [PATCH] update --- .../Interceptor/WebSecurityConfigurer.java | 2 +- .../controller/InstructionBookController.java | 5 ++ ...StandardMaterialApplicationController.java | 4 +- .../WarehousingRecordFormController.java | 20 ----- .../dto/ReagentConsumableInventoryDTO.java | 19 +++-- .../reagent/dto/WarehousingRecordFormDTO.java | 5 +- .../reagent/entity/ReagentConsumables.java | 2 - .../reagent/entity/ReferenceMaterial.java | 4 + .../entity/StandardReserveSolution.java | 2 +- .../reagent/entity/StandardSolutionCurve.java | 2 +- ...ReagentConsumableInventoryServiceImpl.java | 79 ++++++++++++------- .../ReagentConsumablesSetServiceImpl.java | 13 ++- ...tandardMaterialApplicationServiceImpl.java | 13 +-- .../StandardReserveSolutionServiceImpl.java | 27 ++++--- .../StandardSolutionCurveServiceImpl.java | 5 +- .../WarehousingRecordFormServiceImpl.java | 6 +- .../platform/reagent/utils/IntegerUtils.java | 15 ++++ .../laboratory/platform/reagent/vo/OrgVO.java | 1 + .../reagent/vo/ReagentConsumablesSetVO.java | 6 +- .../vo/StandardMaterialApplicationVO.java | 6 ++ .../reagent/vo/StandardReserveSolutionVO.java | 6 ++ .../reagent/vo/StandardSolutionCurveVO.java | 2 + .../mapper/ReferenceMaterialMapper.xml | 1 + 23 files changed, 153 insertions(+), 92 deletions(-) create mode 100644 src/main/java/digital/laboratory/platform/reagent/utils/IntegerUtils.java diff --git a/src/main/java/digital/laboratory/platform/reagent/Interceptor/WebSecurityConfigurer.java b/src/main/java/digital/laboratory/platform/reagent/Interceptor/WebSecurityConfigurer.java index b473dbc..b9e3e72 100644 --- a/src/main/java/digital/laboratory/platform/reagent/Interceptor/WebSecurityConfigurer.java +++ b/src/main/java/digital/laboratory/platform/reagent/Interceptor/WebSecurityConfigurer.java @@ -14,7 +14,7 @@ public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter { @Override public void configure(WebSecurity web) { SecurityContextHolder.setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL); - web.ignoring().antMatchers("/", "/static/**", "/static/dist/**", "/hello**", "/favicon.ico**", "/login", "/login-callback", "/v2/**", "/papp/v2/**", "/papp/entrustment/common/**","/reagent/v2/**"); + web.ignoring().antMatchers("/", "/static/**", "/static/dist/**", "/hello**", "/favicon.ico**", "/login", "/login-callback", "/v2/**", "/papp/v2/**", "/papp/entrustment/common/**","/reagent/v2/**","/standard_material_application/weighing/**","/reagent_consumable_inventory/getByNo/**"); } @Override diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java b/src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java index 7b6c10e..dc6e46a 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java @@ -32,6 +32,7 @@ import java.io.IOException; import java.security.Principal; import java.time.LocalDateTime; import java.util.HashMap; +import java.util.List; import java.util.Map; @@ -213,6 +214,10 @@ public class InstructionBookController { } + + + + } 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 fe2932a..915d7b1 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.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.common.security.annotation.Inner; import digital.laboratory.platform.reagent.dto.BalanceWeighingDTO; import digital.laboratory.platform.reagent.dto.StandardMaterialApplicationDTO; import digital.laboratory.platform.reagent.entity.CatalogueDetails; @@ -18,7 +19,6 @@ import digital.laboratory.platform.reagent.entity.StandardMaterialApplication; import digital.laboratory.platform.reagent.service.StandardMaterialApplicationService; import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO; import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO; -import digital.laboratory.platform.sys.feign.RemoteReagentConsumableService; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.security.access.prepost.PreAuthorize; import io.swagger.annotations.Api; @@ -262,7 +262,7 @@ public class StandardMaterialApplicationController { } } @ApiOperation(value = "天平称量后记录标准物质使用数量", notes = "天平称量后记录标准物质使用数量") - @SysLog("天平称量后记录标准物质使用数量") +// @SysLog("天平称量后记录标准物质使用数量") @PutMapping("/weighing") public R getWeighingMass(@RequestBody List balanceWeighingDTOList) { boolean weighingMass = standardMaterialApplicationService.getWeighingMass(balanceWeighingDTOList); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java index 789d6c4..cf6213f 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java @@ -69,10 +69,6 @@ public class WarehousingRecordFormController { @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_get')") public R getById(String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.getWarehousingRecordFormVO(warehousingRecordFormId); return R.ok(warehousingRecordFormVO); @@ -88,10 +84,6 @@ public class WarehousingRecordFormController { @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')") public R> getWarehousingRecordFormVOPage(Page page, String status, @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 warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOPage(page, Wrappers.query() .ge(startTime != null, "create_time", startTime) .eq(StrUtil.isNotBlank(status), "status", status) @@ -102,7 +94,6 @@ public class WarehousingRecordFormController { } - /** * 分页查询 * @@ -113,10 +104,6 @@ public class WarehousingRecordFormController { @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')") public R> getWarehousingContentVOPage(Page page, String name, @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 warehousingContentVOPage = warehousingContentService.getWarehousingContentVOPage(page, Wrappers.query() .like(StrUtil.isNotBlank(name), "reagent_consumable_name", name) .ge(startTime != null, "create_time", startTime) @@ -139,16 +126,9 @@ public class WarehousingRecordFormController { @PostMapping // @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')") public R postAddObject(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - warehousingRecordFormService.addFormById(warehousingRecordFormDTO, dlpUser); - return R.ok("签收成功"); - } - - } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/ReagentConsumableInventoryDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/ReagentConsumableInventoryDTO.java index f175c14..ec140ac 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/ReagentConsumableInventoryDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/ReagentConsumableInventoryDTO.java @@ -14,21 +14,28 @@ public class ReagentConsumableInventoryDTO extends ReagentConsumableInventory { @ApiModelProperty(value = "(位置信息)") private String location; - @ApiModelProperty(value="(供应商ID)") + @ApiModelProperty(value = "(供应商ID)") private String supplierId; - @ApiModelProperty(value="(有效日期)") + @ApiModelProperty(value = "(有效日期)") private LocalDate expirationDate; - @ApiModelProperty(value="(生产日期)") + @ApiModelProperty(value = "(生产日期)") private LocalDate dateOfProduction; - @ApiModelProperty(value="(房间号)") + @ApiModelProperty(value = "(房间号)") private String roomNo; - private String articleNumber; + @ApiModelProperty(value = "标准物质质量") + private Double mass; - private String packages; + @ApiModelProperty(value = "标准物质单位") + private String referenceMaterialUnit; + + @ApiModelProperty(value = "(供应商名称)") + private String supplierName; + @ApiModelProperty(value = "(规格)") + private String packages; } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java index 8cdff52..3f8ffce 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java @@ -67,5 +67,8 @@ public class WarehousingRecordFormDTO { private String boxId; @ApiModelProperty(value="标准物质质量") - private Double referenceMaterialMass; + private Double mass; + + @ApiModelProperty(value="标准物质单位") + private String referenceMaterialUnit; } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java index f8890a1..2d9f4b7 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java @@ -107,7 +107,6 @@ public class ReagentConsumables extends BaseEntity { @ApiModelProperty(value="存储条件") private String storageCondition; - /** * 备注 */ @@ -124,7 +123,6 @@ public class ReagentConsumables extends BaseEntity { @ApiModelProperty(value="溶液浓度") private double configurationConcentration; - /** * reagentConsumablesId */ 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 f9e5000..d4237b6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java @@ -68,4 +68,8 @@ public class ReferenceMaterial extends BaseEntity { @ApiModelProperty(value = "质量(有可能为重量、有可能为体积)") private Double mass; + @ApiModelProperty(value = "单位") + private String referenceMaterialUnit; + + } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java b/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java index 2813503..48238ba 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java @@ -31,7 +31,7 @@ public class StandardReserveSolution extends BaseEntity { * (配置浓度(mg/mL)) */ @ApiModelProperty(value="(配置浓度(mg/mL))") - private double configurationConcentration; + private Double configurationConcentration; /** * (预警信息) diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/StandardSolutionCurve.java b/src/main/java/digital/laboratory/platform/reagent/entity/StandardSolutionCurve.java index b79e6e6..5823704 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/StandardSolutionCurve.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/StandardSolutionCurve.java @@ -46,7 +46,7 @@ public class StandardSolutionCurve extends BaseEntity { * (标准储备溶液浓度) */ @ApiModelProperty(value="(标准储备溶液浓度)") - private double solutionConcentration; + private Double solutionConcentration; /** * (标准储备溶液浓度编号) diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java index 1aa9cf9..f145959 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java @@ -18,6 +18,7 @@ import digital.laboratory.platform.common.feign.RemoteTemplate2htmlService; import digital.laboratory.platform.common.feign.RemoteWord2PDFService; import digital.laboratory.platform.common.oss.service.OssFile; import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO; +import digital.laboratory.platform.reagent.utils.IntegerUtils; import digital.laboratory.platform.reagent.utils.PageUtils; import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper; @@ -82,6 +83,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl data = new HashMap<>(); - standardReserveSolutionVOById.setConfigurationDatePrint(String.format("%.4",standardReserveSolutionVOById.getConfigurationDatePrint())); data.put("standardReserveSolution", standardReserveSolutionVOById); String templateFileName = "标准储备溶液标签模板.vm"; return remoteTemplate2htmlService.getHtml(templateFileName, data); @@ -554,7 +558,16 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl reagentConsumableInventoryDTOList) { + + Calendar instance = Calendar.getInstance(); + int year = instance.get(Calendar.YEAR); + + IntegerUtils integerUtils = new IntegerUtils(); for (ReagentConsumableInventoryDTO reagentConsumableInventoryDTO : reagentConsumableInventoryDTOList) { + Integer copies = integerUtils.getInteger(reagentConsumableInventoryDTO.getPackagedCopies()); + Integer quantity = reagentConsumableInventoryDTO.getTotalQuantity() * copies; + SupplierInformation supplier = supplierInformationService.getOne(Wrappers.query().eq("supplier_name", reagentConsumableInventoryDTO.getSupplierName())); + String location = "F" + reagentConsumableInventoryDTO.getRoomNo().charAt(0) + "-" + reagentConsumableInventoryDTO.getRoomNo() + "_试剂柜-" + reagentConsumableInventoryDTO .getLocation().charAt(0) + "_" + reagentConsumableInventoryDTO.getLocation(); @@ -574,15 +587,21 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl cabinetCellR = remoteCabinetService.queryCellByRoomNoAndLocation(reagentConsumableInventoryDTO.getRoomNo(), reagentConsumableInventoryDTO.getLocation()); CabinetCell cabinetCell = cabinetCellR.getData(); batchDetails.setLatticeId(cabinetCell.getId()); @@ -609,33 +627,29 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl 0) { int x = batchDetailsList.size() + 1; batchDetails.setBatch("2023-" + x); - one.setTotalQuantity(one.getTotalQuantity() + reagentConsumableInventoryDTO.getTotalQuantity()); + one.setTotalQuantity(one.getTotalQuantity() + quantity); 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()); + reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + quantity); 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.setTotalQuantity(quantity); consumableStash.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); batchDetails.setReagentConsumableStashId(consumableStash.getId()); reagentConsumableStashService.save(consumableStash); } } - if (reagentConsumableInventoryDTO.getCategory().equals("标准物质")) { ReferenceMaterial referenceMaterial = new ReferenceMaterial(); referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); @@ -644,14 +658,14 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImplquery() .eq("room_no", reagentConsumableInventoryDTO.getRoomNo()) .eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId())); - if (reagentConsumableStash != null) { - reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + reagentConsumableInventoryDTO.getTotalQuantity()); + reagentConsumableStash.setTotalQuantity(reagentConsumableStash.getTotalQuantity() + quantity); 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.setTotalQuantity(quantity); consumableStash.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); batchDetails.setReagentConsumableStashId(consumableStash.getId()); reagentConsumableStashService.save(consumableStash); @@ -700,13 +722,13 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl cellAndStoreSupplyDataArrayList = new ArrayList<>();//柜子数组 CellAndStoreSupplyData cellAndStoreSupplyData = new CellAndStoreSupplyData(); cellAndStoreSupplyData.setCellStatus("1"); @@ -738,17 +759,19 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl orgList = baseMapper.getOrgList(); ArrayList orgFullVOS = new ArrayList<>(); for (OrgVO orgVO : orgList) { - if (orgVO.getOrgType() != null && orgVO.getOrgType().equals("county")) { + if (orgVO.getOrgType() != null && orgVO.getOrgType().equals("province") && !(orgVO.getAddress().substring(0, 2).equals("陕西"))) { OrgFullVO orgFullVO = new OrgFullVO(); - orgFullVO.setUsername("X" + orgVO.getAreaCode()); - String[] roles = {"10010","10015", "10020","10130","23020","23030"}; + orgFullVO.setUsername("P" + orgVO.getAreaCode()); + String[] roles = {"10010", "10015", "10020", "10130", "23020", "23030"}; orgFullVO.setRoleIds(roles); orgFullVO.setPassword("123456"); orgFullVO.setOrgId(orgVO.getOrgId()); orgFullVO.setGender(1); orgFullVOS.add(orgFullVO); } + } + System.out.println("总个数" + orgFullVOS.size()); return orgFullVOS; } } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesSetServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesSetServiceImpl.java index e5777c2..e88bfd3 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesSetServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumablesSetServiceImpl.java @@ -2,10 +2,7 @@ package digital.laboratory.platform.reagent.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import digital.laboratory.platform.reagent.entity.ApplicationForUse; -import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; -import digital.laboratory.platform.reagent.entity.ReagentConsumables; -import digital.laboratory.platform.reagent.entity.ReagentConsumablesSet; +import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.mapper.ReagentConsumablesSetMapper; import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.vo.ReagentConsumablesSetVO; @@ -80,10 +77,12 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl standardMaterialApplications = this.list(Wrappers.query().eq("reference_material_id", referenceMaterialId).orderByDesc("create_time")); - if (standardMaterialApplications == null && standardMaterialApplications.size() == 0) { - throw new RuntimeException(String.format("未查询到该标准物质的领用登记表!")); + ReferenceMaterial referenceMaterial = referenceMaterialService.getById(referenceMaterialId); + + if (referenceMaterial.getStatus() != -3) { + throw new RuntimeException(String.format("当前标准物质未出库!")); } StandardMaterialApplication standardMaterialApplication = standardMaterialApplications.get(0); //依次记录称量结果 for (BalanceWeighingDTO balanceWeighingDTO : balanceWeighingDTOList) { - if (standardMaterialApplication.getPurposeAndQuantity() == 0) { + if (standardMaterialApplication.getPurposeAndQuantity() == null) { standardMaterialApplication.setPurposeAndQuantity(balanceWeighingDTO.getWeighingMass().doubleValue()); } else { standardMaterialApplication.setPurposeAndQuantity(standardMaterialApplication.getPurposeAndQuantity() + balanceWeighingDTO.getWeighingMass().doubleValue()); 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 0f8de97..7c530f0 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 @@ -84,10 +84,10 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl solutionUseFormVOList = solutionUseFormService.getSolutionUseFormVOList(standardReserveSolutionVOById.getId()); @@ -167,7 +167,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl list = referenceMaterialService.list(Wrappers.query() .likeRight("number", prefix) @@ -187,12 +187,14 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl list = referenceMaterialService.list(Wrappers.query() .likeRight("number", prefix) @@ -297,6 +301,8 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl solutionUseFormVOMap = new HashMap<>(); - - List solutionUseFormVOMapList = new ArrayList<>(); String applyFileName = "标准储备溶液配制及使用记录表-" + id; //----------------------------- @@ -462,8 +465,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl +