diff --git a/src/main/java/digital/laboratory/platform/reagent/ReagentManagmentApplication.java b/src/main/java/digital/laboratory/platform/reagent/ReagentManagmentApplication.java index e848781..53c9e55 100644 --- a/src/main/java/digital/laboratory/platform/reagent/ReagentManagmentApplication.java +++ b/src/main/java/digital/laboratory/platform/reagent/ReagentManagmentApplication.java @@ -26,8 +26,6 @@ public class ReagentManagmentApplication { // System.out.println("end of Spring Application main()"); // System.out.println("-----------------------------"); // System.out.println("\n\n\n"); - - } // @Bean diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java index 9ca668d..c36f97f 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java @@ -127,7 +127,6 @@ public class PurchasingPlanController { public R> getPurchasingPlanPage(Page page, @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(); @@ -151,17 +150,16 @@ public class PurchasingPlanController { /** * 新增(采购计划) * - * @param purchasingPlanDTOList (采购计划) * @return R */ @ApiOperation(value = "新增(采购计划)", notes = "新增(采购计划) 参数DTO:(detailsOfCentralizedId,quantity = ,)") @SysLog("新增(采购计划)") @PostMapping @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_add')") - public R postAddObject(@RequestBody List purchasingPlanDTOList, HttpServletRequest theHttpServletRequest) { + public R postAddObject(@RequestBody PurchasingPlanDTO purchasingPlanDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - PurchasingPlanVO purchasingPlanVO = purchasingPlanService.addById(purchasingPlanDTOList, dlpUser); + PurchasingPlanVO purchasingPlanVO = purchasingPlanService.addById(purchasingPlanDTO.getIdList(), dlpUser); if (purchasingPlanVO != null) { return R.ok(purchasingPlanVO, "保存成功"); 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 207d235..38e1880 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java @@ -146,7 +146,7 @@ public class ReagentConsumableInventoryController { @ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表") @GetMapping("/List") // @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')") - public R> getList(Page page, String reagentConsumableName, Integer warning, String remark, String category,HttpServletRequest theHttpServletRequest) { + public R> getList(Page page, String reagentConsumableName, Integer warning, String remark, String category, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); IPage reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryREVOList(page, Wrappers.query() @@ -192,24 +192,24 @@ public class ReagentConsumableInventoryController { @ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表") @GetMapping("/MList") // @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')") - public R> getReferenceMaterialVOList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) { + public R> getReagentConsumablePage(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); QueryWrapper reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); - IPage allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper - .eq("category", "试剂") - .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or() - .eq("category", "试剂") - .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName).or() - .eq("category", "耗材") - .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or() - .eq("category", "耗材") - .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName)); - - - return R.ok(allRM); + IPage reagentConsumablePage = reagentConsumableInventoryMapper.getReagentConsumablePage(page, reagentConsumableName); + +// IPage allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper +// .eq("category", "试剂") +// .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or() +// .eq("category", "试剂") +// .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName).or() +// .eq("category", "耗材") +// .like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or() +// .eq("category", "耗材") +// .like(!StrUtil.isEmpty(reagentConsumableName), "species", reagentConsumableName)); + return R.ok(reagentConsumablePage); } /** @@ -220,11 +220,11 @@ public class ReagentConsumableInventoryController { @ApiOperation(value = "试剂耗材/标准物质集合列表", notes = "试剂耗材/标准物质集合列表") @GetMapping("/full") // @PreAuthorize("@pms.hasPermission(' ')") - public R> getReagentConsumableInventoryFull(Page page,String category, String name, HttpServletRequest theHttpServletRequest) { + public R> getReagentConsumableInventoryFull(Page page, String category, String name, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - IPage fullVOPage = reagentConsumableInventoryMapper.getFullVOPage(page,name,category); + IPage fullVOPage = reagentConsumableInventoryMapper.getFullVOPage(page, name, category); return R.ok(fullVOPage); } @@ -357,6 +357,20 @@ public class ReagentConsumableInventoryController { return R.ok(byCode); } + /** + * 天平专用 + * 通过扫码,获取标准物质所有信息 + */ + @ApiOperation(value = "通过编号,获取标准物质所有信", notes = "通过编号,获取标准物质所有信息") + @GetMapping("/getByNo") + public R getByNo(String number) { + ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(Wrappers.query().eq("number", number)); + if (referenceMaterial != null) { + return R.ok(reagentConsumableInventoryService.getByCode(referenceMaterial.getId())); + } else { + return R.failed("未能查询到该标准物质的详细信息"); + } + } /** * 获取用户列表 diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java index a88a604..05e33ac 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java @@ -184,9 +184,9 @@ public class StandardMaterialApprovalFormController { ReferenceMaterial byId = referenceMaterialService.getById(id); - if (byId.getStatus() == -3) { - throw new RuntimeException(String.format("该标准物质已被领用,请先归还后再停用")); - } +// if (byId.getStatus() == -3) { +// throw new RuntimeException(String.format("该标准物质已被领用,请先归还后再停用")); +// } byId.setStatus(-1); @@ -219,8 +219,6 @@ public class StandardMaterialApprovalFormController { throw new RuntimeException("未查询到相关信息"); } String applyFileName = "标准物质停用报废销毁恢复降级使用审批表" + id; - ; - String pdfFilePath = "document" + "/" + "standardMaterialApprovalForm" + "/" + id + "/" + applyFileName + ".pdf"; try { 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 8addf73..789d6c4 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java @@ -138,19 +138,16 @@ public class WarehousingRecordFormController { @SysLog("新增签收记录表") @PostMapping // @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')") - public R postAddObject(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) { + public R postAddObject(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.addFormById(warehousingRecordFormDTO, dlpUser); + warehousingRecordFormService.addFormById(warehousingRecordFormDTO, dlpUser); + + return R.ok("签收成功"); - if (warehousingRecordFormVO != null) { - return R.ok(warehousingRecordFormVO, "入库成功"); - } else { - return R.failed("入库失败"); - } } diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java index 11aee14..4743d56 100644 --- a/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java +++ b/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java @@ -51,4 +51,6 @@ public class PurchasingPlanDTO { @ApiModelProperty(value = "换货供应商ID") private String supplierId; + private String [] idList; + } 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 c9de048..b9bc770 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java @@ -37,7 +37,7 @@ public class ReferenceMaterial extends BaseEntity { @ApiModelProperty(value="试剂耗材Id") private String reagentConsumableId; - @ApiModelProperty(value="使用状态 0 正常使用、-2降级使用") + @ApiModelProperty(value="使用状态 0为可以使用、-2为降级使用、-3 已被领用 主要为备用状态区分被领用时") private Integer serviceStatus; @ApiModelProperty(value="批次明细Id") 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 aa2d313..0edbfb7 100644 --- a/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java @@ -30,4 +30,5 @@ public interface ReagentConsumableInventoryMapper extends BaseMapper getReferenceMaterialPage (IPagepage, @Param (Constants.WRAPPER) QueryWrapper qw); + IPage getReagentConsumablePage (IPagepage, @Param("name") String name ); } diff --git a/src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java b/src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java index d27ecb0..bca493e 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java @@ -26,6 +26,6 @@ public interface WarehousingRecordFormService extends IService getWarehousingRecordFormVOPage(Page page, QueryWrapperqw); } 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 05b8a19..601d9c3 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 @@ -254,6 +254,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImplquery() - .eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName()) .eq("brand", catalogueDetails.getBrand()) .eq("category", catalogueDetails.getCategory()) @@ -263,7 +261,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper); if (list == null & list.size() == 0) { @@ -335,8 +327,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl() { - - @Override public int compare(CatalogueDetails o1, CatalogueDetails o2) { return Integer.valueOf(o1.getPurchaseCatalogueNumber().substring(5)) - Integer.valueOf(o2.getPurchaseCatalogueNumber().substring(5)); @@ -344,7 +334,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl purchaseCatalogueDTOList) { 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 e195126..ac222a2 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 @@ -539,6 +539,7 @@ 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); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/RequisitionRecordServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/RequisitionRecordServiceImpl.java index 071fb50..c2907b0 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/RequisitionRecordServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/RequisitionRecordServiceImpl.java @@ -137,22 +137,22 @@ public class RequisitionRecordServiceImpl extends ServiceImpl solutionUseFormVOMap = new HashMap<>(); @@ -430,7 +430,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl getWarehousingRecordFormVOPage(Page page, QueryWrapper qw) { diff --git a/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml b/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml index 7ed8335..263ed46 100644 --- a/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml +++ b/src/main/resources/mapper/ReagentConsumableInventoryMapper.xml @@ -77,7 +77,7 @@ FROM dlp_base.sys_user user ,dlp_base. b_staff s1 WHERE s1.user_id = user.user_id - and user.name like concat('%',#{name},'%') + and user.name like concat('%',#{name},'%') @@ -179,4 +179,17 @@ FROM reference_material rmp ${ew.customSqlSegment} + +