auditById(AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java
index 0be24e0..108b0ad 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java
@@ -1,17 +1,23 @@
package digital.laboratory.platform.reagent.controller;
+import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
+import digital.laboratory.platform.common.oss.service.OssFile;
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.PeriodVerificationImplementationDTO;
import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation;
import digital.laboratory.platform.reagent.service.PeriodVerificationImplementationService;
+import digital.laboratory.platform.reagent.vo.CheckScheduleVO;
import digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO;
+import org.joda.time.DateTime;
+import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -30,89 +36,88 @@ import java.util.List;
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (标准物质期间核查实施情况及结果记录表) 前端控制器
- *
+ *
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
* 这里写什么:
- * 为前端提供数据, 接受前端的数据
- * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
- * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
+ * 为前端提供数据, 接受前端的数据
+ * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
+ * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
*/
@RestController
@RequiredArgsConstructor
-@RequestMapping("/period_verification_implementation" )
+@RequestMapping("/period_verification_implementation")
@Api(value = "period_verification_implementation", tags = "(标准物质期间核查实施情况及结果记录表)管理")
public class PeriodVerificationImplementationController {
- private final PeriodVerificationImplementationService periodVerificationImplementationService;
+ private final PeriodVerificationImplementationService periodVerificationImplementationService;
+
+ private final OssFile ossFile;
- /**
- * 通过id查询(标准物质期间核查实施情况及结果记录表)
- * @param periodVerificationImplementationId id
- * @return R
- */
- @ApiOperation(value = "通过id查询", notes = "通过id查询")
- @GetMapping( )
+ /**
+ * 通过id查询(标准物质期间核查实施情况及结果记录表)
+ *
+ * @param periodVerificationImplementationId id
+ * @return R
+ */
+ @ApiOperation(value = "通过id查询", notes = "通过id查询")
+ @GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" )
- public R getById( String periodVerificationImplementationId, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ public R getById(String periodVerificationImplementationId, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.getPeriodVerificationImplementationVO(periodVerificationImplementationId);
- return R.ok(periodVerificationImplementation);
- //return R.ok(periodVerificationImplementationService.getById(periodVerificationImplementationId));
- }
+ return R.ok(periodVerificationImplementation);
+ //return R.ok(periodVerificationImplementationService.getById(periodVerificationImplementationId));
+ }
- /**
+ /**
* 分页查询
- * @param page 分页对象
+ *
+ * @param page 分页对象
* @param periodVerificationImplementation (标准物质期间核查实施情况及结果记录表)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
- @GetMapping("/page" )
+ @GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_page')" )
- public R> getPeriodVerificationImplementationPage(Page page, String name,PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
-
- if (name!=null){
-
- IPage periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.query()
- .orderByDesc("create_time")
- );
- return R.ok(periodVerificationImplementationSList);
- }
-
- IPage periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.query()
- .orderByDesc("create_time")
- );
- return R.ok(periodVerificationImplementationSList);
+ public R> getPeriodVerificationImplementationPage(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, String referenceMaterialName, PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ IPage periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.query()
+ .like(StrUtil.isNotBlank(referenceMaterialName), "reference_material_name", referenceMaterialName)
+ .ge("create_time", startTime)
+ .le("create_time", endTime)
+ .orderByDesc("create_time")
+ );
+ return R.ok(periodVerificationImplementationSList);
// return R.ok(periodVerificationImplementationService.page(page, Wrappers.query(periodVerificationImplementation)));
}
/**
* 修改(标准物质期间核查实施情况及结果记录表)
+ *
* @param periodVerificationImplementationDTO (标准物质期间核查实施情况及结果记录表)
* @return R
*/
@ApiOperation(value = "录入(标准物质期间核查实施情况及结果记录表)", notes = "录入((标准物质期间核查实施情况及结果记录表)")
- @SysLog("录入((标准物质期间核查实施情况及结果记录表)" )
+ @SysLog("录入((标准物质期间核查实施情况及结果记录表)")
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_edit')" )
public R putUpdateById(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTO, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO,dlpUser);
+ PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO, dlpUser);
- if (periodVerificationImplementation!=null) {
- return R.ok(periodVerificationImplementation, "保存成功");
- }
- else {
- return R.failed("保存对象失败");
- }
+ if (periodVerificationImplementation != null) {
+ return R.ok(periodVerificationImplementation, "保存成功");
+ } else {
+ return R.failed("保存对象失败");
+ }
}
// /**
@@ -139,53 +144,87 @@ public class PeriodVerificationImplementationController {
//
// }
- /**
- * 提交(标准物质期间核查实施情况及结果记录表)
- * @param periodVerificationImplementationDTO (标准物质期间核查实施情况及结果记录表)
- * @return R
- */
- @ApiOperation(value = "提交(标准物质期间核查实施情况及结果记录表)", notes = "提交(标准物质期间核查实施情况及结果记录表)")
- @SysLog("提交(标准物质期间核查实施情况及结果记录表)" )
- @PostMapping("/commit")
+ /**
+ * 提交(标准物质期间核查实施情况及结果记录表)
+ *
+ * @param periodVerificationImplementationDTO (标准物质期间核查实施情况及结果记录表)
+ * @return R
+ */
+ @ApiOperation(value = "提交(标准物质期间核查实施情况及结果记录表)", notes = "提交(标准物质期间核查实施情况及结果记录表)")
+ @SysLog("提交(标准物质期间核查实施情况及结果记录表)")
+ @PostMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_commit')" )
- public R commitById(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTO, HttpServletRequest theHttpServletRequest) {
-
- Principal principal = theHttpServletRequest.getUserPrincipal();
-
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
-
- PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.commitById(periodVerificationImplementationDTO,dlpUser);
-
- if (periodVerificationImplementation!=null) {
- return R.ok(periodVerificationImplementation, "提交成功");
- }
- else {
- return R.failed("提交失败");
- }
- }
-
- /**
- * 审核(标准物质期间核查实施情况及结果记录表)
- * @param auditAndApproveDTO (标准物质期间核查实施情况及结果记录表)
- * @return R
- */
- @ApiOperation(value = "审核(标准物质期间核查实施情况及结果记录表)", notes = "审核(标准物质期间核查实施情况及结果记录表)")
- @SysLog("审核(标准物质期间核查实施情况及结果记录表)" )
- @PutMapping("/audit")
- @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_audit')" )
- public R auditById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
-
- PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.auditById(auditAndApproveDTO,dlpUser);
-
- if (periodVerificationImplementation!=null) {
- return R.ok(periodVerificationImplementation, "审核成功");
- }
- else {
- return R.failed("审核失败");
- }
- }
+ public R commitById(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTO, HttpServletRequest theHttpServletRequest) {
+
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.commitById(periodVerificationImplementationDTO, dlpUser);
+
+ if (periodVerificationImplementation != null) {
+ return R.ok(periodVerificationImplementation, "提交成功");
+ } else {
+ return R.failed("提交失败");
+ }
+ }
+
+ /**
+ * 审核(标准物质期间核查实施情况及结果记录表)
+ *
+ * @param auditAndApproveDTO (标准物质期间核查实施情况及结果记录表)
+ * @return R
+ */
+ @ApiOperation(value = "审核(标准物质期间核查实施情况及结果记录表)", notes = "审核(标准物质期间核查实施情况及结果记录表)")
+ @SysLog("审核(标准物质期间核查实施情况及结果记录表)")
+ @PutMapping("/audit")
+ @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_audit')")
+ public R auditById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.auditById(auditAndApproveDTO, dlpUser);
+
+ if (periodVerificationImplementation != null) {
+ return R.ok(periodVerificationImplementation, "审核成功");
+ } else {
+ return R.failed("审核失败");
+ }
+ }
+ /**-------标准物质期间核查计划和确认表打印*/
+ /**
+ * 标准物质期间核查计划和确认表打印
+ *
+ * @param id
+ * @return
+ */
+ @ApiOperation(value = "标准物质期间核查计划和确认表打印", notes = "标准物质期间核查计划和确认表打印")
+ @SysLog("期间核查计划打印")
+ @PostMapping("/print")
+// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
+ public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
+ System.out.println("bizApplyWord.................");
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ PeriodVerificationImplementationVO periodVerificationImplementationVO = periodVerificationImplementationService.getPeriodVerificationImplementationVO(id);
+ if (periodVerificationImplementationVO == null) {
+ throw new RuntimeException("未查询到相关信息");
+ }
+ String applyFileName = "标准物质期间核查实施情况及结果记录表" + id;
+ ;
+
+
+ String pdfFilePath = "document" + "/" + "periodVerificationImplementation" + "/" + id + "/" + applyFileName + ".pdf";
+ try {
+ //直接调用pdf方法
+ periodVerificationImplementationService.periodVerificationImplementationTablePDF(periodVerificationImplementationVO, 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/controller/PurchaseCatalogueController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java
index eb86cfd..e8af101 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java
@@ -92,15 +92,15 @@ public class PurchaseCatalogueController {
@ApiOperation(value = "分页查询已发布的采购目录明细", notes = "分页查询已发布的采购目录明细")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')")
- public R> getPurchaseCataloguePage(String name,HttpServletRequest theHttpServletRequest) {
+ public R> getPurchaseCataloguePage(String name,HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- Page vOpage = purchaseCatalogueService.getVOpage(name);
+ List list = purchaseCatalogueService.getList(name);
- return R.ok(vOpage);
+ return R.ok(list);
}
@@ -253,7 +253,7 @@ public class PurchaseCatalogueController {
Boolean aBoolean = purchaseCatalogueService.delCatalogue(purchaseCatalogueId);
if (aBoolean) {
- return R.ok("删除采购");
+ return R.ok("删除成功");
} else return R.failed("删除失败");
}
@@ -397,9 +397,9 @@ public class PurchaseCatalogueController {
return R.ok(anImport);
}
- /**-------出库清单*/
+ /**-------采购目录打印*/
/**
- * 出库清单
+ * 采购目录打印
*
* @param purchaseCatalogueId
*
diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListController.java b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListController.java
index 436aaf9..bbd8362 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListController.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
@@ -14,6 +15,8 @@ import digital.laboratory.platform.reagent.service.PurchaseListService;
import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO;
import digital.laboratory.platform.reagent.vo.PurchaseListPageVO;
import digital.laboratory.platform.reagent.vo.PurchaseListVO;
+import org.joda.time.DateTime;
+import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -25,6 +28,9 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.Principal;
+import java.sql.Date;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
import java.util.List;
/**
@@ -70,17 +76,18 @@ public class PurchaseListController {
/**
* 分页查询
* @param page 分页对象
- * @param purchaseList (采购清单)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_page')" )
- public R> getPurchaseListPage(Page page, PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) {
+ public R> getPurchaseListPage(Page page, @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 purchaseListSList = purchaseListService.getPurchaseListVOPage(page, Wrappers.query()
+ .ge(startTime!=null,"create_time",startTime)
+ .le(endTime!=null,"create_time",endTime)
.orderByDesc("create_time")
);
return R.ok(purchaseListSList);
@@ -105,24 +112,23 @@ public class PurchaseListController {
purchaseListService.editById(purchaseListDTO);
return R.ok("添加成功");
-
}
/**
* 新增(采购清单)
- * @param purchaseListDTOList (采购清单)
+ * @param id (采购清单)
* @return R
*/
@ApiOperation(value = "提交采购清单明细", notes = "提交采购清单明细")
@SysLog("提交采购清单明细" )
@PutMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_commit)" )
- public R commitById(List purchaseListDTOList, HttpServletRequest theHttpServletRequest) {
+ public R commitById(String id, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- PurchaseList purchaseList = purchaseListService.commitById(purchaseListDTOList);
+ PurchaseList purchaseList = purchaseListService.commitById(id);
if (purchaseList!=null) {
return R.ok(purchaseList, "提交成功");
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 eb4c358..096e9eb 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java
@@ -1,35 +1,51 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.LocalDateTimeUtil;
+import cn.hutool.core.io.IoUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.deepoove.poi.XWPFTemplate;
+import com.deepoove.poi.config.Configure;
+import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.core.util.R;
+import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
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.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.PurchasingPlanDTO;
-import digital.laboratory.platform.reagent.entity.ProcurementContent;
-import digital.laboratory.platform.reagent.entity.PurchaseCatalogue;
-import digital.laboratory.platform.reagent.entity.PurchasingPlan;
+import digital.laboratory.platform.reagent.entity.*;
import digital.laboratory.platform.reagent.service.PurchasingPlanService;
+import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
+import digital.laboratory.platform.reagent.vo.ProcurementContentVO;
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO;
import digital.laboratory.platform.reagent.vo.PurchasingPlanVO;
import digital.laboratory.platform.reagent.vo.ReplacementVO;
+import feign.Response;
import lombok.Data;
+import org.apache.commons.io.output.ByteArrayOutputStream;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.mock.web.MockMultipartFile;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.ByteArrayInputStream;
import java.security.Principal;
import java.sql.Date;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
/**
@@ -54,6 +70,12 @@ public class PurchasingPlanController {
@Autowired
private final PurchasingPlanService purchasingPlanService;
+ private final OssFile ossFile;
+
+ private final RemoteWord2PDFService remoteWord2PDFService;
+
+ private final ReagentConsumablesService reagentConsumablesService;
+
/**
* 通过id查询(采购计划)
*
@@ -321,7 +343,129 @@ public class PurchasingPlanController {
return R.failed("审批失败");
}
}
+ /**-------采购计划打印*/
+ /**
+ * 采购计划打印
+ *
+ * @param purchasingPlanId
+ *
+ * @return
+ */
+ @ApiOperation(value = "采购计划打印", notes = "采购计划打印")
+ @SysLog("采购计划打印")
+ @PostMapping("/print")
+// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
+ public void bizGetPDFInventory(String purchasingPlanId, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
+ System.out.println("bizApplyWord.................");
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ PurchasingPlanVO purchasingPlanVO = purchasingPlanService.getPurchasingPlanVO(purchasingPlanId);
+
+ List voList = purchasingPlanVO.getProcurementContentVOList();
+
+ if (voList.isEmpty()) {
+ throw new RuntimeException("未查询到相关信息");
+ }
+
+ String id = purchasingPlanVO.getPurchasingPlanId();
+
+ String applyFileName = "采购计划-"+id;
+
+ String pdfFilePath = "document" + "/"+"purchasingPlan" + "/" + id + "/" + applyFileName + ".pdf";
+ try {
+ //直接调用pdf方法
+ purchasingPlanTablePDF(purchasingPlanVO,id,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();
+ }
+ }
+
+
+ private void purchasingPlanTablePDF(PurchasingPlanVO purchasingPlanVO, String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
+ System.out.println("PurchasingPlanTablePDF.................");
+
+ List procurementContentVOList = purchasingPlanVO.getProcurementContentVOList();
+
+ ArrayList voList = new ArrayList<>();
+ for (ProcurementContentVO procurementContentVO : procurementContentVOList) {
+
+ ReagentConsumables byId = reagentConsumablesService.getById(procurementContentVO.getReagentConsumableId());
+
+ if (byId.getCategory().equals("试剂")|byId.getCategory().equals("耗材")){
+
+ voList.add(procurementContentVO);
+ }
+
+ }
+
+ //-----------------------------
+ // 生成 word 版本的 采购目录
+
+ String applyFileName = "采购计划-"+id;
+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ossFile.fileGet("template" + "/" + "试剂耗材采购计划表模板.docx", bos);
+
+ byte[] templateArray = bos.toByteArray();
+
+ ByteArrayInputStream bis = new ByteArrayInputStream(templateArray);
+ bos.close();
+
+ LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
+
+ Configure config = Configure.builder().
+ bind("voList", policy).build();
+ /**
+ * 循环表格
+ */
+ XWPFTemplate template = XWPFTemplate.compile(bis, config).render(
+ new HashMap() {{
+ put("voList", voList);
+ put("appropriationBudget",purchasingPlanVO.getAppropriationBudget());
+ put("id",id);
+ put("size",1);
+ put("createName", purchasingPlanVO.getCreateName());
+ put("primaryAuditorName", purchasingPlanVO.getPrimaryAuditorName());
+ put("approverName", purchasingPlanVO.getApproverName());
+ put("createTime",LocalDateTimeUtil.format(purchasingPlanVO.getCommitTime(),"yyyy年MM月dd日"));
+ put("auditTimeOfPrimary",LocalDateTimeUtil.format(purchasingPlanVO.getAuditTimeOfPrimary(),"yyyy年MM月dd日"));
+ put("approvalTime",LocalDateTimeUtil.format(purchasingPlanVO.getApprovalTime(),"yyyy年MM月dd日"));
+ }}
+ );
+ bis.close();
+
+ ByteArrayOutputStream fosWord = new ByteArrayOutputStream();
+ template.write(fosWord);
+ template.close();
+
+ //------------
+ ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
+ fosWord.close();
+
+ //MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
+ MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
+ Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
+ fisWord.close();
+
+
+ ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
+ IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
+ ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
+ outPDF.close();
+
+
+ ossFile.fileSave("document" + "/" + "purchasingPlan" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
+ isPDF.close();
+
+
+ System.out.println(String.format("转换为 PDF 结束"));
+
+ }
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 72423f2..9507157 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
@@ -101,10 +101,13 @@ public class ReagentConsumableInventoryController {
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
@GetMapping("/standardList")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
- public R> getReagentConsumableInventoryList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
+ public R> getReagentConsumableInventoryList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- Page reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, reagentConsumableName);
+ IPage reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, Wrappers.query()
+ .like(StrUtil.isNotBlank(reagentConsumableName),"reagent_consumable_name",reagentConsumableName)
+ .eq("category", "标准物质").or()
+ .eq("category", "标准储备溶液"));
return R.ok(reagentConsumableInventoryRMVOList);
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
@@ -112,11 +115,14 @@ public class ReagentConsumableInventoryController {
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
@GetMapping("/List")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
- public R> getList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
+ public R> getList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- Page reagentConsumableInventoryVOList = reagentConsumableInventoryService.getReagentConsumableInventoryVOList(page, reagentConsumableName);
- return R.ok(reagentConsumableInventoryVOList);
+ IPage reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, Wrappers.query()
+ .like(StrUtil.isNotBlank(reagentConsumableName),"reagent_consumable_name",reagentConsumableName)
+ .eq("category", "试剂").or()
+ .eq("category", "耗材"));
+ return R.ok(reagentConsumableInventoryRMVOList);
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumablesController.java b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumablesController.java
index eae674d..8f1f820 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumablesController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumablesController.java
@@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.Principal;
+import java.util.List;
/**
* (试剂耗材类)
@@ -54,18 +55,40 @@ public class ReagentConsumablesController {
@ApiOperation(value = "分页查询试剂耗材类(包括标准物质)", notes = "分页查询试剂耗材类(包括标准物质)")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
- public R> getReagentConsumablesPage(Page page, String name, HttpServletRequest theHttpServletRequest) {
+ public R> getReagentConsumablesPage(Page page, String name, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- IPage reagentConsumablesSList = reagentConsumablesService.page(page, Wrappers.query()
+ List list = reagentConsumablesService.list(Wrappers.query()
.eq("category", "试剂").or()
.eq("category", "耗材").or()
.eq("category", "标准物质")
- .eq(StrUtil.isNotBlank(name),"reagent_consumable_name",name)
+ .like(StrUtil.isNotBlank(name), "reagent_consumable_name", name)
.orderByDesc("create_time")
);
- return R.ok(reagentConsumablesSList);
+
+
+ return R.ok(list);
+// return R.ok(reagentConsumablesService.page(page, Wrappers.query(reagentConsumables)));
+ }
+
+ /**
+ * 分页查询
+ *
+ * @param id 分页对象
+ * @param id (试剂耗材类)
+ * @return
+ */
+ @ApiOperation(value = "通过ID查询试剂耗材类(包括标准物质)", notes = "通过ID查询试剂耗材类")
+ @GetMapping()
+// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
+ public R getReagentConsumables(String id, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ ReagentConsumables byId = reagentConsumablesService.getById(id);
+
+ return R.ok(byId);
// return R.ok(reagentConsumablesService.page(page, Wrappers.query(reagentConsumables)));
}
}
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 99b1d03..1a27185 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java
@@ -7,8 +7,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.reagent.entity.RequisitionRecord;
import digital.laboratory.platform.reagent.service.RequisitionRecordService;
+import digital.laboratory.platform.reagent.vo.ProcurementContentVO;
+import digital.laboratory.platform.reagent.vo.PurchasingPlanVO;
import digital.laboratory.platform.reagent.vo.RequisitionRecordVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
@@ -21,6 +24,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.Principal;
+import java.util.List;
/**
* (试剂耗材领用记录表)
@@ -43,7 +47,37 @@ public class RequisitionRecordController {
private final RequisitionRecordService requisitionRecordService;
+ private final OssFile ossFile;
+ @ApiOperation(value = "试剂耗材领用记录表打印", notes = "试剂耗材领用记录表打印")
+ @SysLog("试剂耗材领用申请表打印")
+ @PostMapping("/print")
+// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
+ public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
+ System.out.println("bizApplyWord.................");
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ List voList = requisitionRecordService.getRequisitionRecordVO(id);
+
+
+ if (voList.isEmpty()) {
+ throw new RuntimeException("未查询到相关信息");
+ }
+
+ String applyFileName = "试剂耗材领用记录表-"+id;
+
+ String pdfFilePath = "document" + "/"+"requisitionRecord" + "/" + id + "/" + applyFileName + ".pdf";
+ try {
+ //直接调用pdf方法
+ requisitionRecordService.rquisitionRecordTablePDF(voList,id,theHttpServletRequest,httpServletResponse);
+ ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
+ httpServletResponse.setContentType(applyFileName);
+ } catch (Exception e) {
+ System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage()));
+ e.printStackTrace();
+ }
+ }
/**
* 分页查询
* @param page 分页对象
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 88b5a4d..a300d2b 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java
@@ -1,17 +1,23 @@
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.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
+import digital.laboratory.platform.common.oss.service.OssFile;
import digital.laboratory.platform.reagent.dto.StandardMaterialApplicationDTO;
+import digital.laboratory.platform.reagent.entity.CatalogueDetails;
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 org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -23,150 +29,215 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.Principal;
+import java.time.LocalDate;
+import java.util.ArrayList;
+import java.util.List;
/**
* (标准物质领用/归还登记表)
*
* @author Zhang Xiaolong created at 2023-03-10
- * @describe (标准物质领用/归还登记表) 前端控制器
- *
+ * @describe (标准物质领用 / 归还登记表) 前端控制器
+ *
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
* 这里写什么:
- * 为前端提供数据, 接受前端的数据
- * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
- * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
+ * 为前端提供数据, 接受前端的数据
+ * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
+ * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
*/
@RestController
@RequiredArgsConstructor
-@RequestMapping("/standard_material_application" )
+@RequestMapping("/standard_material_application")
@Api(value = "standard_material_application", tags = "(标准物质领用/归还登记表)管理")
public class StandardMaterialApplicationController {
- private final StandardMaterialApplicationService standardMaterialApplicationService;
+ private final StandardMaterialApplicationService standardMaterialApplicationService;
+
+ private final OssFile ossFile;
- /**
- * 通过id查询(标准物质领用/归还登记表)
- * @param standardMaterialApplicationId id
- * @return R
- */
- @ApiOperation(value = "通过id查询", notes = "通过id查询")
- @GetMapping( )
+ /**
+ * 通过id查询(标准物质领用/归还登记表)
+ *
+ * @param id, id
+ * @return R
+ */
+ @ApiOperation(value = "通过id查询", notes = "通过id查询")
+ @GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
- public R getById( String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ public R getById(String id, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- StandardMaterialApplication standardMaterialApplication = standardMaterialApplicationService.getById(standardMaterialApplicationId);
- return R.ok(standardMaterialApplication);
- //return R.ok(standardMaterialApplicationService.getById(standardMaterialApplicationId));
- }
+ StandardMaterialApplicationVO standardMaterialApplicationVO = standardMaterialApplicationService.getStandardMaterialApplicationVO(id);
- /**
+ return R.ok(standardMaterialApplicationVO);
+ //return R.ok(standardMaterialApplicationService.getById(standardMaterialApplicationId));
+ }
+
+ /**
* 分页查询
- * @param page 分页对象
+ *
+ * @param page 分页对象
* @param standardMaterialApplication (标准物质领用/归还登记表)
* @return
*/
@ApiOperation(value = "领用分页查询", notes = "领用分页查询")
- @GetMapping("/page" )
+ @GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
public R> getStandardMaterialApplicationPage(Page page, StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- IPage standardMaterialApplicationSList = standardMaterialApplicationService.getPage(page, Wrappers.query()
- .orderByDesc("create_time")
- );
- return R.ok(standardMaterialApplicationSList);
+ IPage standardMaterialApplicationSList = standardMaterialApplicationService.getPage(page, Wrappers.query()
+ .orderByDesc("create_time")
+ );
+ return R.ok(standardMaterialApplicationSList);
// return R.ok(standardMaterialApplicationService.page(page, Wrappers.query(standardMaterialApplication)));
}
- /**
- * 分页查询
- * @param page 分页对象
- * @param standardMaterialApplication (标准物质领用/归还登记表)
- * @return
- */
- @ApiOperation(value = "归还任务分页查询", notes = "归还任务分页查询")
- @GetMapping("/return/page" )
+ /**
+ * 分页查询
+ *
+ * @param page 分页对象
+ * @param standardMaterialApplication (标准物质领用/归还登记表)
+ * @return
+ */
+ @ApiOperation(value = "归还任务分页查询", notes = "归还任务分页查询")
+ @GetMapping("/return/page")
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
- public R> getList(Page page, StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
-
- IPage standardMaterialApplicationSList = standardMaterialApplicationService.getList(page, Wrappers.query()
- .orderByDesc("create_time")
- .eq("status",0)
- );
- return R.ok(standardMaterialApplicationSList);
+ public R> getList(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 standardMaterialApplicationSList = standardMaterialApplicationService.getList(page, Wrappers.query()
+ .eq("status", 0)
+ .like(StrUtil.isNotBlank(name),"reference_substance_name", name)
+ .ge(startTime != null, "create_time", startTime)
+ .le(endTime != null, "create_time", endTime)
+ .orderByDesc("create_time")
+
+ );
+ return R.ok(standardMaterialApplicationSList);
// return R.ok(standardMaterialApplicationService.page(page, Wrappers.query(standardMaterialApplication)));
- }
-
- /**
- * 分页查询
- * @param page 分页对象
- * @param standardMaterialApplication (标准物质领用/归还登记表)
- * @return
- */
- @ApiOperation(value = "归还记录分页查询", notes = "归还记录分页查询")
- @GetMapping("/return" )
+ }
+
+ /**
+ * 分页查询
+ *
+ * @param page 分页对象
+ * @return
+ */
+ @ApiOperation(value = "归还记录分页查询", notes = "归还记录分页查询")
+ @GetMapping("/return")
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
- public R> getPage(Page page, StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
-
- IPage standardMaterialApplicationSList = standardMaterialApplicationService.getList(page, Wrappers.query()
- .orderByDesc("create_time")
- .eq("status",1)
- );
- return R.ok(standardMaterialApplicationSList);
+ public R> getPage(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 standardMaterialApplicationSList = standardMaterialApplicationService.getList(page, Wrappers.query()
+ .eq("status", 1)
+ .like(StrUtil.isNotBlank(name),"reference_substance_name", name)
+ .ge(startTime != null, "create_time", startTime)
+ .le(endTime != null, "create_time", endTime)
+ .orderByDesc("create_time")
+ );
+ return R.ok(standardMaterialApplicationSList);
// return R.ok(standardMaterialApplicationService.page(page, Wrappers.query(standardMaterialApplication)));
- }
+ }
/**
* 归还(标准物质领用/归还登记表)
+ *
* @param standardMaterialApplicationDTO (标准物质领用/归还登记表)
* @return R
*/
@ApiOperation(value = "归还(标准物质领用/归还登记表)", notes = "归还(标准物质领用/归还登记表)")
- @SysLog("修改(标准物质领用/归还登记表)" )
+ @SysLog("修改(标准物质领用/归还登记表)")
@PutMapping
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_edit')" )
public R putUpdateById(@RequestBody StandardMaterialApplicationDTO standardMaterialApplicationDTO, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- StandardMaterialApplication standardMaterialApplication = standardMaterialApplicationService.returnById(standardMaterialApplicationDTO);
+ StandardMaterialApplication standardMaterialApplication = standardMaterialApplicationService.returnById(standardMaterialApplicationDTO);
- if (standardMaterialApplication!=null){
- return R.ok(standardMaterialApplication,"归还成功");
- }else return R.failed("归还失败");
- }
+ if (standardMaterialApplication != null) {
+ return R.ok(standardMaterialApplication, "归还成功");
+ } else return R.failed("归还失败");
+ }
/**
* 通过id删除(标准物质领用/归还登记表)
+ *
* @param standardMaterialApplicationId id
* @return R
*/
@ApiOperation(value = "通过id删除(标准物质领用/归还登记表)", notes = "通过id删除(标准物质领用/归还登记表)")
- @SysLog("通过id删除(标准物质领用/归还登记表)" )
- @DeleteMapping("/{standardMaterialApplicationId}" )
+ @SysLog("通过id删除(标准物质领用/归还登记表)")
+ @DeleteMapping("/{standardMaterialApplicationId}")
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_del')" )
- public R deleteById( String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ public R deleteById(String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardMaterialApplication oldStandardMaterialApplication = standardMaterialApplicationService.getById(standardMaterialApplicationId);
- if (standardMaterialApplicationService.removeById(standardMaterialApplicationId)) {
- return R.ok(oldStandardMaterialApplication, "对象删除成功");
- }
- else {
- return R.failed(oldStandardMaterialApplication, "对象删除失败");
- }
+ if (standardMaterialApplicationService.removeById(standardMaterialApplicationId)) {
+ return R.ok(oldStandardMaterialApplication, "对象删除成功");
+ } else {
+ return R.failed(oldStandardMaterialApplication, "对象删除失败");
+ }
+
+ }
+
+ /**-------采购目录打印*/
+ /**
+ * 采购目录打印
+ *
+ * @param id
+ * @return
+ */
+ @ApiOperation(value = "标准物质领用归还登记表打印", notes = "标准物质领用归还登记表打印")
+ @SysLog("标准物质领用归还登记表打印")
+ @PostMapping("/print")
+// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
+ public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
+ System.out.println("bizApplyWord.................");
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ String ids = IdWorker.get32UUID().toUpperCase();
+
+ String[] split = id.split(",");
+
+ List voList = new ArrayList<>();
+
+ for (String s : split) {
+
+ StandardMaterialApplicationVO standardMaterialApplicationVO = standardMaterialApplicationService.getStandardMaterialApplicationVO(s);
+
+ voList.add(standardMaterialApplicationVO);
+ }
+
+ if (voList.isEmpty()) {
+ throw new RuntimeException("未查询到相关信息");
+ }
+
+
+ String applyFileName = "标准物质领用归还登记表-" + ids;
+ String pdfFilePath = "document" + "/" + "standardMaterialApplication" + "/" + ids + "/" + applyFileName + ".pdf";
+ try {
+ //直接调用pdf方法
+ standardMaterialApplicationService.standardMaterialApplicationTablePDF(voList, ids, 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/controller/StandardMaterialApprovalFormController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java
index 09875a3..f55a486 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java
@@ -1,6 +1,7 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.date.DateTime;
+import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@@ -10,12 +11,14 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
+import digital.laboratory.platform.common.oss.service.OssFile;
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.StandardMaterialApprovalFormDTO;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
import digital.laboratory.platform.reagent.service.StandardMaterialApprovalFormService;
+import digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO;
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -29,190 +32,222 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.Principal;
+import java.time.LocalDate;
/**
* (标准物质停用/报废销毁/恢复/降级使用审批表)
*
* @author Zhang Xiaolong created at 2023-03-10
- * @describe (标准物质停用/报废销毁/恢复/降级使用审批表) 前端控制器
- *
+ * @describe (标准物质停用 / 报废销毁 / 恢复 / 降级使用审批表) 前端控制器
+ *
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
* 这里写什么:
- * 为前端提供数据, 接受前端的数据
- * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
- * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
+ * 为前端提供数据, 接受前端的数据
+ * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
+ * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
*/
@RestController
@RequiredArgsConstructor
-@RequestMapping("/standard_material_approval_form" )
+@RequestMapping("/standard_material_approval_form")
@Api(value = "standard_material_approval_form", tags = "(标准物质停用/报废销毁/恢复/降级使用审批表)管理")
public class StandardMaterialApprovalFormController {
- private final StandardMaterialApprovalFormService standardMaterialApprovalFormService;
+ private final StandardMaterialApprovalFormService standardMaterialApprovalFormService;
+
+ private final ReferenceMaterialService referenceMaterialService;
- private final ReferenceMaterialService referenceMaterialService;
+ private final OssFile ossFile;
- /**
- * 通过id查询(标准物质停用/报废销毁/恢复/降级使用审批表)
- * @param id
- * @return R
- */
- @ApiOperation(value = "通过id查询", notes = "通过id查询")
- @GetMapping( )
+ /**
+ * 通过id查询(标准物质停用/报废销毁/恢复/降级使用审批表)
+ *
+ * @param id
+ * @return R
+ */
+ @ApiOperation(value = "通过id查询", notes = "通过id查询")
+ @GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
- public R getById(String id, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ public R getById(String id, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardMaterialApprovalFormVO standardMaterialApprovalForm = standardMaterialApprovalFormService.getVO(id);
- return R.ok(standardMaterialApprovalForm);
- //return R.ok(standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId));
- }
+ return R.ok(standardMaterialApprovalForm);
+ //return R.ok(standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId));
+ }
- /**
+ /**
* 分页查询
- * @param page 分页对象
- * @param referenceMaterialName (标准物质停用/报废销毁/恢复/降级使用审批表)
+ *
+ * @param page 分页对象
+ * @param referenceMaterialName (标准物质停用/报废销毁/恢复/降级使用审批表)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
- @GetMapping("/page" )
+ @GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_page)" )
- public R> getStandardMaterialApprovalFormPage(Page page, String referenceMaterialName, @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(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();
-
- QueryWrapper standardMaterialApprovalFormQueryWrapper = new QueryWrapper<>();
-
- if (referenceMaterialName!=null){
-
- standardMaterialApprovalFormQueryWrapper.eq("reference_material_name",referenceMaterialName);
- }
-
- if (startTime!=null&&endTime!=null){
-
- standardMaterialApprovalFormQueryWrapper.ge("create_time",startTime).le("create_time",endTime);
- }
-
- IPage standardMaterialApprovalFormSList = standardMaterialApprovalFormService.getVOPage(page, standardMaterialApprovalFormQueryWrapper
- .orderByDesc("create_time")
- );
- return R.ok(standardMaterialApprovalFormSList);
+ public R> getStandardMaterialApprovalFormPage(Page page, String referenceMaterialName, @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(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 standardMaterialApprovalFormSList = standardMaterialApprovalFormService.getVOPage(page, Wrappers.query()
+ .like(StrUtil.isNotBlank(referenceMaterialName), "reference_material_name", referenceMaterialName)
+ .ge(startTime != null, "create_time", startTime)
+ .le(endTime != null, "create_time", endTime)
+
+ );
+ return R.ok(standardMaterialApprovalFormSList);
// return R.ok(standardMaterialApprovalFormService.page(page, Wrappers.query(standardMaterialApprovalForm)));
}
/**
* 新增(标准物质停用/报废销毁/恢复/降级使用审批表)
+ *
* @param standardMaterialApprovalFormDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
* @return R
*/
@ApiOperation(value = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)")
- @SysLog("新增(标准物质停用/报废销毁/恢复/降级使用审批表)" )
+ @SysLog("新增(标准物质停用/报废销毁/恢复/降级使用审批表)")
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
public R postAddObject(@RequestBody StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.commitById(standardMaterialApprovalFormDTO, dlpUser);
+
+ if (standardMaterialApprovalForm != null) {
+ return R.ok(standardMaterialApprovalForm, "保存成功");
+ } else {
+ return R.failed(standardMaterialApprovalForm, "保存失败");
+ }
+ }
+
+ /**
+ * 一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)
+ *
+ * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
+ * @return R
+ */
+ @ApiOperation(value = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
+ @SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
+ @PutMapping("/auditPrimary")
+ @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditPrimary')")
+ public R auditPrimary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.auditPrimary(auditAndApproveDTO, dlpUser);
+
+ if (standardMaterialApprovalForm != null) {
+ return R.ok(standardMaterialApprovalForm, "审核成功");
+ } else {
+ return R.failed(standardMaterialApprovalForm, "审核失败");
+ }
+ }
- StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.commitById(standardMaterialApprovalFormDTO, dlpUser);
+ /**
+ * 二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)
+ *
+ * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
+ * @return R
+ */
+ @ApiOperation(value = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
+ @SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
+ @PutMapping("/auditSecondary")
+ @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditSecondary')")
+ public R auditSecondary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.auditSecondary(auditAndApproveDTO, dlpUser);
+
+ if (standardMaterialApprovalForm != null) {
+ return R.ok(standardMaterialApprovalForm, "审核成功");
+ } else {
+ return R.failed(standardMaterialApprovalForm, "审核失败");
+ }
+ }
- if (standardMaterialApprovalForm!=null) {
- return R.ok(standardMaterialApprovalForm, "保存成功");
- }
- else {
- return R.failed(standardMaterialApprovalForm, "保存失败");
- }
+ /**
+ * 审批(标准物质停用/报废销毁/恢复/降级使用审批表)
+ *
+ * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
+ * @return R
+ */
+ @ApiOperation(value = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)")
+ @SysLog("审批(标准物质停用/报废销毁/恢复/降级使用审批表)")
+ @PutMapping("/approve")
+ @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_approve')")
+ public R approveById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.approveById(auditAndApproveDTO, dlpUser);
+
+ if (standardMaterialApprovalForm != null) {
+ return R.ok(standardMaterialApprovalForm, "审批成功");
+ } else {
+ return R.failed(standardMaterialApprovalForm, "审批失败");
+ }
}
- /**
- * 一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)
- * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
- * @return R
- */
- @ApiOperation(value = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
- @SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" )
- @PutMapping("/auditPrimary")
- @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditPrimary')" )
- public R auditPrimary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
-
- StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.auditPrimary(auditAndApproveDTO,dlpUser);
-
- if (standardMaterialApprovalForm!=null) {
- return R.ok(standardMaterialApprovalForm, "审核成功");
- }
- else {
- return R.failed(standardMaterialApprovalForm, "审核失败");
- }
- }
-
- /**
- * 二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)
- * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
- * @return R
- */
- @ApiOperation(value = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
- @SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" )
- @PutMapping("/auditSecondary")
- @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditSecondary')" )
- public R auditSecondary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
-
- StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.auditSecondary(auditAndApproveDTO,dlpUser);
-
- if (standardMaterialApprovalForm!=null) {
- return R.ok(standardMaterialApprovalForm, "审核成功");
- }
- else {
- return R.failed(standardMaterialApprovalForm, "审核失败");
- }
- }
-
- /**
- * 审批(标准物质停用/报废销毁/恢复/降级使用审批表)
- * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
- * @return R
- */
- @ApiOperation(value = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)")
- @SysLog("审批(标准物质停用/报废销毁/恢复/降级使用审批表)" )
- @PutMapping("/approve")
- @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_approve')" )
- public R approveById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
-
- StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.approveById(auditAndApproveDTO,dlpUser);
-
- if (standardMaterialApprovalForm!=null) {
- return R.ok(standardMaterialApprovalForm, "审批成功");
- }
- else {
- return R.failed(standardMaterialApprovalForm, "审批失败");
- }
- }
-
- @ApiOperation(value = "标准物质停用", notes = "标准物质停用")
- @SysLog("标准物质停用" )
- @PostMapping("/deactivate")
+ @ApiOperation(value = "标准物质停用", notes = "标准物质停用")
+ @SysLog("标准物质停用")
+ @PostMapping("/deactivate")
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_deactivate')" )
- public R editById(String id, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ public R editById(String id, HttpServletRequest theHttpServletRequest) {
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- ReferenceMaterial byId = referenceMaterialService.getById(id);
+ ReferenceMaterial byId = referenceMaterialService.getById(id);
- byId.setStatus(-1);
+ byId.setStatus(-1);
+
+ if (referenceMaterialService.updateById(byId)) {
+ return R.ok("停用成功");
+ } else {
+ return R.failed("停用失败");
+ }
+ }
- if (referenceMaterialService.updateById(byId)) {
- return R.ok("停用成功");
- }
- else {
- return R.failed( "停用失败");
- }
- }
+ /**-------标准物质停用报废销毁恢复降级使用审批表打印*/
+ /**
+ * 标准物质停用报废销毁恢复降级使用审批表打印
+ *
+ * @param id
+ * @return
+ */
+ @ApiOperation(value = "标准物质停用报废销毁恢复降级使用审批表打印", notes = "标准物质停用报废销毁恢复降级使用审批表打印")
+ @SysLog("标准物质停用报废销毁恢复降级使用审批表打印")
+ @PostMapping("/print")
+// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
+ public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
+ System.out.println("bizApplyWord.................");
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ StandardMaterialApprovalFormVO standardMaterialApprovalFormVO = standardMaterialApprovalFormService.getVO(id);
+
+ if (standardMaterialApprovalFormVO == null) {
+ throw new RuntimeException("未查询到相关信息");
+ }
+ String applyFileName = "标准物质停用报废销毁恢复降级使用审批表" + id;
+ ;
+
+
+ String pdfFilePath = "document" + "/" + "standardMaterialApprovalForm" + "/" + id + "/" + applyFileName + ".pdf";
+ try {
+ //直接调用pdf方法
+ standardMaterialApprovalFormService.standardMaterialApprovalFormTablePDF(standardMaterialApprovalFormVO, 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/controller/StandardReserveSolutionController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java
index 0153658..c4f9b48 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java
@@ -1,6 +1,7 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.date.DateTime;
+import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@@ -10,11 +11,14 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
+import digital.laboratory.platform.common.oss.service.OssFile;
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionDTO;
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionFullDTO;
import digital.laboratory.platform.reagent.entity.StandardReserveSolution;
import digital.laboratory.platform.reagent.service.StandardReserveSolutionService;
import digital.laboratory.platform.reagent.utils.String2DateConverter;
+import digital.laboratory.platform.reagent.vo.SolutionUseFormVO;
+import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionFullVO;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO;
import org.springframework.format.annotation.DateTimeFormat;
@@ -31,6 +35,7 @@ import java.io.IOException;
import java.security.Principal;
import java.sql.Date;
import java.text.ParseException;
+import java.util.List;
/**
* (标准储备溶液配制及使用记录表)
@@ -53,6 +58,8 @@ public class StandardReserveSolutionController {
private final StandardReserveSolutionService standardReserveSolutionService;
+ private final OssFile ossFile;
+
/**
* 通过id查询(标准储备溶液配制及使用记录表)
* @param id id
@@ -79,24 +86,15 @@ public class StandardReserveSolutionController {
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
- 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 {
+ 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();
- QueryWrapper standardReserveSolutionQueryWrapper = new QueryWrapper<>();
- //通过名称查询
- if (solutionName!=null){
-
- standardReserveSolutionQueryWrapper.like("solution_name",solutionName);
- }
- if (startTime != null && endTime != null) {
-
- standardReserveSolutionQueryWrapper.ge("create_time",startTime).le("create_time",endTime);
- }
-
- IPage standardReserveSolutionSList = standardReserveSolutionService.getStandardReserveSolutionVOList(page,standardReserveSolutionQueryWrapper
- .orderByDesc("create_time")
- );
+ 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)));
}
@@ -159,4 +157,43 @@ public class StandardReserveSolutionController {
//return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId));
}
+ /**-------标准储备溶液配制及使用记录表打印*/
+ /**
+ * 标准储备溶液配制及使用记录表打印
+ *
+ * @param id
+ *
+ * @return
+ */
+ @ApiOperation(value = "标准储备溶液配制及使用记录表打印", notes = "标准储备溶液配制及使用记录表打印")
+ @SysLog("标准储备溶液配制及使用记录表打印")
+ @PostMapping("/print")
+// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
+ 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/controller/StandardSolutionCurveController.java b/src/main/java/digital/laboratory/platform/reagent/controller/StandardSolutionCurveController.java
index 907239a..776ebb9 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/StandardSolutionCurveController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/StandardSolutionCurveController.java
@@ -1,6 +1,7 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.date.DateTime;
+import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@@ -10,10 +11,14 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
+import digital.laboratory.platform.common.oss.service.OssFile;
import digital.laboratory.platform.reagent.dto.StandardSolutionCurveDTO;
import digital.laboratory.platform.reagent.entity.StandardSolutionCurve;
import digital.laboratory.platform.reagent.service.StandardSolutionCurveService;
+import digital.laboratory.platform.reagent.vo.SolutionUseFormVO;
+import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO;
import digital.laboratory.platform.reagent.vo.StandardSolutionCurveVO;
+import nonapi.io.github.classgraph.json.Id;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
@@ -26,84 +31,135 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.Principal;
+import java.time.LocalDate;
+import java.util.ArrayList;
+import java.util.List;
/**
* (标准工作曲线溶液配置记录表)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (标准工作曲线溶液配置记录表) 前端控制器
- *
+ *
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
* 这里写什么:
- * 为前端提供数据, 接受前端的数据
- * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
- * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
+ * 为前端提供数据, 接受前端的数据
+ * 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
+ * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
*/
@RestController
@RequiredArgsConstructor
-@RequestMapping("/standard_solution_curve" )
+@RequestMapping("/standard_solution_curve")
@Api(value = "standard_solution_curve", tags = "(标准工作曲线溶液配置记录表)管理")
public class StandardSolutionCurveController {
- private final StandardSolutionCurveService standardSolutionCurveService;
+ private final StandardSolutionCurveService standardSolutionCurveService;
+
+ private final OssFile ossFile;
- /**
+ /**
* 分页查询
+ *
* @param page 分页对象
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
- @GetMapping("/page" )
+ @GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" )
public R> getStandardSolutionCurvePage(Page page, String solutionName, @JsonFormat(pattern = "yyyy-MM-dd")
- @DateTimeFormat(pattern = "yyyy-MM-dd")DateTime startTime,@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
-
- QueryWrapper standardSolutionCurveQueryWrapper = new QueryWrapper<>();
-
-
- Principal principal = theHttpServletRequest.getUserPrincipal();
-
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
- if (solutionName!=null){
+ Principal principal = theHttpServletRequest.getUserPrincipal();
- standardSolutionCurveQueryWrapper.like("solution_name",solutionName);
- }
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- if (startTime!=null&&endTime!=null){
- standardSolutionCurveQueryWrapper.ge("create_time",startTime).le("create_time",endTime);
- }
-
- IPage standardSolutionCurveVOPage = standardSolutionCurveService.getStandardSolutionCurveVOPage(page, standardSolutionCurveQueryWrapper
- .orderByDesc("create_time")
- );
- return R.ok(standardSolutionCurveVOPage);
+ IPage standardSolutionCurveVOPage = standardSolutionCurveService.getStandardSolutionCurveVOPage(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(standardSolutionCurveVOPage);
}
/**
* 新增(标准工作曲线溶液配置记录表)
+ *
* @param standardSolutionCurveDTO (标准工作曲线溶液配置记录表)
* @return R
*/
@ApiOperation(value = "新增(标准工作曲线溶液配置记录表)", notes = "新增(标准工作曲线溶液配置记录表)")
- @SysLog("新增(标准工作曲线溶液配置记录表)" )
+ @SysLog("新增(标准工作曲线溶液配置记录表)")
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_add')" )
public R postAddObject(@RequestBody StandardSolutionCurveDTO standardSolutionCurveDTO, HttpServletRequest theHttpServletRequest) {
- Principal principal = theHttpServletRequest.getUserPrincipal();
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ StandardSolutionCurve standardSolutionCurve = standardSolutionCurveService.addById(standardSolutionCurveDTO, dlpUser);
+
+ if (standardSolutionCurve != null) {
+ return R.ok(standardSolutionCurve);
+ } else return R.failed("配置失败");
+ }
+
+/**-------标准工作曲线溶液配置记录表打印*/
+ /**
+ * 标准工作曲线溶液配置记录表打印
+ *
+ * @param idList
+ * @return
+ */
+ @ApiOperation(value = "标准工作曲线溶液配置记录表打印", notes = "标准工作曲线溶液配置记录表打印")
+ @SysLog("标准工作曲线溶液配置记录表打印")
+ @PostMapping("/print")
+// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
+ public void bizGetPDFInventory(String idList, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
+
+ String[] ids = idList.split(",");
+
+ System.out.println("bizApplyWord.................");
+ Principal principal = theHttpServletRequest.getUserPrincipal();
+ DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+
+ List voList = new ArrayList<>();
+
+ for (String id : ids) {
- DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
+ StandardSolutionCurveVO standardSolutionCurveVO = standardSolutionCurveService.getStandardSolutionCurveVO(id);
- StandardSolutionCurve standardSolutionCurve = standardSolutionCurveService.addById(standardSolutionCurveDTO, dlpUser);
+ voList.add(standardSolutionCurveVO);
+ }
- if (standardSolutionCurve!=null){
- return R.ok(standardSolutionCurve);
- }else return R.failed("配置失败");
- }
+ if (ids.length == 0 & ids == null) {
+ throw new RuntimeException(String.format("未查询到相关信息"));
+ }
+
+
+ if (voList.isEmpty()) {
+ throw new RuntimeException("未查询到相关信息");
+ }
+
+ String id = IdWorker.get32UUID().toUpperCase();
+
+ String applyFileName = "标准工作曲线溶液配制记录表-" + id;
+
+ String pdfFilePath = "document" + "/" + "standardSolutionCurve" + "/" + id + "/" + applyFileName + ".pdf";
+ try {
+ //直接调用pdf方法
+ standardSolutionCurveService.standardSolutionCurveTablePDF(voList, id, 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/controller/SupplierInformationController.java b/src/main/java/digital/laboratory/platform/reagent/controller/SupplierInformationController.java
index c8449c1..1e72f00 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/SupplierInformationController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/SupplierInformationController.java
@@ -86,24 +86,19 @@ public class SupplierInformationController {
* 分页查询
*
* @param page 分页对象
- * @param type (服务商/供应商信息)
+ * @param supplierName (服务商/供应商信息)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_page')" )
- public R> getSupplierInformationPage(Page page, String type, HttpServletRequest theHttpServletRequest) {
+ public R> getSupplierInformationPage(Page page, String supplierName, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
- QueryWrapper supplierInformationQueryWrapper = new QueryWrapper<>();
- if (type!=null) {
-
- supplierInformationQueryWrapper.eq("acceptable_condition","合格");
- }
-
- IPage supplierInformationSList = supplierInformationService.page(page, supplierInformationQueryWrapper
+ IPage supplierInformationSList = supplierInformationService.page(page, Wrappers.query()
+ .like(StrUtil.isNotBlank(supplierName),"supplier_name",supplierName)
.orderByDesc("create_time")
);
return R.ok(supplierInformationSList);
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 08373cb..679fa35 100644
--- a/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java
+++ b/src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java
@@ -1,10 +1,12 @@
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.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
@@ -18,6 +20,8 @@ import digital.laboratory.platform.reagent.service.WarehousingContentService;
import digital.laboratory.platform.reagent.service.WarehousingRecordFormService;
import digital.laboratory.platform.reagent.vo.WarehousingContentVO;
import digital.laboratory.platform.reagent.vo.WarehousingRecordFormVO;
+import org.joda.time.DateTime;
+import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -27,6 +31,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.security.Principal;
+import java.time.LocalDate;
import java.util.List;
/**
@@ -62,7 +67,7 @@ public class WarehousingRecordFormController {
@ApiOperation(value = "通过id查询入库信息", notes = "通过id查询入库信息")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_get')" )
- public R getById( String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) {
+ public R getById(String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@@ -75,18 +80,21 @@ public class WarehousingRecordFormController {
/**
* 分页查询
+ *
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
- public R> getWarehousingRecordFormVOPage( Page page,HttpServletRequest theHttpServletRequest) {
+ public R> getWarehousingRecordFormVOPage(Page page, @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();
- Page warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOList(page);
+ IPage warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOPage(page,Wrappers.query()
+ .ge(startTime != null, "create_time", startTime)
+ .le(endTime != null, "create_time", endTime));
return R.ok(warehousingRecordFormVOList);
@@ -95,30 +103,29 @@ public class WarehousingRecordFormController {
/**
* 分页查询
+ *
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/pageWC")
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
- public R> getWarehousingContentVOPage( Page page,String name,HttpServletRequest theHttpServletRequest) {
+ 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();
- QueryWrapper warehousingContentQueryWrapper = new QueryWrapper<>();
-
- if (name!=null){
-
- warehousingContentQueryWrapper.like("reagent_consumable_name",name);
-
- }
-
- IPage warehousingContentVOPage = warehousingContentService.getWarehousingContentVOPage(page, warehousingContentQueryWrapper);
+ IPage warehousingContentVOPage = warehousingContentService.getWarehousingContentVOPage(page, Wrappers.query()
+ .like(StrUtil.isNotBlank(name), "reagent_consumable_name", name)
+ .ge(startTime != null, "create_time", startTime)
+ .le(endTime != null, "create_time", endTime)
+ .eq("status", 1)
+ .orderByDesc("create_time"));
return R.ok(warehousingContentVOPage);
}
+
/**
* 新增签收记录表
*
diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/AcceptanceRecordFormDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/AcceptanceRecordFormDTO.java
index 0503299..f9b3894 100644
--- a/src/main/java/digital/laboratory/platform/reagent/dto/AcceptanceRecordFormDTO.java
+++ b/src/main/java/digital/laboratory/platform/reagent/dto/AcceptanceRecordFormDTO.java
@@ -32,7 +32,7 @@ public class AcceptanceRecordFormDTO {
private String packingInGoodCondition;
@ApiModelProperty(value = "(包装完好备注)")
- private String pcg_remarks;
+ private String pgc_remarks;
@ApiModelProperty(value = "(有效期)")
private String validityPeriod;
diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/CentralizedRequestDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/CentralizedRequestDTO.java
index 152a769..b6ba37d 100644
--- a/src/main/java/digital/laboratory/platform/reagent/dto/CentralizedRequestDTO.java
+++ b/src/main/java/digital/laboratory/platform/reagent/dto/CentralizedRequestDTO.java
@@ -32,4 +32,7 @@ public class CentralizedRequestDTO {
@ApiModelProperty(value="集中采购申请明细Id")
private String detailsOfCentralizedId;
+ @ApiModelProperty(value="用途/购买理由")
+ private String purpose;
+
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java
index bce0c74..6254f08 100644
--- a/src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java
+++ b/src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java
@@ -43,7 +43,6 @@ public class DecentralizedRequestDTO {
private String standardValueOrPurity;
@ApiModelProperty(value="(用途)")
-
private String purpose;
@ApiModelProperty(value="(分散采购申请ID)")
diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/OutgoingContentsDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/OutgoingContentsDTO.java
index 57c934e..6bc1954 100644
--- a/src/main/java/digital/laboratory/platform/reagent/dto/OutgoingContentsDTO.java
+++ b/src/main/java/digital/laboratory/platform/reagent/dto/OutgoingContentsDTO.java
@@ -9,6 +9,9 @@ public class OutgoingContentsDTO {
@ApiModelProperty(value = "(出库用途)")
private Integer outboundUse;
+ @ApiModelProperty(value = "(出库明细ID)")
+ private String id;
+
@ApiModelProperty(value = "(出库数量)")
private Integer quantity;
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 7ae5063..11aee14 100644
--- a/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java
+++ b/src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java
@@ -16,6 +16,8 @@ public class PurchasingPlanDTO {
@ApiModelProperty(value = "集中采购申请明细ID")
private String detailsOfCentralizedId;
+ private double unitPrice;
+
@ApiModelProperty(value = "采购计划id")
private String purchasingPlanId;
diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java
index 4f86e83..8d798a5 100644
--- a/src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java
+++ b/src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java
@@ -14,6 +14,9 @@ public class StandardMaterialApplicationDTO {
@ApiModelProperty(value = "格子id")
private String latticeId;
+ @ApiModelProperty(value = "位置信息")
+ private String location;
+
@ApiModelProperty(value = "是否用完")
private Boolean outOfUse;
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/dto/StandardSolutionCurveDTO.java b/src/main/java/digital/laboratory/platform/reagent/dto/StandardSolutionCurveDTO.java
index af36a1b..f80c7ff 100644
--- a/src/main/java/digital/laboratory/platform/reagent/dto/StandardSolutionCurveDTO.java
+++ b/src/main/java/digital/laboratory/platform/reagent/dto/StandardSolutionCurveDTO.java
@@ -7,8 +7,8 @@ import lombok.Data;
public class StandardSolutionCurveDTO {
- @ApiModelProperty(value="(标准储备溶液编号)")
- private String solutionNumbering;
+ @ApiModelProperty(value="(标准储备溶液Id)")
+ private String solutionId;
@ApiModelProperty(value="(逐级溶液浓度)")
private String stepSolutionConcentration;
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 2a983cb..72771b4 100644
--- a/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java
+++ b/src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java
@@ -55,7 +55,10 @@ public class WarehousingRecordFormDTO {
private Integer warningValue;
@ApiModelProperty(value = "(位置信息)")
- private String location;
+ private String location;
+
+ @ApiModelProperty(value = "(保管人名称)")
+ private String custodianName;
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java
index c717226..a4cf18a 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java
@@ -26,7 +26,8 @@ import lombok.EqualsAndHashCode;
@ApiModel(value = "(验收记录表)")
public class AcceptanceRecordForm extends BaseEntity {
-
+ @ApiModelProperty(value = "(试剂耗材名称)")
+ private String reagentConsumableName;
/**
* (供应商ID)
*/
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 139492e..44ccd56 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java
@@ -36,6 +36,8 @@ public class CentralizedRequest extends BaseEntity {
@ApiModelProperty(value="申请人ID")
private String applicantId;
+
+
/**
* (申请日期)
*/
@@ -69,7 +71,6 @@ public class CentralizedRequest extends BaseEntity {
private LocalDateTime auditTime;
-
/**
* centralizedRequestId
*/
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ComplianceCheck.java b/src/main/java/digital/laboratory/platform/reagent/entity/ComplianceCheck.java
index 01dbbd9..5168ad3 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/ComplianceCheck.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/ComplianceCheck.java
@@ -38,6 +38,8 @@ public class ComplianceCheck extends BaseEntity {
@ApiModelProperty(value = "(编号)")
private String number;
+ @ApiModelProperty(value="(试剂耗材名称)")
+ private String reagentConsumableName;
/**
* (二级审核意见)
*/
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java b/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java
index ee674b7..2d7c4e3 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java
@@ -146,4 +146,11 @@ public class DecentralizeDetails extends BaseEntity {
private String purpose;
+ /**
+ * (采购清单明细ID)
+ */
+ @ApiModelProperty(value="(采购清单明细ID)")
+ private String purchaseListDetailsId;
+
+
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/DetailsOfCentralized.java b/src/main/java/digital/laboratory/platform/reagent/entity/DetailsOfCentralized.java
index e8710ae..ce67bbd 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/DetailsOfCentralized.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/DetailsOfCentralized.java
@@ -59,6 +59,9 @@ public class DetailsOfCentralized extends BaseEntity {
@ApiModelProperty(value="备注")
private String remarks;
+ @ApiModelProperty(value="用途/购买理由")
+ private String purpose;
+
/**
* (换货试剂耗材ID)
*/
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java b/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java
index 470aca5..2ebe864 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java
@@ -119,4 +119,5 @@ public class PeriodVerificationPlan extends BaseEntity {
private String id;
+
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/PurchasingPlan.java b/src/main/java/digital/laboratory/platform/reagent/entity/PurchasingPlan.java
index df0a7a1..4a1b32d 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/PurchasingPlan.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/PurchasingPlan.java
@@ -32,7 +32,7 @@ public class PurchasingPlan extends BaseEntity {
* (经费预算)
*/
@ApiModelProperty(value = "经费预算")
- private double appropriationBudget;
+ private double appropriationBudget;
/**
* (制定人)
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java
index 367e97b..4627fae 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java
@@ -101,7 +101,7 @@ public class ReagentConsumableInventory extends BaseEntity {
* (包装份数)
*/
@ApiModelProperty(value = "(包装份数)")
- private Integer packagedCopies;
+ private String packagedCopies;
/**
* reagentConsumableInventoryId
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 3c8b719..6c71980 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java
@@ -69,7 +69,7 @@ public class ReagentConsumables extends BaseEntity {
* 包装份数
*/
@ApiModelProperty(value="包装份数")
- private Integer packagedCopies;
+ private String packagedCopies;
/**
* (标准值/纯度)
*/
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java
index ede2779..6bf4f50 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java
@@ -35,12 +35,21 @@ public class ReagentConsumablesSet extends BaseEntity {
@ApiModelProperty(value = "(标准物质编号)")
private String referenceMaterialNumber;
+
+ @ApiModelProperty(value = "(出库明细ID)")
+ private String outgoingContentId;
/**
* (数量)
*/
@ApiModelProperty(value = "(数量)")
private Integer quantity;
+ /**
+ * (出库数量)
+ */
+ @ApiModelProperty(value = "(出库数量)")
+ private Integer quantityDelivered;
+
/**
* (用途)
*/
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 4fee365..d088e6f 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java
@@ -63,4 +63,7 @@ public class ReferenceMaterial extends BaseEntity {
@ApiModelProperty(value="试剂耗材(含标准物质)仓库表ID")
private String reagentConsumableInventoryId;
+ @ApiModelProperty(value="试剂耗材(含标准物质)仓库表ID")
+ private String custodianName;
+
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/RequisitionRecord.java b/src/main/java/digital/laboratory/platform/reagent/entity/RequisitionRecord.java
index cc12fd6..280033f 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/RequisitionRecord.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/RequisitionRecord.java
@@ -66,6 +66,7 @@ public class RequisitionRecord extends BaseEntity {
@ApiModelProperty(value="编号")
private String number;
+ private String id;
/**
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/SolutionUseForm.java b/src/main/java/digital/laboratory/platform/reagent/entity/SolutionUseForm.java
index 79b109f..5872c64 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/SolutionUseForm.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/SolutionUseForm.java
@@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -12,7 +13,7 @@ import lombok.EqualsAndHashCode;
@TableName(value = "solution_use_form", autoResultMap = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "(标准溶液使用记录表)")
-public class SolutionUseForm {
+public class SolutionUseForm extends BaseEntity {
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="标准溶液使用记录表ID")
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java b/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java
index d14fab2..210620b 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java
@@ -26,6 +26,8 @@ import lombok.EqualsAndHashCode;
@ApiModel(value = "(标准物质领用归还登记表)")
public class StandardMaterialApplication extends BaseEntity {
+ @ApiModelProperty(value = "(标准物质名称)")
+ private String referenceSubstanceName;
/**
* (标准物质管理员ID)
*/
@@ -149,5 +151,4 @@ public class StandardMaterialApplication extends BaseEntity {
@ApiModelProperty(value="领取码")
private String claimCode;
-
}
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 37933b4..4257960 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java
@@ -55,6 +55,9 @@ public class StandardReserveSolution extends BaseEntity {
@ApiModelProperty(value="(标准物质ID)")
private String referenceMaterialId;
+ @ApiModelProperty(value="(标准溶液ID)")
+ private String referenceId;
+
/**
* (标准物质编号)
*/
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java
index f6a90bc..743cf05 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java
@@ -84,6 +84,11 @@ public class WarehousingBatchList extends BaseEntity {
*/
@ApiModelProperty(value="入库人ID")
private String depositorId;
+ /**
+ * 签收人ID
+ */
+ @ApiModelProperty(value = "入库位置")
+ private String location;
/**
* 签收内容表ID
@@ -105,4 +110,6 @@ public class WarehousingBatchList extends BaseEntity {
private String id;
+
+
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java
index f2538c3..7623715 100644
--- a/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java
+++ b/src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java
@@ -20,6 +20,12 @@ public class WarehousingContent extends BaseEntity {
*/
@ApiModelProperty(value = "(试剂耗材ID)")
private String reagentConsumableId;
+
+ /**
+ * (签收状态 0 未完成 1 已完成)
+ */
+ @ApiModelProperty(value = "(状态)")
+ private Integer status;
/**
* (试剂耗材ID)
*/
diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java
index a0624d5..3ba305e 100644
--- a/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java
+++ b/src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java
@@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm;
import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO;
import org.apache.ibatis.annotations.Mapper;
@@ -17,7 +18,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface AcceptanceRecordFormMapper extends BaseMapper {
- IPage getAcceptanceRecordFormVOPage(IPage page);
+ IPage getAcceptanceRecordFormVOPage(IPage page, @Param(Constants.WRAPPER)QueryWrapper qw);
AcceptanceRecordFormVO getAcceptanceRecordFormVO(String acceptanceRecordFormId);
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/CatalogueDetailsMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/CatalogueDetailsMapper.java
index 58b6aec..e0c8704 100644
--- a/src/main/java/digital/laboratory/platform/reagent/mapper/CatalogueDetailsMapper.java
+++ b/src/main/java/digital/laboratory/platform/reagent/mapper/CatalogueDetailsMapper.java
@@ -1,7 +1,10 @@
package digital.laboratory.platform.reagent.mapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import digital.laboratory.platform.reagent.entity.CatalogueDetails;
import digital.laboratory.platform.reagent.vo.CatalogueDetailsVO;
import org.apache.ibatis.annotations.Mapper;
@@ -18,5 +21,4 @@ import java.util.List;
@Mapper
public interface CatalogueDetailsMapper extends BaseMapper {
-
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/CentralizedRequestMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/CentralizedRequestMapper.java
index e20df3d..453400e 100644
--- a/src/main/java/digital/laboratory/platform/reagent/mapper/CentralizedRequestMapper.java
+++ b/src/main/java/digital/laboratory/platform/reagent/mapper/CentralizedRequestMapper.java
@@ -22,6 +22,7 @@ public interface CentralizedRequestMapper extends BaseMapper
IPage getCentralizedRequestVOPage(@Param("page") IPage page, @Param(Constants.WRAPPER) QueryWrapper qw);
List getCentralizedRequestVOList(@Param(Constants.WRAPPER) QueryWrapper qw);
+ List getVOList(@Param(Constants.WRAPPER) QueryWrapper qw);
CentralizedRequestVO getCentralizedRequestVO(String 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 fa99505..a8c0b8a 100644
--- a/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java
+++ b/src/main/java/digital/laboratory/platform/reagent/mapper/ReagentConsumableInventoryMapper.java
@@ -1,7 +1,11 @@
package digital.laboratory.platform.reagent.mapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
+import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -14,4 +18,6 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface ReagentConsumableInventoryMapper extends BaseMapper {
+ IPage getReagentConsumableInventoryVOPage (IPagepage, @Param(Constants.WRAPPER) QueryWrapper qw);
+
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/RequisitionRecordMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/RequisitionRecordMapper.java
index 202b66e..85bb01a 100644
--- a/src/main/java/digital/laboratory/platform/reagent/mapper/RequisitionRecordMapper.java
+++ b/src/main/java/digital/laboratory/platform/reagent/mapper/RequisitionRecordMapper.java
@@ -8,6 +8,8 @@ import digital.laboratory.platform.reagent.vo.RequisitionRecordVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
/**
* (试剂耗材领用记录表) Mapper 接口
*
@@ -19,4 +21,6 @@ public interface RequisitionRecordMapper extends BaseMapper {
IPage getRequisitionRecordVOPage (IPage page, QueryWrapper qw);
+ List getRequisitionRecordVO (String id);
+
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApplicationMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApplicationMapper.java
index 9ab88eb..3a6d5db 100644
--- a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApplicationMapper.java
+++ b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApplicationMapper.java
@@ -11,18 +11,23 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
+import java.util.List;
+
/**
* (标准物质领用/归还登记表) Mapper 接口
*
* @author Zhang Xiaolong created at 2023-03-10
- * @describe (标准物质领用/归还登记表) Mapper 类
+ * @describe (标准物质领用 / 归还登记表) Mapper 类
*/
@Mapper
public interface StandardMaterialApplicationMapper extends BaseMapper {
- IPage getStandardMaterialApplicationVOPage (IPage page ,@Param(Constants.WRAPPER) QueryWrapper qw);
+ IPage getStandardMaterialApplicationVOPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw);
+
+ IPage getStandardMaterialApplicationVOList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw);
- IPage getStandardMaterialApplicationVOList (IPage page , @Param(Constants.WRAPPER)QueryWrapper qw);
+ StandardMaterialApplicationVO getStandardMaterialApplicationVO(String id
+ );
}
diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApprovalFormMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApprovalFormMapper.java
index b770d3c..4431eb2 100644
--- a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApprovalFormMapper.java
+++ b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApprovalFormMapper.java
@@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
import org.apache.ibatis.annotations.Mapper;
@@ -17,7 +18,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface StandardMaterialApprovalFormMapper extends BaseMapper {
- IPage getVOPage(IPage page, QueryWrapper qw);
+ IPage getVOPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw);
StandardMaterialApprovalFormVO getVO (String id);
diff --git a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardSolutionCurveMapper.java b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardSolutionCurveMapper.java
index 18ad9e0..a322e07 100644
--- a/src/main/java/digital/laboratory/platform/reagent/mapper/StandardSolutionCurveMapper.java
+++ b/src/main/java/digital/laboratory/platform/reagent/mapper/StandardSolutionCurveMapper.java
@@ -3,11 +3,14 @@ package digital.laboratory.platform.reagent.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
import digital.laboratory.platform.reagent.entity.StandardSolutionCurve;
import digital.laboratory.platform.reagent.vo.StandardSolutionCurveVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
/**
* (标准工作曲线溶液配置记录表) Mapper 接口
*
@@ -17,6 +20,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface StandardSolutionCurveMapper extends BaseMapper {
- IPage getStandardSolutionCurveVOPage(IPage page, QueryWrapper qw);
+ IPage getStandardSolutionCurveVOPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper