杨海航 2 years ago
parent a6f72d9c4c
commit 48ab83a8f8
  1. 18
      pom.xml
  2. 151
      src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceContentController.java
  3. 59
      src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java
  4. 28
      src/main/java/digital/laboratory/platform/reagent/controller/ApplicationForUseController.java
  5. 151
      src/main/java/digital/laboratory/platform/reagent/controller/BlacklistController.java
  6. 90
      src/main/java/digital/laboratory/platform/reagent/controller/CabinetFormController.java
  7. 151
      src/main/java/digital/laboratory/platform/reagent/controller/CatalogueDetailsController.java
  8. 32
      src/main/java/digital/laboratory/platform/reagent/controller/CentralizedRequestController.java
  9. 151
      src/main/java/digital/laboratory/platform/reagent/controller/CheckContentController.java
  10. 68
      src/main/java/digital/laboratory/platform/reagent/controller/CheckScheduleController.java
  11. 71
      src/main/java/digital/laboratory/platform/reagent/controller/ComplianceCheckController.java
  12. 151
      src/main/java/digital/laboratory/platform/reagent/controller/DecentralizeDetailsController.java
  13. 38
      src/main/java/digital/laboratory/platform/reagent/controller/DecentralizedRequestController.java
  14. 35
      src/main/java/digital/laboratory/platform/reagent/controller/DeliveryRegistrationFormController.java
  15. 151
      src/main/java/digital/laboratory/platform/reagent/controller/DetailsOfCentralizedController.java
  16. 49
      src/main/java/digital/laboratory/platform/reagent/controller/EvaluationFormController.java
  17. 2
      src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java
  18. 151
      src/main/java/digital/laboratory/platform/reagent/controller/LatticeFormController.java
  19. 2
      src/main/java/digital/laboratory/platform/reagent/controller/OutgoingContentsController.java
  20. 10
      src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java
  21. 151
      src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationPlanController.java
  22. 103
      src/main/java/digital/laboratory/platform/reagent/controller/ProvideServicesOrSuppliesController.java
  23. 31
      src/main/java/digital/laboratory/platform/reagent/controller/PurchaseCatalogueController.java
  24. 53
      src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListController.java
  25. 149
      src/main/java/digital/laboratory/platform/reagent/controller/PurchaseListDetailsController.java
  26. 64
      src/main/java/digital/laboratory/platform/reagent/controller/PurchasingPlanController.java
  27. 46
      src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumableInventoryController.java
  28. 90
      src/main/java/digital/laboratory/platform/reagent/controller/ReagentConsumablesController.java
  29. 17
      src/main/java/digital/laboratory/platform/reagent/controller/RequisitionRecordController.java
  30. 1
      src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApplicationController.java
  31. 93
      src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java
  32. 2
      src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java
  33. 90
      src/main/java/digital/laboratory/platform/reagent/controller/StandardSolutionCurveController.java
  34. 6
      src/main/java/digital/laboratory/platform/reagent/controller/StorageRegistrationFormController.java
  35. 94
      src/main/java/digital/laboratory/platform/reagent/controller/StorageRoomFormController.java
  36. 75
      src/main/java/digital/laboratory/platform/reagent/controller/SupplierInformationController.java
  37. 85
      src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java
  38. 39
      src/main/java/digital/laboratory/platform/reagent/dto/AcceptanceRecordFormDTO.java
  39. 23
      src/main/java/digital/laboratory/platform/reagent/dto/ApplicationForUseDTO.java
  40. 12
      src/main/java/digital/laboratory/platform/reagent/dto/AuditDecentralizedRequestDTO.java
  41. 10
      src/main/java/digital/laboratory/platform/reagent/dto/CentralizedRequestDTO.java
  42. 2
      src/main/java/digital/laboratory/platform/reagent/dto/CheckContentDTO.java
  43. 19
      src/main/java/digital/laboratory/platform/reagent/dto/ComplianceCheckDTO.java
  44. 4
      src/main/java/digital/laboratory/platform/reagent/dto/DecentralizedRequestDTO.java
  45. 32
      src/main/java/digital/laboratory/platform/reagent/dto/EvaluationFormDTO.java
  46. 1
      src/main/java/digital/laboratory/platform/reagent/dto/OutgoingContentsDTO.java
  47. 35
      src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationImplementationDTO.java
  48. 29
      src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationPlanDTO.java
  49. 11
      src/main/java/digital/laboratory/platform/reagent/dto/PurchaseListDTO.java
  50. 21
      src/main/java/digital/laboratory/platform/reagent/dto/PurchasingPlanDTO.java
  51. 3
      src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java
  52. 4
      src/main/java/digital/laboratory/platform/reagent/dto/SupplierInformationDTO.java
  53. 36
      src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java
  54. 5
      src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceContent.java
  55. 27
      src/main/java/digital/laboratory/platform/reagent/entity/AcceptanceRecordForm.java
  56. 6
      src/main/java/digital/laboratory/platform/reagent/entity/ApplicationForUse.java
  57. 3
      src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java
  58. 28
      src/main/java/digital/laboratory/platform/reagent/entity/CabinetForm.java
  59. 15
      src/main/java/digital/laboratory/platform/reagent/entity/CentralizedRequest.java
  60. 41
      src/main/java/digital/laboratory/platform/reagent/entity/CheckContent.java
  61. 4
      src/main/java/digital/laboratory/platform/reagent/entity/CheckSchedule.java
  62. 19
      src/main/java/digital/laboratory/platform/reagent/entity/ComplianceCheck.java
  63. 8
      src/main/java/digital/laboratory/platform/reagent/entity/DecentralizeDetails.java
  64. 8
      src/main/java/digital/laboratory/platform/reagent/entity/DecentralizedRequest.java
  65. 12
      src/main/java/digital/laboratory/platform/reagent/entity/DeliveryRegistrationForm.java
  66. 10
      src/main/java/digital/laboratory/platform/reagent/entity/DetailsOfCentralized.java
  67. 10
      src/main/java/digital/laboratory/platform/reagent/entity/EvaluationForm.java
  68. 12
      src/main/java/digital/laboratory/platform/reagent/entity/InstructionBook.java
  69. 19
      src/main/java/digital/laboratory/platform/reagent/entity/LatticeForm.java
  70. 16
      src/main/java/digital/laboratory/platform/reagent/entity/OutgoingContents.java
  71. 8
      src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationImplementation.java
  72. 26
      src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java
  73. 7
      src/main/java/digital/laboratory/platform/reagent/entity/ProcurementContent.java
  74. 10
      src/main/java/digital/laboratory/platform/reagent/entity/ProvideServicesOrSupplies.java
  75. 15
      src/main/java/digital/laboratory/platform/reagent/entity/PurchaseList.java
  76. 17
      src/main/java/digital/laboratory/platform/reagent/entity/PurchaseListDetails.java
  77. 11
      src/main/java/digital/laboratory/platform/reagent/entity/PurchasingPlan.java
  78. 55
      src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java
  79. 5
      src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumables.java
  80. 11
      src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumablesSet.java
  81. 2
      src/main/java/digital/laboratory/platform/reagent/entity/ReferenceMaterial.java
  82. 20
      src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java
  83. 6
      src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApprovalForm.java
  84. 48
      src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java
  85. 17
      src/main/java/digital/laboratory/platform/reagent/entity/StandardSolutionCurve.java
  86. 29
      src/main/java/digital/laboratory/platform/reagent/entity/StorageRoomForm.java
  87. 6
      src/main/java/digital/laboratory/platform/reagent/entity/SupplierInformation.java
  88. 27
      src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java
  89. 11
      src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java
  90. 6
      src/main/java/digital/laboratory/platform/reagent/entity/WarehousingRecordForm.java
  91. 2
      src/main/java/digital/laboratory/platform/reagent/mapper/AcceptanceRecordFormMapper.java
  92. 3
      src/main/java/digital/laboratory/platform/reagent/mapper/ApplicationForUseMapper.java
  93. 2
      src/main/java/digital/laboratory/platform/reagent/mapper/CentralizedRequestMapper.java
  94. 22
      src/main/java/digital/laboratory/platform/reagent/mapper/CheckContentMapper.java
  95. 3
      src/main/java/digital/laboratory/platform/reagent/mapper/CheckScheduleMapper.java
  96. 2
      src/main/java/digital/laboratory/platform/reagent/mapper/DecentralizedRequestMapper.java
  97. 7
      src/main/java/digital/laboratory/platform/reagent/mapper/DeliveryRegistrationFormMapper.java
  98. 7
      src/main/java/digital/laboratory/platform/reagent/mapper/EvaluationFormMapper.java
  99. 3
      src/main/java/digital/laboratory/platform/reagent/mapper/PeriodVerificationImplementationMapper.java
  100. 1
      src/main/java/digital/laboratory/platform/reagent/mapper/ProvideServicesOrSuppliesMapper.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -27,6 +27,12 @@
<version>2021.1</version>
</dependency>
<!-- thymeleaf模板引擎 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!--配置中心客户端-->
<!-- https://mvnrepository.com/artifact/com.alibaba.cloud/spring-cloud-starter-alibaba-nacos-config -->
<dependency>
@ -60,6 +66,12 @@
<version>2022.10.11-snapshots</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>digital.laboratory.platform</groupId>-->
<!-- <artifactId>dlp-common-oss</artifactId>-->
<!-- <version>2022.10.11-snapshots</version>-->
<!-- </dependency>-->
<!--JDBC相关-->
<dependency>
<groupId>org.springframework.boot</groupId>
@ -112,6 +124,12 @@
<artifactId>dlp-admin-api</artifactId>
<version>2022.10.11-snapshots</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>

@ -1,151 +0,0 @@
package digital.laboratory.platform.reagent.controller;
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 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.reagent.entity.AcceptanceContent;
import digital.laboratory.platform.reagent.service.AcceptanceContentService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.IOException;
import java.security.Principal;
/**
* (验收内容)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (验收内容) 前端控制器
*
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/acceptance_content" )
@Api(value = "acceptance_content", tags = "(验收内容)管理")
public class AcceptanceContentController {
private final AcceptanceContentService acceptanceContentService;
/**
* 通过id查询(验收内容)
* @param acceptanceContentId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{acceptanceContentId}" )
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_get')" )
public R<AcceptanceContent> getById(@PathVariable("acceptanceContentId" ) String acceptanceContentId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
AcceptanceContent acceptanceContent = acceptanceContentService.getById(acceptanceContentId);
return R.ok(acceptanceContent);
//return R.ok(acceptanceContentService.getById(acceptanceContentId));
}
/**
* 分页查询
* @param page 分页对象
* @param acceptanceContent (验收内容)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_get')" )
public R<IPage<AcceptanceContent>> getAcceptanceContentPage(Page<AcceptanceContent> page, AcceptanceContent acceptanceContent, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<AcceptanceContent> acceptanceContentSList = acceptanceContentService.page(page, Wrappers.<AcceptanceContent>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(acceptanceContentSList);
// return R.ok(acceptanceContentService.page(page, Wrappers.query(acceptanceContent)));
}
/**
* 新增(验收内容)
* @param acceptanceContent (验收内容)
* @return R
*/
@ApiOperation(value = "新增(验收内容)", notes = "新增(验收内容)")
@SysLog("新增(验收内容)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_add')" )
public R<AcceptanceContent> postAddObject(@RequestBody AcceptanceContent acceptanceContent, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
acceptanceContent.setAcceptanceContentId(IdWorker.get32UUID().toUpperCase());
if (acceptanceContentService.save(acceptanceContent)) {
return R.ok(acceptanceContent, "对象创建成功");
}
else {
return R.failed(acceptanceContent, "对象创建失败");
}
}
/**
* 修改(验收内容)
* @param acceptanceContent (验收内容)
* @return R
*/
@ApiOperation(value = "修改(验收内容)", notes = "修改(验收内容)")
@SysLog("修改(验收内容)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_edit')" )
public R<AcceptanceContent> putUpdateById(@RequestBody AcceptanceContent acceptanceContent, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (acceptanceContentService.updateById(acceptanceContent)) {
return R.ok(acceptanceContent, "保存对象成功");
}
else {
return R.failed(acceptanceContent, "保存对象失败");
}
}
/**
* 通过id删除(验收内容)
* @param acceptanceContentId id
* @return R
*/
@ApiOperation(value = "通过id删除(验收内容)", notes = "通过id删除(验收内容)")
@SysLog("通过id删除(验收内容)" )
@DeleteMapping("/{acceptanceContentId}" )
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_del')" )
public R<AcceptanceContent> deleteById(@PathVariable String acceptanceContentId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
AcceptanceContent oldAcceptanceContent = acceptanceContentService.getById(acceptanceContentId);
if (acceptanceContentService.removeById(acceptanceContentId)) {
return R.ok(oldAcceptanceContent, "对象删除成功");
}
else {
return R.failed(oldAcceptanceContent, "对象删除失败");
}
}
}

@ -12,6 +12,7 @@ import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm;
import digital.laboratory.platform.reagent.service.AcceptanceRecordFormService;
import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -23,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;
/**
* (验收记录表)
@ -52,9 +54,9 @@ public class AcceptanceRecordFormController {
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{acceptanceRecordFormId}")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')" )
public R<AcceptanceRecordFormVO> getById(@PathVariable("acceptanceRecordFormId") String acceptanceRecordFormId, HttpServletRequest theHttpServletRequest) {
public R<AcceptanceRecordFormVO> getById( String acceptanceRecordFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -70,21 +72,40 @@ public class AcceptanceRecordFormController {
* @param acceptanceRecordForm (验收记录表)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@ApiOperation(value = "分页查询验收任务", notes = "分页查询验收任务")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')" )
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_page')" )
public R<IPage<AcceptanceRecordFormVO>> getAcceptanceRecordFormPage(Page<AcceptanceRecordForm> page, AcceptanceRecordForm acceptanceRecordForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<AcceptanceRecordFormVO> acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVOPage(page, Wrappers.<AcceptanceRecordForm>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
IPage<AcceptanceRecordFormVO> acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVOPage(page
);
return R.ok(acceptanceRecordFormVOPage);
// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm)));
}
/**
* 分页查询
*
* @param page 分页对象
* @param acceptanceRecordForm (验收记录表)
* @return
*/
@ApiOperation(value = "分页查询验收记录", notes = "分页查询验收记录")
@GetMapping("/recordPage")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_recordPage')" )
public R<IPage<AcceptanceRecordFormVO>> getAcceptanceRecordFormRecordPage(Page<AcceptanceRecordForm> page, AcceptanceRecordForm acceptanceRecordForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<AcceptanceRecordFormVO> acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVORecordPage(page);
return R.ok(acceptanceRecordFormVOPage);
// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm)));
}
/**
* 录入(验收记录表)
@ -94,13 +115,13 @@ public class AcceptanceRecordFormController {
*/
@ApiOperation(value = "录入(验收记录表)", notes = "录入(验收记录表)")
@SysLog("录入(验收记录表)")
@PostMapping
@PutMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_add')" )
public R<AcceptanceRecordForm> postAddObject(@RequestBody AcceptanceRecordFormDTO acceptanceRecordFormDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.editFrom(acceptanceRecordFormDTO);
AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.commitForm(acceptanceRecordFormDTO,dlpUser);
if (acceptanceRecordForm != null) {
return R.ok(acceptanceRecordForm, "保存成功");
@ -114,20 +135,6 @@ public class AcceptanceRecordFormController {
* @param acceptanceRecordFormDTO (验收记录表)
* @return R
*/
@ApiOperation(value = "提交(验收记录表)", notes = "提交(验收记录表)")
@SysLog("提交(验收记录表)")
@PostMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_edit')")
public R<AcceptanceRecordForm> putUpdateById(@RequestBody AcceptanceRecordFormDTO acceptanceRecordFormDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.commitForm(acceptanceRecordFormDTO);
if (acceptanceRecordForm!=null){
return R.ok(acceptanceRecordForm,"提交成功");
}else return R.failed("提交失败");
}
// /**
// * 通过id删除(验收记录表)
@ -162,7 +169,7 @@ public class AcceptanceRecordFormController {
@ApiOperation(value = "一级审核(验收记录表)", notes = "一级审核(验收记录表)")
@SysLog("一级审核(验收记录表)")
@PutMapping("/primary")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_edit')")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_primary')")
public R<AcceptanceRecordForm> primaryAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -183,7 +190,7 @@ public class AcceptanceRecordFormController {
@ApiOperation(value = "二级审核(验收记录表)", notes = "二级审核(验收记录表)")
@SysLog("二级审核(验收记录表)")
@PutMapping("/secondary")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_edit')")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_secondary')")
public R<AcceptanceRecordForm> secondaryAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -204,7 +211,7 @@ public class AcceptanceRecordFormController {
@ApiOperation(value = "三级审核(验收记录表)", notes = "三级审核(验收记录表)")
@SysLog("三级审核(验收记录表)")
@PutMapping("/threeLevel")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_edit')")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_threeLevel')")
public R<AcceptanceRecordForm> threeLevelAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();

@ -52,9 +52,9 @@ public class ApplicationForUseController {
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{applicationForUseId}")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_get')")
public R<ApplicationForUseVO> getById(@PathVariable("applicationForUseId") String applicationForUseId, HttpServletRequest theHttpServletRequest) {
public R<ApplicationForUseVO> getById( String applicationForUseId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -74,7 +74,7 @@ public class ApplicationForUseController {
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_get')")
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_page')")
public R<IPage<ApplicationForUseVO>> getApplicationForUsePage(Page<ApplicationForUse> page, ApplicationForUse applicationForUse, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -86,8 +86,6 @@ public class ApplicationForUseController {
return R.ok(applicationForUseVOList);
}
/**
* 新增(试剂耗材领用申请表)
*
@ -98,13 +96,13 @@ public class ApplicationForUseController {
@SysLog("新增(试剂耗材领用申请表)")
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_add')")
public R<ApplicationForUse> postAddObject(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
public R<ApplicationForUseVO> postAddObject(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ApplicationForUse applicationForUse = applicationForUseService.addApplication(applicationForUseDTOList, dlpUser);
ApplicationForUseVO applicationForUse = applicationForUseService.addApplication(applicationForUseDTOList, dlpUser);
if (applicationForUse != null) {
return R.ok(applicationForUse, "保存成功");
@ -121,13 +119,13 @@ public class ApplicationForUseController {
@SysLog("修改(试剂耗材领用申请表)")
@PutMapping
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_edit')")
public R<ApplicationForUse> putUpdateById(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
public R<ApplicationForUseVO> putUpdateById(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ApplicationForUse applicationForUse = applicationForUseService.editApplication(applicationForUseDTOList, dlpUser);
ApplicationForUseVO applicationForUse = applicationForUseService.editApplication(applicationForUseDTOList, dlpUser);
if (applicationForUse != null) {
return R.ok(applicationForUse, "修改成功");
@ -142,9 +140,9 @@ public class ApplicationForUseController {
*/
@ApiOperation(value = "通过id删除(试剂耗材领用申请表)", notes = "通过id删除(试剂耗材领用申请表)")
@SysLog("通过id删除(试剂耗材领用申请表)")
@DeleteMapping("/{applicationForUseId}")
@DeleteMapping()
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_del')")
public R<String> deleteById(@PathVariable String applicationForUseId, HttpServletRequest theHttpServletRequest) {
public R<String> deleteById( String applicationForUseId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -154,8 +152,6 @@ public class ApplicationForUseController {
return R.ok("删除成功");
} else return R.failed("删除失败");
}
/**
* 提交试剂耗材领用申请表
*
@ -165,14 +161,14 @@ public class ApplicationForUseController {
@ApiOperation(value = "提交试剂耗材领用申请表", notes = "提交试剂耗材领用申请表")
@SysLog("修改试剂耗材领用申请表")
@PostMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_edit')")
public R<ApplicationForUse> commitById(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_commit')")
public R<ApplicationForUseVO> commitById(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ApplicationForUse applicationForUse = applicationForUseService.commitApplication(applicationForUseDTOList, dlpUser);
ApplicationForUseVO applicationForUse = applicationForUseService.commitApplication(applicationForUseDTOList, dlpUser);
if (applicationForUse != null) {
return R.ok(applicationForUse, "提交成功");

@ -1,151 +0,0 @@
package digital.laboratory.platform.reagent.controller;
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 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.reagent.entity.Blacklist;
import digital.laboratory.platform.reagent.service.BlacklistService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.IOException;
import java.security.Principal;
/**
* (试剂耗材黑名单)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (试剂耗材黑名单) 前端控制器
*
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/blacklist" )
@Api(value = "blacklist", tags = "(试剂耗材黑名单)管理")
public class BlacklistController {
private final BlacklistService blacklistService;
/**
* 通过id查询(试剂耗材黑名单)
* @param blacklistId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{blacklistId}" )
@PreAuthorize("@pms.hasPermission('reagent_blacklist_get')" )
public R<Blacklist> getById(@PathVariable("blacklistId" ) String blacklistId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
Blacklist blacklist = blacklistService.getById(blacklistId);
return R.ok(blacklist);
//return R.ok(blacklistService.getById(blacklistId));
}
/**
* 分页查询
* @param page 分页对象
* @param blacklist (试剂耗材黑名单)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_blacklist_get')" )
public R<IPage<Blacklist>> getBlacklistPage(Page<Blacklist> page, Blacklist blacklist, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<Blacklist> blacklistSList = blacklistService.page(page, Wrappers.<Blacklist>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(blacklistSList);
// return R.ok(blacklistService.page(page, Wrappers.query(blacklist)));
}
/**
* 新增(试剂耗材黑名单)
* @param blacklist (试剂耗材黑名单)
* @return R
*/
@ApiOperation(value = "新增(试剂耗材黑名单)", notes = "新增(试剂耗材黑名单)")
@SysLog("新增(试剂耗材黑名单)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_blacklist_add')" )
public R<Blacklist> postAddObject(@RequestBody Blacklist blacklist, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
blacklist.setBlacklistId(IdWorker.get32UUID().toUpperCase());
if (blacklistService.save(blacklist)) {
return R.ok(blacklist, "对象创建成功");
}
else {
return R.failed(blacklist, "对象创建失败");
}
}
/**
* 修改(试剂耗材黑名单)
* @param blacklist (试剂耗材黑名单)
* @return R
*/
@ApiOperation(value = "修改(试剂耗材黑名单)", notes = "修改(试剂耗材黑名单)")
@SysLog("修改(试剂耗材黑名单)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_blacklist_edit')" )
public R<Blacklist> putUpdateById(@RequestBody Blacklist blacklist, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (blacklistService.updateById(blacklist)) {
return R.ok(blacklist, "保存对象成功");
}
else {
return R.failed(blacklist, "保存对象失败");
}
}
/**
* 通过id删除(试剂耗材黑名单)
* @param blacklistId id
* @return R
*/
@ApiOperation(value = "通过id删除(试剂耗材黑名单)", notes = "通过id删除(试剂耗材黑名单)")
@SysLog("通过id删除(试剂耗材黑名单)" )
@DeleteMapping("/{blacklistId}" )
@PreAuthorize("@pms.hasPermission('reagent_blacklist_del')" )
public R<Blacklist> deleteById(@PathVariable String blacklistId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
Blacklist oldBlacklist = blacklistService.getById(blacklistId);
if (blacklistService.removeById(blacklistId)) {
return R.ok(oldBlacklist, "对象删除成功");
}
else {
return R.failed(oldBlacklist, "对象删除失败");
}
}
}

@ -9,6 +9,7 @@ import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.entity.CabinetForm;
import digital.laboratory.platform.reagent.service.CabinetFormService;
import digital.laboratory.platform.reagent.vo.CabinetFormVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -22,11 +23,9 @@ import java.io.IOException;
import java.security.Principal;
/**
*
*
* @author Zhang Xiaolong created at 2023-03-22
* @describe 前端控制器
*
* <p>
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
@ -37,30 +36,36 @@ import java.security.Principal;
@RestController
@RequiredArgsConstructor
@RequestMapping("/cabinet_form")
@Api(value = "cabinet_form", tags = "管理")
@Api(value = "cabinet_form", tags = "柜子管理")
public class CabinetFormController {
private final CabinetFormService cabinetFormService;
/**
* 通过id查询
*
* @param cabinetFormId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{cabinetFormId}" )
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')" )
public R<CabinetForm> getById(@PathVariable("cabinetFormId" ) String cabinetFormId, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "通过id查询柜子信息", notes = "通过id查询柜子信息")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')" )
public R<CabinetFormVO> getById(String cabinetFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
CabinetForm cabinetForm = cabinetFormService.getById(cabinetFormId);
return R.ok(cabinetForm);
//return R.ok(cabinetFormService.getById(cabinetFormId));
CabinetFormVO formById = cabinetFormService.getFormById(cabinetFormId);
return R.ok(formById);
}
/**
* 分页查询
*
* @param page 分页对象
* @param cabinetForm
* @return
@ -69,81 +74,88 @@ public class CabinetFormController {
@GetMapping("/page")
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')")
public R<IPage<CabinetForm>> getCabinetFormPage(Page<CabinetForm> page, CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<CabinetForm> cabinetFormSList = cabinetFormService.page(page, Wrappers.<CabinetForm>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(cabinetFormSList);
// return R.ok(cabinetFormService.page(page, Wrappers.query(cabinetForm)));
}
/**
* 新增
*
* @param cabinetForm
* @return R
*/
@ApiOperation(value = "新增", notes = "新增")
@SysLog("新增" )
@ApiOperation(value = "新增柜子信息", notes = "新增柜子信息")
@SysLog("新增柜子信息")
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_add')" )
// @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_add')" )
public R<CabinetForm> postAddObject(@RequestBody CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
cabinetForm.setCabinetFormId(IdWorker.get32UUID().toUpperCase());
if (cabinetFormService.save(cabinetForm)) {
return R.ok(cabinetForm, "对象创建成功");
}
else {
return R.failed(cabinetForm, "对象创建失败");
CabinetForm form = cabinetFormService.addById(cabinetForm);
if (form != null) {
return R.ok(cabinetForm, "保存成功");
} else {
return R.failed(cabinetForm, "保存失败");
}
}
/**
* 修改
*
* @param cabinetForm
* @return R
*/
@ApiOperation(value = "修改", notes = "修改")
@SysLog("修改" )
@ApiOperation(value = "修改柜子信息", notes = "新增柜子信息")
@SysLog("新增柜子信息")
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_edit')")
public R<CabinetForm> putUpdateById(@RequestBody CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (cabinetFormService.updateById(cabinetForm)) {
return R.ok(cabinetForm, "保存对象成功");
}
else {
return R.failed(cabinetForm, "保存对象失败");
CabinetForm form = cabinetFormService.editById(cabinetForm);
if (form != null) {
return R.ok(cabinetForm, "保存成功");
} else {
return R.failed(cabinetForm, "保存失败");
}
}
/**
* 通过id删除
*
* @param cabinetFormId id
* @return R
*/
@ApiOperation(value = "通过id删除", notes = "通过id删除")
@SysLog("通过id删除" )
@ApiOperation(value = "通过id删除柜子信息", notes = "通过id删除柜子信息")
@SysLog("通过id删除柜子信息")
@DeleteMapping("/{cabinetFormId}")
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_del')")
public R<CabinetForm> deleteById(@PathVariable String cabinetFormId, HttpServletRequest theHttpServletRequest) {
public R<String> deleteById(@PathVariable String cabinetFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
CabinetForm oldCabinetForm = cabinetFormService.getById(cabinetFormId);
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (cabinetFormService.removeById(cabinetFormId)) {
return R.ok(oldCabinetForm, "对象删除成功");
}
else {
return R.failed(oldCabinetForm, "对象删除失败");
if (cabinetFormService.delById(cabinetFormId)) {
return R.ok("删除成功");
} else {
return R.failed("删除失败");
}
}

@ -1,151 +0,0 @@
package digital.laboratory.platform.reagent.controller;
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 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.reagent.entity.CatalogueDetails;
import digital.laboratory.platform.reagent.service.CatalogueDetailsService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.IOException;
import java.security.Principal;
/**
* (采购目录明细)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (采购目录明细) 前端控制器
*
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/catalogue_details" )
@Api(value = "catalogue_details", tags = "(采购目录明细)管理")
public class CatalogueDetailsController {
private final CatalogueDetailsService catalogueDetailsService;
/**
* 通过id查询(采购目录明细)
* @param catalogueDetailsId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{catalogueDetailsId}" )
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_get')" )
public R<CatalogueDetails> getById(@PathVariable("catalogueDetailsId" ) String catalogueDetailsId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
CatalogueDetails catalogueDetails = catalogueDetailsService.getById(catalogueDetailsId);
return R.ok(catalogueDetails);
//return R.ok(catalogueDetailsService.getById(catalogueDetailsId));
}
/**
* 分页查询
* @param page 分页对象
* @param catalogueDetails (采购目录明细)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_get')" )
public R<IPage<CatalogueDetails>> getCatalogueDetailsPage(Page<CatalogueDetails> page, CatalogueDetails catalogueDetails, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<CatalogueDetails> catalogueDetailsSList = catalogueDetailsService.page(page, Wrappers.<CatalogueDetails>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(catalogueDetailsSList);
// return R.ok(catalogueDetailsService.page(page, Wrappers.query(catalogueDetails)));
}
/**
* 新增(采购目录明细)
* @param catalogueDetails (采购目录明细)
* @return R
*/
@ApiOperation(value = "新增(采购目录明细)", notes = "新增(采购目录明细)")
@SysLog("新增(采购目录明细)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_add')" )
public R<CatalogueDetails> postAddObject(@RequestBody CatalogueDetails catalogueDetails, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
catalogueDetails.setCatalogueDetailsId(IdWorker.get32UUID().toUpperCase());
if (catalogueDetailsService.save(catalogueDetails)) {
return R.ok(catalogueDetails, "对象创建成功");
}
else {
return R.failed(catalogueDetails, "对象创建失败");
}
}
/**
* 修改(采购目录明细)
* @param catalogueDetails (采购目录明细)
* @return R
*/
@ApiOperation(value = "修改(采购目录明细)", notes = "修改(采购目录明细)")
@SysLog("修改(采购目录明细)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_edit')" )
public R<CatalogueDetails> putUpdateById(@RequestBody CatalogueDetails catalogueDetails, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (catalogueDetailsService.updateById(catalogueDetails)) {
return R.ok(catalogueDetails, "保存对象成功");
}
else {
return R.failed(catalogueDetails, "保存对象失败");
}
}
/**
* 通过id删除(采购目录明细)
* @param catalogueDetailsId id
* @return R
*/
@ApiOperation(value = "通过id删除(采购目录明细)", notes = "通过id删除(采购目录明细)")
@SysLog("通过id删除(采购目录明细)" )
@DeleteMapping("/{catalogueDetailsId}" )
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_del')" )
public R<CatalogueDetails> deleteById(@PathVariable String catalogueDetailsId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
CatalogueDetails oldCatalogueDetails = catalogueDetailsService.getById(catalogueDetailsId);
if (catalogueDetailsService.removeById(catalogueDetailsId)) {
return R.ok(oldCatalogueDetails, "对象删除成功");
}
else {
return R.failed(oldCatalogueDetails, "对象删除失败");
}
}
}

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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;
@ -24,6 +25,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.security.Principal;
import java.sql.Date;
import java.util.List;
/**
@ -58,9 +60,9 @@ public class CentralizedRequestController {
* @return R
*/
@ApiOperation(value = "通过id查询集中采购申请", notes = "通过id查询集中采购申请")
@GetMapping("/{centralizedRequestId}")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_centralized_request_get')")
public R<CentralizedRequestVO> getById(@PathVariable("centralizedRequestId") String centralizedRequestId, HttpServletRequest theHttpServletRequest) {
public R<CentralizedRequestVO> getById(String centralizedRequestId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -111,29 +113,21 @@ public class CentralizedRequestController {
/**
* 分页查询
*
* @param orgName 分页对象
* @param orgName 集中采购申请
* @return
*/
@ApiOperation(value = "采购计划整合集中采购申请分页查询", notes = "采购计划整合集中采购申请分页查询")
@GetMapping("/list")
// @PreAuthorize("@pms.hasPermission('CentralizedPurchaseRequestList')")
public R<List<CentralizedRequestVO>> getCentralizedRequestVOPage(String orgName,HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('centralized_request_list_plan')")
public R<List<CentralizedRequestVO>> getCentralizedRequestVOPage(@JsonFormat(pattern = "yyyy-MM-dd") Date startTime, @JsonFormat(pattern = "yyyy-MM-dd") Date endTime, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (orgName!=null){
List<CentralizedRequestVO> centralizedRequestVOList = centralizedRequestService.getOrgVOList(Wrappers.<CentralizedRequest>query().orderByDesc("create_time"),orgName);
return R.ok(centralizedRequestVOList);
}
List<CentralizedRequestVO> centralizedRequestVOList = centralizedRequestService.getVOList(Wrappers.<CentralizedRequest>query()
.ge("create_time", startTime)
.le("create_time", endTime).orderByDesc("create_time"));
List<CentralizedRequestVO> centralizedRequestVOList = centralizedRequestService.getCentralizedRequestVOList(Wrappers.<CentralizedRequest>query()
.orderByDesc("create_time"));
return R.ok(centralizedRequestVOList);
@ -245,9 +239,9 @@ public class CentralizedRequestController {
*/
@ApiOperation(value = "通过id删除集中采购申请", notes = "通过id删除集中采购申请")
@SysLog("通过id删除集中采购申请")
@DeleteMapping("/{centralizedRequestId}")
@DeleteMapping()
// @PreAuthorize("@pms.hasPermission('reagent_centralized_request_del')")
public R<String> deleteById(@PathVariable String centralizedRequestId, HttpServletRequest theHttpServletRequest) {
public R<String> deleteById(String centralizedRequestId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -267,9 +261,9 @@ public class CentralizedRequestController {
*/
@ApiOperation(value = "通过id删除集中采购申请明细", notes = "通过id删除集中采购申请明细")
@SysLog("通过id删除(集中采购申请)")
@DeleteMapping("/details/{detailsOfCentralizedId}")
@DeleteMapping("/details")
// @PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_del')")
public R<DetailsOfCentralized> deleteDetailsById(@PathVariable String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) {
public R<DetailsOfCentralized> deleteDetailsById(String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) {
DetailsOfCentralized oldDetailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId);

@ -1,151 +0,0 @@
package digital.laboratory.platform.reagent.controller;
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 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.reagent.entity.CheckContent;
import digital.laboratory.platform.reagent.service.CheckContentService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.IOException;
import java.security.Principal;
/**
* (检查内容)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (检查内容) 前端控制器
*
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/check_content" )
@Api(value = "check_content", tags = "(检查内容)管理")
public class CheckContentController {
private final CheckContentService checkContentService;
/**
* 通过id查询(检查内容)
* @param checkContentId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{checkContentId}" )
@PreAuthorize("@pms.hasPermission('reagent_check_content_get')" )
public R<CheckContent> getById(@PathVariable("checkContentId" ) String checkContentId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
CheckContent checkContent = checkContentService.getById(checkContentId);
return R.ok(checkContent);
//return R.ok(checkContentService.getById(checkContentId));
}
/**
* 分页查询
* @param page 分页对象
* @param checkContent (检查内容)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_check_content_get')" )
public R<IPage<CheckContent>> getCheckContentPage(Page<CheckContent> page, CheckContent checkContent, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<CheckContent> checkContentSList = checkContentService.page(page, Wrappers.<CheckContent>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(checkContentSList);
// return R.ok(checkContentService.page(page, Wrappers.query(checkContent)));
}
/**
* 新增(检查内容)
* @param checkContent (检查内容)
* @return R
*/
@ApiOperation(value = "新增(检查内容)", notes = "新增(检查内容)")
@SysLog("新增(检查内容)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_check_content_add')" )
public R<CheckContent> postAddObject(@RequestBody CheckContent checkContent, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
checkContent.setCheckContentId(IdWorker.get32UUID().toUpperCase());
if (checkContentService.save(checkContent)) {
return R.ok(checkContent, "对象创建成功");
}
else {
return R.failed(checkContent, "对象创建失败");
}
}
/**
* 修改(检查内容)
* @param checkContent (检查内容)
* @return R
*/
@ApiOperation(value = "修改(检查内容)", notes = "修改(检查内容)")
@SysLog("修改(检查内容)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_check_content_edit')" )
public R<CheckContent> putUpdateById(@RequestBody CheckContent checkContent, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (checkContentService.updateById(checkContent)) {
return R.ok(checkContent, "保存对象成功");
}
else {
return R.failed(checkContent, "保存对象失败");
}
}
/**
* 通过id删除(检查内容)
* @param checkContentId id
* @return R
*/
@ApiOperation(value = "通过id删除(检查内容)", notes = "通过id删除(检查内容)")
@SysLog("通过id删除(检查内容)" )
@DeleteMapping("/{checkContentId}" )
@PreAuthorize("@pms.hasPermission('reagent_check_content_del')" )
public R<CheckContent> deleteById(@PathVariable String checkContentId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
CheckContent oldCheckContent = checkContentService.getById(checkContentId);
if (checkContentService.removeById(checkContentId)) {
return R.ok(oldCheckContent, "对象删除成功");
}
else {
return R.failed(oldCheckContent, "对象删除失败");
}
}
}

@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -40,7 +41,7 @@ import java.util.List;
@RestController
@RequiredArgsConstructor
@RequestMapping("/check_schedule")
@Api(value = "check_schedule", tags = "管理")
@Api(value = "check_schedule", tags = "期间核查计划制定管理")
public class CheckScheduleController {
private final CheckScheduleService checkScheduleService;
@ -51,10 +52,10 @@ public class CheckScheduleController {
* @param checkScheduleId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{checkScheduleId}")
@ApiOperation(value = "通过id查询新增标准物质期间核查计划和确认表", notes = "通过id查询新增标准物质期间核查计划和确认表")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_get')" )
public R<CheckSchedule> getById(@PathVariable("checkScheduleId") String checkScheduleId, HttpServletRequest theHttpServletRequest) {
public R<CheckSchedule> getById(String checkScheduleId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -70,38 +71,42 @@ public class CheckScheduleController {
* @param checkSchedule
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@ApiOperation(value = "分页查询新增标准物质期间核查计划和确认表", notes = "分页查询新增标准物质期间核查计划和确认表")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_get')" )
public R<IPage<CheckScheduleVO>> getCheckSchedulePage(Page<CheckSchedule> page, CheckSchedule checkSchedule, HttpServletRequest theHttpServletRequest) {
public R<IPage<CheckScheduleVO>> getCheckSchedulePage(Page<CheckSchedule> page, CheckSchedule checkSchedule,String status, String number,HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<CheckScheduleVO> checkScheduleSList = checkScheduleService.getCheckScheduleVOPage(page, Wrappers.<CheckSchedule>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(checkScheduleSList);
// return R.ok(checkScheduleService.page(page, Wrappers.query(checkSchedule)));
}
QueryWrapper<CheckSchedule> checkScheduleQueryWrapper = new QueryWrapper<>();
if (!status.equals("")){
checkScheduleQueryWrapper.eq("status",status);
}
if (!number.equals("")){
checkScheduleQueryWrapper.eq("number",number);
}
IPage<CheckScheduleVO> checkScheduleVOPage = checkScheduleService.getCheckScheduleVOPage(page, checkScheduleQueryWrapper
.orderByAsc("create_time"));
return R.ok(checkScheduleVOPage);
}
/**
* 新增
*
* @param periodVerificationPlanDTOS
* @return R
*/
@ApiOperation(value = "新增", notes = "新增")
@ApiOperation(value = "新增标准物质期间核查计划和确认表", notes = "新增标准物质期间核查计划和确认表")
@SysLog("新增")
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_add')" )
public R<CheckSchedule> postAddObject(@RequestBody List<PeriodVerificationPlanDTO> periodVerificationPlanDTOS, HttpServletRequest theHttpServletRequest) {
public R<CheckScheduleVO> postAddObject(@RequestBody List<PeriodVerificationPlanDTO> periodVerificationPlanDTOS, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
CheckScheduleVO checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
if (checkSchedule != null) {
return R.ok(checkSchedule, "计划创建成功");
@ -116,7 +121,7 @@ public class CheckScheduleController {
* @param periodVerificationPlanDTOS
* @return R
*/
@ApiOperation(value = "修改", notes = "修改")
@ApiOperation(value = "修改标准物质期间核查计划和确认表", notes = "修改标准物质期间核查计划和确认表")
@SysLog("修改")
@PutMapping
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_edit')" )
@ -137,7 +142,7 @@ public class CheckScheduleController {
* @param periodVerificationPlanDTOS
* @return R
*/
@ApiOperation(value = "提交计划", notes = "提交计划")
@ApiOperation(value = "提交计划标准物质期间核查计划和确认表", notes = "提交计划标准物质期间核查计划和确认表")
@SysLog("提交计划")
@PostMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_edit')" )
@ -152,38 +157,13 @@ public class CheckScheduleController {
} else return R.failed("提交失败");
}
// /**
// * 通过id删除
// *
// * @param periodVerificationPlanDTOS id
// * @return R
// */
// @ApiOperation(value = "通过id删除", notes = "通过id删除")
// @SysLog("通过id删除")
// @PostMapping("/commit")
//// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_del')" )
// public R<CheckSchedule> deleteById(@RequestBody List<PeriodVerificationPlanDTO> periodVerificationPlanDTOS, HttpServletRequest theHttpServletRequest) {
// Principal principal = theHttpServletRequest.getUserPrincipal();
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
//
// CheckSchedule checkSchedule = checkScheduleService.commitPlan(periodVerificationPlanDTOS, dlpUser);
//
// if (checkSchedule != null) {
// return R.ok(checkSchedule, "提交成功");
// } else {
// return R.failed("提交失败");
// }
//
// }
/**
* 审核
*
* @param auditAndApproveDTO
* @return R
*/
@ApiOperation(value = "审核", notes = "审核")
@ApiOperation(value = "审核标准物质期间核查计划和确认表", notes = "审核标准物质期间核查计划和确认表")
@SysLog("修改")
@PutMapping("/audit")
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_edit')" )

@ -54,9 +54,9 @@ public class ComplianceCheckController {
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{complianceCheckId}")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')" )
public R<ComplianceCheckVO> getById(@PathVariable("complianceCheckId") String complianceCheckId, HttpServletRequest theHttpServletRequest) {
public R<ComplianceCheckVO> getById( String complianceCheckId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -74,42 +74,41 @@ public class ComplianceCheckController {
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')")
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_page)")
public R<IPage<ComplianceCheckVO>> getComplianceCheckPage(Page<ComplianceCheck> page, ComplianceCheck complianceCheck, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<ComplianceCheckVO> complianceCheckSList = complianceCheckService.getComplianceCheckVOPage(page, Wrappers.<ComplianceCheck>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
.orderByAsc("create_time")
);
return R.ok(complianceCheckSList);
// return R.ok(complianceCheckService.page(page, Wrappers.query(complianceCheck)));
}
/**
* 新增符合性检查记录表(试剂耗材)
*
* @param complianceCheckDTO (符合性检查记录表)
* @return R
*/
@ApiOperation(value = "新增符合性检查记录表(试剂耗材)", notes = "新增符合性检查记录表(试剂耗材)")
@SysLog("新增(符合性检查记录表)")
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_add')")
public R<ComplianceCheck> postAddObject(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ComplianceCheck complianceCheck = complianceCheckService.addCheck(complianceCheckDTO, dlpUser);
if (complianceCheck != null) {
return R.ok(complianceCheck, "保存成功");
} else {
return R.failed(complianceCheck, "保存失败");
}
}
// /**
// * 新增符合性检查记录表(试剂耗材)
// *
// * @param complianceCheckDTO (符合性检查记录表)
// * @return R
// */
// @ApiOperation(value = "新增符合性检查记录表(试剂耗材)", notes = "新增符合性检查记录表(试剂耗材)")
// @SysLog("新增(符合性检查记录表)")
// @PostMapping
//// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_add')")
// public R<ComplianceCheck> postAddObject(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
// Principal principal = theHttpServletRequest.getUserPrincipal();
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
//
// ComplianceCheck complianceCheck = complianceCheckService.addCheck(complianceCheckDTO, dlpUser);
//
// if (complianceCheck != null) {
// return R.ok(complianceCheck, "保存成功");
// } else {
// return R.failed(complianceCheck, "保存失败");
// }
// }
/**
* 手动新增符合性检查记录表(试剂耗材)
*
@ -142,9 +141,9 @@ public class ComplianceCheckController {
*/
@ApiOperation(value = "通过id删除(符合性检查记录表)", notes = "通过id删除(符合性检查记录表)")
@SysLog("通过id删除(符合性检查记录表)")
@DeleteMapping("/{complianceCheckId}")
@DeleteMapping()
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
public R<String> deleteById(@PathVariable String complianceCheckId, HttpServletRequest theHttpServletRequest) {
public R<String> deleteById( String complianceCheckId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -167,7 +166,7 @@ public class ComplianceCheckController {
@ApiOperation(value = "编辑符合性检查记录表", notes = "编辑符合性检查记录表")
@SysLog("编辑符合性检查记录表")
@PutMapping("/edit")
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_edit)" )
public R<String> editCheckById(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -191,12 +190,12 @@ public class ComplianceCheckController {
@ApiOperation(value = "录入符合性检查方案", notes = "录入符合性检查方案")
@SysLog("编辑符合性检查记录表")
@PutMapping("/addScheme")
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_input')" )
public R<String> addScheme(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ComplianceCheck complianceCheck = complianceCheckService.addScheme(complianceCheckDTO);
ComplianceCheck complianceCheck = complianceCheckService.addScheme(complianceCheckDTO,dlpUser);
if (complianceCheck != null) {
return R.ok("保存成功");
@ -214,8 +213,8 @@ public class ComplianceCheckController {
*/
@ApiOperation(value = "提交符合性检查记录表", notes = "提交符合性检查记录表")
@SysLog("提交符合性检查记录表")
@PutMapping("/commit/{complianceCheckId}")
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
@PutMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_commit)" )
public R<String> commitCheck(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -239,7 +238,7 @@ public class ComplianceCheckController {
@ApiOperation(value = "一级审核符合性检查记录表", notes = "一级审核符合性检查记录表")
@SysLog("一级审核符合性检查记录表")
@PutMapping("/primaryAudit")
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_primaryAudit')" )
public R<String> primaryAuditCheck(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -262,7 +261,7 @@ public class ComplianceCheckController {
@ApiOperation(value = "二级审核符合性检查记录表", notes = "二级审核符合性检查记录表")
@SysLog("二级审核符合性检查记录表")
@PutMapping("/secondaryAudit")
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_secondaryAudit)" )
public R<String> secondaryAuditCheck(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();

@ -1,151 +0,0 @@
package digital.laboratory.platform.reagent.controller;
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 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.reagent.entity.DecentralizeDetails;
import digital.laboratory.platform.reagent.service.DecentralizeDetailsService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.IOException;
import java.security.Principal;
/**
* 分散采购申请明细
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe 分散采购申请明细 前端控制器
*
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/decentralize_details" )
@Api(value = "decentralize_details", tags = "分散采购申请明细管理")
public class DecentralizeDetailsController {
private final DecentralizeDetailsService decentralizeDetailsService;
/**
* 通过id查询分散采购申请明细
* @param decentralizeDetailsId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{decentralizeDetailsId}" )
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_get')" )
public R<DecentralizeDetails> getById(@PathVariable("decentralizeDetailsId" ) String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
DecentralizeDetails decentralizeDetails = decentralizeDetailsService.getById(decentralizeDetailsId);
return R.ok(decentralizeDetails);
//return R.ok(decentralizeDetailsService.getById(decentralizeDetailsId));
}
/**
* 分页查询
* @param page 分页对象
* @param decentralizeDetails 分散采购申请明细
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_get')" )
public R<IPage<DecentralizeDetails>> getDecentralizeDetailsPage(Page<DecentralizeDetails> page, DecentralizeDetails decentralizeDetails, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<DecentralizeDetails> decentralizeDetailsSList = decentralizeDetailsService.page(page, Wrappers.<DecentralizeDetails>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(decentralizeDetailsSList);
// return R.ok(decentralizeDetailsService.page(page, Wrappers.query(decentralizeDetails)));
}
/**
* 新增分散采购申请明细
* @param decentralizeDetails 分散采购申请明细
* @return R
*/
@ApiOperation(value = "新增分散采购申请明细", notes = "新增分散采购申请明细")
@SysLog("新增分散采购申请明细" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_add')" )
public R<DecentralizeDetails> postAddObject(@RequestBody DecentralizeDetails decentralizeDetails, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
decentralizeDetails.setDecentralizeDetailsId(IdWorker.get32UUID().toUpperCase());
if (decentralizeDetailsService.save(decentralizeDetails)) {
return R.ok(decentralizeDetails, "对象创建成功");
}
else {
return R.failed(decentralizeDetails, "对象创建失败");
}
}
/**
* 修改分散采购申请明细
* @param decentralizeDetails 分散采购申请明细
* @return R
*/
@ApiOperation(value = "修改分散采购申请明细", notes = "修改分散采购申请明细")
@SysLog("修改分散采购申请明细" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_edit')" )
public R<DecentralizeDetails> putUpdateById(@RequestBody DecentralizeDetails decentralizeDetails, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (decentralizeDetailsService.updateById(decentralizeDetails)) {
return R.ok(decentralizeDetails, "保存对象成功");
}
else {
return R.failed(decentralizeDetails, "保存对象失败");
}
}
/**
* 通过id删除分散采购申请明细
* @param decentralizeDetailsId id
* @return R
*/
@ApiOperation(value = "通过id删除分散采购申请明细", notes = "通过id删除分散采购申请明细")
@SysLog("通过id删除分散采购申请明细" )
@DeleteMapping("/{decentralizeDetailsId}" )
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_del')" )
public R<DecentralizeDetails> deleteById(@PathVariable String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
DecentralizeDetails oldDecentralizeDetails = decentralizeDetailsService.getById(decentralizeDetailsId);
if (decentralizeDetailsService.removeById(decentralizeDetailsId)) {
return R.ok(oldDecentralizeDetails, "对象删除成功");
}
else {
return R.failed(oldDecentralizeDetails, "对象删除失败");
}
}
}

@ -1,24 +1,28 @@
package digital.laboratory.platform.reagent.controller;
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
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 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.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.AuditDecentralizedRequestDTO;
import digital.laboratory.platform.reagent.dto.DecentralizedRequestDTO;
import digital.laboratory.platform.reagent.dto.PurchaseListDTO;
import digital.laboratory.platform.reagent.entity.DecentralizeDetails;
import digital.laboratory.platform.reagent.entity.DecentralizedRequest;
import digital.laboratory.platform.reagent.entity.PurchaseList;
import digital.laboratory.platform.reagent.service.DecentralizeDetailsService;
import digital.laboratory.platform.reagent.service.DecentralizedRequestService;
import digital.laboratory.platform.reagent.service.PurchaseListService;
import digital.laboratory.platform.reagent.vo.DecentralizedRequestVO;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.web.bind.annotation.*;
@ -50,6 +54,9 @@ public class DecentralizedRequestController {
@Autowired
private final DecentralizeDetailsService decentralizeDetailsService;
@Autowired
private PurchaseListService purchaseListService;
/**
* 通过id查询(分散采购申请)
*
@ -57,9 +64,9 @@ public class DecentralizedRequestController {
* @return R
*/
@ApiOperation(value = "通过id查询分散采购申请", notes = "通过id查询分散采购申请")
@GetMapping("/{decentralizedRequestId}")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')")
public R<DecentralizedRequest> getById(@PathVariable("decentralizedRequestId") String decentralizedRequestId, HttpServletRequest theHttpServletRequest) {
public R<DecentralizedRequestVO> getById(String decentralizedRequestId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -78,11 +85,11 @@ public class DecentralizedRequestController {
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')")
public R<IPage<DecentralizedRequest>> getDecentralizedRequestPage(Page<DecentralizedRequest> page, DecentralizedRequest decentralizedRequest, HttpServletRequest theHttpServletRequest) {
public R<IPage<DecentralizedRequestVO>> getDecentralizedRequestPage(Page<DecentralizedRequest> page, DecentralizedRequest decentralizedRequest, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<DecentralizedRequest> decentralizedRequestSList = decentralizedRequestService.page(page, Wrappers.<DecentralizedRequest>query()
IPage<DecentralizedRequestVO> decentralizedRequestSList = decentralizedRequestService.getDecentralizedRequestVOPage(page, Wrappers.<DecentralizedRequest>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
@ -178,12 +185,12 @@ public class DecentralizedRequestController {
*/
@ApiOperation(value = "通过id删除分散采购申请", notes = "通过id删除分散采购申请")
@SysLog("通过id删除(分散采购申请)")
@DeleteMapping("/{decentralizedRequestId}")
@DeleteMapping()
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_del')")
public R<String> deleteById(@PathVariable String decentralizedRequestId, HttpServletRequest theHttpServletRequest) {
public R<String> deleteById(String decentralizedRequestId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
DecentralizedRequest oldDecentralizedRequest = decentralizedRequestService.getById(decentralizedRequestId);
if (decentralizedRequestService.delRequestById(decentralizedRequestId)) {
return R.ok("删除成功");
} else return R.failed("删除失败");
@ -199,9 +206,9 @@ public class DecentralizedRequestController {
*/
@ApiOperation(value = "通过id删除分散采购申请明细", notes = "通过id删除分散采购申请明细")
@SysLog("通过id删除分散采购申请明细")
@DeleteMapping("details/{decentralizeDetailsId}")
@DeleteMapping("/details")
// @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_del')")
public R<DecentralizeDetails> deleteDetailsById(@PathVariable String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) {
public R<DecentralizeDetails> deleteDetailsById(String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -288,20 +295,20 @@ public class DecentralizedRequestController {
/**
* 三级审核分散采购申请
*
* @param auditDecentralizedRequestDTO
* @param auditAndApproveDTO
* @return R
*/
@ApiOperation(value = "三级审核分散采购申请", notes = "三级审核分散采购申请")
@SysLog("审核分散采购申请明细")
@PutMapping("/threeLevel/audit")
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_threeLevel')")
public R<DecentralizedRequest> threeLevelAuditRequest(@RequestBody AuditDecentralizedRequestDTO auditDecentralizedRequestDTO, HttpServletRequest theHttpServletRequest) {
public R<DecentralizedRequest> threeLevelAuditRequest(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
DecentralizedRequest decentralizedRequest = decentralizedRequestService.threeLevelAuditRequest(dlpUser, auditDecentralizedRequestDTO);
DecentralizedRequest decentralizedRequest = decentralizedRequestService.threeLevelAuditRequest(dlpUser, auditAndApproveDTO);
if (decentralizedRequest != null) {
return R.ok(decentralizedRequest, "审核成功");
@ -326,6 +333,9 @@ public class DecentralizedRequestController {
DecentralizedRequest decentralizedRequest = decentralizedRequestService.approveRequest(dlpUser, auditAndApproveDto);
if (decentralizedRequest != null) {
return R.ok(decentralizedRequest, "审批成功");
} else return R.failed("审批失败");

@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.controller;
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;
@ -9,7 +10,11 @@ import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.OutgoingContentsDTO;
import digital.laboratory.platform.reagent.entity.DeliveryRegistrationForm;
import digital.laboratory.platform.reagent.entity.OutgoingContents;
import digital.laboratory.platform.reagent.service.DeliveryRegistrationFormService;
import digital.laboratory.platform.reagent.service.OutgoingContentsService;
import digital.laboratory.platform.reagent.vo.DeliveryRegistrationFormVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumablesVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -44,19 +49,21 @@ public class DeliveryRegistrationFormController {
private final DeliveryRegistrationFormService deliveryRegistrationFormService;
private final OutgoingContentsService outgoingContentsService;
/**
* 通过id查询(试剂耗材出库登记表)
* @param deliveryRegistrationFormId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{deliveryRegistrationFormId}" )
@GetMapping( )
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
public R<DeliveryRegistrationForm> getById(@PathVariable("deliveryRegistrationFormId" ) String deliveryRegistrationFormId, HttpServletRequest theHttpServletRequest) {
public R<DeliveryRegistrationFormVO> getById(String deliveryRegistrationFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
DeliveryRegistrationForm deliveryRegistrationForm = deliveryRegistrationFormService.getById(deliveryRegistrationFormId);
DeliveryRegistrationFormVO deliveryRegistrationForm = deliveryRegistrationFormService.getDeliveryRegistrationFormVOById(deliveryRegistrationFormId);
return R.ok(deliveryRegistrationForm);
//return R.ok(deliveryRegistrationFormService.getById(deliveryRegistrationFormId));
}
@ -69,15 +76,26 @@ public class DeliveryRegistrationFormController {
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
public R<IPage<DeliveryRegistrationForm>> getDeliveryRegistrationFormPage(Page<DeliveryRegistrationForm> page, DeliveryRegistrationForm deliveryRegistrationForm, HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_page')" )
public R<IPage<DeliveryRegistrationFormVO>> getDeliveryRegistrationFormPage(Page<DeliveryRegistrationForm> page, DeliveryRegistrationForm deliveryRegistrationForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<DeliveryRegistrationForm> deliveryRegistrationFormSList = deliveryRegistrationFormService.page(page, Wrappers.<DeliveryRegistrationForm>query()
.eq("create_by", dlpUser.getId())
IPage<DeliveryRegistrationFormVO> deliveryRegistrationFormSList = deliveryRegistrationFormService.getDeliveryRegistrationFormVOPage(page, Wrappers.<DeliveryRegistrationForm>query()
.eq("status",0)
.orderByDesc("create_time")
);
List<DeliveryRegistrationFormVO> records = deliveryRegistrationFormSList.getRecords();
for (DeliveryRegistrationFormVO record : records) {
LambdaQueryWrapper<OutgoingContents> outgoingContentsLambdaQueryWrapper = new LambdaQueryWrapper<>();
outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId,record.getId());
record.setTypeOfDelivery(outgoingContentsService.list(outgoingContentsLambdaQueryWrapper).size());
}
return R.ok(deliveryRegistrationFormSList);
// return R.ok(deliveryRegistrationFormService.page(page, Wrappers.query(deliveryRegistrationForm)));
}
@ -91,7 +109,7 @@ public class DeliveryRegistrationFormController {
@ApiOperation(value = "提交(试剂耗材出库登记表)", notes = "提交(试剂耗材出库登记表)")
@SysLog("提交(试剂耗材出库登记表)" )
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_add')" )
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_commit')" )
public R<DeliveryRegistrationForm> postAddObject(@RequestBody List<OutgoingContentsDTO> outgoingContentsDTOS, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -103,4 +121,5 @@ public class DeliveryRegistrationFormController {
}else return R.failed("提交失败");
}
}

@ -1,151 +0,0 @@
package digital.laboratory.platform.reagent.controller;
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 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.reagent.entity.DetailsOfCentralized;
import digital.laboratory.platform.reagent.service.DetailsOfCentralizedService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.IOException;
import java.security.Principal;
/**
* (集中采购申请明细)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (集中采购申请明细) 前端控制器
*
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/details_of_centralized" )
@Api(value = "details_of_centralized", tags = "(集中采购申请明细)管理")
public class DetailsOfCentralizedController {
private final DetailsOfCentralizedService detailsOfCentralizedService;
/**
* 通过id查询(集中采购申请明细)
* @param detailsOfCentralizedId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{detailsOfCentralizedId}" )
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_get')" )
public R<DetailsOfCentralized> getById(@PathVariable("detailsOfCentralizedId" ) String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId);
return R.ok(detailsOfCentralized);
//return R.ok(detailsOfCentralizedService.getById(detailsOfCentralizedId));
}
/**
* 分页查询
* @param page 分页对象
* @param detailsOfCentralized (集中采购申请明细)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_get')" )
public R<IPage<DetailsOfCentralized>> getDetailsOfCentralizedPage(Page<DetailsOfCentralized> page, DetailsOfCentralized detailsOfCentralized, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<DetailsOfCentralized> detailsOfCentralizedSList = detailsOfCentralizedService.page(page, Wrappers.<DetailsOfCentralized>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(detailsOfCentralizedSList);
// return R.ok(detailsOfCentralizedService.page(page, Wrappers.query(detailsOfCentralized)));
}
/**
* 新增(集中采购申请明细)
* @param detailsOfCentralized (集中采购申请明细)
* @return R
*/
@ApiOperation(value = "新增(集中采购申请明细)", notes = "新增(集中采购申请明细)")
@SysLog("新增(集中采购申请明细)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_add')" )
public R<DetailsOfCentralized> postAddObject(@RequestBody DetailsOfCentralized detailsOfCentralized, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
detailsOfCentralized.setDetailsOfCentralizedId(IdWorker.get32UUID().toUpperCase());
if (detailsOfCentralizedService.save(detailsOfCentralized)) {
return R.ok(detailsOfCentralized, "对象创建成功");
}
else {
return R.failed(detailsOfCentralized, "对象创建失败");
}
}
/**
* 修改(集中采购申请明细)
* @param detailsOfCentralized (集中采购申请明细)
* @return R
*/
@ApiOperation(value = "修改(集中采购申请明细)", notes = "修改(集中采购申请明细)")
@SysLog("修改(集中采购申请明细)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_edit')" )
public R<DetailsOfCentralized> putUpdateById(@RequestBody DetailsOfCentralized detailsOfCentralized, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (detailsOfCentralizedService.updateById(detailsOfCentralized)) {
return R.ok(detailsOfCentralized, "保存对象成功");
}
else {
return R.failed(detailsOfCentralized, "保存对象失败");
}
}
/**
* 通过id删除(集中采购申请明细)
* @param detailsOfCentralizedId id
* @return R
*/
@ApiOperation(value = "通过id删除(集中采购申请明细)", notes = "通过id删除(集中采购申请明细)")
@SysLog("通过id删除(集中采购申请明细)" )
@DeleteMapping("/{detailsOfCentralizedId}" )
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_del')" )
public R<DetailsOfCentralized> deleteById(@PathVariable String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
DetailsOfCentralized oldDetailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId);
if (detailsOfCentralizedService.removeById(detailsOfCentralizedId)) {
return R.ok(oldDetailsOfCentralized, "对象删除成功");
}
else {
return R.failed(oldDetailsOfCentralized, "对象删除失败");
}
}
}

@ -11,6 +11,7 @@ import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.EvaluationFormDTO;
import digital.laboratory.platform.reagent.entity.EvaluationForm;
import digital.laboratory.platform.reagent.service.EvaluationFormService;
import digital.laboratory.platform.reagent.vo.EvaluationFormVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -46,44 +47,24 @@ public class EvaluationFormController {
/**
* 通过id查询(服务商/供应商评价表)
* @param evaluationFormId id
* @param supplierInformationId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{evaluationFormId}" )
@ApiOperation(value = "通过id查询(服务商/供应商评价表)", notes = "通过id查询(服务商/供应商评价表)")
@SysLog("通过id查询(服务商/供应商评价表)" )
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_get')" )
public R<EvaluationForm> getById(@PathVariable("evaluationFormId" ) String evaluationFormId, HttpServletRequest theHttpServletRequest) {
public R<EvaluationFormVO> getById(String supplierInformationId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
EvaluationForm evaluationForm = evaluationFormService.getById(evaluationFormId);
// EvaluationFormVO formById = evaluationFormService.getFormById(supplierInformationId);
return R.ok(evaluationForm);
//return R.ok(evaluationFormService.getById(evaluationFormId));
return R.ok(null);
}
/**
* 分页查询
* @param page 分页对象
* @param evaluationForm (服务商/供应商评价表)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_get')" )
public R<IPage<EvaluationForm>> getEvaluationFormPage(Page<EvaluationForm> page, EvaluationForm evaluationForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<EvaluationForm> evaluationFormSList = evaluationFormService.page(page, Wrappers.<EvaluationForm>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(evaluationFormSList);
// return R.ok(evaluationFormService.page(page, Wrappers.query(evaluationForm)));
}
/**
@ -91,8 +72,8 @@ public class EvaluationFormController {
* @param evaluationFormDTO (服务商/供应商评价表)
* @return R
*/
@ApiOperation(value = "录入(服务商/供应商评价表)", notes = "录入(服务商/供应商评价表)")
@SysLog("录入(服务商/供应商评价表)" )
@ApiOperation(value = "录入并提交(服务商/供应商评价表)", notes = "录入并提交(服务商/供应商评价表)")
@SysLog("录入并提交(服务商/供应商评价表)" )
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_add')" )
public R<EvaluationForm> postAddObject(@RequestBody EvaluationFormDTO evaluationFormDTO, HttpServletRequest theHttpServletRequest) {
@ -101,12 +82,12 @@ public class EvaluationFormController {
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
EvaluationForm evaluationForm = evaluationFormService.editFormById(evaluationFormDTO);
EvaluationForm evaluationForm = evaluationFormService.editFormById(evaluationFormDTO,dlpUser);
if (evaluationForm!=null) {
return R.ok(evaluationForm,"保存成功");
return R.ok(evaluationForm,"提交成功");
}else {
return R.failed("保存失败");
return R.failed("提交失败");
}
}
@ -118,7 +99,7 @@ public class EvaluationFormController {
@ApiOperation(value = "二级审核(服务商/供应商评价表)", notes = "二级审核(服务商/供应商评价表)")
@SysLog("二级审核(服务商/供应商评价表)" )
@PutMapping("/secondary")
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_add')" )
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_secondaryAudit')" )
public R<EvaluationForm> auditFormOfSecondary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -142,7 +123,7 @@ public class EvaluationFormController {
@ApiOperation(value = "三级审核(服务商/供应商评价表)", notes = "三级审核(服务商/供应商评价表)")
@SysLog("三级审核(服务商/供应商评价表)" )
@PutMapping("/three_level")
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_add')" )
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_three_level_audit')" )
public R<EvaluationForm> auditFormOfThreeLevel(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();

@ -94,7 +94,7 @@ public class InstructionBookController {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
instructionBook.setInstructionBookId(IdWorker.get32UUID().toUpperCase());
instructionBook.setId(IdWorker.get32UUID().toUpperCase());
if (instructionBookService.save(instructionBook)) {
return R.ok(instructionBook, "对象创建成功");
}

@ -1,151 +0,0 @@
package digital.laboratory.platform.reagent.controller;
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 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.reagent.entity.LatticeForm;
import digital.laboratory.platform.reagent.service.LatticeFormService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.IOException;
import java.security.Principal;
/**
*
*
* @author Zhang Xiaolong created at 2023-03-22
* @describe 前端控制器
*
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/lattice_form" )
@Api(value = "lattice_form", tags = "管理")
public class LatticeFormController {
private final LatticeFormService latticeFormService;
/**
* 通过id查询
* @param latticeFormId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{latticeFormId}" )
@PreAuthorize("@pms.hasPermission('reagent_lattice_form_get')" )
public R<LatticeForm> getById(@PathVariable("latticeFormId" ) String latticeFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
LatticeForm latticeForm = latticeFormService.getById(latticeFormId);
return R.ok(latticeForm);
//return R.ok(latticeFormService.getById(latticeFormId));
}
/**
* 分页查询
* @param page 分页对象
* @param latticeForm
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_lattice_form_get')" )
public R<IPage<LatticeForm>> getLatticeFormPage(Page<LatticeForm> page, LatticeForm latticeForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<LatticeForm> latticeFormSList = latticeFormService.page(page, Wrappers.<LatticeForm>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(latticeFormSList);
// return R.ok(latticeFormService.page(page, Wrappers.query(latticeForm)));
}
/**
* 新增
* @param latticeForm
* @return R
*/
@ApiOperation(value = "新增", notes = "新增")
@SysLog("新增" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_lattice_form_add')" )
public R<LatticeForm> postAddObject(@RequestBody LatticeForm latticeForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
latticeForm.setLatticeFormId(IdWorker.get32UUID().toUpperCase());
if (latticeFormService.save(latticeForm)) {
return R.ok(latticeForm, "对象创建成功");
}
else {
return R.failed(latticeForm, "对象创建失败");
}
}
/**
* 修改
* @param latticeForm
* @return R
*/
@ApiOperation(value = "修改", notes = "修改")
@SysLog("修改" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_lattice_form_edit')" )
public R<LatticeForm> putUpdateById(@RequestBody LatticeForm latticeForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (latticeFormService.updateById(latticeForm)) {
return R.ok(latticeForm, "保存对象成功");
}
else {
return R.failed(latticeForm, "保存对象失败");
}
}
/**
* 通过id删除
* @param latticeFormId id
* @return R
*/
@ApiOperation(value = "通过id删除", notes = "通过id删除")
@SysLog("通过id删除" )
@DeleteMapping("/{latticeFormId}" )
@PreAuthorize("@pms.hasPermission('reagent_lattice_form_del')" )
public R<LatticeForm> deleteById(@PathVariable String latticeFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
LatticeForm oldLatticeForm = latticeFormService.getById(latticeFormId);
if (latticeFormService.removeById(latticeFormId)) {
return R.ok(oldLatticeForm, "对象删除成功");
}
else {
return R.failed(oldLatticeForm, "对象删除失败");
}
}
}

@ -94,7 +94,7 @@ public class OutgoingContentsController {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
outgoingContents.setOutgoingContentsId(IdWorker.get32UUID().toUpperCase());
outgoingContents.setId(IdWorker.get32UUID().toUpperCase());
if (outgoingContentsService.save(outgoingContents)) {
return R.ok(outgoingContents, "对象创建成功");
}

@ -72,10 +72,18 @@ public class PeriodVerificationImplementationController {
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" )
public R<IPage<PeriodVerificationImplementationVO>> getPeriodVerificationImplementationPage(Page<PeriodVerificationImplementation> page, PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) {
public R<IPage<PeriodVerificationImplementationVO>> getPeriodVerificationImplementationPage(Page<PeriodVerificationImplementation> page, String name,PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (name!=null){
IPage<PeriodVerificationImplementationVO> periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.<PeriodVerificationImplementation>query()
.orderByDesc("create_time")
);
return R.ok(periodVerificationImplementationSList);
}
IPage<PeriodVerificationImplementationVO> periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.<PeriodVerificationImplementation>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")

@ -1,151 +0,0 @@
package digital.laboratory.platform.reagent.controller;
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 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.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.IOException;
import java.security.Principal;
/**
* (标准物质期间核查计划和确认表)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (标准物质期间核查计划和确认表) 前端控制器
*
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/period_verification_plan" )
@Api(value = "period_verification_plan", tags = "(标准物质期间核查计划和确认表)管理")
public class PeriodVerificationPlanController {
private final PeriodVerificationPlanService periodVerificationPlanService;
/**
* 通过id查询(标准物质期间核查计划和确认表)
* @param periodVerificationPlanId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{periodVerificationPlanId}" )
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_get')" )
public R<PeriodVerificationPlan> getById(@PathVariable("periodVerificationPlanId" ) String periodVerificationPlanId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PeriodVerificationPlan periodVerificationPlan = periodVerificationPlanService.getById(periodVerificationPlanId);
return R.ok(periodVerificationPlan);
//return R.ok(periodVerificationPlanService.getById(periodVerificationPlanId));
}
/**
* 分页查询
* @param page 分页对象
* @param periodVerificationPlan (标准物质期间核查计划和确认表)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_get')" )
public R<IPage<PeriodVerificationPlan>> getPeriodVerificationPlanPage(Page<PeriodVerificationPlan> page, PeriodVerificationPlan periodVerificationPlan, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<PeriodVerificationPlan> periodVerificationPlanSList = periodVerificationPlanService.page(page, Wrappers.<PeriodVerificationPlan>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(periodVerificationPlanSList);
// return R.ok(periodVerificationPlanService.page(page, Wrappers.query(periodVerificationPlan)));
}
/**
* 新增(标准物质期间核查计划和确认表)
* @param periodVerificationPlan (标准物质期间核查计划和确认表)
* @return R
*/
@ApiOperation(value = "新增(标准物质期间核查计划和确认表)", notes = "新增(标准物质期间核查计划和确认表)")
@SysLog("新增(标准物质期间核查计划和确认表)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_add')" )
public R<PeriodVerificationPlan> postAddObject(@RequestBody PeriodVerificationPlan periodVerificationPlan, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
periodVerificationPlan.setPeriodVerificationPlanId(IdWorker.get32UUID().toUpperCase());
if (periodVerificationPlanService.save(periodVerificationPlan)) {
return R.ok(periodVerificationPlan, "对象创建成功");
}
else {
return R.failed(periodVerificationPlan, "对象创建失败");
}
}
/**
* 修改(标准物质期间核查计划和确认表)
* @param periodVerificationPlan (标准物质期间核查计划和确认表)
* @return R
*/
@ApiOperation(value = "修改(标准物质期间核查计划和确认表)", notes = "修改(标准物质期间核查计划和确认表)")
@SysLog("修改(标准物质期间核查计划和确认表)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_edit')" )
public R<PeriodVerificationPlan> putUpdateById(@RequestBody PeriodVerificationPlan periodVerificationPlan, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (periodVerificationPlanService.updateById(periodVerificationPlan)) {
return R.ok(periodVerificationPlan, "保存对象成功");
}
else {
return R.failed(periodVerificationPlan, "保存对象失败");
}
}
/**
* 通过id删除(标准物质期间核查计划和确认表)
* @param periodVerificationPlanId id
* @return R
*/
@ApiOperation(value = "通过id删除(标准物质期间核查计划和确认表)", notes = "通过id删除(标准物质期间核查计划和确认表)")
@SysLog("通过id删除(标准物质期间核查计划和确认表)" )
@DeleteMapping("/{periodVerificationPlanId}" )
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_del')" )
public R<PeriodVerificationPlan> deleteById(@PathVariable String periodVerificationPlanId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PeriodVerificationPlan oldPeriodVerificationPlan = periodVerificationPlanService.getById(periodVerificationPlanId);
if (periodVerificationPlanService.removeById(periodVerificationPlanId)) {
return R.ok(oldPeriodVerificationPlan, "对象删除成功");
}
else {
return R.failed(oldPeriodVerificationPlan, "对象删除失败");
}
}
}

@ -9,6 +9,7 @@ import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies;
import digital.laboratory.platform.reagent.service.ProvideServicesOrSuppliesService;
import digital.laboratory.platform.reagent.vo.ProvideServicesOrSuppliesVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -20,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;
/**
* 提供服务或供应品
@ -44,108 +46,21 @@ public class ProvideServicesOrSuppliesController {
/**
* 通过id查询提供服务或供应品
* @param provideServicesOrSuppliesId id
* @param supplierInformationId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{provideServicesOrSuppliesId}" )
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_get')" )
public R<ProvideServicesOrSupplies> getById(@PathVariable("provideServicesOrSuppliesId" ) String provideServicesOrSuppliesId, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "通过供应商id查询该供应商提供的所有物品", notes = "通过供应商id查询该供应商提供的所有物品")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_get')" )
public R<List<ProvideServicesOrSuppliesVO>> getById(String supplierInformationId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ProvideServicesOrSupplies provideServicesOrSupplies = provideServicesOrSuppliesService.getById(provideServicesOrSuppliesId);
return R.ok(provideServicesOrSupplies);
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(supplierInformationId);
return R.ok(voList);
//return R.ok(provideServicesOrSuppliesService.getById(provideServicesOrSuppliesid));
}
/**
* 分页查询
* @param page 分页对象
* @param provideServicesOrSupplies 提供服务或供应品
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_get')" )
public R<IPage<ProvideServicesOrSupplies>> getProvideServicesOrSuppliesPage(Page<ProvideServicesOrSupplies> page, ProvideServicesOrSupplies provideServicesOrSupplies, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<ProvideServicesOrSupplies> provideServicesOrSuppliesSList = provideServicesOrSuppliesService.page(page, Wrappers.<ProvideServicesOrSupplies>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(provideServicesOrSuppliesSList);
// return R.ok(provideServicesOrSuppliesService.page(page, Wrappers.query(provideServicesOrSupplies)));
}
/**
* 新增提供服务或供应品
* @param provideServicesOrSupplies 提供服务或供应品
* @return R
*/
@ApiOperation(value = "新增提供服务或供应品", notes = "新增提供服务或供应品")
@SysLog("新增提供服务或供应品" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_add')" )
public R<ProvideServicesOrSupplies> postAddObject(@RequestBody ProvideServicesOrSupplies provideServicesOrSupplies, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
provideServicesOrSupplies.setEvaluationFormId(IdWorker.get32UUID().toUpperCase());
if (provideServicesOrSuppliesService.save(provideServicesOrSupplies)) {
return R.ok(provideServicesOrSupplies, "对象创建成功");
}
else {
return R.failed(provideServicesOrSupplies, "对象创建失败");
}
}
/**
* 修改提供服务或供应品
* @param provideServicesOrSupplies 提供服务或供应品
* @return R
*/
@ApiOperation(value = "修改提供服务或供应品", notes = "修改提供服务或供应品")
@SysLog("修改提供服务或供应品" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_edit')" )
public R<ProvideServicesOrSupplies> putUpdateById(@RequestBody ProvideServicesOrSupplies provideServicesOrSupplies, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (provideServicesOrSuppliesService.updateById(provideServicesOrSupplies)) {
return R.ok(provideServicesOrSupplies, "保存对象成功");
}
else {
return R.failed(provideServicesOrSupplies, "保存对象失败");
}
}
/**
* 通过id删除提供服务或供应品
* @param provideServicesOrSuppliesid id
* @return R
*/
@ApiOperation(value = "通过id删除提供服务或供应品", notes = "通过id删除提供服务或供应品")
@SysLog("通过id删除提供服务或供应品" )
@DeleteMapping("/{provideServicesOrSuppliesid}" )
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_del')" )
public R<ProvideServicesOrSupplies> deleteById(@PathVariable String provideServicesOrSuppliesid, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ProvideServicesOrSupplies oldProvideServicesOrSupplies = provideServicesOrSuppliesService.getById(provideServicesOrSuppliesid);
if (provideServicesOrSuppliesService.removeById(provideServicesOrSuppliesid)) {
return R.ok(oldProvideServicesOrSupplies, "对象删除成功");
}
else {
return R.failed(oldProvideServicesOrSupplies, "对象删除失败");
}
}
}

@ -5,6 +5,7 @@ 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;
@ -17,6 +18,7 @@ import digital.laboratory.platform.reagent.service.CatalogueDetailsService;
import digital.laboratory.platform.reagent.service.PurchaseCatalogueService;
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO;
import org.springframework.beans.factory.annotation.Autowired;
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 +29,10 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
import javax.servlet.http.HttpServletRequest;
import java.security.Principal;
import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.List;
/**
@ -56,19 +62,18 @@ public class PurchaseCatalogueController {
* 分页查询
*
* @param
* @return
*/
@ApiOperation(value = "分页查询已发布的采购目录明细", notes = "分页查询已发布的采购目录明细")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')")
public R<PurchaseCatalogueVO> getPurchaseCataloguePage(HttpServletRequest theHttpServletRequest) {
public R<Page> getPurchaseCataloguePage(HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PurchaseCatalogueVO vOpage = purchaseCatalogueService.getVOpage();
Page vOpage = purchaseCatalogueService.getVOpage();
return R.ok(vOpage);
@ -78,26 +83,24 @@ public class PurchaseCatalogueController {
* 分页查询
*
* @param page 分页对象
* @return
*/
@ApiOperation(value = "分页查询制定编辑的采购目录", notes = "分页查询制定编辑的采购目录")
@GetMapping("/pages")
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')")
public R<IPage<PurchaseCatalogueVO>> getPurchaseCatalogueVOPage(Page<PurchaseCatalogue> page, Integer status, HttpServletRequest theHttpServletRequest) {
public R<IPage<PurchaseCatalogueVO>> getPurchaseCatalogueVOPage(Page<PurchaseCatalogue> page, @JsonFormat(pattern = "yyyy-MM-dd") Date startTime, @JsonFormat(pattern = "yyyy-MM-dd") Date endTime, HttpServletRequest theHttpServletRequest) {
IPage<PurchaseCatalogueVO> purchaseCatalogueVOPage = purchaseCatalogueService.getPurchaseCatalogueVOPage(page, Wrappers.<PurchaseCatalogue>query().orderByDesc("create_time"));
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (status!=null){
if (startTime != null && endTime != null) {
IPage<PurchaseCatalogueVO> purchaseCatalogueVOPage1 = purchaseCatalogueService.getPurchaseCatalogueVOPage(page, Wrappers.<PurchaseCatalogue>query().eq("status",status).orderByDesc("create_time"));
IPage<PurchaseCatalogueVO> purchaseCatalogueVOPage1 = purchaseCatalogueService.getPurchaseCatalogueVOPage(page, Wrappers.<PurchaseCatalogue>query().ge("create_time", startTime).le("create_time", endTime).orderByDesc("create_time"));
List<PurchaseCatalogueVO> records = purchaseCatalogueVOPage.getRecords();
return R.ok(purchaseCatalogueVOPage1);}
return R.ok(purchaseCatalogueVOPage1);
}
return R.ok(purchaseCatalogueVOPage);
@ -130,10 +133,6 @@ public class PurchaseCatalogueController {
}
/**
* 新增(采购目录)
*
@ -342,9 +341,9 @@ public class PurchaseCatalogueController {
*/
@ApiOperation(value = "发布采购目录", notes = "发布采购目录")
@SysLog("发布采购目录")
@PutMapping("/release/{purchaseCatalogueId}")
@PutMapping("/release")
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_release')")
public R<PurchaseCatalogue> releaseById(@PathVariable String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) {
public R<PurchaseCatalogue> releaseById( String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) {
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.releaseCatalogue(purchaseCatalogueId);

@ -11,6 +11,8 @@ import digital.laboratory.platform.reagent.dto.PurchaseListDTO;
import digital.laboratory.platform.reagent.entity.PurchaseList;
import digital.laboratory.platform.reagent.entity.PurchaseListDetails;
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.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
@ -52,9 +54,9 @@ public class PurchaseListController {
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{purchaseListId}" )
@GetMapping( )
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')" )
public R<PurchaseList> getById(@PathVariable("purchaseListId" ) String purchaseListId, HttpServletRequest theHttpServletRequest) {
public R<PurchaseList> getById(String purchaseListId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -73,43 +75,66 @@ public class PurchaseListController {
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')" )
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_page')" )
public R<IPage<PurchaseList>> getPurchaseListPage(Page<PurchaseList> page, PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<PurchaseList> purchaseListSList = purchaseListService.page(page, Wrappers.<PurchaseList>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(purchaseListSList);
// return R.ok(purchaseListService.page(page, Wrappers.query(purchaseList)));
}
/**
* 新增(采购清单)
* @param purchaseListDTOList (采购清单)
* @param purchaseListDTO (采购清单)
* @return R
*/
@ApiOperation(value = "新增采购清单", notes = "新增采购清单")
@SysLog("新增采购清单" )
@ApiOperation(value = "修改采购清单明细", notes = "修改采购清单明细")
@SysLog("修改采购清单明细" )
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_add')" )
public R<PurchaseList> postAddObject(@RequestBody List<PurchaseListDTO> purchaseListDTOList, HttpServletRequest theHttpServletRequest) {
public R<PurchaseListDetailsVO> postAddObject(@RequestBody PurchaseListDTO purchaseListDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PurchaseListDetailsVO purchaseListDetailsVO = purchaseListService.addDetails(purchaseListDTO);
if (purchaseListDetailsVO!=null) {
return R.ok(purchaseListDetailsVO, "保存成功");
}
else {
return R.failed(purchaseListDetailsVO, "保存失败");
}
}
/**
* 新增(采购清单)
* @param id (采购清单)
* @return R
*/
@ApiOperation(value = "提交采购清单明细", notes = "提交采购清单明细")
@SysLog("提交采购清单明细" )
@PutMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_commit)" )
public R<PurchaseList> commitById( String id, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PurchaseList purchaseList = new PurchaseList();
PurchaseList purchaseList = purchaseListService.commitById(id);
if (purchaseListService.addListById(purchaseListDTOList, purchaseList)!=null) {
return R.ok(purchaseList, "创建成功");
if (purchaseList!=null) {
return R.ok(purchaseList, "提交成功");
}
else {
return R.failed(purchaseList, "创建失败");
return R.failed(purchaseList, "提交失败");
}
}
}
}}

@ -1,149 +0,0 @@
package digital.laboratory.platform.reagent.controller;
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 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.reagent.entity.PurchaseListDetails;
import digital.laboratory.platform.reagent.service.PurchaseListDetailsService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.security.Principal;
/**
* (采购清单明细)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (采购清单明细) 前端控制器
*
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/purchaselist_details" )
@Api(value = "purchaselist_details", tags = "(采购清单明细)管理")
public class PurchaseListDetailsController {
private final PurchaseListDetailsService purchaselistDetailsService;
/**
* 通过id查询(采购清单明细)
* @param purchaselistDetailsId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{purchaselistDetailsId}" )
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_get')" )
public R<PurchaseListDetails> getById(@PathVariable("purchaselistDetailsId" ) String purchaselistDetailsId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PurchaseListDetails purchaselistDetails = purchaselistDetailsService.getById(purchaselistDetailsId);
return R.ok(purchaselistDetails);
//return R.ok(purchaselistDetailsService.getById(purchaselistDetailsId));
}
/**
* 分页查询
* @param page 分页对象
* @param purchaselistDetails (采购清单明细)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_get')" )
public R<IPage<PurchaseListDetails>> getPurchaselistDetailsPage(Page<PurchaseListDetails> page, PurchaseListDetails purchaselistDetails, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<PurchaseListDetails> purchaselistDetailsSList = purchaselistDetailsService.page(page, Wrappers.<PurchaseListDetails>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(purchaselistDetailsSList);
// return R.ok(purchaselistDetailsService.page(page, Wrappers.query(purchaselistDetails)));
}
/**
* 新增(采购清单明细)
* @param purchaselistDetails (采购清单明细)
* @return R
*/
@ApiOperation(value = "新增(采购清单明细)", notes = "新增(采购清单明细)")
@SysLog("新增(采购清单明细)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_add')" )
public R<PurchaseListDetails> postAddObject(@RequestBody PurchaseListDetails purchaselistDetails, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
purchaselistDetails.setPurchaselistDetailsId(IdWorker.get32UUID().toUpperCase());
if (purchaselistDetailsService.save(purchaselistDetails)) {
return R.ok(purchaselistDetails, "对象创建成功");
}
else {
return R.failed(purchaselistDetails, "对象创建失败");
}
}
/**
* 修改(采购清单明细)
* @param purchaselistDetails (采购清单明细)
* @return R
*/
@ApiOperation(value = "修改(采购清单明细)", notes = "修改(采购清单明细)")
@SysLog("修改(采购清单明细)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_edit')" )
public R<PurchaseListDetails> putUpdateById(@RequestBody PurchaseListDetails purchaselistDetails, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (purchaselistDetailsService.updateById(purchaselistDetails)) {
return R.ok(purchaselistDetails, "保存对象成功");
}
else {
return R.failed(purchaselistDetails, "保存对象失败");
}
}
/**
* 通过id删除(采购清单明细)
* @param purchaselistDetailsId id
* @return R
*/
@ApiOperation(value = "通过id删除(采购清单明细)", notes = "通过id删除(采购清单明细)")
@SysLog("通过id删除(采购清单明细)" )
@DeleteMapping("/{purchaselistDetailsId}" )
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_del')" )
public R<PurchaseListDetails> deleteById(@PathVariable String purchaselistDetailsId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PurchaseListDetails oldPurchaseListDetails = purchaselistDetailsService.getById(purchaselistDetailsId);
if (purchaselistDetailsService.removeById(purchaselistDetailsId)) {
return R.ok(oldPurchaseListDetails, "对象删除成功");
}
else {
return R.failed(oldPurchaseListDetails, "对象删除失败");
}
}
}

@ -1,17 +1,22 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.date.DateTime;
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;
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.service.PurchasingPlanService;
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO;
import digital.laboratory.platform.reagent.vo.PurchasingPlanVO;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -22,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.security.Principal;
import java.sql.Date;
import java.util.List;
/**
@ -53,9 +59,9 @@ public class PurchasingPlanController {
* @return R
*/
@ApiOperation(value = "点击一行通过id查询采购计划明细", notes = "点击一行通过id查询采购计划明细")
@GetMapping("/{purchasingPlanId}")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')")
public R<PurchasingPlan> getById(@PathVariable("purchasingPlanId") String purchasingPlanId, HttpServletRequest theHttpServletRequest) {
public R<PurchasingPlan> getById(String purchasingPlanId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -73,20 +79,29 @@ public class PurchasingPlanController {
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')")
public R<IPage<PurchasingPlanVO>> getPurchasingPlanPage(Page<PurchasingPlan> page, HttpServletRequest theHttpServletRequest) {
public R<IPage<PurchasingPlanVO>> getPurchasingPlanPage(Page<PurchasingPlan> page, @JsonFormat(pattern = "yyyy-MM-dd") Date startTime,
@JsonFormat(pattern = "yyyy-MM-dd") Date endTime, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (startTime != null && endTime != null) {
IPage<PurchasingPlanVO> purchasingPlanVOPage = purchasingPlanService.getPurchasingPlanVOPage(page, Wrappers.<PurchasingPlan>query().
ge("create_time", startTime)
.le("create_time", endTime).orderByDesc("create_time"));
return R.ok(purchasingPlanVOPage);
}else {
IPage<PurchasingPlanVO> purchasingPlanVOPage = purchasingPlanService.getPurchasingPlanVOPage(page, Wrappers.<PurchasingPlan>query()
.orderByDesc("create_time"));
return R.ok(purchasingPlanVOPage);
}
}
/**
* 新增(采购计划)
@ -145,7 +160,7 @@ public class PurchasingPlanController {
@ApiOperation(value = "修改采购计划合并明细", notes = "修改采购计划合并明细")
@SysLog("修改(采购计划)")
@PutMapping("/details")
// @PreAuthorize("@pms.hasPermission('reagent_procurement_content_edit')")
// @PreAuthorize("@pms.hasPermission('reagent_procurement_content_merge')")
public R<ProcurementContent> editDetails(@RequestBody PurchasingPlanDTO purchasingPlanDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -169,9 +184,9 @@ public class PurchasingPlanController {
*/
@ApiOperation(value = "通过id删除采购计划明细", notes = "通过id删除采购计划明细")
@SysLog("通过id删除采购计划明细")
@DeleteMapping("content/{procurementContentId}")
@DeleteMapping("/content")
// @PreAuthorize("@pms.hasPermission('reagent_procurement_content_del')")
public R<String> deleteContentById(@PathVariable String procurementContentId, HttpServletRequest theHttpServletRequest) {
public R<String> deleteContentById(String procurementContentId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -194,7 +209,7 @@ public class PurchasingPlanController {
@ApiOperation(value = "提交采购计划", notes = "提交采购计划")
@SysLog("修改(采购计划)")
@PutMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_commit')")
public R<PurchasingPlan> commitById(String purchasingPlanId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -219,7 +234,7 @@ public class PurchasingPlanController {
@ApiOperation(value = "换货", notes = "换货")
@SysLog("(换货)")
@PutMapping("/replacement")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_replacemen')")
public R<ProcurementContent> replacementById(@RequestBody PurchasingPlanDTO purchasingPlanDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -244,7 +259,7 @@ public class PurchasingPlanController {
@ApiOperation(value = "审核采购计划", notes = "审核采购计划")
@SysLog("修改(采购计划)")
@PutMapping("/audit")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_audit')")
public R<PurchasingPlan> auditById(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -269,7 +284,7 @@ public class PurchasingPlanController {
@ApiOperation(value = "审批采购计划", notes = "审批采购计划")
@SysLog("修改(采购计划)")
@PutMapping("/approve")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_approve)")
public R<PurchasingPlan> approveById(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -285,30 +300,7 @@ public class PurchasingPlanController {
}
}
/**
* 发布采购计划
*
* @param purchasingPlanId (采购计划)
* @return R
*/
@ApiOperation(value = "发布采购计划", notes = "发布采购计划")
@SysLog("修改(采购计划)")
@PutMapping("/release")
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')")
public R<PurchasingPlan> releaseById(@PathVariable String purchasingPlanId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PurchasingPlan purchasingPlan = purchasingPlanService.releaseById(purchasingPlanId);
if (purchasingPlan != null) {
return R.ok(purchasingPlan,"发布成功");
} else {
return R.failed("发布失败");
}
}
}

@ -9,6 +9,7 @@ import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService;
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
@ -63,18 +64,40 @@ public class ReagentConsumableInventoryController {
/**
* @param reagentConsumableInventory 试剂耗材库存
* @param
* @return
*/
@ApiOperation(value = "耗材列表集合", notes = "耗材列表集合")
@ApiOperation(value = "标准物质列表", notes = "标准物质列表")
@GetMapping("/RList" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
public R<List<ReagentConsumableInventoryVO>> getReagentConsumableInventoryPage(Page<ReagentConsumableInventory> page, ReagentConsumableInventory reagentConsumableInventory, HttpServletRequest theHttpServletRequest) {
public R<Page<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryPage(Integer current,Integer size, String reagentConsumableName,HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
Page<ReagentConsumableInventoryFullVO> allList = reagentConsumableInventoryService.getAllList(current,size,reagentConsumableName);
return R.ok(allList);
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
@GetMapping("/standardList" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
public R<Page<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page page,String name,HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page,name);
return R.ok(reagentConsumableInventoryRMVOList);
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
List<ReagentConsumableInventoryVO> reagentConsumableInventorySList = reagentConsumableInventoryService.getReagentConsumableInventoryVOList();
return R.ok(reagentConsumableInventorySList);
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
@GetMapping("/List" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
public R<Page<ReagentConsumableInventoryVO>> getList(Page page,String name,HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = reagentConsumableInventoryService.getReagentConsumableInventoryVOList(page,name);
return R.ok(reagentConsumableInventoryVOList);
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
}
@ -83,16 +106,15 @@ public class ReagentConsumableInventoryController {
*
* @return
*/
@ApiOperation(value = "标准物质列表", notes = "标准物质列表")
@ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表")
@GetMapping("/MList" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
public R<List<ReagentConsumableInventoryVO>> getReferenceMaterialVOList(HttpServletRequest theHttpServletRequest) {
public R<Page<ReagentConsumableInventoryFullVO>> getReferenceMaterialVOList(Integer current,Integer size,String reagentConsumableName,HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
List<ReagentConsumableInventoryVO> referenceMaterialVOList = reagentConsumableInventoryService.getReferenceMaterialVOList();
return R.ok(referenceMaterialVOList);
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
Page<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(current, size,reagentConsumableName);
return R.ok(allRM);
}
@ -146,9 +168,9 @@ public class ReagentConsumableInventoryController {
*/
@ApiOperation(value = "通过id删除试剂耗材库存", notes = "通过id删除试剂耗材库存")
@SysLog("通过id删除试剂耗材库存" )
@DeleteMapping("/{reagentConsumableInventoryId}" )
@DeleteMapping()
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_del')" )
public R<ReagentConsumableInventory> deleteById(@PathVariable String reagentConsumableInventoryId, HttpServletRequest theHttpServletRequest) {
public R<ReagentConsumableInventory> deleteById(String reagentConsumableInventoryId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();

@ -42,22 +42,6 @@ public class ReagentConsumablesController {
private final ReagentConsumablesService reagentConsumablesService;
/**
* 通过id查询(试剂耗材类)
* @param reagentConsumablesId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
public R<ReagentConsumables> getById(String reagentConsumablesId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(reagentConsumablesId);
return R.ok(reagentConsumables);
//return R.ok(reagentConsumablesService.getById(reagentConsumablesId));
}
/**
* 分页查询
@ -65,87 +49,17 @@ public class ReagentConsumablesController {
* @param reagentConsumables (试剂耗材类)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@ApiOperation(value = "分页查询试剂耗材类(包括标准物质)", notes = "分页查询试剂耗材类(包括标准物质)")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
public R<IPage<ReagentConsumables>> getReagentConsumablesPage(Page<ReagentConsumables> page, ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<ReagentConsumables> reagentConsumablesSList = reagentConsumablesService.page(page, Wrappers.<ReagentConsumables>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(reagentConsumablesSList);
// return R.ok(reagentConsumablesService.page(page, Wrappers.query(reagentConsumables)));
}
/**
* 新增(试剂耗材类)
* @param reagentConsumables (试剂耗材类)
* @return R
*/
@ApiOperation(value = "新增(试剂耗材类)", notes = "新增(试剂耗材类)")
@SysLog("新增(试剂耗材类)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_add')" )
public R<ReagentConsumables> postAddObject(@RequestBody ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
reagentConsumables.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
if (reagentConsumablesService.save(reagentConsumables)) {
return R.ok(reagentConsumables, "对象创建成功");
}
else {
return R.failed(reagentConsumables, "对象创建失败");
}
}
/**
* 修改(试剂耗材类)
* @param reagentConsumables (试剂耗材类)
* @return R
*/
@ApiOperation(value = "修改(试剂耗材类)", notes = "修改(试剂耗材类)")
@SysLog("修改(试剂耗材类)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_edit')" )
public R<ReagentConsumables> putUpdateById(@RequestBody ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (reagentConsumablesService.updateById(reagentConsumables)) {
return R.ok(reagentConsumables, "保存对象成功");
}
else {
return R.failed(reagentConsumables, "保存对象失败");
}
}
/**
* 通过id删除(试剂耗材类)
* @param reagentConsumablesId id
* @return R
*/
@ApiOperation(value = "通过id删除(试剂耗材类)", notes = "通过id删除(试剂耗材类)")
@SysLog("通过id删除(试剂耗材类)" )
@DeleteMapping("/{reagentConsumablesId}" )
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_del')" )
public R<ReagentConsumables> deleteById(@PathVariable String reagentConsumablesId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ReagentConsumables oldReagentConsumables = reagentConsumablesService.getById(reagentConsumablesId);
if (reagentConsumablesService.removeById(reagentConsumablesId)) {
return R.ok(oldReagentConsumables, "对象删除成功");
}
else {
return R.failed(oldReagentConsumables, "对象删除失败");
}
}
}

@ -43,22 +43,6 @@ public class RequisitionRecordController {
private final RequisitionRecordService requisitionRecordService;
// /**
// * 通过id查询(试剂耗材领用记录表)
// * @param requisitionRecordId id
// * @return R
// */
// @ApiOperation(value = "通过id查询", notes = "通过id查询")
// @GetMapping("/{requisitionRecordId}" )
// @PreAuthorize("@pms.hasPermission('reagent_requisition_record_get')" )
// public R<RequisitionRecord> getById(@PathVariable("requisitionRecordId" ) String requisitionRecordId, HttpServletRequest theHttpServletRequest) {
// Principal principal = theHttpServletRequest.getUserPrincipal();
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
//
// RequisitionRecord requisitionRecord = requisitionRecordService.getById(requisitionRecordId);
// return R.ok(requisitionRecord);
// //return R.ok(requisitionRecordService.getById(requisitionRecordId));
// }
/**
* 分页查询
@ -74,7 +58,6 @@ public class RequisitionRecordController {
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<RequisitionRecordVO> requisitionRecordSList = requisitionRecordService.getRequisitionRecordVOPage(page, Wrappers.<RequisitionRecord>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(requisitionRecordSList);

@ -75,7 +75,6 @@ public class StandardMaterialApplicationController {
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<StandardMaterialApplicationVO> standardMaterialApplicationSList = standardMaterialApplicationService.getPage(page, Wrappers.<StandardMaterialApplication>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(standardMaterialApplicationSList);

@ -7,6 +7,7 @@ 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.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.StandardMaterialApprovalFormDTO;
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
import digital.laboratory.platform.reagent.service.StandardMaterialApprovalFormService;
@ -69,7 +70,7 @@ public class StandardMaterialApprovalFormController {
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
public R<IPage<StandardMaterialApprovalFormVO>> getStandardMaterialApprovalFormPage(Page<StandardMaterialApprovalForm> page, StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -113,7 +114,7 @@ public class StandardMaterialApprovalFormController {
@ApiOperation(value = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("修改(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" )
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" )
public R<StandardMaterialApprovalForm> putUpdateById(@RequestBody StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -128,6 +129,94 @@ public class StandardMaterialApprovalFormController {
}
}
/**
* 修改(标准物质停用/报废销毁/恢复/降级使用审批表)
* @param standardMaterialApprovalFormDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
* @return R
*/
@ApiOperation(value = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("修改(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PostMapping("/commit")
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" )
public R<StandardMaterialApprovalForm> commitById(@RequestBody StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, HttpServletRequest theHttpServletRequest) {
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_edit')" )
public R<StandardMaterialApprovalForm> 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_edit')" )
public R<StandardMaterialApprovalForm> 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_edit')" )
public R<StandardMaterialApprovalForm> 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, "审批失败");
}
}
}

@ -94,7 +94,7 @@ public class StandardReserveSolutionController {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
standardReserveSolution.setStandardReserveSolutionId(IdWorker.get32UUID().toUpperCase());
standardReserveSolution.setId(IdWorker.get32UUID().toUpperCase());
if (standardReserveSolutionService.save(standardReserveSolution)) {
return R.ok(standardReserveSolution, "对象创建成功");
}

@ -7,8 +7,10 @@ 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.reagent.dto.StandardSolutionCurveDTO;
import digital.laboratory.platform.reagent.entity.StandardSolutionCurve;
import digital.laboratory.platform.reagent.service.StandardSolutionCurveService;
import digital.laboratory.platform.reagent.vo.StandardSolutionCurveVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -42,110 +44,48 @@ public class StandardSolutionCurveController {
private final StandardSolutionCurveService standardSolutionCurveService;
/**
* 通过id查询(标准工作曲线溶液配置记录表)
* @param standardSolutionCurveId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{standardSolutionCurveId}" )
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" )
public R<StandardSolutionCurve> getById(@PathVariable("standardSolutionCurveId" ) String standardSolutionCurveId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardSolutionCurve standardSolutionCurve = standardSolutionCurveService.getById(standardSolutionCurveId);
return R.ok(standardSolutionCurve);
//return R.ok(standardSolutionCurveService.getById(standardSolutionCurveId));
}
/**
* 分页查询
* @param page 分页对象
* @param standardSolutionCurve (标准工作曲线溶液配置记录表)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" )
public R<IPage<StandardSolutionCurve>> getStandardSolutionCurvePage(Page<StandardSolutionCurve> page, StandardSolutionCurve standardSolutionCurve, HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" )
public R<IPage<StandardSolutionCurveVO>> getStandardSolutionCurvePage(Page<StandardSolutionCurve> page, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<StandardSolutionCurve> standardSolutionCurveSList = standardSolutionCurveService.page(page, Wrappers.<StandardSolutionCurve>query()
.eq("create_by", dlpUser.getId())
IPage<StandardSolutionCurveVO> standardSolutionCurveVOPage = standardSolutionCurveService.getStandardSolutionCurveVOPage(page, Wrappers.<StandardSolutionCurve>query()
.orderByDesc("create_time")
);
return R.ok(standardSolutionCurveSList);
// return R.ok(standardSolutionCurveService.page(page, Wrappers.query(standardSolutionCurve)));
return R.ok(standardSolutionCurveVOPage);
}
/**
* 新增(标准工作曲线溶液配置记录表)
* @param standardSolutionCurve (标准工作曲线溶液配置记录表)
* @param standardSolutionCurveDTO (标准工作曲线溶液配置记录表)
* @return R
*/
@ApiOperation(value = "新增(标准工作曲线溶液配置记录表)", notes = "新增(标准工作曲线溶液配置记录表)")
@SysLog("新增(标准工作曲线溶液配置记录表)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_add')" )
public R<StandardSolutionCurve> postAddObject(@RequestBody StandardSolutionCurve standardSolutionCurve, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
standardSolutionCurve.setStandardSolutionCurveId(IdWorker.get32UUID().toUpperCase());
if (standardSolutionCurveService.save(standardSolutionCurve)) {
return R.ok(standardSolutionCurve, "对象创建成功");
}
else {
return R.failed(standardSolutionCurve, "对象创建失败");
}
}
// @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_add')" )
public R<StandardSolutionCurve> postAddObject(@RequestBody StandardSolutionCurveDTO standardSolutionCurveDTO, HttpServletRequest theHttpServletRequest) {
/**
* 修改(标准工作曲线溶液配置记录表)
* @param standardSolutionCurve (标准工作曲线溶液配置记录表)
* @return R
*/
@ApiOperation(value = "修改(标准工作曲线溶液配置记录表)", notes = "修改(标准工作曲线溶液配置记录表)")
@SysLog("修改(标准工作曲线溶液配置记录表)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_edit')" )
public R<StandardSolutionCurve> putUpdateById(@RequestBody StandardSolutionCurve standardSolutionCurve, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (standardSolutionCurveService.updateById(standardSolutionCurve)) {
return R.ok(standardSolutionCurve, "保存对象成功");
}
else {
return R.failed(standardSolutionCurve, "保存对象失败");
}
}
/**
* 通过id删除(标准工作曲线溶液配置记录表)
* @param standardSolutionCurveId id
* @return R
*/
@ApiOperation(value = "通过id删除(标准工作曲线溶液配置记录表)", notes = "通过id删除(标准工作曲线溶液配置记录表)")
@SysLog("通过id删除(标准工作曲线溶液配置记录表)" )
@DeleteMapping("/{standardSolutionCurveId}" )
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_del')" )
public R<StandardSolutionCurve> deleteById(@PathVariable String standardSolutionCurveId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardSolutionCurve oldStandardSolutionCurve = standardSolutionCurveService.getById(standardSolutionCurveId);
StandardSolutionCurve standardSolutionCurve = standardSolutionCurveService.addById(standardSolutionCurveDTO, dlpUser);
if (standardSolutionCurveService.removeById(standardSolutionCurveId)) {
return R.ok(oldStandardSolutionCurve, "对象删除成功");
}
else {
return R.failed(oldStandardSolutionCurve, "对象删除失败");
if (standardSolutionCurve!=null){
return R.ok(standardSolutionCurve);
}else return R.failed("配置失败");
}
}
}

@ -49,7 +49,7 @@ public class StorageRegistrationFormController {
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{storageRegistrationFormId}" )
@PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" )
// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" )
public R<StorageRegistrationForm> getById(@PathVariable("storageRegistrationFormId" ) String storageRegistrationFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -67,7 +67,7 @@ public class StorageRegistrationFormController {
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" )
// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" )
public R<IPage<StorageRegistrationForm>> getStorageRegistrationFormPage(Page<StorageRegistrationForm> page, StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -89,7 +89,7 @@ public class StorageRegistrationFormController {
@ApiOperation(value = "新增(试剂耗材入库登记表)", notes = "新增(试剂耗材入库登记表)")
@SysLog("新增(试剂耗材入库登记表)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_add')" )
// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_add')" )
public R<StorageRegistrationForm> postAddObject(@RequestBody StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();

@ -9,6 +9,7 @@ import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.entity.StorageRoomForm;
import digital.laboratory.platform.reagent.service.StorageRoomFormService;
import digital.laboratory.platform.reagent.vo.StorageRoomFormVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -22,11 +23,9 @@ import java.io.IOException;
import java.security.Principal;
/**
*
*
* @author Zhang Xiaolong created at 2023-03-22
* @describe 前端控制器
*
* <p>
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
@ -37,113 +36,128 @@ import java.security.Principal;
@RestController
@RequiredArgsConstructor
@RequestMapping("/storage_room_form")
@Api(value = "storage_room_form", tags = "管理")
@Api(value = "storage_room_form", tags = "仓库存储室管理")
public class StorageRoomFormController {
private final StorageRoomFormService storageRoomFormService;
/**
* 通过id查询
*
* @param storageRoomFormId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{storageRoomFormId}" )
@PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" )
public R<StorageRoomForm> getById(@PathVariable("storageRoomFormId" ) String storageRoomFormId, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "通过id查询存储室信息", notes = "通过id查询存储室")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" )
public R<StorageRoomFormVO> getById(String storageRoomFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StorageRoomForm storageRoomForm = storageRoomFormService.getById(storageRoomFormId);
return R.ok(storageRoomForm);
//return R.ok(storageRoomFormService.getById(storageRoomFormId));
StorageRoomFormVO formById = storageRoomFormService.getFormById(storageRoomFormId);
if (formById != null) {
return R.ok(formById);
} else {
return R.failed("不存在该ID对应的存储室");
}
}
/**
* 分页查询
*
* @param page 分页对象
* @param storageRoomForm
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
@PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" )
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" )
public R<IPage<StorageRoomForm>> getStorageRoomFormPage(Page<StorageRoomForm> page, StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<StorageRoomForm> storageRoomFormSList = storageRoomFormService.page(page, Wrappers.<StorageRoomForm>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(storageRoomFormSList);
// return R.ok(storageRoomFormService.page(page, Wrappers.query(storageRoomForm)));
}
/**
* 新增
*
* @param storageRoomForm
* @return R
*/
@ApiOperation(value = "新增", notes = "新增")
@SysLog("新增" )
@ApiOperation(value = "新增存储室信息", notes = "新增存储室信息")
@SysLog("新增存储室信息")
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_storage_room_form_add')" )
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_add')")
public R<StorageRoomForm> postAddObject(@RequestBody StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
storageRoomForm.setStorageRoomFormId(IdWorker.get32UUID().toUpperCase());
if (storageRoomFormService.save(storageRoomForm)) {
return R.ok(storageRoomForm, "对象创建成功");
}
else {
return R.failed(storageRoomForm, "对象创建失败");
StorageRoomForm roomForm = storageRoomFormService.addById(storageRoomForm);
if (roomForm!=null) {
return R.ok(storageRoomForm, "保存成功");
} else {
return R.failed(storageRoomForm, "保存失败");
}
}
/**
* 修改
*
* @param storageRoomForm
* @return R
*/
@ApiOperation(value = "修改", notes = "修改")
@SysLog("修改" )
@ApiOperation(value = "修改存储室信息", notes = "修改存储室信息")
@SysLog("修改存储室信息")
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_storage_room_form_edit')" )
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_edit')")
public R<StorageRoomForm> putUpdateById(@RequestBody StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (storageRoomFormService.updateById(storageRoomForm)) {
return R.ok(storageRoomForm, "保存对象成功");
}
else {
return R.failed(storageRoomForm, "保存对象失败");
StorageRoomForm roomForm = storageRoomFormService.editById(storageRoomForm);
if (roomForm!=null) {
return R.ok(storageRoomForm, "保存成功");
} else {
return R.failed(storageRoomForm, "保存失败");
}
}
/**
* 通过id删除
*
* @param storageRoomFormId id
* @return R
*/
@ApiOperation(value = "通过id删除", notes = "通过id删除")
@SysLog("通过id删除")
@DeleteMapping("/{storageRoomFormId}")
@PreAuthorize("@pms.hasPermission('reagent_storage_room_form_del')" )
public R<StorageRoomForm> deleteById(@PathVariable String storageRoomFormId, HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_del')")
public R<String > deleteById(@PathVariable String storageRoomFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StorageRoomForm oldStorageRoomForm = storageRoomFormService.getById(storageRoomFormId);
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (storageRoomFormService.removeById(storageRoomFormId)) {
return R.ok(oldStorageRoomForm, "对象删除成功");
}
else {
return R.failed(oldStorageRoomForm, "对象删除失败");
if (storageRoomFormService.delById(storageRoomFormId)) {
return R.ok("删除成功");
} else {
return R.failed("删除失败");
}
}

@ -1,33 +1,40 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.io.file.FileNameUtil;
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 digital.laboratory.platform.common.core.util.R;
//import digital.laboratory.platform.common.oss.service.OssFile;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.SupplierInformationDTO;
import digital.laboratory.platform.reagent.entity.SupplierInformation;
import digital.laboratory.platform.reagent.service.SupplierInformationService;
import digital.laboratory.platform.reagent.vo.SupplierInformationVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.Principal;
import java.util.HashMap;
import java.util.Map;
/**
* (服务商/供应商信息)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (服务商 / 供应商信息) 前端控制器
*
* <p>
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
@ -43,41 +50,44 @@ public class SupplierInformationController {
private final SupplierInformationService supplierInformationService;
// private final OssFile ossFile;
/**
* 通过id查询(服务商/供应商信息)
*
* @param supplierInformationId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{supplierInformationId}" )
@ApiOperation(value = "通过id查询(服务商/供应商信息)", notes = "通过id查询(服务商/供应商信息)")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
public R<SupplierInformation> getById(@PathVariable("supplierInformationId" ) String supplierInformationId, HttpServletRequest theHttpServletRequest) {
public R<SupplierInformationVO> getById(String supplierInformationId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
SupplierInformation supplierInformation = supplierInformationService.getById(supplierInformationId);
SupplierInformationVO voById = supplierInformationService.getVOById(supplierInformationId);
return R.ok(supplierInformation);
return R.ok(voById);
}
/**
* 分页查询
*
* @param page 分页对象
* @param supplierInformation (服务商/供应商信息)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_page')" )
public R<IPage<SupplierInformation>> getSupplierInformationPage(Page<SupplierInformation> page, SupplierInformation supplierInformation, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<SupplierInformation> supplierInformationSList = supplierInformationService.page(page, Wrappers.<SupplierInformation>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(supplierInformationSList);
@ -87,12 +97,14 @@ public class SupplierInformationController {
/**
* 新增(服务商/供应商信息)
*
* @param supplierInformationDTO (服务商/供应商信息)
* @return R
*/
@ApiOperation(value = "新增服务商/供应商信息", notes = "新增服务商/供应商信息")
@SysLog("新增服务商/供应商信息")
@PostMapping
@Transactional
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
public R<SupplierInformation> postAddObject(@RequestBody SupplierInformationDTO supplierInformationDTO, HttpServletRequest theHttpServletRequest) {
@ -100,18 +112,19 @@ public class SupplierInformationController {
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
SupplierInformation supplierInformation = new SupplierInformation();
SupplierInformation supplierInformation = supplierInformationService.addInfoById(supplierInformationDTO);
if (supplierInformationService.addInfoById(supplierInformationDTO,supplierInformation)) {
if (supplierInformation != null) {
return R.ok(supplierInformation, "保存成功");
}
else {
} else {
return R.failed("保存失败");
}
}
/**
* 修改(服务商/供应商信息)
*
* @param supplierInformationDTO (服务商/供应商信息)
* @return R
*/
@ -129,9 +142,43 @@ public class SupplierInformationController {
if (supplierInformation != null) {
return R.ok(supplierInformation, "修改成功");
}
else {
} else {
return R.failed("修改失败");
}
}
/**
* 修改(服务商/供应商信息)
*
* @param id (服务商/供应商信息)
* @return R
*/
// @ApiOperation(value = "上传供应人照片", notes = "上传供应人照片/供应商信息")
// @SysLog("修改服务商/供应商信息")
// @PostMapping("/upload")
//// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_edit')" )
// public R<SupplierInformation> putUpdateById(String id, @RequestPart("file") MultipartFile file, HttpServletRequest theHttpServletRequest) {
//
// Principal principal = theHttpServletRequest.getUserPrincipal();
//
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
//
// SupplierInformation supplierInformation = supplierInformationService.getById(id);
//
// String path = "reagent_managment" + " /" + "supplierInformation" + "/" + "picture_"+supplierInformation.getId();
// String fileName = FileNameUtil.getName(file.getOriginalFilename());
// boolean r = ossFile.fileUpload(file, path);
// Map<String, String> ResultData = new HashMap<>();
// ResultData.put("fileName", fileName);
// ResultData.put("path", path);
//
// if (r) {
// //修改数据库
// supplierInformation.setPhotographOfSupplier(path);
// supplierInformationService.updateById(supplierInformation);
// return R.ok(supplierInformation, "上传成功");
// } else return R.failed("上传失败");
//
// }
}

@ -49,10 +49,10 @@ public class WarehousingRecordFormController {
* @param warehousingRecordFormId id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{warehousingRecordFormId}")
// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_get')" )
public R<WarehousingRecordFormVO> getById(@PathVariable("warehousingRecordFormId") String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "通过id查询入库信息", notes = "通过id查询入库信息")
@GetMapping()
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_get')" )
public R<WarehousingRecordFormVO> getById( String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
@ -65,25 +65,20 @@ public class WarehousingRecordFormController {
/**
* 分页查询
*
* @param page 分页对象
* @param signingRecordForm 签收记录表
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_get')")
public R<IPage<WarehousingRecordForm>> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, WarehousingRecordForm signingRecordForm, HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
public R<List<WarehousingRecordFormVO>> getWarehousingRecordFormVOPage( HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<WarehousingRecordForm> signingRecordFormPage = warehousingRecordFormService.page(page, Wrappers.<WarehousingRecordForm>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time"));
List<WarehousingRecordFormVO> warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOList();
return R.ok(signingRecordFormPage);
return R.ok(warehousingRecordFormVOList);
}
@ -97,71 +92,19 @@ public class WarehousingRecordFormController {
@ApiOperation(value = "新增签收记录表", notes = "新增签收记录表")
@SysLog("新增签收记录表")
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_add')")
public R<String> postAddObject(@RequestBody List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')")
public R<WarehousingRecordFormVO> postAddObject(@RequestBody List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
Boolean aBoolean = warehousingRecordFormService.addFormById(warehousingRecordFormDTOList, dlpUser);
WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.addFormById(warehousingRecordFormDTOList, dlpUser);
if (aBoolean) {
return R.ok("保存成功");
if (warehousingRecordFormVO != null) {
return R.ok(warehousingRecordFormVO, "入库成功");
} else {
return R.failed("保存失败");
return R.failed("入库失败");
}
}
// /**
// * 修改签收记录表
// *
// * @param warehousingRecordFormDTO 签收记录表
// * @return R
// */
// @ApiOperation(value = "修改签收记录表", notes = "修改签收记录表")
// @SysLog("修改签收记录表")
// @PutMapping
//// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_edit')")
// public R<WarehousingBatchList> putUpdateById(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) {
//
// Principal principal = theHttpServletRequest.getUserPrincipal();
//
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
//
// WarehousingRecordFormDTO warehousingRecordFormDTO1 = warehousingRecordFormDTO;
//
//
// if ( != null) {
// return R.ok(signedBatchList, "修改成功");
// } else {
// return R.failed(signedBatchList, "修改失败");
// }
// }
// /**
// * 通过id删除签收记录表
// *
// * @param signingRecordFormId id
// * @return R
// */
// @ApiOperation(value = "通过id删除签收记录表", notes = "通过id删除签收记录表")
// @SysLog("通过id删除签收记录表")
// @DeleteMapping("/{signingRecordFormId}")
// @PreAuthorize("@pms.hasPermission('reagent_signing_record_form_del')")
// public R<W> deleteById(@PathVariable String signingRecordFormId, HttpServletRequest theHttpServletRequest) {
// Principal principal = theHttpServletRequest.getUserPrincipal();
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
//
// SigningRecordForm oldSigningRecordForm = warehousingRecordFormService.getById(signingRecordFormId);
//
// if (warehousingRecordFormService.removeById(signingRecordFormId)) {
// return R.ok(oldSigningRecordForm, "对象删除成功");
// } else {
// return R.failed(oldSigningRecordForm, "对象删除失败");
// }
//
// }
}

@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -8,18 +9,46 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
public class AcceptanceRecordFormDTO {
@ApiModelProperty(value = "(后续处理情况)")
private String followUpTreatment;
@ApiModelProperty(value = "(验收记录表ID)")
private String acceptanceRecordFormId;
private boolean theSameBrandAndModel;
@ApiModelProperty(value = "(品牌型号一致)")
private String theSameBrandAndModel;
@ApiModelProperty(value = "(品牌型号一致备注)")
private String bam_remarks;
private boolean consistentQuantity;
@ApiModelProperty(value = "(数量一致)")
private String consistentQuantity;
@ApiModelProperty(value = "(数量一致备注)")
private String cq_remarks;
private boolean packingInGoodCondition;
@ApiModelProperty(value = "(包装完好)")
private String packingInGoodCondition;
@ApiModelProperty(value = "(包装完好备注)")
private String pcg_remarks;
private boolean validityPeriod;
@ApiModelProperty(value = "(有效期)")
private String validityPeriod;
@ApiModelProperty(value = "(有效期备注)")
private String vp_remarks;
private boolean deliveryCycle;
@ApiModelProperty(value = "(供货周期)")
private String deliveryCycle;
@ApiModelProperty(value = "(供货周期备注)")
private String dc_remarks;
@ApiModelProperty(value = "(验收结论)")
private String acceptanceConclusion;
@ApiModelProperty(value = "(不合格项目)")
private String nonconformingItem;
}

@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.dto;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
@ -7,13 +8,35 @@ import java.time.LocalDateTime;
import java.util.List;
@Data
public class ApplicationForUseDTO {
@ApiModelProperty(value = "(标准物质编号)")
private String referenceMaterialNumber;
@ApiModelProperty(value = "(是否归还)")
private boolean returnOrNot;
@ApiModelProperty(value = "(备注)")
private String remarks;
@ApiModelProperty(value = "(用途)")
private Integer purpose;
@ApiModelProperty(value = "(领用申请ID)")
private String applicationForUseId;
@ApiModelProperty(value = "(数量)")
private Integer quantity;
@ApiModelProperty(value = "(试剂耗材ID)")
private String reagentConsumableId;
@ApiModelProperty(value = "(规格型号)")
private String specificationAndModel;
@ApiModelProperty(value = "(标准物质领用归还/登记表ID)")
private String standardMaterialApplicationId;
@ApiModelProperty(value = "(批次ID)")
private String batchDetailsId;
}

@ -1,12 +0,0 @@
package digital.laboratory.platform.reagent.dto;
import lombok.Data;
@Data
public class AuditDecentralizedRequestDTO {
private Boolean auditResult;
private String auditOpinion;
private Boolean haveCheck;
private String uuId;
}

@ -13,22 +13,22 @@ import lombok.NoArgsConstructor;
@ApiModel(value = "集中采购申请DTO")
public class CentralizedRequestDTO {
@ApiModelProperty(value="集中采购申请ID")
@ApiModelProperty(value="集中采购申请ID")
private String centralizedRequestId;
@ApiModelProperty(value="采购目录编号")
@ApiModelProperty(value="采购目录编号")
private String purchaseCatalogueNumber;
@ApiModelProperty(value="申请数量")
private Integer numberOfApplications;
@ApiModelProperty(value="试剂耗材ID")
@ApiModelProperty(value="试剂耗材ID")
private String reagentConsumableId;
@ApiModelProperty(value="备注")
@ApiModelProperty(value="备注")
private String remarks;
@ApiModelProperty(value="集中采购申请明细Id")
private String detailsOfCentralizedId;

@ -1,6 +1,7 @@
package digital.laboratory.platform.reagent.dto;
import digital.laboratory.platform.reagent.entity.DisqualificationForm;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -12,14 +13,32 @@ import java.util.List;
@AllArgsConstructor
@NoArgsConstructor
public class ComplianceCheckDTO {
@ApiModelProperty(value="(录入检查结论)")
private String examinationConclusion;
@ApiModelProperty(value="(录入检查方案)")
private String inspectionScheme;
@ApiModelProperty(value="(符合性检查ID,录入方案与结论时传输)")
private String complianceCheckId;
@ApiModelProperty(value="(品牌)")
private String brand;
@ApiModelProperty(value="(试剂耗材Id)")
private String reagentConsumableId;
@ApiModelProperty(value="(规格型号)")
private String specificationAndModel;
@ApiModelProperty(value="(不合格项目,录入检查结论时传输)")
private String nonconformingItem;
@ApiModelProperty(value="(标准物质编号,若选择的物质为标准物质,则需传输编号)")
private String reagentConsumableNumber;
@ApiModelProperty(value="(批次ID)")
private String batchDetailsId;

@ -45,7 +45,11 @@ public class DecentralizedRequestDTO {
@ApiModelProperty(value="(用途)")
private String purpose;
@ApiModelProperty(value="(分散采购申请ID)")
private String decentralizedRequestId;
@ApiModelProperty(value="(分散采购申请明细.ID)")
private String decentralizeDetailsId;
@ApiModelProperty(value="单价")

@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.dto;
import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies;
import digital.laboratory.platform.reagent.mapper.ProvideServicesOrSuppliesMapper;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -14,20 +15,49 @@ import java.util.List;
@NoArgsConstructor
public class
EvaluationFormDTO {
@ApiModelProperty(value = "(联系电话)")
private String contactNumber;
@ApiModelProperty(value = "(联系人)")
private String contactPerson;
private String serviceProviderAndSupplierId;
@ApiModelProperty(value="供应商信息评价表id")
private String evaluationFormId;
@ApiModelProperty(value = "(供应商营业执照)")
private String supplierBusinessLicense;
@ApiModelProperty(value = "(供应商通过质量保证体系)")
private String supplierPassesQualityAssuranceSystem;
@ApiModelProperty(value = "(供应商产品认证)")
private String supplierProductCertification;
@ApiModelProperty(value = "(对供应品检验校准效率)")
private String checkAndCalibrateEfficiencyOfSupplies;
@ApiModelProperty(value = "(对供应商总体服务是否满意)")
private String overallSupplierServiceSatisfaction;
@ApiModelProperty(value = "(供应商态度)")
private String supplierAttitude;
@ApiModelProperty(value = "(供应商设备与设施)")
private String supplierEquipmentAndFacilities;
@ApiModelProperty(value = "(供应商技术与管理能力)")
private String supplierTechnologyAndManagementCapability;
@ApiModelProperty(value = "(供应商交货是否及时)")
private String whetherTheSupplierDeliversOnTime;
@ApiModelProperty(value = "(供应商ID")
private String supplierInformationId;
@ApiModelProperty(value = "(一级评价意见//该意见为当前登录用户的评价意见,不同于审核)")
private String commentsFromPrimary;

@ -12,5 +12,6 @@ public class OutgoingContentsDTO {
private String deliveryRegistrationFormId;
private String referenceMaterialId;
private String number;
private boolean returnOrNot;
}

@ -1,25 +1,52 @@
package digital.laboratory.platform.reagent.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
public class PeriodVerificationImplementationDTO {
@ApiModelProperty(value="(不满足应用要求原因分析)")
private String causeOfDissatisfaction;
private LocalDateTime checkingTime;
@ApiModelProperty(value="(核查时间)")
private LocalDate checkingTime;
@ApiModelProperty(value="(偏差/不确定度)")
private String deviationAndUncertainty;
@ApiModelProperty(value="(核查实施情况及结果)")
private String implementationAndResults;
private String number;
@ApiModelProperty(value="(标准物质编号)")
private String referenceMaterialNumber;
@ApiModelProperty(value="(标准物质ID)")
private String referenceMaterialId;
@ApiModelProperty(value="(标准物质名称)")
private String referenceMaterialName;
@ApiModelProperty(value="(备注)")
private String remarks;
@ApiModelProperty(value="(标准值/纯度)")
private String standardValueAndPurity;
@ApiModelProperty(value="(核查方法)")
private String verificationMethod;
@ApiModelProperty(value="(期间核查计划明细ID)")
private String periodVerificationPlanId;
@ApiModelProperty(value="(核查人ID)")
private Integer opinionOfInspector;
private String result;
private String periodVerificationImplementationId;
@ApiModelProperty(value="(标准物质期间核查实施情况及结果记录表ID)")
private String periodVerificationImplementationId;
@ApiModelProperty(value="(核查结果:PDF)")
private String result;
}

@ -2,27 +2,46 @@ package digital.laboratory.platform.reagent.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PeriodVerificationPlanDTO {
@ApiModelProperty(value="(偏差/不确定度)")
private String deviationAndUncertainty;
@ApiModelProperty(value="(核查人ID)")
private String inspectorId;
@ApiModelProperty(value="(计划核查周期)")
private Integer plannedVerificationCycle;
@ApiModelProperty(value="(标准物质ID)")
private String referenceMaterialId;
@ApiModelProperty(value="(标准物质编号)")
private String referenceMaterialNumber;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime scheduledVerificationDate;
@DateTimeFormat(pattern = "yyyy-MM-dd ")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value="(计划核查日期)")
private LocalDate scheduledVerificationDate;
@ApiModelProperty(value="(标准值/纯度)")
private String standardValueAndPurity;
private String verificationBasis;
private String checkScheduleId;
@ApiModelProperty(value="(核查依据)")
private String verificationBasis;
@ApiModelProperty(value="(计划制定表ID)")
private String checkScheduleId;
}

@ -9,20 +9,19 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
public class PurchaseListDTO {
@ApiModelProperty(value="(采购清单ID)·")
@ApiModelProperty(value="(采购清单ID)")
private String purchaseListId;
@ApiModelProperty(value="(采购量)")
@ApiModelProperty(value="(采购量)")
private Integer purchaseQuantity;
@ApiModelProperty(value="(试剂耗材ID)")
@ApiModelProperty(value="(试剂耗材ID)")
private String reagentConsumableId;
@ApiModelProperty(value="(备注)")
private String remarks;
@ApiModelProperty(value="(供应商ID)")
private String supplierId;
@ApiModelProperty(value="(采购清单明细ID)")
private String id;
}

@ -12,34 +12,35 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@ApiModel(value = "(采购计划DTO)")
public class PurchasingPlanDTO {
@ApiModelProperty(value="集中采购申请明细ID")
@ApiModelProperty(value = "集中采购申请明细ID")
private String detailsOfCentralizedId;
@ApiModelProperty(value="采购计划id")
@ApiModelProperty(value = "采购计划id")
private String purchasingPlanId;
@ApiModelProperty(value="申请数量)")
@ApiModelProperty(value = "申请数量)")
private Integer numberOfApplications;
@ApiModelProperty(value = "采购数量)")
private Integer quantityPurchased;
@ApiModelProperty(value="试剂耗材ID")
@ApiModelProperty(value = "试剂耗材ID")
private String reagentConsumableId;
@ApiModelProperty(value="集中采购申请明细ID")
@ApiModelProperty(value = "采购计划明细ID")
private String procurementContentId;
@ApiModelProperty(value="换货试剂耗材ID")
@ApiModelProperty(value = "换货试剂耗材ID")
private String replacementReagentConsumableId;
@ApiModelProperty(value="换货数量")
@ApiModelProperty(value = "换货数量")
private Integer replacementQuantity;
@ApiModelProperty(value="换货单价")
@ApiModelProperty(value = "换货单价")
private Double replacementPrice;
@ApiModelProperty(value = "采购计划明细修改备注")
private String planRemark;
}

@ -7,6 +7,7 @@ public class StandardMaterialApplicationDTO {
private String standardMaterialApplicationId;
private String userId;
private double useQuantity;
private String useQuantity;
private String latticeId;
private Boolean outOfUse;
}

@ -42,5 +42,7 @@ public class SupplierInformationDTO {
@ApiModelProperty(value="(供应人电话)")
private String supplierTelephone;
private String supplierInformationId;
@ApiModelProperty(value="(供应商ID)")
private String id;
}

@ -1,11 +1,15 @@
package digital.laboratory.platform.reagent.dto;
import cn.hutool.core.date.DateTime;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.sql.Date;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
@ -13,29 +17,41 @@ import java.time.LocalDateTime;
@NoArgsConstructor
public class WarehousingRecordFormDTO {
@ApiModelProperty(value="批号")
private String batchNumber;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime dateOfProduction;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@JSONField(format = "yyyy-MM-dd")
@ApiModelProperty(value="(生产日期)")
private LocalDate dateOfProduction;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value="入库日期")
private LocalDateTime dateOfReceipt;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime expirationDate;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@JSONField(format = "yyyy-MM-dd")
@ApiModelProperty(value="(有效日期)")
private LocalDate expirationDate;
@ApiModelProperty(value="(数量)")
private Integer quantity;
private String supplierId;
@ApiModelProperty(value="(预警值)")
private Integer warningValue;
@ApiModelProperty(value="(入库批次明细ID)")
private String warehousingBatchListId;
@ApiModelProperty(value="(入库内容ID)")
private String warehousingContentId;
@ApiModelProperty(value="(格子ID)")
private String latticeId;
private String remarks;
@ApiModelProperty(value="(备注)")
private String remark;
@ApiModelProperty(value="(存储期限)")
private String limitDate;
}

@ -37,11 +37,6 @@ public class AcceptanceContent extends BaseEntity {
@ApiModelProperty(value="(不合格项目)")
private String nonconformingItem;
/**
* acceptanceContentId
*/

@ -106,18 +106,13 @@ public class AcceptanceRecordForm extends BaseEntity {
@ApiModelProperty(value = "(一级审核人ID)")
private String primaryAuditorId;
/**
* 签收批次明细ID
*/
@ApiModelProperty(value = "签收批次明细ID")
private String signedBatchListId;
/**
* acceptanceRecordFormId
*/
@TableId(value = "acceptance_record_form_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value = "acceptanceRecordFormId")
private String acceptanceRecordFormId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value = "id")
private String id;
/**
* 一级审核结果
@ -140,7 +135,7 @@ public class AcceptanceRecordForm extends BaseEntity {
* (品牌型号一致)
*/
@ApiModelProperty(value = "(品牌型号一致)")
private boolean theSameBrandAndModel;
private String theSameBrandAndModel;
/**
* (品牌型号一致备注)
@ -152,7 +147,7 @@ public class AcceptanceRecordForm extends BaseEntity {
* (数量一致)
*/
@ApiModelProperty(value = "(数量一致)")
private boolean consistentQuantity;
private String consistentQuantity;
/**
* (数量一致备注)
@ -163,7 +158,7 @@ public class AcceptanceRecordForm extends BaseEntity {
* (包装完好)
*/
@ApiModelProperty(value = "(包装完好)")
private boolean packingInGoodCondition;
private String packingInGoodCondition;
/**
* (包装完好备注)
*/
@ -173,7 +168,7 @@ public class AcceptanceRecordForm extends BaseEntity {
* (有效期)
*/
@ApiModelProperty(value = "(有效期)")
private boolean validityPeriod;
private String validityPeriod;
/**
* (有效期备注)
@ -185,7 +180,7 @@ public class AcceptanceRecordForm extends BaseEntity {
* (供货周期)
*/
@ApiModelProperty(value = "(供货周期)")
private boolean deliveryCycle;
private String deliveryCycle;
/**
* (供货周期备注)
@ -207,7 +202,7 @@ public class AcceptanceRecordForm extends BaseEntity {
/**
* (状态)
*/
@ApiModelProperty(value = "(状态)")
@ApiModelProperty(value = "状态(0:未提交,1:已提交,2:一级审核通过,3:二级审核通过,4:三级审核通过)")
private Integer status;
/**
* (签收物品明细Id)
@ -216,4 +211,8 @@ public class AcceptanceRecordForm extends BaseEntity {
private String warehousingContentId;
@ApiModelProperty(value = "(验收人名称)")
private String userName;
}

@ -49,9 +49,9 @@ public class ApplicationForUse extends BaseEntity {
/**
* applicationForUseId
*/
@TableId(value = "application_for_use_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="applicationForUseId")
private String applicationForUseId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
/**
* 出库记录表

@ -114,6 +114,9 @@ public class BatchDetails extends BaseEntity {
@ApiModelProperty(value="(预警值)")
private Integer warningValue;
@ApiModelProperty(value="(预警信息)")
private String warningInformation;

@ -21,51 +21,55 @@ import lombok.EqualsAndHashCode;
@Data
@TableName(value = "cabinet_form", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "")
@ApiModel(value = "柜子记录表")
public class CabinetForm extends BaseEntity {
/**
* cabinetFormId
*/
@TableId(value = "cabinet_form_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="cabinetFormId")
private String cabinetFormId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="柜子ID:创建时,不用传入,修改时,需传入柜子ID")
private String id;
/**
* storageRoomFormId
*/
@ApiModelProperty(value="storageRoomFormId")
@ApiModelProperty(value="存储室ID")
private String storageRoomFormId;
/**
* name
*/
@ApiModelProperty(value="name")
@ApiModelProperty(value="柜子名称")
private String name;
/**
* number
*/
@ApiModelProperty(value="number")
@ApiModelProperty(value="柜子编号")
private String number;
/**
* specification
*/
@ApiModelProperty(value="specification")
private String specification;
@ApiModelProperty(value="柜子规格:为数字类型")
private Integer specification;
/**
* status
*/
@ApiModelProperty(value="status")
@ApiModelProperty(value="状态(0:未存满,1:已存满)")
private Integer status;
/**
* picture
*/
@ApiModelProperty(value="picture")
@ApiModelProperty(value="图片路径")
private String picture;
/**
* type
*/
@ApiModelProperty(value="柜子类型")
private String type;
}

@ -51,14 +51,9 @@ public class CentralizedRequest extends BaseEntity {
/**
* (状态)
*/
@ApiModelProperty(value="状态(0:未提交,1:已提交)")
@ApiModelProperty(value="状态(0:未提交,1:已提交,2:已被制定采购计划)")
private Integer status;
/**
* (部门名称)
*/
@ApiModelProperty(value="部门名称")
private String orgName;
/**
* (申请人名称)
*/
@ -67,16 +62,12 @@ public class CentralizedRequest extends BaseEntity {
/**
* centralizedRequestId
*/
@TableId(value = "centralized_request_id", type = IdType.ASSIGN_UUID)
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="集中采购申请ID")
private String centralizedRequestId;
private String id;
}

@ -1,41 +0,0 @@
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 java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* (检查内容)
*
* @author Zhang Xiaolong created at 2023-03-10 14:25:06
* @describe (检查内容) 实体类
*/
@Data
@TableName(value = "check_content", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "(检查内容)")
public class CheckContent extends BaseEntity {
/**
* checkContentId
*/
@TableId(value = "check_content_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="checkContentId")
private String checkContentId;
}

@ -50,12 +50,12 @@ public class CheckSchedule extends BaseEntity {
private String auditOpinionOfTechnical;
@TableId(value = "check_schedule_id", type = IdType.ASSIGN_UUID)
@TableId(value = "id", type = IdType.ASSIGN_UUID)
/**
* checkScheduleId
*/
@ApiModelProperty(value="计划制定表")
private String checkScheduleId;
private String id;
/**
* (技术负责人ID)
*/

@ -6,8 +6,10 @@ 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 java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -94,7 +96,7 @@ public class ComplianceCheck extends BaseEntity {
/**
* (状态)
*/
@ApiModelProperty(value="(状态)")
@ApiModelProperty(value = "状态(0:计划创建,1:已录入方案,2:已提交,3:一级审核通过,4:二级审核通过,-1:审核不通过)")
private Integer status;
/**
@ -134,13 +136,18 @@ public class ComplianceCheck extends BaseEntity {
/**
* complianceCheckId
*/
@TableId(value = "compliance_check_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="complianceCheckId")
private String complianceCheckId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value = "id")
private String id;
/**
* (不合格项目)
*/
@ApiModelProperty(value = "(执行者ID)")
private String executorId;
@ApiModelProperty(value = "(批次ID)")
private String batchDetailsId;
}

@ -56,9 +56,9 @@ public class DecentralizeDetails extends BaseEntity {
/**
* decentralizeDetailsId
*/
@TableId(value = "decentralize_details_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="decentralizeDetailsId")
private String decentralizeDetailsId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="分散采购明细ID")
private String id;
/**
* 包装份数
@ -132,7 +132,7 @@ public class DecentralizeDetails extends BaseEntity {
*/
@ApiModelProperty(value="备注")
private String remark;
private String remarks;
/**
* 包装单位
*/

@ -129,9 +129,9 @@ public class DecentralizedRequest extends BaseEntity {
/**
* decentralizedRequestId
*/
@TableId(value = "decentralized_request_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="decentralizedRequestId")
private String decentralizedRequestId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
/**
* (采购清单ID)
@ -148,7 +148,7 @@ public class DecentralizedRequest extends BaseEntity {
/**
* (提交状态)
*/
@ApiModelProperty(value="(提交状态)")
@ApiModelProperty(value="(状态(0:未提交,1:已提交,2:一级审核通过,3:二级审核通过,4:三级审核通过,5:审批通过,6:已被制定为采购清单))")
private Integer status;

@ -42,6 +42,12 @@ public class DeliveryRegistrationForm extends BaseEntity {
@ApiModelProperty(value="(出库申请人)")
private String outgoingApplicantId;
/**
* (状态)
*/
@ApiModelProperty(value="(状态)")
private Integer status;
@ -49,9 +55,9 @@ public class DeliveryRegistrationForm extends BaseEntity {
/**
* deliveryRegistrationFormId
*/
@TableId(value = "delivery_registration_form_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="deliveryRegistrationFormId")
private String deliveryRegistrationFormId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
}

@ -81,9 +81,13 @@ public class DetailsOfCentralized extends BaseEntity {
* detailsOfCentralizedId
*/
@TableId(value = "details_of_centralized_id", type = IdType.ASSIGN_UUID)
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="集中采购明细ID")
private String detailsOfCentralizedId;
private String id;
/**
* (备注)
*/
@ApiModelProperty(value="采购计划修改备注")
private String detailsRemark;
}

@ -109,9 +109,9 @@ public class EvaluationForm extends BaseEntity {
/**
* evaluationFormId
*/
@TableId(value = "evaluation_form_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="evaluationFormId")
private String evaluationFormId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="供应商信息评价表id")
private String id;
/**
* (供应商营业执照)
@ -170,7 +170,7 @@ public class EvaluationForm extends BaseEntity {
/**
* supplierInformationId
*/
@ApiModelProperty(value="supplierInformationId")
@ApiModelProperty(value="供应商ID")
private String supplierInformationId;
/**
@ -182,7 +182,7 @@ public class EvaluationForm extends BaseEntity {
/**
* supplierInformationId
*/
@ApiModelProperty(value="supplierInformationId")
@ApiModelProperty(value="状态:(0:未提交,1:已提交,2:二级审核通过,3:三级审核通过)")
private Integer status;

@ -6,6 +6,8 @@ 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 java.io.File;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
@ -78,16 +80,12 @@ public class InstructionBook extends BaseEntity {
@ApiModelProperty(value="技术负责人ID")
private String technicalDirectorId;
/**
* instructionBookId
*/
@TableId(value = "instruction_book_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="instructionBookId")
private String instructionBookId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
}

@ -27,32 +27,29 @@ public class LatticeForm extends BaseEntity {
/**
* number
*/
@ApiModelProperty(value="number")
@ApiModelProperty(value="格子编号")
private String number;
/**
* status
*/
@ApiModelProperty(value="status")
private String status;
@ApiModelProperty(value="状态(0:未存入,1:已存入)")
private Integer status;
/**
* latticeFormId
*/
@TableId(value = "lattice_form_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="latticeFormId")
private String latticeFormId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="格子ID")
private String id;
/**
* cabinetFormId
*/
@ApiModelProperty(value="cabinetFormId")
@ApiModelProperty(value="柜子ID")
private String cabinetFormId;
/**
* picture
*/
@ApiModelProperty(value="picture")
@ApiModelProperty(value="图片路径")
private String picture;

@ -54,22 +54,24 @@ public class OutgoingContents extends BaseEntity {
@ApiModelProperty(value="(试剂耗材类型)")
private String reagentConsumableType;
/**
* (备注)
*/
@ApiModelProperty(value="(备注)")
private String remarks;
@ApiModelProperty(value = "(是否归还)")
private boolean returnOrNot;
@ApiModelProperty(value = "(标准物质编号)")
private String referenceMaterialNumber;
@ApiModelProperty(value = "(标准物质ID)")
private String referenceMaterialId;
/**
* outgoingContentsId
*/
@TableId(value = "outgoing_contents_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="outgoingContentsId")
private String outgoingContentsId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
}

@ -7,6 +7,7 @@ import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -40,7 +41,7 @@ public class PeriodVerificationImplementation extends BaseEntity {
* (技术负责人审核时间)
*/
@ApiModelProperty(value="(技术负责人审核时间)")
private LocalDateTime auditTimeOfTechnical;
private LocalDate auditTimeOfTechnical;
/**
* (不满足应用要求原因分析)
@ -52,7 +53,7 @@ public class PeriodVerificationImplementation extends BaseEntity {
* (核查时间)
*/
@ApiModelProperty(value="(核查时间)")
private LocalDateTime checkingTime;
private LocalDate checkingTime;
/**
* (提交状态)
@ -103,6 +104,9 @@ public class PeriodVerificationImplementation extends BaseEntity {
@ApiModelProperty(value="(标准物质ID)")
private String referenceMaterialId;
@ApiModelProperty(value="(标准物质名称)")
private String referenceMaterialName;
/**
* (备注)
*/

@ -3,13 +3,16 @@ 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 com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
/**
@ -21,14 +24,16 @@ import lombok.EqualsAndHashCode;
@Data
@TableName(value = "period_verification_plan", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "(标准物质期间核查计划和确认表)")
@ApiModel(value = "(标准物质期间核查计划和确认表明细)")
public class PeriodVerificationPlan extends BaseEntity {
/**
* (下次核查日期)
*/
@DateTimeFormat(pattern = "yyyy-MM-dd ")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value="(下次核查日期)")
private LocalDateTime dateOfNextCheck;
private LocalDate dateOfNextCheck;
/**
* (偏差/不确定度)
@ -55,7 +60,6 @@ public class PeriodVerificationPlan extends BaseEntity {
@ApiModelProperty(value="(计划核查周期)")
private Integer plannedVerificationCycle;
/**
* (标准物质ID)
*/
@ -70,8 +74,10 @@ public class PeriodVerificationPlan extends BaseEntity {
/**
* (计划核查日期)
*/
@DateTimeFormat(pattern = "yyyy-MM-dd ")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value="(计划核查日期)")
private LocalDateTime scheduledVerificationDate;
private LocalDate scheduledVerificationDate;
/**
* (标准值/纯度)
@ -88,8 +94,10 @@ public class PeriodVerificationPlan extends BaseEntity {
/**
* (核查实施日期)
*/
@DateTimeFormat(pattern = "yyyy-MM-dd ")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value="(核查实施日期)")
private LocalDateTime implementationDate;
private LocalDate implementationDate;
/**
* (核查结果)
@ -103,14 +111,12 @@ public class PeriodVerificationPlan extends BaseEntity {
@ApiModelProperty(value="checkScheduleId")
private String checkScheduleId;
/**
* periodVerificationPlanId
*/
@TableId(value = "period_verification_plan_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="periodVerificationPlanId")
private String periodVerificationPlanId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
}

@ -82,8 +82,11 @@ public class ProcurementContent extends BaseEntity {
@ApiModelProperty(value="(换货单价)")
private Double replacementPrice;
/**
* (备注)
*/
@ApiModelProperty(value="(采购计划明细备注)")
private String planRemark;
/**

@ -36,16 +36,12 @@ public class ProvideServicesOrSupplies extends BaseEntity {
@ApiModelProperty(value="(服务商/供应商评价表ID)")
private String evaluationFormId;
/**
* provideServicesOrSuppliesId
*/
@TableId(value = "provide_services_or_supplies_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="provideServicesOrSuppliesId")
private String provideServicesOrSuppliesId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="提供服务或供应品表ID")
private String id;
}

@ -30,20 +30,27 @@ public class PurchaseList extends BaseEntity {
@ApiModelProperty(value="清单名称")
private String name;
/**
* (编号)
*/
@ApiModelProperty(value="(编号)")
private String number;
/**
* (编号)
*/
@ApiModelProperty(value="(状态(0:未提交,1:已提交)")
private Integer status;
/**
* purchaseListId
*/
@TableId(value = "purchase_list_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="purchaseListId")
private String purchaseListId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="采购清单ID")
private String id;
private String type;
}

@ -25,7 +25,7 @@ public class PurchaseListDetails extends BaseEntity {
/**
* (采购清单ID)·
*/
@ApiModelProperty(value="(采购清单ID)·")
@ApiModelProperty(value="(采购清单ID)")
private String purchaseListId;
/**
@ -40,12 +40,6 @@ public class PurchaseListDetails extends BaseEntity {
@ApiModelProperty(value="(试剂耗材ID)")
private String reagentConsumableId;
/**
* (备注)
*/
@ApiModelProperty(value="(备注)")
private String remarks;
/**
* (供应商ID)
*/
@ -53,15 +47,12 @@ public class PurchaseListDetails extends BaseEntity {
private String supplierId;
/**
* purchaselistDetailsId
*/
@TableId(value = "purchaselist_details_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="purchaselistDetailsId")
private String purchaselistDetailsId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="采购清单明细ID")
private String id;
}

@ -6,8 +6,10 @@ 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 java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -35,12 +37,6 @@ public class PurchasingPlan extends BaseEntity {
*/
@ApiModelProperty(value = "制定人")
private String CreateId;
/**
* (部门名称)
*/
@ApiModelProperty(value="部门名称")
private String orgName;
/**
* (申请人名称)
*/
@ -92,7 +88,6 @@ public class PurchasingPlan extends BaseEntity {
private String approverId;
/**
* (采购清单ID)
*/
@ -114,7 +109,7 @@ public class PurchasingPlan extends BaseEntity {
/**
* (状态)
*/
@ApiModelProperty(value="状态")
@ApiModelProperty(value = "状态(0:未提交,1:已提交,2:审核通过,3:审批通过,-1审核/审批未通过,4:已被制定为采购清单)")
private Integer status;
/**

@ -6,6 +6,7 @@ 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 java.io.Serializable;
import java.time.LocalDateTime;
@ -26,6 +27,11 @@ import lombok.EqualsAndHashCode;
@ApiModel(value = "试剂耗材库存")
public class ReagentConsumableInventory extends BaseEntity {
/**
* 名称
*/
@ApiModelProperty(value = "名称")
private String reagentConsumableName;
/**
* (品牌)
*/
@ -103,7 +109,56 @@ public class ReagentConsumableInventory extends BaseEntity {
*/
@TableId(value = "reagent_consumable_inventory_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value = "reagentConsumableInventoryId")
private String reagentConsumableInventoryId;
/**
* 单价
*/
@ApiModelProperty(value = "单价")
private Double unitPrice;
/**
* 别名
*/
@ApiModelProperty(value = "别名")
private String alias;
/**
* 存储条件
*/
@ApiModelProperty(value = "存储条件")
private String storageCondition;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String remark;
/**
* 包装单位
*/
@ApiModelProperty(value = "包装单位")
private String minimumUnit;
/**
* (溶液浓度)
*/
@ApiModelProperty(value = "(溶液浓度)")
private String configurationConcentration;
/**
* 英文名
*/
@ApiModelProperty(value = "英文名")
private String englishName;
/**
* 存储期限
*/
@ApiModelProperty(value = "存储期限")
private LocalDateTime storageLife;
/**
* 状态
*/
@ApiModelProperty(value = "状态")
private Integer status;
}

@ -111,6 +111,11 @@ public class ReagentConsumables extends BaseEntity {
*/
@ApiModelProperty(value="包装单位")
private String minimumUnit;
/**
* 溶液浓度
*/
@ApiModelProperty(value="溶液浓度")
private String configurationConcentration;
/**

@ -33,6 +33,11 @@ public class ReagentConsumablesSet extends BaseEntity {
@ApiModelProperty(value = "(试剂耗材领用申请表ID)")
private String applicationForUseId;
@ApiModelProperty(value = "(是否归还)")
private boolean returnOrNot;
@ApiModelProperty(value = "(标准物质编号)")
private String referenceMaterialNumber;
/**
* (数量)
*/
@ -70,9 +75,9 @@ public class ReagentConsumablesSet extends BaseEntity {
/**
* reagentConsumablesSetId
*/
@TableId(value = "reagent_consumables_set_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value = "reagentConsumablesSetId")
private String reagentConsumablesSetId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value = "id")
private String id;
}

@ -52,5 +52,7 @@ public class ReferenceMaterial extends BaseEntity {
@ApiModelProperty(value="id")
private String id;
@ApiModelProperty(value="试剂耗材(含标准物质)仓库表ID")
private String reagentConsumableInventoryId;
}

@ -23,7 +23,7 @@ import lombok.EqualsAndHashCode;
@Data
@TableName(value = "standard_material_application", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "(标准物质领用/归还登记表)")
@ApiModel(value = "(标准物质领用归还登记表)")
public class StandardMaterialApplication extends BaseEntity {
/**
@ -61,7 +61,7 @@ public class StandardMaterialApplication extends BaseEntity {
* (使用数量)
*/
@ApiModelProperty(value="(使用数量)")
private Double purposeAndQuantity;
private String purposeAndQuantity;
/**
* (领用人ID)
@ -75,11 +75,17 @@ public class StandardMaterialApplication extends BaseEntity {
@ApiModelProperty(value="(标准物质编号)")
private String referenceMaterialNumber;
/**
* (标准物质类ID)
*/
@ApiModelProperty(value="(标准物质类ID)")
private String referenceSubstanceId;
/**
* (标准物质ID)
*/
@ApiModelProperty(value="(标准物质ID)")
private String referenceSubstanceId;
private String referenceMaterialId;
/**
* (领用数量)
@ -120,25 +126,25 @@ public class StandardMaterialApplication extends BaseEntity {
/**
* deliveryRegistrationFormId
*/
@ApiModelProperty(value="deliveryRegistrationFormId")
@ApiModelProperty(value="出库登记表Id")
private String deliveryRegistrationFormId;
/**
* requisitionRecordId
*/
@ApiModelProperty(value="requisitionRecordId")
@ApiModelProperty(value="领用登记表ID")
private String requisitionRecordId;
/**
* storageRegistrationFormId
*/
@ApiModelProperty(value="storageRegistrationFormId")
@ApiModelProperty(value="入库登记表ID")
private String storageRegistrationFormId;
/**
* claimCode
*/
@ApiModelProperty(value="claimCode")
@ApiModelProperty(value="领取码")
private String claimCode;

@ -207,9 +207,9 @@ public class StandardMaterialApprovalForm extends BaseEntity {
/**
* standardMaterialApprovalFormId
*/
@TableId(value = "standard_material_approval_form_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="standardMaterialApprovalFormId")
private String standardMaterialApprovalFormId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
}

@ -8,6 +8,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -28,7 +30,7 @@ public class StandardReserveSolution extends BaseEntity {
* (配置浓度(mg/mL))
*/
@ApiModelProperty(value="(配置浓度(mg/mL))")
private Double configurationConcentration;
private String configurationConcentration;
/**
* (配置日期)
@ -40,13 +42,8 @@ public class StandardReserveSolution extends BaseEntity {
* (定容体积mL)
*/
@ApiModelProperty(value="(定容体积(mL))")
private Double constantVolume;
private String constantVolume;
/**
* (使用日期)
*/
@ApiModelProperty(value="(使用日期)")
private LocalDateTime dateOfUse;
/**
* (配制人ID)
@ -54,16 +51,7 @@ public class StandardReserveSolution extends BaseEntity {
@ApiModelProperty(value="(配制人ID)")
private String dispenserId;
/**
* (使用次序)
*/
@ApiModelProperty(value="(使用次序)")
private Integer orderofuse;
/**
* (使用数量mL)
*/
@ApiModelProperty(value="(使用数量(mL))")
private String quantityUsed;
/**
@ -82,17 +70,18 @@ public class StandardReserveSolution extends BaseEntity {
* (标准物质称取量)
*/
@ApiModelProperty(value="(标准物质称取量)")
private Double referenceMaterialScale;
private String referenceMaterialScale;
/**
* (备注)
*/
@ApiModelProperty(value="(备注)")
private String remarks;
/**
* (备注)
*/
@ApiModelProperty(value="(入库备注)")
private String warehousingRemarks;
/**
* (溶液名称)
@ -112,24 +101,23 @@ public class StandardReserveSolution extends BaseEntity {
@ApiModelProperty(value="(使用溶剂)")
private String useOfSolvent;
/**
* (使用人ID)
*/
@ApiModelProperty(value="(使用人ID)")
private String userId;
/**
* (有效期限)
*/
@ApiModelProperty(value="(有效期限)")
private LocalDateTime validityPeriod;
/**
* (有效期限)
*/
@ApiModelProperty(value="(状态:(0:未入库,1:已入库,-1:停止使用))")
private Integer status;
/**
* standardReserveSolutionId
*/
@TableId(value = "standard_reserve_solution_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="standardReserveSolutionId")
private String standardReserveSolutionId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="标准储备溶液及使用记录表ID")
private String id;
}

@ -60,10 +60,6 @@ public class StandardSolutionCurve extends BaseEntity {
@ApiModelProperty(value="(逐级溶液浓度)")
private String stepSolutionConcentration;
/**
* (工作曲线溶液配置日期)
*/
@ -73,15 +69,12 @@ public class StandardSolutionCurve extends BaseEntity {
/**
* standardSolutionCurveId
*/
@TableId(value = "standard_solution_curve_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="standardSolutionCurveId")
private String standardSolutionCurveId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="标准工作曲线溶液配制记录表ID")
private String id;
/**
* storageRegistrationFormId
*/
@ApiModelProperty(value="storageRegistrationFormId")
private String storageRegistrationFormId;
@ApiModelProperty(value="(标准储备溶液ID)")
private String referenceMaterialId;
}

@ -21,21 +21,8 @@ import lombok.EqualsAndHashCode;
@Data
@TableName(value = "storage_room_form", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "")
@ApiModel(value = "存储室记录表")
public class StorageRoomForm extends BaseEntity {
/**
* type
*/
@ApiModelProperty(value="type")
private String type;
/**
* temperature
*/
@ApiModelProperty(value="temperature")
private String temperature;
/**
* 楼层
*/
@ -45,27 +32,27 @@ public class StorageRoomForm extends BaseEntity {
/**
* humidity
*/
@ApiModelProperty(value="humidity")
private String humidity;
@ApiModelProperty(value="房间位置")
private String roomLocation;
/**
* picture
*/
@ApiModelProperty(value="picture")
@ApiModelProperty(value="图片路径")
private String picture;
/**
* name
*/
@ApiModelProperty(value="name")
@ApiModelProperty(value="存储室名称")
private String name;
/**
* storageRoomFormId
*/
@TableId(value = "storage_room_form_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="storageRoomFormId")
private String storageRoomFormId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="存储室ID,创建时,无需传入,修改时需传入存储室ID")
private String id;
}

@ -100,9 +100,9 @@ public class SupplierInformation extends BaseEntity {
/**
* supplierInformationId
*/
@TableId(value = "supplier_information_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="supplierInformationId")
private String supplierInformationId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
}

@ -7,6 +7,7 @@ import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -46,7 +47,7 @@ public class WarehousingBatchList extends BaseEntity {
* (生产日期)
*/
@ApiModelProperty(value="(生产日期)")
private LocalDateTime dateOfProduction;
private LocalDate dateOfProduction;
/**
@ -59,7 +60,17 @@ public class WarehousingBatchList extends BaseEntity {
* (有效日期)
*/
@ApiModelProperty(value="(有效日期)")
private LocalDateTime expirationDate;
private LocalDate expirationDate;
/**
* (有效日期)
*/
@ApiModelProperty(value="(存储期限)")
private String limitDate;
/**
* (有效日期)
*/
@ApiModelProperty(value="(备注)")
private String remark;
/**
* (数量)
@ -79,12 +90,6 @@ public class WarehousingBatchList extends BaseEntity {
@ApiModelProperty(value="入库内容表ID")
private String warehousingContentId;
/**
* (供应商ID)
*/
@ApiModelProperty(value="(供应商ID)")
private String supplierId;
/**
* (预警值)
*/
@ -94,9 +99,9 @@ public class WarehousingBatchList extends BaseEntity {
/**
* signedBatchListId
*/
@TableId(value = "warehousing_batch_list_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="warehousingBatchListId")
private String warehousingBatchListId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="入库批次明细ID")
private String id;
}

@ -50,11 +50,16 @@ public class WarehousingContent extends BaseEntity {
@ApiModelProperty(value = "(验收记录ID)")
private String acceptanceRecordFormId;
/**
* (供应商ID)
*/
@ApiModelProperty(value = "(供应商ID)")
private String supplierId;
/**
* signedContentId
*/
@TableId(value = "warehousing_content_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="warehousingContentId")
private String warehousingContentId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value = "id")
private String id;
}

@ -45,9 +45,9 @@ public class WarehousingRecordForm extends BaseEntity {
/**
* signingRecordFormId
*/
@TableId(value = "warehousing_record_form_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="warehousingRecordFormId")
private String warehousingRecordFormId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
}

@ -17,7 +17,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface AcceptanceRecordFormMapper extends BaseMapper<AcceptanceRecordForm> {
IPage<AcceptanceRecordFormVO> getAcceptanceRecordFormVOPage(IPage<AcceptanceRecordForm> page, QueryWrapper<AcceptanceRecordForm> qw);
IPage<AcceptanceRecordFormVO> getAcceptanceRecordFormVOPage(IPage<AcceptanceRecordForm> page);
AcceptanceRecordFormVO getAcceptanceRecordFormVO(String acceptanceRecordFormId);
}

@ -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.ApplicationForUse;
import digital.laboratory.platform.reagent.vo.ApplicationForUseVO;
import org.apache.ibatis.annotations.Mapper;
@ -21,7 +22,7 @@ public interface ApplicationForUseMapper extends BaseMapper<ApplicationForUse> {
ApplicationForUseVO getApplicationForUseVO(String applicationForUseId);
IPage<ApplicationForUseVO> getApplicationForUseVOPage(IPage<ApplicationForUse> page, QueryWrapper<ApplicationForUse> qw);
IPage<ApplicationForUseVO> getApplicationForUseVOPage(IPage<ApplicationForUse> page, @Param(Constants.WRAPPER)QueryWrapper<ApplicationForUse> qw);
List<ApplicationForUseVO> getApplicationForUseVOList (QueryWrapper<ApplicationForUse> qw);

@ -23,6 +23,6 @@ public interface CentralizedRequestMapper extends BaseMapper<CentralizedRequest>
IPage<CentralizedRequestVO> getCentralizedRequestVOPage(@Param("page") IPage<CentralizedRequest> page, @Param(Constants.WRAPPER) QueryWrapper<CentralizedRequest> qw);
List<CentralizedRequestVO> getCentralizedRequestVOList(@Param(Constants.WRAPPER) QueryWrapper<CentralizedRequest> qw);
CentralizedRequestVO getCentralizedRequestVO(String centralizedRequestId);
CentralizedRequestVO getCentralizedRequestVO(String id);
}

@ -1,22 +0,0 @@
package digital.laboratory.platform.reagent.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import digital.laboratory.platform.reagent.entity.CheckContent;
import digital.laboratory.platform.reagent.vo.CheckContentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* (检查内容) Mapper 接口
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (检查内容) Mapper
*/
@Mapper
public interface CheckContentMapper extends BaseMapper<CheckContent> {
List<CheckContentVO> getCheckContentVOList (String complianceCheckId);
}

@ -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.CheckSchedule;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.vo.CheckScheduleVO;
@ -19,7 +20,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface CheckScheduleMapper extends BaseMapper<CheckSchedule> {
IPage <CheckScheduleVO> getCheckScheduleVOPage (IPage<CheckSchedule> page, QueryWrapper<CheckSchedule> qw);
IPage <CheckScheduleVO> getCheckScheduleVOPage (IPage<CheckSchedule> page,@Param(Constants.WRAPPER) QueryWrapper<CheckSchedule> qw);
CheckScheduleVO getCheckScheduleVO (String checkScheduleId);
}

@ -27,7 +27,7 @@ public interface DecentralizedRequestMapper extends BaseMapper<DecentralizedRequ
List<DecentralizedRequestVO> getDecentralizedRequestVOList(@Param(Constants.WRAPPER) QueryWrapper<DecentralizedRequest> qw);
DecentralizedRequestVO getDecentralizedRequest (String decentralizedRequestId);
DecentralizedRequestVO getDecentralizedRequest (String id);
}

@ -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.extension.plugins.pagination.Page;
import digital.laboratory.platform.reagent.entity.DeliveryRegistrationForm;
import digital.laboratory.platform.reagent.vo.DeliveryRegistrationFormVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -14,4 +17,8 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface DeliveryRegistrationFormMapper extends BaseMapper<DeliveryRegistrationForm> {
Page<DeliveryRegistrationFormVO> getDeliveryRegistrationFormVOPage (Page <DeliveryRegistrationForm> page , QueryWrapper<DeliveryRegistrationForm> qw);
DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById (String deliveryRegistrationFormId);
}

@ -1,11 +1,15 @@
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 digital.laboratory.platform.reagent.entity.EvaluationForm;
import digital.laboratory.platform.reagent.vo.EvaluationFormVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* (服务商/供应商评价表) Mapper 接口
*
@ -15,6 +19,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface EvaluationFormMapper extends BaseMapper<EvaluationForm> {
EvaluationFormVO getEvaluationForm(String evaluationFormId);
EvaluationFormVO getEvaluationForm(String id);
List<EvaluationFormVO> getEvaluationFormVOList (String supplierInformationId);
}

@ -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.PeriodVerificationImplementation;
import digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO;
import org.apache.ibatis.annotations.Mapper;
@ -17,7 +18,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface PeriodVerificationImplementationMapper extends BaseMapper<PeriodVerificationImplementation> {
IPage<PeriodVerificationImplementationVO> getPeriodVerificationImplementationVOPage(IPage<PeriodVerificationImplementation> page, QueryWrapper<PeriodVerificationImplementation>qw);
IPage<PeriodVerificationImplementationVO> getPeriodVerificationImplementationVOPage( IPage<PeriodVerificationImplementation> page, @Param(Constants.WRAPPER)QueryWrapper<PeriodVerificationImplementation>qw);
PeriodVerificationImplementationVO getPeriodVerificationImplementationVO(String periodVerificationImplementationId);

@ -17,6 +17,5 @@ import java.util.List;
@Mapper
public interface ProvideServicesOrSuppliesMapper extends BaseMapper<ProvideServicesOrSupplies> {
List<ProvideServicesOrSuppliesVO> getProvideServicesOrSuppliesVOList (String provideServicesOrSuppliesId);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save