杨海航 2 years ago
parent 441f8f7d85
commit 45cf686a02
  1. 10
      pom.xml
  2. 2
      src/main/java/digital/laboratory/platform/reagent/controller/AcceptanceRecordFormController.java
  3. 6
      src/main/java/digital/laboratory/platform/reagent/controller/CheckScheduleController.java
  4. 151
      src/main/java/digital/laboratory/platform/reagent/controller/FixedValueReportController.java
  5. 159
      src/main/java/digital/laboratory/platform/reagent/controller/InstructionBookController.java
  6. 36
      src/main/java/digital/laboratory/platform/reagent/controller/PeriodVerificationImplementationController.java
  7. 59
      src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java
  8. 89
      src/main/java/digital/laboratory/platform/reagent/controller/StandardReserveSolutionController.java
  9. 154
      src/main/java/digital/laboratory/platform/reagent/controller/SupplierInformationController.java
  10. 42
      src/main/java/digital/laboratory/platform/reagent/controller/WarehousingRecordFormController.java
  11. 24
      src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationImplementationDTO.java
  12. 4
      src/main/java/digital/laboratory/platform/reagent/dto/PeriodVerificationPlanDTO.java
  13. 6
      src/main/java/digital/laboratory/platform/reagent/dto/ReagentConsumablesSetDTO.java
  14. 10
      src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApplicationDTO.java
  15. 37
      src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApprovalFormDTO.java
  16. 2
      src/main/java/digital/laboratory/platform/reagent/dto/WarehousingRecordFormDTO.java
  17. 2
      src/main/java/digital/laboratory/platform/reagent/entity/BatchDetails.java
  18. 4
      src/main/java/digital/laboratory/platform/reagent/entity/InstructionBook.java
  19. 23
      src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationImplementation.java
  20. 2
      src/main/java/digital/laboratory/platform/reagent/entity/PeriodVerificationPlan.java
  21. 2
      src/main/java/digital/laboratory/platform/reagent/entity/ReagentConsumableInventory.java
  22. 2
      src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApplication.java
  23. 8
      src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApprovalForm.java
  24. 9
      src/main/java/digital/laboratory/platform/reagent/entity/StandardReserveSolution.java
  25. 12
      src/main/java/digital/laboratory/platform/reagent/entity/SupplierInformation.java
  26. 6
      src/main/java/digital/laboratory/platform/reagent/entity/WarehousingBatchList.java
  27. 5
      src/main/java/digital/laboratory/platform/reagent/entity/WarehousingContent.java
  28. 4
      src/main/java/digital/laboratory/platform/reagent/mapper/PeriodVerificationPlanMapper.java
  29. 4
      src/main/java/digital/laboratory/platform/reagent/mapper/StandardReserveSolutionMapper.java
  30. 7
      src/main/java/digital/laboratory/platform/reagent/mapper/WarehousingContentMapper.java
  31. 5
      src/main/java/digital/laboratory/platform/reagent/service/PeriodVerificationImplementationService.java
  32. 4
      src/main/java/digital/laboratory/platform/reagent/service/PeriodVerificationPlanService.java
  33. 7
      src/main/java/digital/laboratory/platform/reagent/service/StandardMaterialApprovalFormService.java
  34. 8
      src/main/java/digital/laboratory/platform/reagent/service/StandardReserveSolutionService.java
  35. 4
      src/main/java/digital/laboratory/platform/reagent/service/WarehousingContentService.java
  36. 4
      src/main/java/digital/laboratory/platform/reagent/service/WarehousingRecordFormService.java
  37. 1
      src/main/java/digital/laboratory/platform/reagent/service/impl/CentralizedRequestServiceImpl.java
  38. 48
      src/main/java/digital/laboratory/platform/reagent/service/impl/CheckScheduleServiceImpl.java
  39. 61
      src/main/java/digital/laboratory/platform/reagent/service/impl/DeliveryRegistrationFormServiceImpl.java
  40. 1
      src/main/java/digital/laboratory/platform/reagent/service/impl/DetailsOfCentralizedServiceImpl.java
  41. 88
      src/main/java/digital/laboratory/platform/reagent/service/impl/PeriodVerificationImplementationServiceImpl.java
  42. 29
      src/main/java/digital/laboratory/platform/reagent/service/impl/PeriodVerificationPlanServiceImpl.java
  43. 7
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchaseListServiceImpl.java
  44. 41
      src/main/java/digital/laboratory/platform/reagent/service/impl/ReagentConsumableInventoryServiceImpl.java
  45. 1
      src/main/java/digital/laboratory/platform/reagent/service/impl/RequisitionRecordServiceImpl.java
  46. 23
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApplicationServiceImpl.java
  47. 67
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java
  48. 76
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardReserveSolutionServiceImpl.java
  49. 29
      src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingContentServiceImpl.java
  50. 15
      src/main/java/digital/laboratory/platform/reagent/service/impl/WarehousingRecordFormServiceImpl.java
  51. 10
      src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApplicationVO.java
  52. 3
      src/main/java/digital/laboratory/platform/reagent/vo/WarehousingContentVO.java
  53. 12
      src/main/resources/bootstrap.yml
  54. 2
      src/main/resources/mapper/InstructionBookMapper.xml
  55. 12
      src/main/resources/mapper/PeriodVerificationImplementationMapper.xml
  56. 14
      src/main/resources/mapper/PeriodVerificationPlanMapper.xml
  57. 11
      src/main/resources/mapper/StandardMaterialApplicationMapper.xml
  58. 3
      src/main/resources/mapper/StandardMaterialApprovalFormMapper.xml
  59. 3
      src/main/resources/mapper/StandardReserveSolutionMapper.xml
  60. 2
      src/main/resources/mapper/SupplierInformationMapper.xml
  61. 13
      src/main/resources/mapper/WarehousingContentMapper.xml

@ -66,11 +66,11 @@
<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>-->
<dependency>
<groupId>digital.laboratory.platform</groupId>
<artifactId>dlp-common-oss</artifactId>
<version>2022.10.11-snapshots</version>
</dependency>
<!--JDBC相关-->
<dependency>

@ -94,7 +94,7 @@ public class AcceptanceRecordFormController {
*/
@ApiOperation(value = "分页查询验收记录", notes = "分页查询验收记录")
@GetMapping("/recordPage")
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_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();

@ -13,6 +13,7 @@ import digital.laboratory.platform.reagent.dto.PeriodVerificationPlanDTO;
import digital.laboratory.platform.reagent.entity.CheckSchedule;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.service.CheckScheduleService;
import digital.laboratory.platform.reagent.service.InstructionBookService;
import digital.laboratory.platform.reagent.vo.CheckScheduleVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
@ -46,6 +47,8 @@ public class CheckScheduleController {
private final CheckScheduleService checkScheduleService;
/**
* 通过id查询
*
@ -87,7 +90,7 @@ public class CheckScheduleController {
checkScheduleQueryWrapper.eq("number",number);
}
IPage<CheckScheduleVO> checkScheduleVOPage = checkScheduleService.getCheckScheduleVOPage(page, checkScheduleQueryWrapper
.orderByAsc("create_time"));
.orderByDesc("create_time"));
return R.ok(checkScheduleVOPage);
}
@ -179,4 +182,5 @@ public class CheckScheduleController {
}
}

@ -1,5 +1,7 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.io.file.FileNameUtil;
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;
@ -7,19 +9,28 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.common.oss.service.OssFile;
import digital.laboratory.platform.reagent.entity.FixedValueReport;
import digital.laboratory.platform.reagent.entity.InstructionBook;
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.service.FixedValueReportService;
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
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 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.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
/**
* (定值报告)
@ -42,110 +53,86 @@ public class FixedValueReportController {
private final FixedValueReportService fixedValueReportService;
private final ReferenceMaterialService referenceMaterialService;
private final OssFile ossFile;
/**
* 通过id查询(定值报告)
* @param fixedValueReportId id
* 新增定值报告
*
* @param id 定值报告
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{fixedValueReportId}" )
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_get')" )
public R<FixedValueReport> getById(@PathVariable("fixedValueReportId" ) String fixedValueReportId, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "上传定值报告", notes = "上传定值报告")
@SysLog("上传定值报告")
@PostMapping
// @PreAuthorize("@pms.hasPermission('fixed_value_report_add')" )
public R<FixedValueReport> upload(String id, String fixedResult,@RequestPart(value = "file", required = false) MultipartFile file, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
FixedValueReport fixedValueReport = fixedValueReportService.getById(fixedValueReportId);
return R.ok(fixedValueReport);
//return R.ok(fixedValueReportService.getById(fixedValueReportId));
}
ReferenceMaterial byId = referenceMaterialService.getById(id);
/**
* 分页查询
* @param page 分页对象
* @param fixedValueReport (定值报告)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_get')" )
public R<IPage<FixedValueReport>> getFixedValueReportPage(Page<FixedValueReport> page, FixedValueReport fixedValueReport, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
String path = "reagen_managment" + "/" + "fixedValueReport" + "/" + byId.getReagentConsumableId();
String fileName = FileNameUtil.getName(file.getOriginalFilename());
boolean b = ossFile.fileUpload(file, path);
Map<String, String> ResultData = new HashMap<>();
ResultData.put("fileName", fileName);
ResultData.put("path", path);
FixedValueReport fixedValueReport = new FixedValueReport();
IPage<FixedValueReport> fixedValueReportSList = fixedValueReportService.page(page, Wrappers.<FixedValueReport>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(fixedValueReportSList);
// return R.ok(fixedValueReportService.page(page, Wrappers.query(fixedValueReport)));
}
if (b) {
fixedValueReport.setFixedValueReportId(IdWorker.get32UUID().toUpperCase());
fixedValueReport.setFixedValueReport(fileName);
fixedValueReport.setFixedResult(fixedResult);
fixedValueReport.setReferenceSubstanceId(byId.getId());
String fileNames = path + "/" + fileName;
/**
* 新增(定值报告)
* @param fixedValueReport (定值报告)
* @return R
*/
@ApiOperation(value = "新增(定值报告)", notes = "新增(定值报告)")
@SysLog("新增(定值报告)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_add')" )
public R<FixedValueReport> postAddObject(@RequestBody FixedValueReport fixedValueReport, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
fixedValueReport.setFixedValueReportId(IdWorker.get32UUID().toUpperCase());
if (fixedValueReportService.save(fixedValueReport)) {
return R.ok(fixedValueReport, "对象创建成功");
}
else {
return R.failed(fixedValueReport, "对象创建失败");
}
fixedValueReportService.save(fixedValueReport);
return R.ok(fixedValueReport, "上传成功");
} else return R.failed("上传失败");
}
/**
* 修改(定值报告)
* @param fixedValueReport (定值报告)
* 新增定值报告
*
* @param id 定值报告
* @return R
*/
@ApiOperation(value = "修改(定值报告)", notes = "修改(定值报告)")
@SysLog("修改(定值报告)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_edit')" )
public R<FixedValueReport> putUpdateById(@RequestBody FixedValueReport fixedValueReport, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "预览定值报告", notes = "预览定值报告")
@SysLog("预览定值报告")
@GetMapping("/download")
// @PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" )
public R<FixedValueReport> download(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (fixedValueReportService.updateById(fixedValueReport)) {
return R.ok(fixedValueReport, "保存对象成功");
}
else {
return R.failed(fixedValueReport, "保存对象失败");
}
}
ReferenceMaterial byId = referenceMaterialService.getById(id);
/**
* 通过id删除(定值报告)
* @param fixedValueReportId id
* @return R
*/
@ApiOperation(value = "通过id删除(定值报告)", notes = "通过id删除(定值报告)")
@SysLog("通过id删除(定值报告)" )
@DeleteMapping("/{fixedValueReportId}" )
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_del')" )
public R<FixedValueReport> deleteById(@PathVariable String fixedValueReportId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
LambdaQueryWrapper<FixedValueReport> fixedValueReportLambdaQueryWrapper = new LambdaQueryWrapper<>();
FixedValueReport oldFixedValueReport = fixedValueReportService.getById(fixedValueReportId);
fixedValueReportLambdaQueryWrapper.eq(FixedValueReport::getReferenceSubstanceId,byId.getId());
if (fixedValueReportService.removeById(fixedValueReportId)) {
return R.ok(oldFixedValueReport, "对象删除成功");
}
else {
return R.failed(oldFixedValueReport, "对象删除失败");
}
FixedValueReport one = fixedValueReportService.getOne(fixedValueReportLambdaQueryWrapper);
}
if (one != null) {
String fileName = one.getFixedValueReport();
String path = "reagen_managment" + "/" + "instructionBook" + "/" + byId.getReagentConsumableId();
String fileNames = path + "/" + fileName;
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
return R.ok(one);
} else
return R.ok(null);
}
}

@ -1,5 +1,7 @@
package digital.laboratory.platform.reagent.controller;
import cn.hutool.core.io.file.FileNameUtil;
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;
@ -7,26 +9,34 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.common.oss.service.OssFile;
import digital.laboratory.platform.reagent.entity.InstructionBook;
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.service.InstructionBookService;
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
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 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.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
/**
* (标准物质期间核查指导书)
*
* @author Zhang Xiaolong created at 2023-03-10
* @describe (标准物质期间核查指导书) 前端控制器
*
* <p>
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么:
* 为前端提供数据, 接受前端的数据
@ -36,116 +46,97 @@ import java.security.Principal;
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/instruction_book" )
@RequestMapping("/instruction_book")
@Api(value = "instruction_book", tags = "(标准物质期间核查指导书)管理")
public class InstructionBookController {
private final ReagentConsumablesService reagentConsumablesService;
private final InstructionBookService instructionBookService;
private final OssFile ossFile;
/**
* 通过id查询(标准物质期间核查指导书)
* @param instructionBookId id
* 新增(标准物质期间核查指导书)
*
* @param id (标准物质期间核查指导书)
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{instructionBookId}" )
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_get')" )
public R<InstructionBook> getById(@PathVariable("instructionBookId" ) String instructionBookId, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "上传(标准物质期间核查指导书)", notes = "上传(标准物质期间核查指导书)")
@SysLog("上传(标准物质期间核查指导书)")
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" )
public R<InstructionBook> upload(String id, @RequestPart(value = "file", required = false) MultipartFile file, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
InstructionBook instructionBook = instructionBookService.getById(instructionBookId);
return R.ok(instructionBook);
//return R.ok(instructionBookService.getById(instructionBookId));
}
ReagentConsumables byId = reagentConsumablesService.getById(id);
/**
* 分页查询
* @param page 分页对象
* @param instructionBook (标准物质期间核查指导书)
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_get')" )
public R<IPage<InstructionBook>> getInstructionBookPage(Page<InstructionBook> page, InstructionBook instructionBook, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
String path = "reagen_managment" + "/" + "instructionBook" + "/" + byId.getReagentConsumableId();
String fileName = FileNameUtil.getName(file.getOriginalFilename());
boolean b = ossFile.fileUpload(file, path);
Map<String, String> ResultData = new HashMap<>();
ResultData.put("fileName", fileName);
ResultData.put("path", path);
InstructionBook instructionBook = new InstructionBook();
IPage<InstructionBook> instructionBookSList = instructionBookService.page(page, Wrappers.<InstructionBook>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(instructionBookSList);
// return R.ok(instructionBookService.page(page, Wrappers.query(instructionBook)));
}
if (b) {
instructionBook.setId(IdWorker.get32UUID().toUpperCase());
instructionBook.setSetTime(LocalDateTime.now());
instructionBook.setMakerId(dlpUser.getId());
instructionBook.setReferenceMaterialTypeId(byId.getReagentConsumableId());
instructionBook.setInstructionBook(fileName);
String fileNames = path + "/" + fileName;
/**
* 新增(标准物质期间核查指导书)
* @param instructionBook (标准物质期间核查指导书)
* @return R
*/
@ApiOperation(value = "新增(标准物质期间核查指导书)", notes = "新增(标准物质期间核查指导书)")
@SysLog("新增(标准物质期间核查指导书)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" )
public R<InstructionBook> postAddObject(@RequestBody InstructionBook instructionBook, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
instructionBook.setId(IdWorker.get32UUID().toUpperCase());
if (instructionBookService.save(instructionBook)) {
return R.ok(instructionBook, "对象创建成功");
}
else {
return R.failed(instructionBook, "对象创建失败");
}
}
instructionBookService.save(instructionBook);
return R.ok(instructionBook, "上传成功");
} else return R.failed("上传失败");
/**
* 修改(标准物质期间核查指导书)
* @param instructionBook (标准物质期间核查指导书)
* @return R
*/
@ApiOperation(value = "修改(标准物质期间核查指导书)", notes = "修改(标准物质期间核查指导书)")
@SysLog("修改(标准物质期间核查指导书)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_edit')" )
public R<InstructionBook> putUpdateById(@RequestBody InstructionBook instructionBook, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (instructionBookService.updateById(instructionBook)) {
return R.ok(instructionBook, "保存对象成功");
}
else {
return R.failed(instructionBook, "保存对象失败");
}
}
/**
* 通过id删除(标准物质期间核查指导书)
* @param instructionBookId id
* 新增(标准物质期间核查指导书)
*
* @param id (标准物质期间核查指导书)
* @return R
*/
@ApiOperation(value = "通过id删除(标准物质期间核查指导书)", notes = "通过id删除(标准物质期间核查指导书)")
@SysLog("通过id删除(标准物质期间核查指导书)" )
@DeleteMapping("/{instructionBookId}" )
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_del')" )
public R<InstructionBook> deleteById(@PathVariable String instructionBookId, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "预览(标准物质期间核查指导书)", notes = "预览(标准物质期间核查指导书)(标准物质期间核查指导书)")
@SysLog("预览(标准物质期间核查指导书)(标准物质期间核查指导书)")
@GetMapping("/download")
// @PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" )
public R<InstructionBook> download(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
InstructionBook oldInstructionBook = instructionBookService.getById(instructionBookId);
ReagentConsumables byId = reagentConsumablesService.getById(id);
if (instructionBookService.removeById(instructionBookId)) {
return R.ok(oldInstructionBook, "对象删除成功");
}
else {
return R.failed(oldInstructionBook, "对象删除失败");
}
LambdaQueryWrapper<InstructionBook> instructionBookLambdaQueryWrapper = new LambdaQueryWrapper<>();
}
instructionBookLambdaQueryWrapper.eq(InstructionBook::getReferenceMaterialTypeId, byId.getReagentConsumableId());
InstructionBook one = instructionBookService.getOne(instructionBookLambdaQueryWrapper);
if (one != null) {
String fileName = one.getInstructionBook();
String path = "reagen_managment" + "/" + "instructionBook" + "/" + byId.getReagentConsumableId();
String fileNames = path + "/" + fileName;
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
return R.ok(one);
} else
return R.ok(null);
}
}

@ -52,9 +52,9 @@ public class PeriodVerificationImplementationController {
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{periodVerificationImplementationId}" )
@GetMapping( )
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" )
public R<PeriodVerificationImplementation> getById(@PathVariable("periodVerificationImplementationId" ) String periodVerificationImplementationId, HttpServletRequest theHttpServletRequest) {
public R<PeriodVerificationImplementation> getById( String periodVerificationImplementationId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -85,7 +85,6 @@ public class PeriodVerificationImplementationController {
}
IPage<PeriodVerificationImplementationVO> periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.<PeriodVerificationImplementation>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(periodVerificationImplementationSList);
@ -93,43 +92,20 @@ public class PeriodVerificationImplementationController {
}
/**
* 新增(标准物质期间核查实施情况及结果记录表)
* @param periodVerificationImplementationDTOS (标准物质期间核查实施情况及结果记录表)
* @return R
*/
@ApiOperation(value = "新增(标准物质期间核查实施情况及结果记录表)", notes = "新增(标准物质期间核查实施情况及结果记录表)")
@SysLog("新增(标准物质期间核查实施情况及结果记录表)" )
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_add')" )
public R<PeriodVerificationImplementation> postAddObject(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTOS, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.addById(periodVerificationImplementationDTOS, dlpUser);
if (periodVerificationImplementation!=null) {
return R.ok(periodVerificationImplementation, "保存成功");
}
else {
return R.failed(periodVerificationImplementation, "对象创建失败");
}
}
/**
* 修改(标准物质期间核查实施情况及结果记录表)
* @param periodVerificationImplementationDTO (标准物质期间核查实施情况及结果记录表)
* @return R
*/
@ApiOperation(value = "修改(标准物质期间核查实施情况及结果记录表)", notes = "修改(标准物质期间核查实施情况及结果记录表)")
@SysLog("修改(标准物质期间核查实施情况及结果记录表)" )
@PutMapping
@ApiOperation(value = "录入(标准物质期间核查实施情况及结果记录表)", notes = "录入((标准物质期间核查实施情况及结果记录表)")
@SysLog("录入((标准物质期间核查实施情况及结果记录表)" )
@PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_edit')" )
public R<PeriodVerificationImplementation> putUpdateById(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO);
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO,dlpUser);
if (periodVerificationImplementation!=null) {
return R.ok(periodVerificationImplementation, "保存成功");

@ -47,17 +47,17 @@ public class StandardMaterialApprovalFormController {
/**
* 通过id查询(标准物质停用/报废销毁/恢复/降级使用审批表)
* @param standardMaterialApprovalFormId id
* @param id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping( )
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
public R<StandardMaterialApprovalFormVO> getById(String standardMaterialApprovalFormId, HttpServletRequest theHttpServletRequest) {
public R<StandardMaterialApprovalFormVO> getById(String id, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardMaterialApprovalFormVO standardMaterialApprovalForm = standardMaterialApprovalFormService.getVO(standardMaterialApprovalFormId);
StandardMaterialApprovalFormVO standardMaterialApprovalForm = standardMaterialApprovalFormService.getVO(id);
return R.ok(standardMaterialApprovalForm);
//return R.ok(standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId));
}
@ -96,7 +96,7 @@ public class StandardMaterialApprovalFormController {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.addById(standardMaterialApprovalFormDTO, dlpUser);
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.commitById(standardMaterialApprovalFormDTO, dlpUser);
if (standardMaterialApprovalForm!=null) {
return R.ok(standardMaterialApprovalForm, "保存成功");
@ -106,51 +106,6 @@ public class StandardMaterialApprovalFormController {
}
}
/**
* 修改(标准物质停用/报废销毁/恢复/降级使用审批表)
* @param standardMaterialApprovalFormDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
* @return R
*/
@ApiOperation(value = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("修改(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PutMapping
// @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();
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.editById(standardMaterialApprovalFormDTO);
if (standardMaterialApprovalForm!=null) {
return R.ok(standardMaterialApprovalForm, "修改成功");
}
else {
return R.failed(standardMaterialApprovalForm, "修改失败");
}
}
/**
* 修改(标准物质停用/报废销毁/恢复/降级使用审批表)
* @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 (标准物质停用/报废销毁/恢复/降级使用审批表)
@ -159,7 +114,7 @@ public class StandardMaterialApprovalFormController {
@ApiOperation(value = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PutMapping("/auditPrimary")
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" )
// @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();
@ -182,7 +137,7 @@ public class StandardMaterialApprovalFormController {
@ApiOperation(value = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PutMapping("/auditSecondary")
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" )
// @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();
@ -205,7 +160,7 @@ public class StandardMaterialApprovalFormController {
@ApiOperation(value = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("审批(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PutMapping("/approve")
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" )
// @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();

@ -7,8 +7,12 @@ 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.StandardReserveSolutionDTO;
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionFullDTO;
import digital.laboratory.platform.reagent.entity.StandardReserveSolution;
import digital.laboratory.platform.reagent.service.StandardReserveSolutionService;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionFullVO;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -44,18 +48,18 @@ public class StandardReserveSolutionController {
/**
* 通过id查询(标准储备溶液配制及使用记录表)
* @param standardReserveSolutionId id
* @param id id
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{standardReserveSolutionId}" )
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
public R<StandardReserveSolution> getById(@PathVariable("standardReserveSolutionId" ) String standardReserveSolutionId, HttpServletRequest theHttpServletRequest) {
@GetMapping( )
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
public R<StandardReserveSolutionVO> getById(String id, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardReserveSolution standardReserveSolution = standardReserveSolutionService.getById(standardReserveSolutionId);
return R.ok(standardReserveSolution);
StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id);
return R.ok(standardReserveSolutionVOById);
//return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId));
}
@ -67,13 +71,12 @@ public class StandardReserveSolutionController {
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
public R<IPage<StandardReserveSolution>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
public R<IPage<StandardReserveSolutionVO>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<StandardReserveSolution> standardReserveSolutionSList = standardReserveSolutionService.page(page, Wrappers.<StandardReserveSolution>query()
.eq("create_by", dlpUser.getId())
IPage<StandardReserveSolutionVO> standardReserveSolutionSList = standardReserveSolutionService.getStandardReserveSolutionVOList(page, Wrappers.<StandardReserveSolution>query()
.orderByDesc("create_time")
);
return R.ok(standardReserveSolutionSList);
@ -83,69 +86,59 @@ public class StandardReserveSolutionController {
/**
* 新增(标准储备溶液配制及使用记录表)
* @param standardReserveSolution (标准储备溶液配制及使用记录表)
* @param standardReserveSolutionDTO (标准储备溶液配制及使用记录表)
* @return R
*/
@ApiOperation(value = "新增(标准储备溶液配制及使用记录表)", notes = "新增(标准储备溶液配制及使用记录表)")
@SysLog("新增(标准储备溶液配制及使用记录表)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" )
public R<StandardReserveSolution> postAddObject(@RequestBody StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" )
public R<StandardReserveSolutionVO> postAddObject(@RequestBody StandardReserveSolutionDTO standardReserveSolutionDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
standardReserveSolution.setId(IdWorker.get32UUID().toUpperCase());
if (standardReserveSolutionService.save(standardReserveSolution)) {
return R.ok(standardReserveSolution, "对象创建成功");
}
else {
return R.failed(standardReserveSolution, "对象创建失败");
}
StandardReserveSolutionVO standardReserveSolutionVO = standardReserveSolutionService.addById(standardReserveSolutionDTO, dlpUser);
if (standardReserveSolutionVO!=null){
return R.ok(standardReserveSolutionVO,"配置成功");
}else return R.failed("配置失败");
}
/**
* 修改(标准储备溶液配制及使用记录表)
* @param standardReserveSolution (标准储备溶液配制及使用记录表)
* 新增(标准储备溶液配制及使用记录表)
* @return R
*/
@ApiOperation(value = "修改(标准储备溶液配制及使用记录表)", notes = "修改(标准储备溶液配制及使用记录表)")
@SysLog("修改(标准储备溶液配制及使用记录表)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_edit')" )
public R<StandardReserveSolution> putUpdateById(@RequestBody StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "入库(标准储备溶液配制及使用记录表)", notes = "入库(标准储备溶液配制及使用记录表)")
@SysLog("入库(标准储备溶液配制及使用记录表)" )
@PostMapping("warehousing")
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" )
public R<StandardReserveSolutionFullVO> warehousingById(@RequestBody StandardReserveSolutionFullDTO standardReserveSolutionFullDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (standardReserveSolutionService.updateById(standardReserveSolution)) {
return R.ok(standardReserveSolution, "保存对象成功");
}
else {
return R.failed(standardReserveSolution, "保存对象失败");
}
StandardReserveSolutionFullVO standardReserveSolutionFullVO = standardReserveSolutionService.warehousingById(standardReserveSolutionFullDTO);
if (standardReserveSolutionFullVO!=null){
return R.ok(standardReserveSolutionFullVO,"入库成功");
}else return R.failed("入库失败");
}
/**
* 通过id删除(标准储备溶液配制及使用记录表)
* @param standardReserveSolutionId id
* 通过id查询(标准储备溶液配制及使用记录表)
* @param id id
* @return R
*/
@ApiOperation(value = "通过id删除(标准储备溶液配制及使用记录表)", notes = "通过id删除(标准储备溶液配制及使用记录表)")
@SysLog("通过id删除(标准储备溶液配制及使用记录表)" )
@DeleteMapping("/{standardReserveSolutionId}" )
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_del')" )
public R<StandardReserveSolution> deleteById(@PathVariable String standardReserveSolutionId, HttpServletRequest theHttpServletRequest) {
@ApiOperation(value = "通过id查询标准储备溶液入库记录", notes = "通过id查询标准储备溶液入库记录")
@GetMapping( "/full")
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
public R<StandardReserveSolutionVO> getFullVOById(String id, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardReserveSolution oldStandardReserveSolution = standardReserveSolutionService.getById(standardReserveSolutionId);
if (standardReserveSolutionService.removeById(standardReserveSolutionId)) {
return R.ok(oldStandardReserveSolution, "对象删除成功");
}
else {
return R.failed(oldStandardReserveSolution, "对象删除失败");
}
StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(id);
return R.ok(byFullVOId);
//return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId));
}
}

@ -6,7 +6,7 @@ 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.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;
@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.activation.MimetypesFileTypeMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@ -50,7 +51,7 @@ public class SupplierInformationController {
private final SupplierInformationService supplierInformationService;
// private final OssFile ossFile;
private final OssFile ossFile;
/**
* 通过id查询(服务商/供应商信息)
@ -70,7 +71,6 @@ public class SupplierInformationController {
SupplierInformationVO voById = supplierInformationService.getVOById(supplierInformationId);
return R.ok(voById);
}
/**
@ -148,37 +148,127 @@ public class SupplierInformationController {
}
/**
* 修改(服务商/供应商信息)
* 上传供应人照片
*
* @param id (服务商/供应商信息)
* @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("上传失败");
//
// }
@ApiOperation(value = "上传供应人照片", notes = "上传供应人照片/供应商信息")
@SysLog("修改服务商/供应商信息")
@PostMapping("/upload")
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
public R<SupplierInformation> putUpdateById(String id, @RequestPart(value = "file", required = false) MultipartFile file, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
SupplierInformation supplierInformation = supplierInformationService.getById(id);
String path = "reagen_managment" + "/" + "supplierInformation" + "/" + 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);
supplierInformation.setPhotograph(fileName);
supplierInformationService.updateById(supplierInformation);
String fileNames = path + "/" + fileName;
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
return R.ok(supplierInformation, "上传成功");
} else return R.failed("上传失败");
}
@ApiOperation(value = "上传资质文件", notes = "上传资质文件")
@SysLog("上传资质文件")
@PostMapping("/uploadQd")
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
public R<SupplierInformation> uploadById(String id, @RequestPart(value = "file", required = false) MultipartFile file, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
SupplierInformation supplierInformation = supplierInformationService.getById(id);
String path = "reagen_managment" + "/" + "supplierInformation/" + 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.setQualificationDocument(path);
supplierInformation.setQualificationDocumentName(fileName);
supplierInformationService.updateById(supplierInformation);
String fileNames = path + "/" + fileName;
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
return R.ok(supplierInformation, "上传成功");
} else return R.failed("上传失败");
}
@ApiOperation(value = "预览资质文件", notes = "预览资质文件")
@SysLog("预览资质文件")
@GetMapping("/downloadQd")
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
public R<SupplierInformation> downloadById(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
SupplierInformation supplierInformation = supplierInformationService.getById(id);
String qualificationDocumentName = supplierInformation.getQualificationDocumentName();
if (qualificationDocumentName != null) {
String path = "reagen_managment" + "/" + "supplierInformation/" + supplierInformation.getId();
String fileName = path + "/" + qualificationDocumentName;
ossFile.fileGet(fileName, httpServletResponse.getOutputStream());
return R.ok(supplierInformation);
} else return R.failed();
}
@ApiOperation(value = "预览供应人照片", notes = "预览供应人照片")
@SysLog("预览供应人照片")
@GetMapping("/download")
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
public R<SupplierInformation> download(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
SupplierInformation supplierInformation = supplierInformationService.getById(id);
String photograph = supplierInformation.getPhotograph();
if (photograph != null) {
String path = "reagen_managment" + "/" + "supplierInformation/" + supplierInformation.getId();
String fileName = path + "/" + photograph;
ossFile.fileGet(fileName, httpServletResponse.getOutputStream());
return R.ok(supplierInformation);
} else return R.failed();
}
}

@ -1,5 +1,7 @@
package digital.laboratory.platform.reagent.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -7,9 +9,14 @@ 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.WarehousingRecordFormDTO;
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.entity.WarehousingBatchList;
import digital.laboratory.platform.reagent.entity.WarehousingContent;
import digital.laboratory.platform.reagent.entity.WarehousingRecordForm;
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
import digital.laboratory.platform.reagent.service.WarehousingContentService;
import digital.laboratory.platform.reagent.service.WarehousingRecordFormService;
import digital.laboratory.platform.reagent.vo.WarehousingContentVO;
import digital.laboratory.platform.reagent.vo.WarehousingRecordFormVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
@ -43,6 +50,10 @@ public class WarehousingRecordFormController {
private final WarehousingRecordFormService warehousingRecordFormService;
private final WarehousingContentService warehousingContentService;
private final ReagentConsumablesService reagentConsumablesService;
/**
* 通过id查询签收记录表
*
@ -70,19 +81,44 @@ public class WarehousingRecordFormController {
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
public R<List<WarehousingRecordFormVO>> getWarehousingRecordFormVOPage( HttpServletRequest theHttpServletRequest) {
public R<Page<WarehousingRecordFormVO>> getWarehousingRecordFormVOPage( Page page,HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
List<WarehousingRecordFormVO> warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOList();
Page<WarehousingRecordFormVO> warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOList(page);
return R.ok(warehousingRecordFormVOList);
}
/**
* 分页查询
* @return
*/
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/pageWC")
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
public R<IPage<WarehousingContentVO>> getWarehousingContentVOPage( Page page,String name,HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
QueryWrapper<WarehousingContent> warehousingContentQueryWrapper = new QueryWrapper<>();
if (!name.equals("")){
warehousingContentQueryWrapper.eq("reagentConsumableName",name);
}
IPage<WarehousingContentVO> warehousingContentVOPage = warehousingContentService.getWarehousingContentVOPage(page, warehousingContentQueryWrapper);
return R.ok(warehousingContentVOPage);
}
/**
* 新增签收记录表
*
@ -107,4 +143,6 @@ public class WarehousingRecordFormController {
return R.failed("入库失败");
}
}
}

@ -14,30 +14,12 @@ public class PeriodVerificationImplementationDTO {
@ApiModelProperty(value="(核查时间)")
private LocalDate checkingTime;
@ApiModelProperty(value="(偏差/不确定度)")
private String deviationAndUncertainty;
@ApiModelProperty(value="(核查实施情况及结果)")
private String implementationAndResults;
@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;
@ -49,4 +31,10 @@ public class PeriodVerificationImplementationDTO {
@ApiModelProperty(value="(核查结果:PDF)")
private String result;
@ApiModelProperty(value="(核查方法)")
private String verificationMethod;
@ApiModelProperty(value="(偏差/不确定度)")
private String deviationAndUncertainty;
}

@ -16,7 +16,7 @@ import java.time.LocalDateTime;
public class PeriodVerificationPlanDTO {
@ApiModelProperty(value="(偏差/不确定度)")
private String deviationAndUncertainty;
private String deviationOrUncertainty;
@ApiModelProperty(value="(核查人ID)")
private String inspectorId;
@ -36,7 +36,7 @@ public class PeriodVerificationPlanDTO {
private LocalDate scheduledVerificationDate;
@ApiModelProperty(value="(标准值/纯度)")
private String standardValueAndPurity;
private String standardValueOrPurity;
@ApiModelProperty(value="(核查依据)")
private String verificationBasis;

@ -1,6 +0,0 @@
package digital.laboratory.platform.reagent.dto;
public class ReagentConsumablesSetDTO {
}

@ -1,13 +1,19 @@
package digital.laboratory.platform.reagent.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class StandardMaterialApplicationDTO {
@ApiModelProperty(value = "标准物质领用归还登记表Id")
private String standardMaterialApplicationId;
private String userId;
@ApiModelProperty(value = "归还数量")
private String useQuantity;
@ApiModelProperty(value = "格子id")
private String latticeId;
@ApiModelProperty(value = "是否需要归还")
private Boolean outOfUse;
}

@ -1,29 +1,60 @@
package digital.laboratory.platform.reagent.dto;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StandardMaterialApprovalFormDTO {
@ApiModelProperty(value="(经办人)")
private String agentName;
private String applicantId;
private String applicantName;
@ApiModelProperty(value="(批号)")
private String batchNumber;
@ApiModelProperty(value="(定值结果)")
private String fixedResult;
@ApiModelProperty(value="(制造商)")
private String manufacturerId;
@ApiModelProperty(value="(标准物质编号)")
private String referenceMaterialNumber;
@ApiModelProperty(value="(标准物质名称)")
private String referenceMaterialName;
@ApiModelProperty(value="(购置时间)")
private LocalDateTime purchaseTime;
@ApiModelProperty(value="(处理时间)")
private LocalDate processingTime;
@ApiModelProperty(value="(数量)")
private Integer quantity;
@ApiModelProperty(value="(申请原因)")
private String reasonForApplication;
@ApiModelProperty(value="(标准物质id)")
private String referenceMaterialId;
@ApiModelProperty(value="(备注)")
private String remarks;
@ApiModelProperty(value="(规格)")
private String specification;
@ApiModelProperty(value="(申请内容)")
private Integer applicationContent;
@ApiModelProperty(value="ID")
private String standardMaterialApprovalFormId;

@ -51,7 +51,5 @@ public class WarehousingRecordFormDTO {
@ApiModelProperty(value="(备注)")
private String remark;
@ApiModelProperty(value="(存储期限)")
private String limitDate;
}

@ -64,7 +64,7 @@ public class BatchDetails extends BaseEntity {
* (有效日期)
*/
@ApiModelProperty(value="(有效日期)")
private LocalDateTime expirationDate;
private Integer expirationDate;
/**
* (定值结果)

@ -65,8 +65,8 @@ public class InstructionBook extends BaseEntity {
/**
* (标准物质id)
*/
@ApiModelProperty(value="(标准物质id)")
private String referenceMaterialId;
@ApiModelProperty(value="(标准物质id)")
private String referenceMaterialTypeId;
/**
* (制定时间)

@ -58,7 +58,7 @@ public class PeriodVerificationImplementation extends BaseEntity {
/**
* (提交状态)
*/
@ApiModelProperty(value="(提交状态)")
@ApiModelProperty(value="(提交状态(0:未提交,1:已提交,2:审核通过,-1:审核未通过))")
private Integer commitStatus;
/**
@ -79,6 +79,9 @@ public class PeriodVerificationImplementation extends BaseEntity {
@ApiModelProperty(value="(核查人员ID)")
private String inspectorId;
@ApiModelProperty(value="(核查结果:PDF)")
private String result;
/**
* (编号)
*/
@ -101,12 +104,18 @@ public class PeriodVerificationImplementation extends BaseEntity {
/**
* (标准物质ID)
*/
@ApiModelProperty(value="(标准物质ID)")
private String referenceMaterialId;
@ApiModelProperty(value="(标准物质名称)")
private String referenceMaterialName;
/**
* (核查依据)
*/
@ApiModelProperty(value="(核查依据)")
private String verificationBasis;
/**
* (备注)
*/
@ -117,7 +126,7 @@ public class PeriodVerificationImplementation extends BaseEntity {
* (标准值/纯度)
*/
@ApiModelProperty(value="(标准值/纯度)")
private String standardValueAndPurity;
private String standardValueOrPurity;
/**
* (技术负责人ID)
@ -131,13 +140,12 @@ public class PeriodVerificationImplementation extends BaseEntity {
@ApiModelProperty(value="(核查方法)")
private String verificationMethod;
/**
* periodVerificationImplementationId
*/
@TableId(value = "period_verification_implementation_id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="periodVerificationImplementationId")
private String periodVerificationImplementationId;
@TableId(value = "id", type = IdType.ASSIGN_UUID)
@ApiModelProperty(value="id")
private String id;
/**
* periodVerificationPlanId
@ -145,5 +153,4 @@ public class PeriodVerificationImplementation extends BaseEntity {
@ApiModelProperty(value="periodVerificationPlanId")
private String periodVerificationPlanId;
}

@ -83,7 +83,7 @@ public class PeriodVerificationPlan extends BaseEntity {
* (标准值/纯度)
*/
@ApiModelProperty(value="(标准值/纯度)")
private String standardValueAndPurity;
private String standardValueOrPurity;
/**
* (核查依据)

@ -153,7 +153,7 @@ public class ReagentConsumableInventory extends BaseEntity {
* 存储期限
*/
@ApiModelProperty(value = "存储期限")
private LocalDateTime storageLife;
private Integer storageLife;
/**
* 状态
*/

@ -93,6 +93,8 @@ public class StandardMaterialApplication extends BaseEntity {
@ApiModelProperty(value="(领用数量)")
private Integer requisitionedQuantity;
@ApiModelProperty(value="(是否归还)")
private Integer isReturn;
/**
* (序号)
*/

@ -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;
@ -129,7 +130,7 @@ public class StandardMaterialApprovalForm extends BaseEntity {
/**
* (提交状态)
*/
@ApiModelProperty(value="(提交状态)")
@ApiModelProperty(value="(提交状态(0:未提交,1:已提交,2:一级审核通过,3:二级审核通过,4:审批通过,-1:审核/审批不通过,-2:审批不通过))")
private Integer commitStatus;
@ -165,7 +166,7 @@ public class StandardMaterialApprovalForm extends BaseEntity {
* (处理时间)
*/
@ApiModelProperty(value="(处理时间)")
private LocalDateTime processingTime;
private LocalDate processingTime;
/**
* (购置时间)
@ -197,6 +198,9 @@ public class StandardMaterialApprovalForm extends BaseEntity {
@ApiModelProperty(value="(备注)")
private String remarks;
@ApiModelProperty(value="(申请内容)")
private Integer applicationContent;
/**
* (规格)
*/

@ -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 io.swagger.models.auth.In;
@ -43,17 +44,11 @@ public class StandardReserveSolution extends BaseEntity {
*/
@ApiModelProperty(value="(定容体积(mL))")
private String constantVolume;
/**
* (配制人ID)
*/
@ApiModelProperty(value="(配制人ID)")
private String dispenserId;
private String quantityUsed;
/**
* (标准物质ID)
*/
@ -105,7 +100,7 @@ public class StandardReserveSolution extends BaseEntity {
* (有效期限)
*/
@ApiModelProperty(value="(有效期限)")
private LocalDateTime validityPeriod;
private Integer validityPeriod;
/**
* (有效期限)
*/

@ -54,12 +54,24 @@ public class SupplierInformation extends BaseEntity {
@ApiModelProperty(value="(供应人照片)路径")
private String photographOfSupplier;
/**
* (供应人照片)名称
*/
@ApiModelProperty(value="(供应人照片)名称")
private String photograph;
/**
* (资质文件)路径
*/
@ApiModelProperty(value="(资质文件)路径")
private String qualificationDocument;
/**
* (资质文件)路径
*/
@ApiModelProperty(value="(资质文件)名称")
private String qualificationDocumentName;
/**
* (供应范围)
*/

@ -1,8 +1,10 @@
package digital.laboratory.platform.reagent.entity;
import com.alibaba.fastjson.annotation.JSONField;
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;
@ -46,6 +48,8 @@ public class WarehousingBatchList extends BaseEntity {
/**
* (生产日期)
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@JSONField(format = "yyyy-MM-dd")
@ApiModelProperty(value="(生产日期)")
private LocalDate dateOfProduction;
@ -59,6 +63,8 @@ public class WarehousingBatchList extends BaseEntity {
/**
* (有效日期)
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@JSONField(format = "yyyy-MM-dd")
@ApiModelProperty(value="(有效日期)")
private LocalDate expirationDate;
/**

@ -20,6 +20,11 @@ public class WarehousingContent extends BaseEntity {
*/
@ApiModelProperty(value = "(试剂耗材ID)")
private String reagentConsumableId;
/**
* (试剂耗材ID)
*/
@ApiModelProperty(value = "(试剂耗材名称)")
private String reagentConsumableName;
/**
* (总数量)

@ -3,10 +3,13 @@ package digital.laboratory.platform.reagent.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import java.util.List;
@ -20,5 +23,6 @@ import java.util.List;
public interface PeriodVerificationPlanMapper extends BaseMapper<PeriodVerificationPlan> {
List <PeriodVerificationPlanVO> getPeriodVerificationPlanVOList (String checkScheduleId);
IPage <PeriodVerificationPlanVO> getPeriodVerificationPlanVOPage (Page<PeriodVerificationPlan> page, @Param(Constants.WRAPPER) QueryWrapper<PeriodVerificationPlan>qw);
}

@ -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.StandardReserveSolution;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO;
import org.apache.ibatis.annotations.Mapper;
@ -19,6 +20,7 @@ public interface StandardReserveSolutionMapper extends BaseMapper<StandardReserv
StandardReserveSolutionVO getStandardReserveSolutionVOById (String id);
IPage<StandardReserveSolutionVO> getStandardReserveSolutionVOPage (IPage<StandardReserveSolution> page , QueryWrapper <StandardReserveSolution>qw);
IPage<StandardReserveSolutionVO> getStandardReserveSolutionVOPage (IPage<StandardReserveSolution> page , @Param(Constants.WRAPPER) QueryWrapper <StandardReserveSolution>qw);
IPage<StandardReserveSolutionVO> getVOPage ();
}

@ -1,9 +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 com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import digital.laboratory.platform.reagent.entity.WarehousingContent;
import digital.laboratory.platform.reagent.vo.WarehousingContentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.yaml.snakeyaml.scanner.Constant;
import java.util.List;
@ -11,4 +17,5 @@ import java.util.List;
public interface WarehousingContentMapper extends BaseMapper<WarehousingContent> {
List<WarehousingContentVO> getWarehousingContentVOList(String signingRecordFormId);
IPage<WarehousingContentVO> getWarehousingContentVOPage(Page page, @Param(Constants.WRAPPER)QueryWrapper<WarehousingContent> qw);
}

@ -7,6 +7,7 @@ import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.PeriodVerificationImplementationDTO;
import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO;
/**
@ -21,9 +22,9 @@ public interface PeriodVerificationImplementationService extends IService<Period
PeriodVerificationImplementationVO getPeriodVerificationImplementationVO(String periodVerificationImplementationId);
PeriodVerificationImplementation addById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser);
PeriodVerificationImplementation addById(PeriodVerificationPlan periodVerificationPlan);
PeriodVerificationImplementation editById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO);
PeriodVerificationImplementation editById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO,DLPUser dlpUser);
PeriodVerificationImplementation commitById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser);

@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.PeriodVerificationPlanDTO;
@ -18,4 +19,7 @@ import java.util.List;
*/
public interface PeriodVerificationPlanService extends IService<PeriodVerificationPlan> {
List<PeriodVerificationPlanVO> getPeriodVerificationPlanVOList ( String checkScheduleId);
IPage<PeriodVerificationPlanVO> getPeriodVerificationPlanVOPage (Page<PeriodVerificationPlan> page, QueryWrapper<PeriodVerificationPlan> qw);
}

@ -17,12 +17,7 @@ import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
*/
public interface StandardMaterialApprovalFormService extends IService<StandardMaterialApprovalForm> {
StandardMaterialApprovalForm addById (StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser);
StandardMaterialApprovalForm editById (StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO);
StandardMaterialApprovalForm commitById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser);
StandardMaterialApprovalForm commitById (StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser);
IPage<StandardMaterialApprovalFormVO> getVOPage(IPage<StandardMaterialApprovalForm> page, QueryWrapper<StandardMaterialApprovalForm> qw);
StandardMaterialApprovalFormVO getVO(String standardMaterialApprovalFormId);

@ -5,10 +5,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionDTO;
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionFullDTO;
import digital.laboratory.platform.reagent.entity.StandardReserveSolution;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionFullVO;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO;
import java.util.List;
/**
* (标准储备溶液配制及使用记录表)服务类
*
@ -19,11 +22,12 @@ public interface StandardReserveSolutionService extends IService<StandardReserve
StandardReserveSolutionVO getStandardReserveSolutionVOById(String id);
StandardReserveSolution addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser);
StandardReserveSolutionVO addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser);
IPage<StandardReserveSolutionVO> getStandardReserveSolutionVOList(IPage<StandardReserveSolution> page, QueryWrapper<StandardReserveSolution> qw);
StandardReserveSolution warehousingById(String solutionId, String latticeId);
StandardReserveSolutionFullVO warehousingById(StandardReserveSolutionFullDTO standardReserveSolutionFullDTO);
StandardReserveSolutionFullVO getByFullVOId(String id);
}

@ -1,5 +1,8 @@
package digital.laboratory.platform.reagent.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.entity.WarehousingContent;
@ -11,4 +14,5 @@ public interface WarehousingContentService extends IService<WarehousingContent>
List<WarehousingContentVO> getWarehousingContentVOList(String warehousingRecordFormId);
IPage<WarehousingContentVO> getWarehousingContentVOPage(Page page, QueryWrapper<WarehousingContent> qw);
}

@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.WarehousingRecordFormDTO;
@ -24,6 +25,5 @@ public interface WarehousingRecordFormService extends IService<WarehousingRecord
WarehousingRecordFormVO getWarehousingRecordFormVO (String warehousingFormId);
@Transactional
WarehousingRecordFormVO addFormById(List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, DLPUser dlpUser);
List<WarehousingRecordFormVO> getWarehousingRecordFormVOList();
Page<WarehousingRecordFormVO> getWarehousingRecordFormVOList(Page page);
}

@ -199,7 +199,6 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
centralizedRequestVO.setDetailsOfCentralizedVOList(detailsOfCentralizedService.getDetailsOfCentralizedVOList(centralizedRequestVO.getId()));
centralizedRequestVOArrayList.add(centralizedRequestVO);
}
return centralizedRequestVOArrayList;
}
}

@ -12,6 +12,7 @@ import digital.laboratory.platform.reagent.entity.CheckSchedule;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.mapper.CheckScheduleMapper;
import digital.laboratory.platform.reagent.service.CheckScheduleService;
import digital.laboratory.platform.reagent.service.PeriodVerificationImplementationService;
import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService;
import digital.laboratory.platform.reagent.vo.CheckScheduleVO;
import digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO;
@ -19,6 +20,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.time.LocalDateTime;
import java.util.ArrayList;
@ -33,6 +35,9 @@ import java.util.List;
@Service
public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, CheckSchedule> implements CheckScheduleService {
@Autowired
private PeriodVerificationImplementationService periodVerificationImplementationService;
@Autowired
private CheckScheduleService checkScheduleService;
@Autowired
@ -58,6 +63,8 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
periodVerificationPlan.setCheckScheduleId(checkSchedule.getId());
periodVerificationPlan.setDeviationAndUncertainty(periodVerificationPlanDTO.getDeviationOrUncertainty());
periodVerificationPlans.add(periodVerificationPlan);
}
@ -92,6 +99,8 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
BeanUtils.copyProperties(periodVerificationPlanDTO, periodVerificationPlan);
periodVerificationPlan.setDeviationAndUncertainty(periodVerificationPlanDTO.getDeviationOrUncertainty());
periodVerificationPlan.setCheckScheduleId(byId.getId());
periodVerificationPlans.add(periodVerificationPlan);
@ -110,23 +119,27 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
CheckSchedule byId = checkScheduleService.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId());
if (byId == null) {
CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
checkSchedule.setStatus(1);
checkScheduleService.updateById(checkSchedule);
return checkSchedule;
} else {
byId.setStatus(1);
checkScheduleService.updateById(byId);}
CheckSchedule checkSchedule = checkScheduleService.editPlan(periodVerificationPlanDTOS);
checkSchedule.setStatus(1);
checkScheduleService.updateById(checkSchedule);
return checkSchedule;
}
return byId;
}
@Override
public CheckSchedule auditPlan(AuditAndApproveDTO auditAndApproveDTO,DLPUser dlpUser){
public CheckSchedule auditPlan(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
CheckSchedule byId = checkScheduleService.getById(auditAndApproveDTO.getUuId());
@ -135,15 +148,27 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
byId.setAuditTimeOfTechnical(LocalDateTime.now());
byId.setTechnicalDirectorId(dlpUser.getId());
if (auditAndApproveDTO.getAuditResult()==true){
byId.setStatus(2);}
else {
if (auditAndApproveDTO.getAuditResult() == true) {
LambdaQueryWrapper<PeriodVerificationPlan> periodVerificationPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
periodVerificationPlanLambdaQueryWrapper.eq(PeriodVerificationPlan::getCheckScheduleId,byId.getId());
List<PeriodVerificationPlan> list = periodVerificationPlanService.list(periodVerificationPlanLambdaQueryWrapper);
for (PeriodVerificationPlan periodVerificationPlan : list) {
periodVerificationImplementationService.addById(periodVerificationPlan);
}
byId.setStatus(2);
} else {
byId.setStatus(-1);
}
if (checkScheduleService.updateById(byId)){
if (checkScheduleService.updateById(byId)) {
return byId;
}else throw new RuntimeException(String.format("审核失败"));
} else throw new RuntimeException(String.format("审核失败"));
}
@Override
@ -167,4 +192,5 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
}
}

@ -93,11 +93,11 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
ReagentConsumables one = reagentConsumablesService.getById(reagentConsumablesSet.getReagentConsumableId());
if (one.getCategory().equals("标准物质")|one.getCategory().equals("标准储备溶液")){
if (one.getCategory().equals("标准物质") | one.getCategory().equals("标准储备溶液")) {
LambdaQueryWrapper<ReferenceMaterial> referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>();
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getNumber,reagentConsumablesSet.getReferenceMaterialNumber());
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getNumber, reagentConsumablesSet.getReferenceMaterialNumber());
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper);
@ -166,7 +166,9 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
outgoingContents.setDeliveryRegistrationFormId(byId.getId());
if (reagentConsumables.getCategory().equals("标准物质")&&outgoingContents.isReturnOrNot()) {
outgoingContents.setReferenceMaterialNumber(outgoingContentsDTO.getNumber());
if (reagentConsumables.getCategory().equals("标准物质") && outgoingContents.isReturnOrNot()) {
//生成标准物质领用/归还登记表
StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication();
@ -180,25 +182,32 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel());
standardMaterialApplication.setApplicationForUseId(one.getId());
standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId());
standardMaterialApplication.setStatus(0);
standardMaterialApplication.setReferenceMaterialNumber(outgoingContents.getReferenceMaterialNumber());
standardMaterialApplication.setAdministratorId(dlpUser.getId());
standardMaterialApplication.setReferenceMaterialNumber(outgoingContentsDTO.getNumber());
standardMaterialApplications.add(standardMaterialApplication);
standardMaterialApplication.setIsReturn(outgoingContentsDTO.getOutboundUse());
if (outgoingContentsDTO.getOutboundUse() == 2) {
standardMaterialApplication.setStatus(-1);
standardMaterialApplication.setPurposeAndQuantity(outgoingContents.getQuantity().toString());
} else {
standardMaterialApplication.setStatus(0);
}
ReferenceMaterial byId1 = referenceMaterialService.getById(outgoingContentsDTO.getReferenceMaterialId());
byId1.setStatus(-1);
//查找出对应的仓库信息,将库存量减少
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.reduceById(outgoingContents.getReagentConsumableId(), outgoingContents.getQuantity());
if (reagentConsumableInventory.getTotalQuantity() < 0) {
throw new RuntimeException(String.format("出库数量不能超过库存量"));
}
} else if (reagentConsumables.getCategory().equals("标准储备溶液")&&outgoingContents.isReturnOrNot()) {
} else if (reagentConsumables.getCategory().equals("标准储备溶液") && outgoingContents.isReturnOrNot()) {
//创建标准物质领用/归还登记表
StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication();
standardMaterialApplication.setReferenceMaterialNumber(outgoingContents.getReferenceMaterialNumber());
standardMaterialApplication.setReferenceMaterialNumber(outgoingContentsDTO.getNumber());
standardMaterialApplication.setStandardMaterialApplicationId(IdWorker.get32UUID().toUpperCase());
standardMaterialApplication.setPurpose(outgoingContents.getOutboundUse());
standardMaterialApplication.setDateOfClaim(LocalDateTime.now());
@ -208,7 +217,13 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
standardMaterialApplication.setRequisitionedQuantity(outgoingContents.getQuantity());
standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel());
standardMaterialApplication.setApplicationForUseId(one.getId());
if (outgoingContentsDTO.getOutboundUse() == 2) {
standardMaterialApplication.setPurposeAndQuantity(outgoingContents.getQuantity().toString());
standardMaterialApplication.setStatus(1);
} else {
standardMaterialApplication.setStatus(0);
}
standardMaterialApplication.setAdministratorId(dlpUser.getId());
standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId());
standardMaterialApplications.add(standardMaterialApplication);
@ -254,13 +269,16 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
}
outgoingContentsList.add(outgoingContents);
}
if (outgoingContentsService.saveBatch(outgoingContentsList) && standardMaterialApplicationService.saveBatch(standardMaterialApplications)) {
if (standardMaterialApplications.size() != 0) {
standardMaterialApplicationService.saveBatch(standardMaterialApplications);
}
if (outgoingContentsService.saveBatch(outgoingContentsList)) {
return byId;
} else throw new RuntimeException(String.format("提交失败"));
}
@Override//分页查询
public Page <DeliveryRegistrationFormVO> getDeliveryRegistrationFormVOPage(Page page, QueryWrapper<DeliveryRegistrationForm> qw){
public Page<DeliveryRegistrationFormVO> getDeliveryRegistrationFormVOPage(Page page, QueryWrapper<DeliveryRegistrationForm> qw) {
Page deliveryRegistrationFormVOPage = baseMapper.getDeliveryRegistrationFormVOPage(page, qw);
@ -268,29 +286,29 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
}
@Override//通过ID查询出库内容
public DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById(String deliveryRegistrationFormId){
public DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById(String deliveryRegistrationFormId) {
DeliveryRegistrationFormVO deliveryRegistrationFormVOById = baseMapper.getDeliveryRegistrationFormVOById(deliveryRegistrationFormId);
LambdaQueryWrapper<OutgoingContents> outgoingContentsLambdaQueryWrapper = new LambdaQueryWrapper<>();
outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId,deliveryRegistrationFormVOById.getId());
outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId, deliveryRegistrationFormVOById.getId());
List<OutgoingContents> list = outgoingContentsService.list(outgoingContentsLambdaQueryWrapper);
List<OutgoingContentsVO> outgoingContentsVOS = new ArrayList<>();
if (list.size()!=0){
if (list.size() != 0) {
for (OutgoingContents outgoingContents : list) {
OutgoingContentsVO outgoingContentsVO = new OutgoingContentsVO();
BeanUtils.copyProperties(outgoingContents,outgoingContentsVO);
BeanUtils.copyProperties(outgoingContents, outgoingContentsVO);
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,outgoingContents.getReagentConsumableId());
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, outgoingContents.getReagentConsumableId());
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
@ -299,15 +317,16 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
outgoingContentsVOS.add(outgoingContentsVO);
}
deliveryRegistrationFormVOById.setOutgoingContentsList(outgoingContentsVOS);}
deliveryRegistrationFormVOById.setOutgoingContentsList(outgoingContentsVOS);
}
return deliveryRegistrationFormVOById;
}
@Override
public ReagentConsumablesVO scanById(String reagentConsumableId, String referenceMaterialId){
public ReagentConsumablesVO scanById(String reagentConsumableId, String referenceMaterialId) {
if (!(referenceMaterialId.equals("0"))){
if (!(referenceMaterialId.equals("0"))) {
ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableId);
@ -315,20 +334,20 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO();
BeanUtils.copyProperties(byId,reagentConsumablesVO);
BeanUtils.copyProperties(byId, reagentConsumablesVO);
reagentConsumablesVO.setNumber(byId1.getNumber());
reagentConsumablesVO.setReferenceMaterialId(referenceMaterialId);
return reagentConsumablesVO;
}else {
} else {
ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableId);
ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO();
BeanUtils.copyProperties(byId,reagentConsumablesVO);
BeanUtils.copyProperties(byId, reagentConsumablesVO);
return reagentConsumablesVO;
}

@ -53,7 +53,6 @@ public class DetailsOfCentralizedServiceImpl extends ServiceImpl<DetailsOfCentra
detailsOfCentralizedVO.setSpecificationAndModel(byId.getSpecificationAndModel());
}
return list;
}

@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@ -9,6 +10,7 @@ import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.PeriodVerificationImplementationDTO;
import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.mapper.PeriodVerificationImplementationMapper;
import digital.laboratory.platform.reagent.service.PeriodVerificationImplementationService;
@ -59,39 +61,58 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
return periodVerificationImplementationVO;
}
@Override//新增期间核查结果录入表
public PeriodVerificationImplementation addById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser) {
public PeriodVerificationImplementation addById(PeriodVerificationPlan periodVerificationPlan) {
PeriodVerificationImplementation periodVerificationImplementation = new PeriodVerificationImplementation();
BeanUtils.copyProperties(periodVerificationImplementationDTO, periodVerificationImplementation);
periodVerificationImplementation.setId(IdWorker.get32UUID().toUpperCase());
//赋值信息
periodVerificationImplementation.setDeviationAndUncertainty(periodVerificationPlan.getDeviationAndUncertainty());
periodVerificationImplementation.setReferenceMaterialId(periodVerificationPlan.getReferenceMaterialId());
periodVerificationImplementation.setReferenceMaterialNumber(periodVerificationPlan.getReferenceMaterialNumber());
periodVerificationImplementation.setPeriodVerificationPlanId(periodVerificationPlan.getId());
LambdaQueryWrapper<ReferenceMaterial> referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>();
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getId, periodVerificationPlan.getReferenceMaterialId());
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper);
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId());
//赋值信息
periodVerificationImplementation.setReferenceMaterialName(reagentConsumables.getReagentConsumableName());
periodVerificationImplementation.setStandardValueOrPurity(reagentConsumables.getStandardValueOrPurity());
periodVerificationImplementation.setVerificationBasis(periodVerificationPlan.getVerificationBasis());
periodVerificationImplementation.setCommitStatus(0);
if (periodVerificationImplementationService.save(periodVerificationImplementation)) {
return periodVerificationImplementation;
} else throw new RuntimeException(String.format("保存失败"));
periodVerificationImplementation.setPeriodVerificationImplementationId(IdWorker.get32UUID().toUpperCase());
}
String result = periodVerificationImplementationDTO.getResult();
@Override//录入期间核查结果记录表
public PeriodVerificationImplementation editById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser) {
PeriodVerificationPlan byId = periodVerificationPlanService.getById(periodVerificationImplementationDTO.getPeriodVerificationPlanId());
PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(periodVerificationImplementationDTO.getPeriodVerificationImplementationId());
byId.setVerificationResult(result);
BeanUtils.copyProperties(periodVerificationImplementationDTO, byId);
byId.setImplementationDate(periodVerificationImplementation.getCheckingTime());
byId.setInspectorId(dlpUser.getId());
byId.setDateOfNextCheck(byId.getImplementationDate().minusMonths(byId.getPlannedVerificationCycle()));
if (periodVerificationImplementationDTO.getCauseOfDissatisfaction() != null) {
if (periodVerificationImplementationService.save(periodVerificationImplementation) && periodVerificationPlanService
.updateById(byId)) {
byId.setOpinionOfInspector(false);
return periodVerificationImplementation;
} else throw new RuntimeException(String.format("保存失败"));
} else byId.setOpinionOfInspector(true);
}
ReferenceMaterial byId1 = referenceMaterialService.getById(byId.getReferenceMaterialId());
@Override//修改期间核查结果记录表
public PeriodVerificationImplementation editById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO) {
ReagentConsumables byId2 = reagentConsumablesService.getById(byId1.getReagentConsumableId());
PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(periodVerificationImplementationDTO.getPeriodVerificationImplementationId());
byId2.setDeviationOrUncertainty(periodVerificationImplementationDTO.getDeviationAndUncertainty());
BeanUtils.copyProperties(periodVerificationImplementationDTO, byId);
reagentConsumablesService.updateById(byId2);
String result = periodVerificationImplementationDTO.getResult();
@ -108,33 +129,23 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
} else throw new RuntimeException(String.format("保存失败"));
}
@Override//提交期间核查结果记录表
public PeriodVerificationImplementation commitById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser){
if (periodVerificationImplementationDTO.getPeriodVerificationImplementationId()==null){
@Override//提交期间核查结果记录表
public PeriodVerificationImplementation commitById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser) {
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.addById(periodVerificationImplementationDTO, dlpUser);
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO, dlpUser);
periodVerificationImplementation.setCommitStatus(1);
if ( periodVerificationImplementationService.updateById(periodVerificationImplementation)){
return periodVerificationImplementation;
}else throw new RuntimeException(String.format("提交失败"));
}else {
if (periodVerificationImplementationService.updateById(periodVerificationImplementation)) {
PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(periodVerificationImplementationDTO.getPeriodVerificationImplementationId());
byId.setCommitStatus(1);
if ( periodVerificationImplementationService.updateById(byId)){
return byId;
return periodVerificationImplementation;
}else throw new RuntimeException(String.format("提交失败"));
}
} else return null;
}
@Override//审核期间核查结果记录表
public PeriodVerificationImplementation auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser){
public PeriodVerificationImplementation auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(auditAndApproveDTO.getUuId());
@ -143,11 +154,8 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
byId.setAuditTimeOfTechnical(LocalDate.now());
byId.setTechnicalDirectorId(dlpUser.getId());
if (periodVerificationImplementationService.updateById(byId)){
if (periodVerificationImplementationService.updateById(byId)) {
return byId;
}else throw new RuntimeException(String.format("审核失败"));
} else throw new RuntimeException(String.format("审核失败"));
}
}

@ -2,11 +2,17 @@ package digital.laboratory.platform.reagent.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.mapper.PeriodVerificationPlanMapper;
import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService;
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
import digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@ -20,11 +26,34 @@ import java.util.List;
@Service
public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerificationPlanMapper, PeriodVerificationPlan> implements PeriodVerificationPlanService {
@Autowired
private ReagentConsumablesService reagentConsumablesService;
@Autowired
private ReferenceMaterialService referenceMaterialService;
@Override
public List<PeriodVerificationPlanVO> getPeriodVerificationPlanVOList(String checkScheduleId){
List<PeriodVerificationPlanVO> periodVerificationPlanVOPage = baseMapper.getPeriodVerificationPlanVOList(checkScheduleId);
for (PeriodVerificationPlanVO periodVerificationPlanVO : periodVerificationPlanVOPage) {
ReferenceMaterial byId = referenceMaterialService.getById(periodVerificationPlanVO.getReferenceMaterialId());
ReagentConsumables byId1 = reagentConsumablesService.getById(byId.getReagentConsumableId());
periodVerificationPlanVO.setReferenceMaterialName(byId1.getReagentConsumableName());
}
return periodVerificationPlanVOPage;
}
@Override
public IPage<PeriodVerificationPlanVO> getPeriodVerificationPlanVOPage(Page<PeriodVerificationPlan> page, QueryWrapper<PeriodVerificationPlan> qw){
IPage<PeriodVerificationPlanVO> periodVerificationPlanVOPage = baseMapper.getPeriodVerificationPlanVOPage(page, qw);
return periodVerificationPlanVOPage;
}

@ -50,6 +50,9 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
@Autowired
private PurchasingPlanService purchasingPlanService;
@Autowired
private ReagentConsumablesService reagentConsumablesService;
@Override//通过ID查找清单
public PurchaseListVO getPurchaseList(String purchaseListId) {
@ -107,10 +110,14 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
for (PurchaseListDetails purchaseListDetails : purchaseListDetailsList) {
ReagentConsumables byId = reagentConsumablesService.getById(purchaseListDetails.getReagentConsumableId());
WarehousingContent warehousingContent = new WarehousingContent();
//完善入库内容信息
warehousingContent.setId(IdWorker.get32UUID().toUpperCase());
warehousingContent.setReagentConsumableName(byId.getReagentConsumableName());
warehousingContent.setTotalQuantity(purchaseListDetails.getPurchaseQuantity());
warehousingContent.setReagentConsumableId(purchaseListDetails.getReagentConsumableId());

@ -12,6 +12,7 @@ import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.BatchDetailsVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumablesVO;
import io.swagger.models.auth.In;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -42,11 +43,16 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
@Autowired
private SupplierInformationService supplierInformationService;
@Autowired
private FixedValueReportService fixedValueReportService;
@Override//试剂耗材管理列表
public Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOList(Page page, String name) {
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
reagentConsumableInventoryQueryWrapper.eq("status",1);
if (name != null) {
reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or()
@ -143,6 +149,11 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
one.setTotalQuantity(one.getTotalQuantity() + quantity);
if (one.getTotalQuantity()==0){
one.setStatus(-1);
}
if (reagentConsumableInventoryService.updateById(one)) {
return one;
@ -160,6 +171,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
one.setTotalQuantity(one.getTotalQuantity() - quantity);
if (reagentConsumableInventoryService.updateById(one)) {
return one;
@ -200,6 +212,12 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
for (ReferenceMaterial referenceMaterial : list1) {
LambdaQueryWrapper<FixedValueReport> fixedValueReportLambdaQueryWrapper = new LambdaQueryWrapper<>();
fixedValueReportLambdaQueryWrapper.eq(FixedValueReport::getReferenceSubstanceId,referenceMaterial.getId());
FixedValueReport one = fixedValueReportService.getOne(fixedValueReportLambdaQueryWrapper);
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO);
@ -213,8 +231,17 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId());
reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName());
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
reagentConsumableInventoryFullVO.setBatchNumber(batchDetails.getBatchNumber());
reagentConsumableInventoryFullVO.setManufacturerId(batchDetails.getSupplierId());
reagentConsumableInventoryFullVO.setPurchaseTime(batchDetails.getPurchaseTime());
reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId());
reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus());
if (one!=null){
reagentConsumableInventoryFullVO.setFixedResult(one.getFixedResult());
}
reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
@ -251,10 +278,16 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId());
reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName());
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
reagentConsumableInventoryFullVO.setBatchNumber(batchDetails.getBatchNumber());
reagentConsumableInventoryFullVO.setManufacturerId(batchDetails.getSupplierId());
reagentConsumableInventoryFullVO.setPurchaseTime(batchDetails.getPurchaseTime());
reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId());
reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus());
reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
}
}
@ -355,8 +388,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList);
return pages;
}
}
}

@ -36,6 +36,7 @@ public class RequisitionRecordServiceImpl extends ServiceImpl<RequisitionRecordM
ReagentConsumables byId = reagentConsumablesService.getById(outgoingContents.getReagentConsumableId());
requisitionRecord.setRequisitionRecordId(IdWorker.get32UUID().toUpperCase());
requisitionRecord.setReagentConsumableId(byId.getReagentConsumableId());
requisitionRecord.setRemarks(outgoingContents.getRemarks());
requisitionRecord.setDrawingAmount(outgoingContents.getQuantity());
requisitionRecord.setSpecificationAndModel(byId.getSpecificationAndModel());

@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.dto.StandardMaterialApplicationDTO;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.entity.SolutionUseForm;
import digital.laboratory.platform.reagent.entity.StandardMaterialApplication;
import digital.laboratory.platform.reagent.entity.*;
import digital.laboratory.platform.reagent.mapper.StandardMaterialApplicationMapper;
import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO;
@ -16,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
/**
* (标准物质领用/归还登记表)服务实现类
@ -35,7 +33,6 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
@Autowired
private ReagentConsumableInventoryService reagentConsumableInventoryService;
@Autowired
private SolutionUseFormService solutionUseFormService;
@ -61,12 +58,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
one.setQuantityUsed(byId.getPurposeAndQuantity());
solutionUseFormService.updateById(one);
}
if (standardMaterialApplicationDTO.getOutOfUse()==false){
reagentConsumableInventoryService.addById(byId.getReferenceSubstanceId(), byId.getRequisitionedQuantity());
}
//
if (standardMaterialApplicationService.updateById(byId)) {
return byId;
} else throw new RuntimeException(String.format("归还失败"));
@ -87,10 +79,15 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
IPage<StandardMaterialApplicationVO> standardMaterialApplicationVOList = baseMapper.getStandardMaterialApplicationVOList(page, qw);
return standardMaterialApplicationVOList;
List<StandardMaterialApplicationVO> records = standardMaterialApplicationVOList.getRecords();
}
for (StandardMaterialApplicationVO record : records) {
ReagentConsumables byId = reagentConsumablesService.getById(record.getReferenceSubstanceId());
record.setCategory(byId.getCategory());
}
return standardMaterialApplicationVOList;
}
}

@ -7,9 +7,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.ReferenceMaterial;
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
import digital.laboratory.platform.reagent.entity.SupplierInformation;
import digital.laboratory.platform.reagent.mapper.StandardMaterialApprovalFormMapper;
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
import digital.laboratory.platform.reagent.service.StandardMaterialApprovalFormService;
import digital.laboratory.platform.reagent.service.SupplierInformationService;
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
@ -33,52 +35,49 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
@Autowired
private SupplierInformationService supplierInformationService;
@Autowired
private ReferenceMaterialService referenceMaterialService;
@Override
public StandardMaterialApprovalForm addById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser){
public StandardMaterialApprovalForm commitById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser){
StandardMaterialApprovalForm standardMaterialApprovalForm = new StandardMaterialApprovalForm();
BeanUtils.copyProperties(standardMaterialApprovalFormDTO,standardMaterialApprovalForm);
standardMaterialApprovalForm.setId(IdWorker.get32UUID().toUpperCase());
if (standardMaterialApprovalFormService.save(standardMaterialApprovalForm)){
return standardMaterialApprovalForm;
}else throw new RuntimeException(String.format("保存失败"));
}
standardMaterialApprovalForm.setApplicantId(dlpUser.getId());
standardMaterialApprovalForm.setApplicantName(dlpUser.getName());
@Override
public StandardMaterialApprovalForm editById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO){
standardMaterialApprovalForm.setId(IdWorker.get32UUID().toUpperCase());
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormDTO.getStandardMaterialApprovalFormId());
if (standardMaterialApprovalFormDTO.getApplicationContent()==1|standardMaterialApprovalFormDTO.getApplicationContent()==2){
BeanUtils.copyProperties(standardMaterialApprovalFormDTO,standardMaterialApprovalForm);
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
if (standardMaterialApprovalFormService.updateById(standardMaterialApprovalForm)){
return standardMaterialApprovalForm;
}else throw new RuntimeException(String.format("保存失败"));
}
byId.setStatus(-1);
@Override
public StandardMaterialApprovalForm commitById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser){
}else if (standardMaterialApprovalFormDTO.getApplicationContent()==4){
if (standardMaterialApprovalFormDTO.getStandardMaterialApprovalFormId()==null){
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
StandardMaterialApprovalForm standardMaterialApprovalForm = addById(standardMaterialApprovalFormDTO, dlpUser);
byId.setStatus(-2);
return standardMaterialApprovalForm;
}else {
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormDTO.getStandardMaterialApprovalFormId());
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
BeanUtils.copyProperties(standardMaterialApprovalFormDTO,byId);
byId.setStatus(-2);
if (standardMaterialApprovalFormService.updateById(byId)){
return byId;
}else throw new RuntimeException(String.format("提交失败"));
}
standardMaterialApprovalForm.setCommitStatus(1);
if (standardMaterialApprovalFormService.save(standardMaterialApprovalForm)){
return standardMaterialApprovalForm;
}else throw new RuntimeException(String.format("保存失败"));
}
@Override
public IPage<StandardMaterialApprovalFormVO> getVOPage(IPage<StandardMaterialApprovalForm> page, QueryWrapper<StandardMaterialApprovalForm> qw){
@ -112,6 +111,12 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
byId.setPrimaryAuditorId(dlpUser.getId());
byId.setAuditTimeOfPrimary(LocalDateTime.now());
if (auditAndApproveDTO.getAuditResult()==true){
byId.setCommitStatus(2);
}else {
byId.setCommitStatus(-1);
}
if (standardMaterialApprovalFormService.updateById(byId)){
return byId;
}else throw new RuntimeException(String.format("审核失败"));
@ -126,7 +131,11 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
byId.setAuditResultOfSecondary(auditAndApproveDTO.getAuditResult());
byId.setSecondaryAuditorId(dlpUser.getId());
byId.setAuditTimeOfSecondary(LocalDateTime.now());
if (auditAndApproveDTO.getAuditResult()==true){
byId.setCommitStatus(3);
}else {
byId.setCommitStatus(-1);
}
if (standardMaterialApprovalFormService.updateById(byId)){
return byId;
}else throw new RuntimeException(String.format("审核失败"));
@ -141,7 +150,11 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
byId.setResultOfApproval(auditAndApproveDTO.getAuditResult());
byId.setApproverId(dlpUser.getId());
byId.setApprovalOfTime(LocalDateTime.now());
if (auditAndApproveDTO.getApproveResult()==true){
byId.setCommitStatus(4);
}else {
byId.setCommitStatus(-2);
}
if (standardMaterialApprovalFormService.updateById(byId)){
return byId;
}else throw new RuntimeException(String.format("审批失败"));

@ -7,10 +7,8 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionDTO;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.entity.StandardReserveSolution;
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionFullDTO;
import digital.laboratory.platform.reagent.entity.*;
import digital.laboratory.platform.reagent.mapper.StandardReserveSolutionMapper;
import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.LocationVO;
@ -24,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -60,6 +59,9 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
@Autowired
private ReferenceMaterialService referenceMaterialService;
@Autowired
private BatchDetailsService batchDetailsService;
@Override//通过ID查询标准溶液的配置记录
public StandardReserveSolutionVO getStandardReserveSolutionVOById(String id) {
@ -74,7 +76,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
@Override//配置标准储备溶液
@Transactional
public StandardReserveSolution addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser) {
public StandardReserveSolutionVO addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser) {
StandardReserveSolution standardReserveSolution = new StandardReserveSolution();
@ -90,12 +92,12 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName,standardReserveSolution.getSolutionName());
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration,standardReserveSolution.getConfigurationConcentration());
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName, standardReserveSolution.getSolutionName());
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration, standardReserveSolution.getConfigurationConcentration());
ReagentConsumables one = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper);
//判断是否存在过该标准储备溶液,若未存在,则将其存入试剂耗材类
if (one==null){
if (one == null) {
ReagentConsumables reagentConsumables = new ReagentConsumables();
@ -103,21 +105,25 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
ReagentConsumables reagentConsumables1 = reagentConsumablesService.getById(byId.getReagentConsumableId());
BeanUtils.copyProperties(reagentConsumables1,reagentConsumables);
BeanUtils.copyProperties(reagentConsumables1, reagentConsumables);
reagentConsumables1.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
reagentConsumables1.setReagentConsumableName(standardReserveSolution.getSolutionName());
reagentConsumables1.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration());
reagentConsumables1.setCategory("标准储备溶液");
reagentConsumablesService.save(reagentConsumables1);
}
if (standardReserveSolutionService.save(standardReserveSolution)) {
return standardReserveSolution;
StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(standardReserveSolution.getId());
return standardReserveSolutionVOById;
} else throw new RuntimeException(String.format("配置失败"));
}
@Override//标准储备溶液入库任务(查询的为状态为0的标准储备溶液)
@Override//标准储备溶液入库任务
public IPage<StandardReserveSolutionVO> getStandardReserveSolutionVOList(IPage<StandardReserveSolution> page, QueryWrapper<StandardReserveSolution> qw) {
IPage<StandardReserveSolutionVO> standardReserveSolutionVOPage = baseMapper.getStandardReserveSolutionVOPage(page, qw);
@ -126,15 +132,26 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
}
@Override//标准储备溶液配置入库
public StandardReserveSolutionVO warehousingById(String solutionId, String latticeId) {
@Transactional
public StandardReserveSolutionFullVO warehousingById(StandardReserveSolutionFullDTO standardReserveSolutionFullDTO) {
String id = standardReserveSolutionFullDTO.getId();
String latticeId = standardReserveSolutionFullDTO.getLatticeId();
String warehousingRemarks = standardReserveSolutionFullDTO.getWarehousingRemarks();
//提供格子位置与标准储备溶液配置表ID
StandardReserveSolution byId = standardReserveSolutionService.getById(solutionId);
StandardReserveSolution byId = standardReserveSolutionService.getById(id);
ReferenceMaterial byId1 = referenceMaterialService.getById(byId.getReferenceMaterialId());
BatchDetails batchDetails = batchDetailsService.getById(byId1.getBatchDetailsId());
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName,byId.getSolutionName());
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName, byId.getSolutionName());
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration,byId.getConfigurationConcentration());
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration, byId.getConfigurationConcentration());
//查询出该标准储备溶液的对象
ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper);
@ -150,11 +167,17 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory);
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
reagentConsumableInventory.setStatus(1);
reagentConsumableInventory.setConfigurationConcentration(byId.getConfigurationConcentration());
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
//获取当前年月日
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-mm-dd");
formatter.format(date);
//创建标准溶液对象,并生成编号
@ -163,6 +186,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId());
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
referenceMaterial.setNumber(reagentConsumableInventory.getEnglishName() + "-" + formatter.format(date));
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
referenceMaterialService.save(referenceMaterial);
@ -170,9 +194,13 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
reagentConsumableInventory.setTotalQuantity(1);
reagentConsumableInventory.setStorageLife(byId.getValidityPeriod());
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
byId.setStatus(1);
if (reagentConsumableInventoryService.save(reagentConsumableInventory)&&standardReserveSolutionService
byId.setWarehousingRemarks(warehousingRemarks);
if (reagentConsumableInventoryService.save(reagentConsumableInventory) && standardReserveSolutionService
.updateById(byId)) {
StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId());
return byFullVOId;
@ -186,7 +214,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
//获取当前年月日
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-mm-dd");
formatter.format(date);
//创建标准溶液对象,并生成编号
@ -195,6 +223,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId());
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
referenceMaterial.setNumber(one.getEnglishName() + "-" + formatter.format(date));
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
referenceMaterialService.save(referenceMaterial);
//将存储信息录入仓库表
@ -205,6 +234,9 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
byId.setStatus(1);
byId.setWarehousingRemarks(warehousingRemarks);
if (standardReserveSolutionService.updateById(byId) && reagentConsumableInventoryService.updateById(one)) {
StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId());
@ -222,8 +254,10 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
StandardReserveSolutionFullVO standardReserveSolutionFullVO = new StandardReserveSolutionFullVO();
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
//更新库存信息
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, standardReserveSolutionVOById.getReferenceMaterialId());
ReferenceMaterial byId = referenceMaterialService.getById(standardReserveSolutionVOById.getReferenceMaterialId());
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableName, standardReserveSolutionVOById.getSolutionName());
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getConfigurationConcentration, standardReserveSolutionVOById.getConfigurationConcentration());
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
@ -232,6 +266,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
LocationVO locationById = latticeFormService.getLocationById(latticeId);
//赋值FullVO对象
BeanUtils.copyProperties(standardReserveSolutionVOById,standardReserveSolutionFullVO);
standardReserveSolutionFullVO.setStorageRoomFormName(locationById.getStorageRoomFormName());
standardReserveSolutionFullVO.setCabinetFormNumber(locationById.getCabinetFormNumber());
standardReserveSolutionFullVO.setLatticeFormNumber(locationById.getLatticeFormNumber());
@ -241,5 +276,4 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
return standardReserveSolutionFullVO;
}
}

@ -1,5 +1,8 @@
package digital.laboratory.platform.reagent.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.entity.WarehousingContent;
@ -44,4 +47,30 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
}
return warehousingContentVOList;
}
@Override
public IPage<WarehousingContentVO> getWarehousingContentVOPage(Page page, QueryWrapper<WarehousingContent> qw) {
IPage<WarehousingContentVO> warehousingContentVOPage = baseMapper.getWarehousingContentVOPage(page, qw);
List<WarehousingContentVO> records = warehousingContentVOPage.getRecords();
for (WarehousingContentVO warehousingContentVO : records) {
List<WarehousingBatchListVO> warehousingBatchListVOList = warehousingBatchListService.getWarehousingBatchListVOList(warehousingContentVO.getId());
warehousingContentVO.setWarehousingBatchListVOList(warehousingBatchListVOList);
ReagentConsumables byId = reagentConsumablesService.getById(warehousingContentVO.getReagentConsumableId());
warehousingContentVO.setCategory(byId.getCategory());
warehousingContentVO.setBrand(byId.getBrand());
warehousingContentVO.setSpecificationAndModel(byId.getSpecificationAndModel());
warehousingContentVO.setReagentConsumables(byId);
}
return warehousingContentVOPage;
}
}

@ -1,11 +1,14 @@
package digital.laboratory.platform.reagent.service.impl;
import cn.hutool.core.util.PageUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.config.PageUtils;
import digital.laboratory.platform.reagent.dto.WarehousingRecordFormDTO;
import digital.laboratory.platform.reagent.entity.*;
import digital.laboratory.platform.reagent.mapper.WarehousingRecordFormMapper;
@ -157,6 +160,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory);
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
reagentConsumableInventory.setStatus(1);
BatchDetails batchDetails = new BatchDetails();
@ -374,7 +378,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
}
@Override
public List<WarehousingRecordFormVO> getWarehousingRecordFormVOList() {
public Page<WarehousingRecordFormVO> getWarehousingRecordFormVOList(Page page) {
List<WarehousingRecordFormVO> warehousingRecordFormVOList = baseMapper.getWarehousingRecordFormVOList();
@ -403,7 +407,14 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
warehousingRecordFormVO.setWarehousingQuantity(y);
warehousingRecordFormVO.setQuantityPurchased(x);
}
return warehousingRecordFormVOList;
if (warehousingRecordFormVOList.size() != 0) {
PageUtils pageUtils = new PageUtils();
Page pages = pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), warehousingRecordFormVOList);
return pages;
} else return null;
}
}

@ -15,5 +15,15 @@ public class StandardMaterialApplicationVO extends StandardMaterialApplication {
@ApiModelProperty(value = "(标准物质名称)")
private String referenceSubstanceName;
@ApiModelProperty(value = "(领用人名称)")
private String recipientName;
@ApiModelProperty(value = "(管理员名称)")
private String administratorName;
@ApiModelProperty(value = "(类别)")
private String category;
}

@ -10,9 +10,6 @@ import java.util.List;
@Data
public class WarehousingContentVO extends WarehousingContent {
@ApiModelProperty(value = "(试剂耗材名称)")
private String reagentConsumableName;
@ApiModelProperty(value = "(入库批次明细数组)")
List<WarehousingBatchListVO> warehousingBatchListVOList;

@ -49,17 +49,17 @@ spring:
# minio 文件存储配置信息
# 文件上传相关 支持阿里云、华为云、腾讯、minio
# oss:
#oss:
# endpoint: http://127.0.0.1:9000
# accessKey: dlp-yhh
# secretKey: 87990016
# bucket-name: bucket1
# 文件上传相关 支持阿里云、华为云、腾讯、minio
# oss:
# endpoint: http://192.168.9.73:9000
# accessKey: dlp
# secretKey: 87990016
# bucket-name: dlpfiles
oss:
endpoint: http://192.168.9.73:9000
accessKey: dlp
secretKey: 87990016
bucket-name: dlpfiles

@ -12,7 +12,7 @@
<result property="commitStatus" column="commit_status"/>
<result property="instructionBook" column="instruction_book"/>
<result property="makerId" column="maker_id"/>
<result property="referenceMaterialId" column="reference_material_id"/>
<result property="referenceMaterialTypeId" column="reference_material_type_id"/>
<result property="setTime" column="set_time"/>
<result property="technicalDirectorId" column="technical_director_id"/>
<result property="createTime" column="create_time"/>

@ -6,7 +6,7 @@
<resultMap id="periodVerificationImplementationMap"
type="digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation">
<id property="periodVerificationImplementationId" column="period_verification_implementation_id"/>
<id property="id" column="id"/>
<result property="auditOpinionOfTechnical" column="audit_opinion_of_technical"/>
<result property="auditResultOfTechnical" column="audit_result_of_technical"/>
<result property="auditTimeOfTechnical" column="audit_time_of_technical"/>
@ -20,7 +20,7 @@
<result property="opinionOfInspector" column="opinion_of_inspector"/>
<result property="referenceMaterialId" column="reference_material_id"/>
<result property="remarks" column="remarks"/>
<result property="standardValueAndPurity" column="standard_value_and_purity"/>
<result property="standardValueOrPurity" column="standard_value_or_purity"/>
<result property="technicalDirectorId" column="technical_director_id"/>
<result property="verificationMethod" column="verification_method"/>
<result property="createTime" column="create_time"/>
@ -30,6 +30,8 @@
<result property="referenceMaterialNumber" column="reference_material_number"/>
<result property="periodVerificationPlanId" column="period_verification_plan_id"/>
<result property="referenceMaterialName" column="reference_material_name"/>
<result property="verificationBasis" column="verification_basis"/>
<result property="result" column="result"/>
</resultMap>
<resultMap id="periodVerificationImplementationVO" type="digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO"
@ -42,7 +44,7 @@
select pvi.*,
(SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=pvi.inspector_id ) as inspector_nam
WHERE user.user_id=pvi.inspector_id ) as inspector_name
, (
SELECT user.name
FROM dlp_base.sys_user user
@ -63,12 +65,12 @@
where rc.reagent_consumable_id = pvi.reference_material_id) as reference_material_name,
(SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=pvi.inspector_id ) as inspector_nam
WHERE user.user_id=pvi.inspector_id ) as inspector_name
, (
SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=pvi.technical_director_id ) as technical_director_name
FROM period_verification_implementation pvi
WHERE pvi.period_verification_implementation_id = #{periodVerificationImplementationId}
WHERE pvi.id = #{periodVerificationImplementationId}
</select>
</mapper>

@ -13,7 +13,6 @@
<result property="instructionBookId" column="instruction_book_id"/>
<result property="plannedVerificationCycle" column="planned_verification_cycle"/>
<result property="scheduledVerificationDate" column="scheduled_verification_date"/>
<result property="standardValueAndPurity" column="standard_value_and_purity"/>
<result property="verificationBasis" column="verification_basis"/>
<result property="implementationDate" column="implementation_date"/>
<result property="verificationResult" column="verification_result"/>
@ -22,6 +21,7 @@
<result property="createBy" column="create_by"/>
<result property="updateBy" column="update_by"/>
<result property="checkScheduleId" column="check_schedule_id"/>
<result property="standardValueOrPurity" column="standard_value_or_purity"/>
</resultMap>
<resultMap id="periodVerificationPlanVO" type="digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO"
@ -32,9 +32,6 @@
<sql id="getPeriodVerificationPlanVOSQL">
select pvp.*,
(select rc.reagent_consumable_name
from reagent_consumables rc
where rc.reagent_consumable_id = pvp.reference_material_id) as reference_material_name,
(SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=pvp.inspector_id ) as inspector_name
@ -45,4 +42,13 @@
<select id="getPeriodVerificationPlanVOList" resultMap="periodVerificationPlanVO" resultType="digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO">
<include refid="getPeriodVerificationPlanVOSQL"></include>
</select>
<select id="getPeriodVerificationPlanVOPage" resultMap="periodVerificationPlanVO" resultType="digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO">
select pvp.*,
(SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=pvp.inspector_id ) as inspector_name
from period_verification_plan pvp
${ew.customSqlSegment}
</select>
</mapper>

@ -30,6 +30,7 @@
<result property="status" column="status"/>
<result property="applicationForUseId" column="application_for_use_id"/>
<result property="referenceMaterialId" column="reference_material_id"/>
<result property="isReturn" column="is_return"/>
</resultMap>
<resultMap id="standardMaterialApplicationVO"
@ -37,6 +38,8 @@
extends="standardMaterialApplicationMap">
<result property="referenceSubstanceName" column="reference_substance_name"></result>
<result property="recipientName" column="recipient_name"></result>
<result property="administratorName" column="administrator_name"/>
<result property="category" column="category"/>
</resultMap>
<sql id="getStandardMaterialApplicationVOSQL">
@ -44,10 +47,16 @@
(select rc.reagent_consumable_name
from reagent_consumables rc
where rc.reagent_consumable_id = sma.reference_substance_id) as reference_substance_name,
(SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=sma.recipient_id
) AS recipient_name
) AS recipient_name,
(SELECT user.name
FROM dlp_base.sys_user user
WHERE user.user_id=sma.administrator_id
) AS administrator_name
from standard_material_application sma
</sql>

@ -37,6 +37,7 @@
<result property="specification" column="specification"/>
<result property="secondaryAuditorId" column="secondary_auditor_id"/>
<result property="approverId" column="approver_id"/>
<result property="applicationContent" column="application_content"/>
</resultMap>
@ -50,7 +51,7 @@
<select id="getVOPage" resultMap="standardMaterialApprovalFormVO" resultType="digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO">
SELECT smaf.*,
(select si.supplier_name from supplier_information si where si.supplier_information_id = smaf.manufacturer_id) as manufacturer_name
(select si.supplier_name from supplier_information si where si.id = smaf.manufacturer_id) as manufacturer_name
(select user.name from dlp_base.sys_user user where user.user_id=smaf.primary_auditorId ) as primary_auditor_name
(select user.name from dlp_base.sys_user user where user.user_id=smaf.secondary_auditor_id ) as secondary_auditor_name
(select user.name from dlp_base.sys_user user where user.user_id=smaf.approver_id ) as approver_name

@ -45,6 +45,7 @@
select srs.*,
(select user.name from dlp_base.sys_user user where user.user_id = srs.dispenser_id) as dispenser_name
from standard_reserve_solution srs
where srs.status = 0
${ew.customSqlSegment}
</select>
</mapper>

@ -22,5 +22,7 @@
<result property="supplierName" column="supplier_name"/>
<result property="supplierTelephone" column="supplier_telephone"/>
<result property="number" column="number"/>
<result property="photograph" column="photograph"/>
<result property="qualificationDocumentName" column="qualification_document_name"/>
</resultMap>
</mapper>

@ -17,11 +17,11 @@
<result property="updateBy" column="update_by"/>
<result property="acceptanceRecordFormId" column="acceptance_record_form_id"/>
<result property="supplierId" column="supplier_id"/>
<result property="reagentConsumableName" column="reagent_consumable_name"/>
</resultMap>
<resultMap id="warehousingContentVO" type="digital.laboratory.platform.reagent.vo.WarehousingContentVO" extends="warehousingContentMap">
<result property="reagentConsumableName" column="reagent_consumable_name"></result>
<result property="supplierName" column="supplier_name"/>
<result property="applicantName" column="applicant_name"/>
@ -29,10 +29,17 @@
<select id="getWarehousingContentVOList" resultMap="warehousingContentVO" resultType="digital.laboratory.platform.reagent.vo.WarehousingContentVO">
SELECT wc.*,
(select rc.reagent_consumable_name from reagent_consumables rc where rc.reagent_consumable_id = wc.reagent_consumable_id) as reagent_consumable_name ,
(select si.supplier_name from supplier_information si where si.id = #{supplierId}) as supplier_name ,
(select si.supplier_name from supplier_information si where si.id = wc.supplier_id) as supplier_name ,
(select user.name from dlp_base.sys_user user where user.user_id=wc.create_by ) as applicant_name
FROM warehousing_content wc
WHERE wc.warehousing_record_form_id = #{warehousingRecordFormId}
</select>
<select id="getWarehousingContentVOPage" resultMap="warehousingContentVO" resultType="digital.laboratory.platform.reagent.vo.WarehousingContentVO">
SELECT wc.*,
(select si.supplier_name from supplier_information si where si.id = wc.supplier_id) as supplier_name ,
(select user.name from dlp_base.sys_user user where user.user_id=wc.create_by ) as applicant_name
FROM warehousing_content wc
${ew.customSqlSegment}
</select>
</mapper>
Loading…
Cancel
Save