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 eab2925..8b7f3f6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java @@ -1,6 +1,7 @@ package digital.laboratory.platform.reagent.controller; import cn.hutool.core.util.StrUtil; +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; @@ -11,6 +12,7 @@ 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.ReagentConsumableInventoryDTO; +import digital.laboratory.platform.reagent.entity.BatchDetails; import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; import digital.laboratory.platform.reagent.entity.ReferenceMaterial; import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper; @@ -109,34 +111,34 @@ public class ReagentConsumableInventoryController { @ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表") @GetMapping("/standardList") // @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')") - public R> getReagentConsumableInventoryList(Page page, Integer warning, String remark, String reagentConsumableName, HttpServletRequest theHttpServletRequest) { + public R> getReagentConsumableInventoryList(Page page, Integer warning, String reagentConsumableName, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - IPage reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, Wrappers.query() + IPage reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, + Wrappers.query() + .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) + .like(warning != null && warning == 1, "warning_information", "库存不足") + .eq("category", "标准物质").or() - .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) - .like(warning != null && warning == 1, "warning_information", "库存不足") - .eq("category", "标准物质").or() + .like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName) + .like(warning != null && warning == 1, "warning_information", "库存不足") + .eq("category", "标准物质").or() - .like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName) - .like(warning != null && warning == 1, "warning_information", "库存不足") - .eq("category", "标准物质").or() + .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) + .like(warning != null && warning == 1, "warning_information", "库存不足") + .eq("category", "标准储备溶液").or() - .like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName) - .like(warning != null && warning == 1, "warning_information", "库存不足") - .eq("category", "标准储备溶液").or() + .like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName) + .like(warning != null && warning == 1, "warning_information", "库存不足") + .eq("category", "标准储备溶液").or() - .like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName) - .like(warning != null && warning == 1, "warning_information", "库存不足") - .eq("category", "标准储备溶液").or() - - .like(StrUtil.isNotBlank(reagentConsumableName), "species", reagentConsumableName) - .like(warning != null && warning == 1, "warning_information", "库存不足") - .eq("category", "标准物质").or(). + .like(StrUtil.isNotBlank(reagentConsumableName), "species", reagentConsumableName) + .like(warning != null && warning == 1, "warning_information", "库存不足") + .eq("category", "标准物质").or(). - like(StrUtil.isNotBlank(reagentConsumableName), "species", reagentConsumableName) - .like(warning != null && warning == 1, "warning_information", "库存不足") - .eq("category", "标准储备溶液").or(), warning); + like(StrUtil.isNotBlank(reagentConsumableName), "species", reagentConsumableName) + .like(warning != null && warning == 1, "warning_information", "库存不足") + .eq("category", "标准储备溶液").or(), warning); return R.ok(reagentConsumableInventoryRMVOList); @@ -401,5 +403,16 @@ public class ReagentConsumableInventoryController { } + @PutMapping("/update/location") + @ApiOperation(value = "修改试剂/耗材位置信息", + notes = "需要将四个参数传入包装体:" +"\n"+ + "1. 对应试剂耗材批次ID:batchDetailsId" +"\n"+ + "2. 格子ID:latticeId" +"\n"+ + "3. 柜子ID :boxId" +"\n"+ + "4. 位置信息:location") + public R updateLocation(@RequestBody BatchDetails batchDetails) { + return reagentConsumableInventoryService.updateLocation(batchDetails) ? R.ok("修改成功!") : R.failed("修改失败"); + } + } 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 c9dd4c6..b611e90 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java @@ -99,9 +99,9 @@ public class RequisitionRecordController { 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) + .orderByDesc("date_of_claim") ); return R.ok(requisitionRecordSList); // return R.ok(requisitionRecordService.page(page, Wrappers.query(requisitionRecord))); diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/Blacklist.java b/src/main/java/digital/laboratory/platform/reagent/entity/Blacklist.java index dbc6ca0..cd51ca2 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/Blacklist.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/Blacklist.java @@ -24,6 +24,12 @@ import lombok.EqualsAndHashCode; @ApiModel(value = "(试剂耗材黑名单)") public class Blacklist extends BaseEntity { + public static void main(String[] args) { + int a = 5; + int b =2 ; + System.out.println(a/b); + } + /** * (试剂耗材ID) */ diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java b/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java index d4237b6..5c11752 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java @@ -70,6 +70,4 @@ public class ReferenceMaterial extends BaseEntity { @ApiModelProperty(value = "单位") private String referenceMaterialUnit; - - } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/PeriodVerificationPlanService.java b/src/main/java/digital/laboratory/platform/reagent/service/PeriodVerificationPlanService.java index 737fa88..d0b279e 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/PeriodVerificationPlanService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/PeriodVerificationPlanService.java @@ -20,7 +20,6 @@ import java.util.List; public interface PeriodVerificationPlanService extends IService { List getPeriodVerificationPlanVOList ( String checkScheduleId); - IPage getPeriodVerificationPlanVOPage (Page page, QueryWrapper qw); void getPlan(); 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 eefc7af..f220ff7 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/ReagentConsumableInventoryService.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO; +import digital.laboratory.platform.reagent.entity.BatchDetails; import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; import digital.laboratory.platform.reagent.entity.ReferenceMaterial; import digital.laboratory.platform.reagent.vo.*; @@ -62,5 +63,8 @@ public interface ReagentConsumableInventoryService extends IService getOrgList(); + @Transactional + boolean updateLocation(BatchDetails batchDetails); + // List getOrgList(); } 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 2293ab0..3a3643b 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 @@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service.impl; import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -303,7 +304,6 @@ public class CentralizedRequestServiceImpl extends ServiceImpl periodVerificationPlanLambdaQueryWrapper = new LambdaQueryWrapper<>(); - periodVerificationPlanLambdaQueryWrapper.eq(PeriodVerificationPlan::getCheckScheduleId,byId.getId()); + periodVerificationPlanLambdaQueryWrapper.eq(PeriodVerificationPlan::getCheckScheduleId, byId.getId()); List list = periodVerificationPlanService.list(periodVerificationPlanLambdaQueryWrapper); @@ -221,23 +221,28 @@ public class CheckScheduleServiceImpl extends ServiceImpl voList = checkScheduleVO.getPeriodVerificationPlanVOS(); - int x= 1; + int x = 1; for (PeriodVerificationPlanVO periodVerificationPlanVO : voList) { - periodVerificationPlanVO.setI(x); - - if (periodVerificationPlanVO.getVerificationResult()!=null&&periodVerificationPlanVO.getVerificationResult().equals("P")){ + if (!StringUtils.isNotBlank(periodVerificationPlanVO.getDeviationAndUncertainty())) { + periodVerificationPlanVO.setDeviationAndUncertainty("/"); + } + if (!StringUtils.isNotBlank(periodVerificationPlanVO.getStandardValueOrPurity())) { + periodVerificationPlanVO.setStandardValueOrPurity("/"); + } + if (periodVerificationPlanVO.getVerificationResult() != null && periodVerificationPlanVO.getVerificationResult().equals("P")) { periodVerificationPlanVO.setP("√"); - }else if (periodVerificationPlanVO.getVerificationResult()!=null&&periodVerificationPlanVO.getVerificationResult().equals("D")){ + } else if (periodVerificationPlanVO.getVerificationResult() != null && periodVerificationPlanVO.getVerificationResult().equals("D")) { periodVerificationPlanVO.setD("√"); - }else if (periodVerificationPlanVO.getVerificationResult()!=null&&periodVerificationPlanVO.getVerificationResult().equals("F")){ + } else if (periodVerificationPlanVO.getVerificationResult() != null && periodVerificationPlanVO.getVerificationResult().equals("F")) { periodVerificationPlanVO.setF("√"); } x++; @@ -261,7 +266,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl() {{ - put("voList",voList); - put("year",year); - put("managerName",checkScheduleVO.getManagerName()); - put("technicalDirectorName",checkScheduleVO.getTechnicalDirectorName()); - put("auditTimeOfTechnical", LocalDateTimeUtil.format(checkScheduleVO.getAuditTimeOfTechnical(),"yyyy年MM月dd日")); + put("voList", voList); + put("year", year); + put("managerName", checkScheduleVO.getManagerName()); + put("technicalDirectorName", checkScheduleVO.getTechnicalDirectorName()); + put("auditTimeOfTechnical", LocalDateTimeUtil.format(checkScheduleVO.getAuditTimeOfTechnical(), "yyyy年MM月dd日")); }} ); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java index 0bdf2ed..ab0145c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java @@ -176,7 +176,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl outgoingContentsDTOS, DLPUser dlpUser) { DeliveryRegistrationForm deliveryRegistrationForm = this.getById(outgoingContentsDTOS.get(0).getDeliveryRegistrationFormId());//得到出库登记表 @@ -252,7 +252,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl periodVerificationPlanVOPage = baseMapper.getPeriodVerificationPlanVOList(checkScheduleId); for (PeriodVerificationPlanVO periodVerificationPlanVO : periodVerificationPlanVOPage) { - - ReferenceMaterial byId = referenceMaterialService.getById(periodVerificationPlanVO.getReferenceMaterialId()); - - ReagentConsumables byId1 = reagentConsumablesService.getById(byId.getReagentConsumableId()); - - periodVerificationPlanVO.setReferenceMaterialName(byId1.getReagentConsumableName()); - + ReferenceMaterial referenceMaterial = referenceMaterialService.getById(periodVerificationPlanVO.getReferenceMaterialId()); + ReagentConsumables reagentConsumables = reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId()); + periodVerificationPlanVO.setReferenceMaterialName(reagentConsumables.getReagentConsumableName()); + periodVerificationPlanVO.setDeviationAndUncertainty(reagentConsumables.getDeviationOrUncertainty()); + periodVerificationPlanVO.setStandardValueOrPurity(reagentConsumables.getStandardValueOrPurity()); } - return periodVerificationPlanVOPage; } @@ -84,9 +81,9 @@ public class PeriodVerificationPlanServiceImpl extends ServiceImpl getList(String name, Integer category) { QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("status", 4); - QueryWrapper queryWrapper1 = queryWrapper.orderByDesc("update_time"); - List list = this.list(queryWrapper1); if (list.size() == 0) { @@ -324,7 +321,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper); if (list == null & list.size() == 0) { - throw new RuntimeException(String.format("未存在已发布的采购目录")); } Collections.sort(catalogueDetailsList, new Comparator() { diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java index cb58d25..7fd6dc7 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java @@ -14,6 +14,7 @@ import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.mapper.PurchasingPlanMapper; import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.vo.ProcurementContentVO; +import digital.laboratory.platform.reagent.vo.PurchaseRequestPrintVO; import digital.laboratory.platform.reagent.vo.PurchasingPlanVO; import digital.laboratory.platform.reagent.vo.ReplacementVO; import org.springframework.beans.BeanUtils; @@ -21,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; @@ -574,6 +576,10 @@ public class PurchasingPlanServiceImpl extends ServiceImpl voList, HttpServletResponse response){ + } } 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 7450500..dd5e667 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,7 +18,6 @@ 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; @@ -28,6 +27,7 @@ import digital.laboratory.platform.sys.entity.CabinetCell; import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData; import digital.laboratory.platform.sys.feign.RemoteCabinetService; import feign.Response; +import io.seata.spring.annotation.GlobalTransactional; import org.apache.commons.io.output.ByteArrayOutputStream; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -562,7 +562,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImplquery().eq("supplier_name", reagentConsumableInventoryDTO.getSupplierName())); @@ -570,6 +569,32 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImplquery() .eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName()) .eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()), "brand", reagentConsumableInventoryDTO.getBrand()) @@ -579,7 +604,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl solutionUseFormVOList = solutionUseFormService.getSolutionUseFormVOList(standardReserveSolutionVOById.getId()); @@ -242,7 +242,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl voList = standardReserveSolutionVO.getSolutionUseFormVOList(); - for (SolutionUseFormVO solutionUseFormVO : voList) { - - LocalDateTime createTime = solutionUseFormVO.getCreateTime(); + voList.sort((a, b) -> a.getCreateTime().compareTo(b.getCreateTime())); - String format = LocalDateTimeUtil.format(createTime, "yyyy年MM月dd日"); + HashMap solutionUseFormVOHashMap = new HashMap(); + List> maps = new ArrayList<>(); - solutionUseFormVO.setFormat(format); + for (int i = 0; i < voList.size(); i++) { + voList.get(i).setFormat(LocalDateTimeUtil.format(voList.get(i).getCreateTime(), "yyyy年MM月dd日")); + solutionUseFormVOHashMap.put("userName" + (i + 1), voList.get(i).getUserName()); + solutionUseFormVOHashMap.put("format" + (i + 1), voList.get(i).getFormat()); + solutionUseFormVOHashMap.put("quantityUsed" + (i + 1), voList.get(i).getQuantityUsed()); } + maps.add(solutionUseFormVOHashMap); + // if (voList.size()<7){ // int s = 7-voList.size(); @@ -418,7 +423,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl() {{ - put("voList", voList); + put("maps", maps); put("year", year); put("solutionName", standardReserveSolutionVO.getSolutionName()); put("solutionNumbering", standardReserveSolutionVO.getSolutionNumbering()); @@ -435,11 +440,12 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl