diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/FixedValueReportController.java b/src/main/java/digital/laboratory/platform/reagent/controller/FixedValueReportController.java index 9e2395d..565ce72 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/FixedValueReportController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/FixedValueReportController.java @@ -93,6 +93,8 @@ public class FixedValueReportController { fixedValueReport.setFixedValueReportId(IdWorker.get32UUID().toUpperCase()); fixedValueReport.setFixedResult(fixedResult); fixedValueReport.setReferenceSubstanceId(id); + byId.setFixedResult(fixedResult); + referenceMaterialService.updateById(byId); String fileNames = path + "/" + fileName; ossFile.fileGet(fileNames, httpServletResponse.getOutputStream()); @@ -106,6 +108,8 @@ public class FixedValueReportController { fixedValueReport1.setFixedValueReport(fileName); fixedValueReport1.setFixedResult(fixedResult); String fileNames = path + "/" + fileName; + byId.setFixedResult(fixedResult); + referenceMaterialService.updateById(byId); ossFile.fileGet(fileNames, httpServletResponse.getOutputStream()); diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java index bf5674b..04011b6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java @@ -92,7 +92,7 @@ public class PurchaseCatalogueController { @ApiOperation(value = "分页查询已发布的采购目录明细", notes = "分页查询已发布的采购目录明细") @GetMapping("/page") @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_pages')") - public R> getPurchaseCataloguePage(String name,HttpServletRequest theHttpServletRequest) { + public R> getPurchaseCataloguePage(String name, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -113,7 +113,7 @@ public class PurchaseCatalogueController { @ApiOperation(value = "分页查询制定编辑的采购目录", notes = "分页查询制定编辑的采购目录") @GetMapping("/pages") @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_pages')") - public R> getPurchaseCatalogueVOPage(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) { + public R> getPurchaseCatalogueVOPage(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) { IPage purchaseCatalogueVOPage = purchaseCatalogueService.getPurchaseCatalogueVOPage(page, Wrappers.query().orderByDesc("create_time")); Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -314,10 +314,10 @@ public class PurchaseCatalogueController { * @param auditAndApproveDto * @return R */ - @ApiOperation(value = "一级审核采购目录", notes = "一级审核采购目录") - @SysLog("一级审核采购目录") - @PutMapping("/primary/audit") - @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_primary')") + @ApiOperation(value = "审核采购目录", notes = "审核采购目录") + @SysLog("审核采购目录") + @PutMapping("/audit") + @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_audit')") public R primaryAuditCatalogue(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) { Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -333,30 +333,6 @@ public class PurchaseCatalogueController { } } - /** - * 审核采购目录 - * - * @param auditAndApproveDto - * @return R - */ - @ApiOperation(value = "二级审核采购目录", notes = "二级审核采购目录") - @SysLog("二级审核采购目录") - @PutMapping("/secondary/audit") - @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_secondary')") - public R secondaryAuditCatalogue(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) { - - Principal principal = theHttpServletRequest.getUserPrincipal(); - - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.secondaryAuditCatalogue(auditAndApproveDto, dlpUser); - - if (purchaseCatalogue != null) { - return R.ok(purchaseCatalogue, "审核成功"); - } else { - return R.failed("审核失败"); - } - } /** * 发布采购目录 @@ -368,7 +344,7 @@ public class PurchaseCatalogueController { @SysLog("发布采购目录") @PutMapping("/release") @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_release')") - public R releaseById( String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) { + public R releaseById(String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) { PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.releaseCatalogue(purchaseCatalogueId); @@ -390,7 +366,7 @@ public class PurchaseCatalogueController { @SysLog("导入采购目录") @PostMapping("/import") @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_import')") - public R getImport( @RequestBody List purchaseCatalogueDTOList, HttpServletRequest theHttpServletRequest) { + public R getImport(@RequestBody List purchaseCatalogueDTOList, HttpServletRequest theHttpServletRequest) { PurchaseCatalogueVO anImport = purchaseCatalogueService.getImport(purchaseCatalogueDTOList); @@ -402,13 +378,12 @@ public class PurchaseCatalogueController { * 采购目录打印 * * @param purchaseCatalogueId - * * @return */ @ApiOperation(value = "采购目录打印", notes = "采购目录打印") @SysLog("采购目录打印") @PostMapping("/print") - @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_print')") + @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_print')") public void bizGetPDFInventory(String purchaseCatalogueId, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) { System.out.println("bizApplyWord................."); Principal principal = theHttpServletRequest.getUserPrincipal(); @@ -424,12 +399,12 @@ public class PurchaseCatalogueController { String id = IdWorker.get32UUID().toUpperCase(); - String applyFileName = "采购目录-"+id; + String applyFileName = "采购目录-" + id; - String pdfFilePath = "document" + "/"+"purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf"; + String pdfFilePath = "document" + "/" + "purchaseCatalogue" + "/" + id + "/" + applyFileName + ".pdf"; try { //直接调用pdf方法 - purchaseCatalogueTablePDF(purchaseCatalogueVO,id,theHttpServletRequest,httpServletResponse); + purchaseCatalogueTablePDF(purchaseCatalogueVO, id, theHttpServletRequest, httpServletResponse); ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream()); httpServletResponse.setContentType(applyFileName); } catch (Exception e) { @@ -447,7 +422,7 @@ public class PurchaseCatalogueController { //----------------------------- // 生成 word 版本的 采购目录 - String applyFileName = "采购目录-"+id; + String applyFileName = "采购目录-" + id; ByteArrayOutputStream bos = new ByteArrayOutputStream(); ossFile.fileGet("template" + "/" + "试剂耗材集中采购目录模板.docx", bos); @@ -467,11 +442,11 @@ public class PurchaseCatalogueController { XWPFTemplate template = XWPFTemplate.compile(bis, config).render( new HashMap() {{ put("voList", voList); - put("id",purchaseCatalogueVO.getPurchaseCatalogueId()); - put("size",1); - put("secondaryAuditorName",purchaseCatalogueVO.getSecondaryAuditorName()); - put("auditTimeOfSecondary", LocalDateTimeUtil.format(purchaseCatalogueVO.getAuditTimeOfSecondary(), "yyyy年MM月dd日 ")); - put("name",LocalDateTimeUtil.format(LocalDateTime.now(),"yyyy年")+"~"+LocalDateTimeUtil.format(LocalDateTime.now().plusYears(1),"yyyy年")); + put("id", purchaseCatalogueVO.getPurchaseCatalogueId()); + put("size", 1); + put("secondaryAuditorName", purchaseCatalogueVO.getAuditorName()); + put("auditTimeOfSecondary", LocalDateTimeUtil.format(purchaseCatalogueVO.getAuditTime(), "yyyy年MM月dd日 ")); + put("name", LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy年") + "~" + LocalDateTimeUtil.format(LocalDateTime.now().plusYears(1), "yyyy年")); }} ); bis.close(); 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 0885c04..f2168f6 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java @@ -105,6 +105,7 @@ public class ReagentConsumableInventoryController { // return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory))); } + @ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表") @GetMapping("/standardList") @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" ) @@ -159,7 +160,6 @@ public class ReagentConsumableInventoryController { return R.ok(allRM); } - /** * 分页查询 * diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java index 69f52cb..0d0635c 100644 --- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java +++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java @@ -42,158 +42,162 @@ import java.util.List; * * @author Zhang Xiaolong created at 2023-03-10 * @describe (标准储备溶液配制及使用记录表) 前端控制器 - * + *

* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 * 这里写什么: - * 为前端提供数据, 接受前端的数据 - * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 - * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 + * 为前端提供数据, 接受前端的数据 + * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 + * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 * 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 */ @RestController @RequiredArgsConstructor -@RequestMapping("/standard_reserve_solution" ) +@RequestMapping("/standard_reserve_solution") @Api(value = "standard_reserve_solution", tags = "(标准储备溶液配制及使用记录表)管理") public class StandardReserveSolutionController { - private final StandardReserveSolutionService standardReserveSolutionService; - - private final OssFile ossFile; + private final StandardReserveSolutionService standardReserveSolutionService; - /** - * 通过id查询(标准储备溶液配制及使用记录表) - * @param id id - * @return R - */ - @ApiOperation(value = "通过id查询", notes = "通过id查询") - @GetMapping( ) - @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" ) - public R getById(String id, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + private final OssFile ossFile; - StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id); - return R.ok(standardReserveSolutionVOById); - //return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId)); - } + /** + * 通过id查询(标准储备溶液配制及使用记录表) + * + * @param id id + * @return R + */ + @ApiOperation(value = "通过id查询", notes = "通过id查询") + @GetMapping() + @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')") + public R getById(String id, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id); + return R.ok(standardReserveSolutionVOById); + //return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId)); + } - /** + /** * 分页查询 - * @param page 分页对象 + * + * @param page 分页对象 * @param solutionName (标准储备溶液配制及使用记录表) * @return */ @ApiOperation(value = "分页查询", notes = "分页查询") - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_page')" ) - public R> getStandardReserveSolutionPage(Page page, String solutionName, @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) throws ParseException { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - IPage standardReserveSolutionSList = standardReserveSolutionService.getStandardReserveSolutionVOList(page,Wrappers.query() - .like(StrUtil.isNotBlank(solutionName),"solution_name",solutionName) - .ge(startTime!=null,"create_time",startTime) - .le(endTime!=null,"create_time",endTime) - .orderByDesc("create_time")); - return R.ok(standardReserveSolutionSList); + @GetMapping("/page") + @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_page')") + public R> getStandardReserveSolutionPage(Page page, String solutionName, @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) throws ParseException { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + IPage standardReserveSolutionSList = standardReserveSolutionService.getStandardReserveSolutionVOList(page, Wrappers.query() + .like(StrUtil.isNotBlank(solutionName), "solution_name", solutionName) + .ge(startTime != null, "create_time", startTime) + .le(endTime != null, "create_time", endTime) + .orderByDesc("create_time")); + return R.ok(standardReserveSolutionSList); // return R.ok(standardReserveSolutionService.page(page, Wrappers.query(standardReserveSolution))); } /** * 新增(标准储备溶液配制及使用记录表) + * * @param standardReserveSolutionDTO (标准储备溶液配制及使用记录表) * @return R */ @ApiOperation(value = "新增(标准储备溶液配制及使用记录表)", notes = "新增(标准储备溶液配制及使用记录表)") - @SysLog("新增(标准储备溶液配制及使用记录表)" ) + @SysLog("新增(标准储备溶液配制及使用记录表)") @PostMapping - @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" ) + @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')") public R postAddObject(@RequestBody StandardReserveSolutionDTO standardReserveSolutionDTO, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - StandardReserveSolutionVO standardReserveSolutionVO = standardReserveSolutionService.addById(standardReserveSolutionDTO, dlpUser); - - if (standardReserveSolutionVO!=null){ - return R.ok(standardReserveSolutionVO,"配置成功"); - }else return R.failed("配置失败"); - } - - /** - * 新增(标准储备溶液配制及使用记录表) - * @return R - */ - @ApiOperation(value = "入库(标准储备溶液配制及使用记录表)", notes = "入库(标准储备溶液配制及使用记录表)") - @SysLog("入库(标准储备溶液配制及使用记录表)" ) - @PostMapping("warehousing") - @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_warehousing')" ) - public R warehousingById(@RequestBody StandardReserveSolutionFullDTO standardReserveSolutionFullDTO, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - StandardReserveSolutionFullVO standardReserveSolutionFullVO = standardReserveSolutionService.warehousingById(standardReserveSolutionFullDTO); - - if (standardReserveSolutionFullVO!=null){ - return R.ok(standardReserveSolutionFullVO,"入库成功"); - }else return R.failed("入库失败"); - } - - /** - * 通过id查询(标准储备溶液配制及使用记录表) - * @param id id - * @return R - */ - @ApiOperation(value = "通过id查询标准储备溶液入库记录", notes = "通过id查询标准储备溶液入库记录") - @GetMapping( "/full") - @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_full')" ) - public R getFullVOById(String id, HttpServletRequest theHttpServletRequest) { - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(id); - - return R.ok(byFullVOId); - //return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId)); - } - - /**-------标准储备溶液配制及使用记录表打印*/ - /** - * 标准储备溶液配制及使用记录表打印 - * - * @param id - * - * @return - */ - @ApiOperation(value = "标准储备溶液配制及使用记录表打印", notes = "标准储备溶液配制及使用记录表打印") - @SysLog("标准储备溶液配制及使用记录表打印") - @PostMapping("/print") - @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_print')") - public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) { - System.out.println("bizApplyWord................."); - Principal principal = theHttpServletRequest.getUserPrincipal(); - DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); - - StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id); - - List voList = standardReserveSolutionVOById.getSolutionUseFormVOList(); - - if (voList.isEmpty()){ - - throw new RuntimeException(String.format("未查询到使用记录,无法打印")); - } - - String applyFileName = "标准储备溶液配制及使用记录表-"+id; - - String pdfFilePath = "document" + "/"+"standardReserveSolution" + "/" + id + "/" + applyFileName + ".pdf"; - try { - //直接调用pdf方法 - standardReserveSolutionService.standardReserveSolutionTablePDF(standardReserveSolutionVOById,theHttpServletRequest,httpServletResponse); - ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream()); - httpServletResponse.setContentType(applyFileName); - } catch (Exception e) { - System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage())); - e.printStackTrace(); - } - } + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StandardReserveSolutionVO standardReserveSolutionVO = standardReserveSolutionService.addById(standardReserveSolutionDTO, dlpUser); + + if (standardReserveSolutionVO != null) { + return R.ok(standardReserveSolutionVO, "配置成功"); + } else return R.failed("配置失败"); + } + + /** + * 新增(标准储备溶液配制及使用记录表) + * + * @return R + */ + @ApiOperation(value = "入库(标准储备溶液配制及使用记录表)", notes = "入库(标准储备溶液配制及使用记录表)") + @SysLog("入库(标准储备溶液配制及使用记录表)") + @PostMapping("warehousing") + @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_warehousing')") + public R warehousingById(@RequestBody StandardReserveSolutionFullDTO standardReserveSolutionFullDTO, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StandardReserveSolutionFullVO standardReserveSolutionFullVO = standardReserveSolutionService.warehousingById(standardReserveSolutionFullDTO); + + if (standardReserveSolutionFullVO != null) { + return R.ok(standardReserveSolutionFullVO, "入库成功"); + } else return R.failed("入库失败"); + } + + /** + * 通过id查询(标准储备溶液配制及使用记录表) + * + * @param id id + * @return R + */ + @ApiOperation(value = "通过id查询标准储备溶液入库记录", notes = "通过id查询标准储备溶液入库记录") + @GetMapping("/full") + @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_full')") + public R getFullVOById(String id, HttpServletRequest theHttpServletRequest) { + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(id); + + return R.ok(byFullVOId); + //return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId)); + } + + /**-------标准储备溶液配制及使用记录表打印*/ + /** + * 标准储备溶液配制及使用记录表打印 + * + * @param id + * @return + */ + @ApiOperation(value = "标准储备溶液配制及使用记录表打印", notes = "标准储备溶液配制及使用记录表打印") + @SysLog("标准储备溶液配制及使用记录表打印") + @PostMapping("/print") + @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_print')") + public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) { + System.out.println("bizApplyWord................."); + Principal principal = theHttpServletRequest.getUserPrincipal(); + DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); + + StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id); + + List voList = standardReserveSolutionVOById.getSolutionUseFormVOList(); + + if (voList.isEmpty()) { + + throw new RuntimeException(String.format("未查询到使用记录,无法打印")); + } + + String applyFileName = "标准储备溶液配制及使用记录表-" + id; + + String pdfFilePath = "document" + "/" + "standardReserveSolution" + "/" + id + "/" + applyFileName + ".pdf"; + try { + //直接调用pdf方法 + standardReserveSolutionService.standardReserveSolutionTablePDF(standardReserveSolutionVOById, theHttpServletRequest, httpServletResponse); + ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream()); + httpServletResponse.setContentType(applyFileName); + } catch (Exception e) { + System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage())); + e.printStackTrace(); + } + } } diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/AngleMark.java b/src/main/java/digital/laboratory/platform/reagent/entity/AngleMark.java new file mode 100644 index 0000000..c1e8869 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/reagent/entity/AngleMark.java @@ -0,0 +1,42 @@ +package digital.laboratory.platform.reagent.entity; + +import digital.laboratory.platform.common.mybatis.base.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class AngleMark { + + @ApiModelProperty(value="审核审批角标") + private Integer reviewAndApproveMark; + + @ApiModelProperty(value="采购清单角标") + private Integer purchaseListMark; + + @ApiModelProperty(value="入库角标") + private Integer warehousingMark; + + @ApiModelProperty(value="标准储备溶液入库角标") + private Integer storageOfSolutionMark; + + @ApiModelProperty(value="采购入库角标") + private Integer purchaseWarehousingMark; + + @ApiModelProperty(value="归还任务角标") + private Integer returnMark; + + @ApiModelProperty(value="符合性检查角标") + private Integer complianceCheckMark; + + @ApiModelProperty(value="验收任务角标") + private Integer acceptanceMark; + + @ApiModelProperty(value="期间核查记录角标") + private Integer periodVerificationMark; + + @ApiModelProperty(value="出库任务角标") + private Integer deliveryMark; + + @ApiModelProperty(value="采购目录角标") + private Integer purchaseCatalogueMark; +} diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java b/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java index d4221fb..da5b765 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java @@ -68,7 +68,6 @@ public class CentralizedRequest extends BaseEntity { private LocalDateTime auditTime; - /** * centralizedRequestId */ diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseCatalogue.java b/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseCatalogue.java index 62acd77..5e7a970 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseCatalogue.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/PurchaseCatalogue.java @@ -27,38 +27,23 @@ public class PurchaseCatalogue extends BaseEntity { /** * (一级审核意见) */ - @ApiModelProperty(value="一级审核意见") - private String auditOpinionOfPrimary; + @ApiModelProperty(value="审核意见") + private String auditOpinion; - /** - * (二级审核意见) - */ - @ApiModelProperty(value="二级审核意见") - private String auditOpinionOfSecondary; /** * (一级审核结果) */ - @ApiModelProperty(value="一级审核结果") - private Boolean auditResultOfPrimary; - - /** - * (技术负责人审核结果) - */ - @ApiModelProperty(value="二级审核结果") - private Boolean auditResultOfSecondary; + @ApiModelProperty(value="审核结果") + private Boolean auditResult; /** * (一级审核时间) */ - @ApiModelProperty(value="一级审核时间") - private LocalDateTime auditTimeOfPrimary; + @ApiModelProperty(value="审核时间") + private LocalDateTime auditTime; + - /** - * (二级审核时间) - */ - @ApiModelProperty(value="二级审核时间") - private LocalDateTime auditTimeOfSecondary; @ApiModelProperty(value="提交时间") private LocalDateTime commitTime; @@ -66,8 +51,8 @@ public class PurchaseCatalogue extends BaseEntity { /** * (一级审核人ID) */ - @ApiModelProperty(value="一级审核人ID") - private String primaryAuditorId; + @ApiModelProperty(value="审核人ID") + private String auditorId; /** * 发布日期 @@ -82,12 +67,6 @@ public class PurchaseCatalogue extends BaseEntity { private Integer status; - /** - * (二级审核人ID) - */ - @ApiModelProperty(value="二级审核人ID") - private String secondaryAuditorId; - /** * (编号) */ 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 7134f1d..9a4b165 100644 --- a/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java +++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java @@ -28,6 +28,9 @@ public class ReferenceMaterial extends BaseEntity { @ApiModelProperty(value="标准物质编号") private String number; + @ApiModelProperty(value="定值结果") + private String fixedResult; + @ApiModelProperty(value="打印序列号") private String code; /** diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/AngleMarkMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/AngleMarkMapper.java new file mode 100644 index 0000000..857f220 --- /dev/null +++ b/src/main/java/digital/laboratory/platform/reagent/mapper/AngleMarkMapper.java @@ -0,0 +1,9 @@ +package digital.laboratory.platform.reagent.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import digital.laboratory.platform.reagent.entity.AngleMark; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface AngleMarkMapper extends BaseMapper { +} diff --git a/src/main/java/digital/laboratory/platform/reagent/service/AngleMarkService.java b/src/main/java/digital/laboratory/platform/reagent/service/AngleMarkService.java new file mode 100644 index 0000000..f62d00f --- /dev/null +++ b/src/main/java/digital/laboratory/platform/reagent/service/AngleMarkService.java @@ -0,0 +1,7 @@ +package digital.laboratory.platform.reagent.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import digital.laboratory.platform.reagent.entity.AngleMark; + +public interface AngleMarkService extends IService { +} diff --git a/src/main/java/digital/laboratory/platform/reagent/service/PurchaseCatalogueService.java b/src/main/java/digital/laboratory/platform/reagent/service/PurchaseCatalogueService.java index 113fdce..c1ab38f 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/PurchaseCatalogueService.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/PurchaseCatalogueService.java @@ -39,7 +39,6 @@ public interface PurchaseCatalogueService extends IService { PurchaseCatalogue primaryAuditCatalogue (AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser); - PurchaseCatalogue secondaryAuditCatalogue(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser); PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId); 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 81a0d43..2125b0b 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 @@ -73,6 +73,21 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl implements AngleMarkService { + + private ReviewAndApproveService reviewAndApproveService; + + private PurchaseListService purchaseListService; + + private WarehousingContentService warehousingContentService; + + private AcceptanceRecordFormService acceptanceRecordFormService; + + private ComplianceCheckService complianceCheckService; + + private PeriodVerificationImplementationService periodVerificationImplementationService; + + private DeliveryRegistrationFormService deliveryRegistrationFormService; + + private PurchaseCatalogueService purchaseCatalogueService; + + + public AngleMark getMark() { + return null; + + } +} 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 e54bad0..6a8d580 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 @@ -79,9 +79,10 @@ public class CentralizedRequestServiceImpl extends ServiceImpl centralizedRequestDTOList, DLPUser dlpUser) { + public CentralizedRequest addRequest(List centralizedRequestDTOList, DLPUser dlpUser) { CentralizedRequest centralizedRequest = new CentralizedRequest(); @@ -108,16 +109,16 @@ public class CentralizedRequestServiceImpl extends ServiceImpl centralizedRequestDTOList,DLPUser dlpUser) { + public CentralizedRequest commitRequest(List centralizedRequestDTOList, DLPUser dlpUser) { - if (centralizedRequestDTOList.get(0).getCentralizedRequestId()==null){ + if (centralizedRequestDTOList.get(0).getCentralizedRequestId() == null) { CentralizedRequest centralizedRequest = centralizedRequestService.addRequest(centralizedRequestDTOList, dlpUser); @@ -125,10 +126,10 @@ public class CentralizedRequestServiceImpl extends ServiceImpl list = detailsOfCentralizedService.list(detailsOfCentralizedLambdaQueryWrapper); - if (list.size()!=0){ + if (list.size() != 0) { detailsOfCentralizedService.removeBatchByIds(list); @@ -202,7 +202,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>(); //查询状态为1的采购申请:已提交 - centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,1); + centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus, 1); List list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper); @@ -210,7 +210,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl getPurchaseRequestPrintList(String id, String type) { ArrayList purchaseRequestPrintVOList = new ArrayList<>(); - if(type.equals("集中采购申请")){ + if (type.equals("集中采购申请")) { CentralizedRequestVO centralizedRequest = centralizedRequestService.getCentralizedRequestVO(id); @@ -279,47 +280,50 @@ public class CentralizedRequestServiceImpl extends ServiceImplquery().eq("procurement_content_id", detailsOfCentralized.getProcurementContentId())).getSupplierId()).getSupplierName()); - purchaseRequestPrintVOList.add(purchaseRequestPrintVO);} + PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO(); + purchaseRequestPrintVO.setApplicantName(centralizedRequest.getApplicantName()); + purchaseRequestPrintVO.setPurpose(detailsOfCentralized.getPurpose()); + purchaseRequestPrintVO.setQuantity(detailsOfCentralized.getQuantityPurchased()); + purchaseRequestPrintVO.setRemarks(detailsOfCentralized.getRemarks()); + purchaseRequestPrintVO.setReagentConsumableName(reagentConsumables.getReagentConsumableName()); + purchaseRequestPrintVO.setSpecificationAndModel(reagentConsumables.getSpecificationAndModel()); + purchaseRequestPrintVO.setUnitPrice(procurementContentService.getById(detailsOfCentralized.getProcurementContentId()).getUnitPrice()); + purchaseRequestPrintVO.setSubtotal(procurementContentService.getById(detailsOfCentralized.getProcurementContentId()).getSubtotal()); + purchaseRequestPrintVO.setSupplierName(supplierInformationService.getById(purchaseListDetailsService.getOne(Wrappers.query().eq("procurement_content_id", detailsOfCentralized.getProcurementContentId())).getSupplierId()).getSupplierName()); + purchaseRequestPrintVOList.add(purchaseRequestPrintVO); + } } - }else { + } else { DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(id); for (DecentralizeDetails decentralizeDetails : requestById.getDecentralizeDetailsVOList()) { - if (decentralizeDetails.getCategory().equals("标准物质")){ + if (decentralizeDetails.getCategory().equals("标准物质")) { - PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO(); + PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO(); - BeanUtils.copyProperties(decentralizeDetails, purchaseRequestPrintVO); + BeanUtils.copyProperties(decentralizeDetails, purchaseRequestPrintVO); - purchaseRequestPrintVO.setPurpose(decentralizeDetails.getPurpose()); - purchaseRequestPrintVO.setApplicantName(requestById.getApplicantName()); - purchaseRequestPrintVO.setRemarks(decentralizeDetails.getRemarks()); + purchaseRequestPrintVO.setPurpose(decentralizeDetails.getPurpose()); + purchaseRequestPrintVO.setApplicantName(requestById.getApplicantName()); + purchaseRequestPrintVO.setRemarks(decentralizeDetails.getRemarks()); - purchaseRequestPrintVO.setSubtotal(purchaseRequestPrintVO.getUnitPrice() * purchaseRequestPrintVO.getQuantity()); - //查找出供应商名称 - purchaseRequestPrintVO.setSupplierName(supplierInformationService.getById(purchaseListDetailsService.getById(decentralizeDetails.getPurchaseListDetailsId()).getSupplierId()).getSupplierName()); + purchaseRequestPrintVO.setSubtotal(purchaseRequestPrintVO.getUnitPrice() * purchaseRequestPrintVO.getQuantity()); + //查找出供应商名称 + purchaseRequestPrintVO.setSupplierName(supplierInformationService.getById(purchaseListDetailsService.getById(decentralizeDetails.getPurchaseListDetailsId()).getSupplierId()).getSupplierName()); - purchaseRequestPrintVOList.add(purchaseRequestPrintVO);} + purchaseRequestPrintVOList.add(purchaseRequestPrintVO); + } } } return purchaseRequestPrintVOList; } + @Override public void purchaseRequestTablePDF(List voList, String id, String type, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception { System.out.println("purchaseRequestTablePDF................."); @@ -334,7 +338,7 @@ public class CentralizedRequestServiceImpl extends ServiceImpl purchaseCatalogueDTOList, DLPUser dlpUser) { - if (purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId() == null) { + Set permissions = dlpUser.getPermissions(); + + if (purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId().equals("") | purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId() == null) { PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.addCatalogue(dlpUser, purchaseCatalogueDTOList); - purchaseCatalogue.setStatus(1); + if (permissions.contains("reagent_purchase_catalogue_primary")) { + + purchaseCatalogue.setStatus(2); + } else { + purchaseCatalogue.setStatus(1); + } purchaseCatalogue.setCommitTime(LocalDateTime.now()); @@ -200,7 +208,12 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>(); @@ -261,24 +248,25 @@ public class PurchaseCatalogueServiceImpl extends ServiceImplquery() + .eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName()) + .eq("brand", catalogueDetails.getBrand()) + .eq("category", catalogueDetails.getCategory()) + .eq("specification_and_model", catalogueDetails.getSpecificationAndModel()) + .eq("standard_value_or_purity", catalogueDetails.getStandardValueOrPurity()) + .eq("cas_number", catalogueDetails.getCasNumber())); + + if (one == null) { ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails); - } else { - ReagentConsumables byId = reagentConsumablesService.getById(catalogueDetails.getReagentConsumableId()); - if (byId == null) { - ReagentConsumables one = reagentConsumablesService.getOne(Wrappers.query() - .eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName()) - .eq("cas_number", catalogueDetails.getCasNumber()) - .eq("specification_and_model", catalogueDetails.getSpecificationAndModel()) - .eq("standard_value_or_purity", catalogueDetails.getStandardValueOrPurity())); - if (one == null) { - ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails); - } - } + catalogueDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); + catalogueDetailsService.updateById(catalogueDetails); + }else { + catalogueDetails.setReagentConsumableId(one.getReagentConsumableId()); + catalogueDetailsService.updateById(catalogueDetails); } } + + purchaseCatalogue.setStatus(3); } else { purchaseCatalogue.setStatus(-3); } @@ -288,6 +276,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl queryWrapper1 = queryWrapper.orderByDesc("create_time"); + QueryWrapper queryWrapper1 = queryWrapper.orderByDesc("update_time"); List list = purchaseCatalogueService.list(queryWrapper1); @@ -352,7 +341,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl getReagentConsumableInventoryFull(QueryWrapper qw) { List list = reagentConsumableInventoryService.list(qw); @@ -394,7 +394,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,3); + standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,4); List list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper); @@ -554,14 +554,14 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl periodVerificationImplementationVOS = new ArrayList<>(); //供应商评价已审核列表 List evaluationFormVOS = new ArrayList<>(); - - List centralizedRequestVOList = new ArrayList<>(); //集中采购申请已审核列表 + List centralizedRequestVOList = new ArrayList<>(); + if (permissions.contains("reagent_centralized_request_audit")){ LambdaQueryWrapper centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>(); - centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,2); + centralizedRequestLambdaQueryWrapper.eq(CentralizedRequest::getStatus,2).or().eq(CentralizedRequest::getStatus, -2); List list = centralizedRequestService.list(centralizedRequestLambdaQueryWrapper); @@ -916,7 +916,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); - standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,4).or().eq(StandardMaterialApprovalForm::getCommitStatus, -4); + standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,5).or().eq(StandardMaterialApprovalForm::getCommitStatus, -5); List list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper); diff --git a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java index 2e8a8ca..cc6a437 100644 --- a/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java +++ b/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java @@ -78,7 +78,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl getStandardReserveSolutionVOList(IPage page, QueryWrapper qw) { IPage standardReserveSolutionVOPage = baseMapper.getStandardReserveSolutionVOPage(page, qw); @@ -225,6 +225,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl warehousingRecordFormDTOList, DLPUser dlpUser) { diff --git a/src/main/java/digital/laboratory/platform/reagent/utils/MinioProp.java b/src/main/java/digital/laboratory/platform/reagent/utils/MinioProp.java deleted file mode 100644 index 4634f7c..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/utils/MinioProp.java +++ /dev/null @@ -1,27 +0,0 @@ -package digital.laboratory.platform.reagent.utils; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * minio 属性值 - */ -@Data -@Component -@ConfigurationProperties(prefix = "minio") -public class MinioProp { - /** - * 连接url - */ - private String endpoint; - /** - * 用户名 - */ - private String accesskey; - /** - * 密码 - */ - private String secretKey; -} - \ No newline at end of file diff --git a/src/main/java/digital/laboratory/platform/reagent/utils/MinioUtils.java b/src/main/java/digital/laboratory/platform/reagent/utils/MinioUtils.java deleted file mode 100644 index dfce7e4..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/utils/MinioUtils.java +++ /dev/null @@ -1,64 +0,0 @@ -//package digital.laboratory.platform.reagent.utils; -//import com.alibaba.fastjson.JSONObject; -//import io.minio.MinioClient; -//import lombok.SneakyThrows; -//import lombok.extern.slf4j.Slf4j; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Component; -//import org.springframework.web.multipart.MultipartFile; -// -//@Slf4j -//@Component -//public class MinioUtils { -// -// @Autowired -// private MinioClient client; -// @Autowired -// private MinioProp minioProp; -// -// /** -// * 创建bucket -// * -// * @param bucketName bucket名称 -// */ -// @SneakyThrows -// public void createBucket(String bucketName) { -// if (!client.bucketExists(bucketName)) { -// client.makeBucket(bucketName); -// } -// } -// -// /** -// * 上传文件 -// * -// * @param file 文件 -// * @param bucketName 存储桶 -// * @return -// */ -// public JSONObject uploadFile(MultipartFile file, String bucketName) throws Exception { -// JSONObject res = new JSONObject(); -// res.put("code", 0); -// // 判断上传文件是否为空 -// if (null == file || 0 == file.getSize()) { -// res.put("msg", "上传文件不能为空"); -// return res; -// } -// try { -// // 判断存储桶是否存在 -// createBucket(bucketName); -// // 文件名 -// String originalFilename = file.getOriginalFilename(); -// // 新的文件名 = 存储桶名称_时间戳.后缀名 -// String fileName = bucketName + "_" + System.currentTimeMillis() + originalFilename.substring(originalFilename.lastIndexOf(".")); -// // 开始上传 -// client.putObject(bucketName, fileName, file.getInputStream(), file.getContentType()); -// res.put("code", 1); -// res.put("msg", minioProp.getEndpoint() + "/" + bucketName + "/" + fileName); -// return res; -// } catch (Exception e) { -// log.error("上传文件失败:{}", e.getMessage()); -// } -// res.put("msg", "上传失败"); -// return res; -// } -//} diff --git a/src/main/java/digital/laboratory/platform/reagent/utils/getTime.java b/src/main/java/digital/laboratory/platform/reagent/utils/getTime.java deleted file mode 100644 index e68115e..0000000 --- a/src/main/java/digital/laboratory/platform/reagent/utils/getTime.java +++ /dev/null @@ -1,14 +0,0 @@ -package digital.laboratory.platform.reagent.utils; - -import java.text.SimpleDateFormat; -import java.time.LocalTime; -import java.util.Date; - -public class getTime { - - public static LocalTime getTime(){ - - LocalTime now = LocalTime.now(); - - return now; - }} diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/CatalogueDetailsVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/CatalogueDetailsVO.java index 581eeeb..18c92d4 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/CatalogueDetailsVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/CatalogueDetailsVO.java @@ -12,4 +12,5 @@ import lombok.NoArgsConstructor; public class CatalogueDetailsVO extends CatalogueDetails { private String reagentConsumableName; + } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/OutgoingContentsVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/OutgoingContentsVO.java index ba5232c..af81432 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/OutgoingContentsVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/OutgoingContentsVO.java @@ -14,5 +14,8 @@ public class OutgoingContentsVO extends OutgoingContents { private ReagentConsumableInventory reagentConsumableInventory; + private Integer batch; + private String supplierName; + } diff --git a/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseCatalogueVO.java b/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseCatalogueVO.java index 0f42aa2..259bd10 100644 --- a/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseCatalogueVO.java +++ b/src/main/java/digital/laboratory/platform/reagent/vo/PurchaseCatalogueVO.java @@ -17,11 +17,8 @@ import java.util.List; @ApiModel(value = "采购目录VO") public class PurchaseCatalogueVO extends PurchaseCatalogue { - @ApiModelProperty(value="一级审核人名称") - private String primaryAuditorName; - - @ApiModelProperty(value="二级审核人名称") - private String secondaryAuditorName; + @ApiModelProperty(value="审核人名称") + private String auditorName; private List catalogueDetailsListList; diff --git a/src/main/resources/mapper/PurchaseCatalogueMapper.xml b/src/main/resources/mapper/PurchaseCatalogueMapper.xml index d70642f..0085d6b 100644 --- a/src/main/resources/mapper/PurchaseCatalogueMapper.xml +++ b/src/main/resources/mapper/PurchaseCatalogueMapper.xml @@ -6,16 +6,12 @@ - - - - - - - + + + + - @@ -28,8 +24,7 @@ - - + @@ -38,12 +33,7 @@ SELECT pc.*, (SELECT user.name FROM dlp_base.sys_user user - WHERE user.user_id = pc.primary_auditor_id) AS primary_auditor_name - , ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=pc.secondary_auditor_id - ) AS secondary_auditor_name + WHERE user.user_id = pc.auditor_id) AS auditor_name , ( SELECT user.name FROM dlp_base.sys_user user @@ -62,12 +52,7 @@ SELECT pc.*, (SELECT user.name FROM dlp_base.sys_user user - WHERE user.user_id = pc.primary_auditor_id) AS primary_auditor_name - , ( - SELECT user.name - FROM dlp_base.sys_user user - WHERE user.user_id=pc.secondary_auditor_id - ) AS secondary_auditor_name + WHERE user.user_id = pc.auditor_id) AS auditor_name , ( SELECT org.name FROM dlp_base.sys_org org diff --git a/src/main/resources/mapper/ReferenceMaterialMapper.xml b/src/main/resources/mapper/ReferenceMaterialMapper.xml index 764b256..c44893a 100644 --- a/src/main/resources/mapper/ReferenceMaterialMapper.xml +++ b/src/main/resources/mapper/ReferenceMaterialMapper.xml @@ -20,6 +20,7 @@ +