杨海航 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. 163
      src/main/java/digital/laboratory/platform/reagent/controller/FixedValueReportController.java
  5. 187
      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. 107
      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. 77
      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. 90
      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. 20
      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> <version>2022.10.11-snapshots</version>
</dependency> </dependency>
<!-- <dependency>--> <dependency>
<!-- <groupId>digital.laboratory.platform</groupId>--> <groupId>digital.laboratory.platform</groupId>
<!-- <artifactId>dlp-common-oss</artifactId>--> <artifactId>dlp-common-oss</artifactId>
<!-- <version>2022.10.11-snapshots</version>--> <version>2022.10.11-snapshots</version>
<!-- </dependency>--> </dependency>
<!--JDBC相关--> <!--JDBC相关-->
<dependency> <dependency>

@ -94,7 +94,7 @@ public class AcceptanceRecordFormController {
*/ */
@ApiOperation(value = "分页查询验收记录", notes = "分页查询验收记录") @ApiOperation(value = "分页查询验收记录", notes = "分页查询验收记录")
@GetMapping("/recordPage") @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) { public R<IPage<AcceptanceRecordFormVO>> getAcceptanceRecordFormRecordPage(Page<AcceptanceRecordForm> page, AcceptanceRecordForm acceptanceRecordForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); 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.CheckSchedule;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan; import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.service.CheckScheduleService; import digital.laboratory.platform.reagent.service.CheckScheduleService;
import digital.laboratory.platform.reagent.service.InstructionBookService;
import digital.laboratory.platform.reagent.vo.CheckScheduleVO; import digital.laboratory.platform.reagent.vo.CheckScheduleVO;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -46,6 +47,8 @@ public class CheckScheduleController {
private final CheckScheduleService checkScheduleService; private final CheckScheduleService checkScheduleService;
/** /**
* 通过id查询 * 通过id查询
* *
@ -87,7 +90,7 @@ public class CheckScheduleController {
checkScheduleQueryWrapper.eq("number",number); checkScheduleQueryWrapper.eq("number",number);
} }
IPage<CheckScheduleVO> checkScheduleVOPage = checkScheduleService.getCheckScheduleVOPage(page, checkScheduleQueryWrapper IPage<CheckScheduleVO> checkScheduleVOPage = checkScheduleService.getCheckScheduleVOPage(page, checkScheduleQueryWrapper
.orderByAsc("create_time")); .orderByDesc("create_time"));
return R.ok(checkScheduleVOPage); return R.ok(checkScheduleVOPage);
} }
@ -179,4 +182,5 @@ public class CheckScheduleController {
} }
} }

@ -1,5 +1,7 @@
package digital.laboratory.platform.reagent.controller; 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.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; 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.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; 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.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.FixedValueReportService;
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.oauth2.provider.OAuth2Authentication; import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.security.Principal; 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 FixedValueReportService fixedValueReportService;
private final ReferenceMaterialService referenceMaterialService;
private final OssFile ossFile;
/** /**
* 通过id查询(定值报告) * 新增定值报告
* @param fixedValueReportId id *
* @param id 定值报告
* @return R * @return R
*/ */
@ApiOperation(value = "通过id查询", notes = "通过id查询") @ApiOperation(value = "上传定值报告", notes = "上传定值报告")
@GetMapping("/{fixedValueReportId}" ) @SysLog("上传定值报告")
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_get')" ) @PostMapping
public R<FixedValueReport> getById(@PathVariable("fixedValueReportId" ) String fixedValueReportId, HttpServletRequest theHttpServletRequest) { // @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(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
FixedValueReport fixedValueReport = fixedValueReportService.getById(fixedValueReportId); ReferenceMaterial byId = referenceMaterialService.getById(id);
return R.ok(fixedValueReport);
//return R.ok(fixedValueReportService.getById(fixedValueReportId)); 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();
if (b) {
fixedValueReport.setFixedValueReportId(IdWorker.get32UUID().toUpperCase());
fixedValueReport.setFixedValueReport(fileName);
fixedValueReport.setFixedResult(fixedResult);
fixedValueReport.setReferenceSubstanceId(byId.getId());
String fileNames = path + "/" + fileName;
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
fixedValueReportService.save(fixedValueReport);
return R.ok(fixedValueReport, "上传成功");
} else return R.failed("上传失败");
} }
/** /**
* 分页查询 * 新增定值报告
* @param page 分页对象 *
* @param fixedValueReport (定值报告) * @param id 定值报告
* @return * @return R
*/ */
@ApiOperation(value = "分页查询", notes = "分页查询") @ApiOperation(value = "预览定值报告", notes = "预览定值报告")
@GetMapping("/page" ) @SysLog("预览定值报告")
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_get')" ) @GetMapping("/download")
public R<IPage<FixedValueReport>> getFixedValueReportPage(Page<FixedValueReport> page, FixedValueReport fixedValueReport, HttpServletRequest theHttpServletRequest) { // @PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" )
public R<FixedValueReport> download(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<FixedValueReport> fixedValueReportSList = fixedValueReportService.page(page, Wrappers.<FixedValueReport>query() ReferenceMaterial byId = referenceMaterialService.getById(id);
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time")
);
return R.ok(fixedValueReportSList);
// return R.ok(fixedValueReportService.page(page, Wrappers.query(fixedValueReport)));
}
/**
* 新增(定值报告)
* @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();
fixedValueReport.setFixedValueReportId(IdWorker.get32UUID().toUpperCase()); LambdaQueryWrapper<FixedValueReport> fixedValueReportLambdaQueryWrapper = new LambdaQueryWrapper<>();
if (fixedValueReportService.save(fixedValueReport)) {
return R.ok(fixedValueReport, "对象创建成功");
}
else {
return R.failed(fixedValueReport, "对象创建失败");
}
}
/**
* 修改(定值报告)
* @param fixedValueReport (定值报告)
* @return R
*/
@ApiOperation(value = "修改(定值报告)", notes = "修改(定值报告)")
@SysLog("修改(定值报告)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_edit')" )
public R<FixedValueReport> putUpdateById(@RequestBody FixedValueReport fixedValueReport, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (fixedValueReportService.updateById(fixedValueReport)) { fixedValueReportLambdaQueryWrapper.eq(FixedValueReport::getReferenceSubstanceId,byId.getId());
return R.ok(fixedValueReport, "保存对象成功");
} FixedValueReport one = fixedValueReportService.getOne(fixedValueReportLambdaQueryWrapper);
else {
return R.failed(fixedValueReport, "保存对象失败"); if (one != null) {
}
}
/**
* 通过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();
FixedValueReport oldFixedValueReport = fixedValueReportService.getById(fixedValueReportId); String fileName = one.getFixedValueReport();
if (fixedValueReportService.removeById(fixedValueReportId)) { String path = "reagen_managment" + "/" + "instructionBook" + "/" + byId.getReagentConsumableId();
return R.ok(oldFixedValueReport, "对象删除成功");
}
else {
return R.failed(oldFixedValueReport, "对象删除失败");
}
} 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; 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.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -7,145 +9,134 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import digital.laboratory.platform.common.core.util.R; import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; 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.InstructionBook;
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.service.InstructionBookService; import digital.laboratory.platform.reagent.service.InstructionBookService;
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.oauth2.provider.OAuth2Authentication; import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.security.Principal; import java.security.Principal;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
/** /**
* (标准物质期间核查指导书) * (标准物质期间核查指导书)
* *
* @author Zhang Xiaolong created at 2023-03-10 * @author Zhang Xiaolong created at 2023-03-10
* @describe (标准物质期间核查指导书) 前端控制器 * @describe (标准物质期间核查指导书) 前端控制器
* * <p>
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service * 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service
* 这里写什么: * 这里写什么:
* 为前端提供数据, 接受前端的数据 * 为前端提供数据, 接受前端的数据
* 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 * 为前端提供的数据, service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的 * 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数这里对参数的整理, 应该只是格式上的, 而不能是业务上的
* 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换 * 数据层在 mapper , 数据层不涉及业务, 只管技术上的 对象<-> 之间的转换
*/ */
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/instruction_book" ) @RequestMapping("/instruction_book")
@Api(value = "instruction_book", tags = "(标准物质期间核查指导书)管理") @Api(value = "instruction_book", tags = "(标准物质期间核查指导书)管理")
public class InstructionBookController { public class InstructionBookController {
private final InstructionBookService instructionBookService; private final ReagentConsumablesService reagentConsumablesService;
private final InstructionBookService instructionBookService;
/**
* 通过id查询(标准物质期间核查指导书)
* @param instructionBookId 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) {
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));
}
/**
* 分页查询
* @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();
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)));
}
private final OssFile ossFile;
/** /**
* 新增(标准物质期间核查指导书) * 新增(标准物质期间核查指导书)
* @param instructionBook (标准物质期间核查指导书) *
* @param id (标准物质期间核查指导书)
* @return R * @return R
*/ */
@ApiOperation(value = "新增(标准物质期间核查指导书)", notes = "新增(标准物质期间核查指导书)") @ApiOperation(value = "上传(标准物质期间核查指导书)", notes = "上传(标准物质期间核查指导书)")
@SysLog("新增(标准物质期间核查指导书)" ) @SysLog("上传(标准物质期间核查指导书)")
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" ) // @PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" )
public R<InstructionBook> postAddObject(@RequestBody InstructionBook instructionBook, HttpServletRequest theHttpServletRequest) { public R<InstructionBook> upload(String id, @RequestPart(value = "file", required = false) MultipartFile file, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
instructionBook.setId(IdWorker.get32UUID().toUpperCase()); ReagentConsumables byId = reagentConsumablesService.getById(id);
if (instructionBookService.save(instructionBook)) {
return R.ok(instructionBook, "对象创建成功"); String path = "reagen_managment" + "/" + "instructionBook" + "/" + byId.getReagentConsumableId();
} String fileName = FileNameUtil.getName(file.getOriginalFilename());
else { boolean b = ossFile.fileUpload(file, path);
return R.failed(instructionBook, "对象创建失败"); Map<String, String> ResultData = new HashMap<>();
} ResultData.put("fileName", fileName);
} ResultData.put("path", path);
InstructionBook instructionBook = new 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;
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
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 * @return R
*/ */
@ApiOperation(value = "通过id删除(标准物质期间核查指导书)", notes = "通过id删除(标准物质期间核查指导书)") @ApiOperation(value = "预览(标准物质期间核查指导书)", notes = "预览(标准物质期间核查指导书)(标准物质期间核查指导书)")
@SysLog("通过id删除(标准物质期间核查指导书)" ) @SysLog("预览(标准物质期间核查指导书)(标准物质期间核查指导书)")
@DeleteMapping("/{instructionBookId}" ) @GetMapping("/download")
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_del')" ) // @PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" )
public R<InstructionBook> deleteById(@PathVariable String instructionBookId, HttpServletRequest theHttpServletRequest) { public R<InstructionBook> download(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
InstructionBook oldInstructionBook = instructionBookService.getById(instructionBookId);
if (instructionBookService.removeById(instructionBookId)) {
return R.ok(oldInstructionBook, "对象删除成功");
}
else {
return R.failed(oldInstructionBook, "对象删除失败");
}
} ReagentConsumables byId = reagentConsumablesService.getById(id);
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 * @return R
*/ */
@ApiOperation(value = "通过id查询", notes = "通过id查询") @ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{periodVerificationImplementationId}" ) @GetMapping( )
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" ) // @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(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -85,7 +85,6 @@ public class PeriodVerificationImplementationController {
} }
IPage<PeriodVerificationImplementationVO> periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.<PeriodVerificationImplementation>query() IPage<PeriodVerificationImplementationVO> periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.<PeriodVerificationImplementation>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time") .orderByDesc("create_time")
); );
return R.ok(periodVerificationImplementationSList); 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 (标准物质期间核查实施情况及结果记录表) * @param periodVerificationImplementationDTO (标准物质期间核查实施情况及结果记录表)
* @return R * @return R
*/ */
@ApiOperation(value = "修改(标准物质期间核查实施情况及结果记录表)", notes = "修改(标准物质期间核查实施情况及结果记录表)") @ApiOperation(value = "录入(标准物质期间核查实施情况及结果记录表)", notes = "录入((标准物质期间核查实施情况及结果记录表)")
@SysLog("修改(标准物质期间核查实施情况及结果记录表)" ) @SysLog("录入((标准物质期间核查实施情况及结果记录表)" )
@PutMapping @PostMapping
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_edit')" ) // @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_edit')" )
public R<PeriodVerificationImplementation> putUpdateById(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTO, HttpServletRequest theHttpServletRequest) { public R<PeriodVerificationImplementation> putUpdateById(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO); PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO,dlpUser);
if (periodVerificationImplementation!=null) { if (periodVerificationImplementation!=null) {
return R.ok(periodVerificationImplementation, "保存成功"); return R.ok(periodVerificationImplementation, "保存成功");

@ -47,17 +47,17 @@ public class StandardMaterialApprovalFormController {
/** /**
* 通过id查询(标准物质停用/报废销毁/恢复/降级使用审批表) * 通过id查询(标准物质停用/报废销毁/恢复/降级使用审批表)
* @param standardMaterialApprovalFormId id * @param id
* @return R * @return R
*/ */
@ApiOperation(value = "通过id查询", notes = "通过id查询") @ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping( ) @GetMapping( )
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" ) // @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(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardMaterialApprovalFormVO standardMaterialApprovalForm = standardMaterialApprovalFormService.getVO(standardMaterialApprovalFormId); StandardMaterialApprovalFormVO standardMaterialApprovalForm = standardMaterialApprovalFormService.getVO(id);
return R.ok(standardMaterialApprovalForm); return R.ok(standardMaterialApprovalForm);
//return R.ok(standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId)); //return R.ok(standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId));
} }
@ -96,7 +96,7 @@ public class StandardMaterialApprovalFormController {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.addById(standardMaterialApprovalFormDTO, dlpUser); StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.commitById(standardMaterialApprovalFormDTO, dlpUser);
if (standardMaterialApprovalForm!=null) { if (standardMaterialApprovalForm!=null) {
return R.ok(standardMaterialApprovalForm, "保存成功"); 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 (标准物质停用/报废销毁/恢复/降级使用审批表) * @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
@ -159,7 +114,7 @@ public class StandardMaterialApprovalFormController {
@ApiOperation(value = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)") @ApiOperation(value = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" ) @SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PutMapping("/auditPrimary") @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) { public R<StandardMaterialApprovalForm> auditPrimary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -182,7 +137,7 @@ public class StandardMaterialApprovalFormController {
@ApiOperation(value = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)") @ApiOperation(value = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" ) @SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PutMapping("/auditSecondary") @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) { public R<StandardMaterialApprovalForm> auditSecondary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
@ -205,7 +160,7 @@ public class StandardMaterialApprovalFormController {
@ApiOperation(value = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)") @ApiOperation(value = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("审批(标准物质停用/报废销毁/恢复/降级使用审批表)" ) @SysLog("审批(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PutMapping("/approve") @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) { public R<StandardMaterialApprovalForm> approveById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); 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.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog; import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; 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.entity.StandardReserveSolution;
import digital.laboratory.platform.reagent.service.StandardReserveSolutionService; 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 org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -44,18 +48,18 @@ public class StandardReserveSolutionController {
/** /**
* 通过id查询(标准储备溶液配制及使用记录表) * 通过id查询(标准储备溶液配制及使用记录表)
* @param standardReserveSolutionId id * @param id id
* @return R * @return R
*/ */
@ApiOperation(value = "通过id查询", notes = "通过id查询") @ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{standardReserveSolutionId}" ) @GetMapping( )
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" ) // @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
public R<StandardReserveSolution> getById(@PathVariable("standardReserveSolutionId" ) String standardReserveSolutionId, HttpServletRequest theHttpServletRequest) { public R<StandardReserveSolutionVO> getById(String id, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardReserveSolution standardReserveSolution = standardReserveSolutionService.getById(standardReserveSolutionId); StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id);
return R.ok(standardReserveSolution); return R.ok(standardReserveSolutionVOById);
//return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId)); //return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId));
} }
@ -67,13 +71,12 @@ public class StandardReserveSolutionController {
*/ */
@ApiOperation(value = "分页查询", notes = "分页查询") @ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" ) // @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
public R<IPage<StandardReserveSolution>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) { public R<IPage<StandardReserveSolutionVO>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<StandardReserveSolution> standardReserveSolutionSList = standardReserveSolutionService.page(page, Wrappers.<StandardReserveSolution>query() IPage<StandardReserveSolutionVO> standardReserveSolutionSList = standardReserveSolutionService.getStandardReserveSolutionVOList(page, Wrappers.<StandardReserveSolution>query()
.eq("create_by", dlpUser.getId())
.orderByDesc("create_time") .orderByDesc("create_time")
); );
return R.ok(standardReserveSolutionSList); return R.ok(standardReserveSolutionSList);
@ -83,69 +86,59 @@ public class StandardReserveSolutionController {
/** /**
* 新增(标准储备溶液配制及使用记录表) * 新增(标准储备溶液配制及使用记录表)
* @param standardReserveSolution (标准储备溶液配制及使用记录表) * @param standardReserveSolutionDTO (标准储备溶液配制及使用记录表)
* @return R * @return R
*/ */
@ApiOperation(value = "新增(标准储备溶液配制及使用记录表)", notes = "新增(标准储备溶液配制及使用记录表)") @ApiOperation(value = "新增(标准储备溶液配制及使用记录表)", notes = "新增(标准储备溶液配制及使用记录表)")
@SysLog("新增(标准储备溶液配制及使用记录表)" ) @SysLog("新增(标准储备溶液配制及使用记录表)" )
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" ) // @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" )
public R<StandardReserveSolution> postAddObject(@RequestBody StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) { public R<StandardReserveSolutionVO> postAddObject(@RequestBody StandardReserveSolutionDTO standardReserveSolutionDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
standardReserveSolution.setId(IdWorker.get32UUID().toUpperCase()); StandardReserveSolutionVO standardReserveSolutionVO = standardReserveSolutionService.addById(standardReserveSolutionDTO, dlpUser);
if (standardReserveSolutionService.save(standardReserveSolution)) {
return R.ok(standardReserveSolution, "对象创建成功");
}
else {
return R.failed(standardReserveSolution, "对象创建失败");
}
}
/** if (standardReserveSolutionVO!=null){
* 修改(标准储备溶液配制及使用记录表) return R.ok(standardReserveSolutionVO,"配置成功");
* @param standardReserveSolution (标准储备溶液配制及使用记录表) }else return R.failed("配置失败");
* @return R }
*/
@ApiOperation(value = "修改(标准储备溶液配制及使用记录表)", notes = "修改(标准储备溶液配制及使用记录表)") /**
@SysLog("修改(标准储备溶液配制及使用记录表)" ) * 新增(标准储备溶液配制及使用记录表)
@PutMapping * @return R
@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(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (standardReserveSolutionService.updateById(standardReserveSolution)) { StandardReserveSolutionFullVO standardReserveSolutionFullVO = standardReserveSolutionService.warehousingById(standardReserveSolutionFullDTO);
return R.ok(standardReserveSolution, "保存对象成功");
}
else {
return R.failed(standardReserveSolution, "保存对象失败");
}
}
/** if (standardReserveSolutionFullVO!=null){
* 通过id删除(标准储备溶液配制及使用记录表) return R.ok(standardReserveSolutionFullVO,"入库成功");
* @param standardReserveSolutionId id }else return R.failed("入库失败");
* @return R }
*/
@ApiOperation(value = "通过id删除(标准储备溶液配制及使用记录表)", notes = "通过id删除(标准储备溶液配制及使用记录表)") /**
@SysLog("通过id删除(标准储备溶液配制及使用记录表)" ) * 通过id查询(标准储备溶液配制及使用记录表)
@DeleteMapping("/{standardReserveSolutionId}" ) * @param id id
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_del')" ) * @return R
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(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardReserveSolution oldStandardReserveSolution = standardReserveSolutionService.getById(standardReserveSolutionId); StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(id);
if (standardReserveSolutionService.removeById(standardReserveSolutionId)) {
return R.ok(oldStandardReserveSolution, "对象删除成功");
}
else {
return R.failed(oldStandardReserveSolution, "对象删除失败");
}
} 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.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import digital.laboratory.platform.common.core.util.R; 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.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.SupplierInformationDTO; 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.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.activation.MimetypesFileTypeMap;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
@ -50,7 +51,7 @@ public class SupplierInformationController {
private final SupplierInformationService supplierInformationService; private final SupplierInformationService supplierInformationService;
// private final OssFile ossFile; private final OssFile ossFile;
/** /**
* 通过id查询(服务商/供应商信息) * 通过id查询(服务商/供应商信息)
@ -70,7 +71,6 @@ public class SupplierInformationController {
SupplierInformationVO voById = supplierInformationService.getVOById(supplierInformationId); SupplierInformationVO voById = supplierInformationService.getVOById(supplierInformationId);
return R.ok(voById); return R.ok(voById);
} }
/** /**
@ -148,37 +148,127 @@ public class SupplierInformationController {
} }
/** /**
* 修改(服务商/供应商信息) * 上传供应人照片
* *
* @param id (服务商/供应商信息) * @param id 上传供应人照片
* @return R * @return R
*/ */
// @ApiOperation(value = "上传供应人照片", notes = "上传供应人照片/供应商信息") @ApiOperation(value = "上传供应人照片", notes = "上传供应人照片/供应商信息")
// @SysLog("修改服务商/供应商信息") @SysLog("修改服务商/供应商信息")
// @PostMapping("/upload") @PostMapping("/upload")
//// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_edit')" ) // @PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
// public R<SupplierInformation> putUpdateById(String id, @RequestPart("file") MultipartFile file, HttpServletRequest theHttpServletRequest) { public R<SupplierInformation> putUpdateById(String id, @RequestPart(value = "file", required = false) MultipartFile file, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
//
// Principal principal = theHttpServletRequest.getUserPrincipal(); Principal principal = theHttpServletRequest.getUserPrincipal();
//
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
//
// SupplierInformation supplierInformation = supplierInformationService.getById(id); SupplierInformation supplierInformation = supplierInformationService.getById(id);
//
// String path = "reagent_managment" + " /" + "supplierInformation" + "/" + "picture_"+supplierInformation.getId(); String path = "reagen_managment" + "/" + "supplierInformation" + "/" + supplierInformation.getId();
// String fileName = FileNameUtil.getName(file.getOriginalFilename()); String fileName = FileNameUtil.getName(file.getOriginalFilename());
// boolean r = ossFile.fileUpload(file, path); boolean r = ossFile.fileUpload(file, path);
// Map<String, String> ResultData = new HashMap<>(); Map<String, String> ResultData = new HashMap<>();
// ResultData.put("fileName", fileName); ResultData.put("fileName", fileName);
// ResultData.put("path", path); ResultData.put("path", path);
//
// if (r) { if (r) {
// //修改数据库 //修改数据库
// supplierInformation.setPhotographOfSupplier(path); supplierInformation.setPhotographOfSupplier(path);
// supplierInformationService.updateById(supplierInformation); supplierInformation.setPhotograph(fileName);
// return R.ok(supplierInformation, "上传成功"); supplierInformationService.updateById(supplierInformation);
// } else return R.failed("上传失败"); 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; 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.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.WarehousingRecordFormDTO; 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.WarehousingBatchList;
import digital.laboratory.platform.reagent.entity.WarehousingContent;
import digital.laboratory.platform.reagent.entity.WarehousingRecordForm; 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.service.WarehousingRecordFormService;
import digital.laboratory.platform.reagent.vo.WarehousingContentVO;
import digital.laboratory.platform.reagent.vo.WarehousingRecordFormVO; import digital.laboratory.platform.reagent.vo.WarehousingRecordFormVO;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -43,6 +50,10 @@ public class WarehousingRecordFormController {
private final WarehousingRecordFormService warehousingRecordFormService; private final WarehousingRecordFormService warehousingRecordFormService;
private final WarehousingContentService warehousingContentService;
private final ReagentConsumablesService reagentConsumablesService;
/** /**
* 通过id查询签收记录表 * 通过id查询签收记录表
* *
@ -70,19 +81,44 @@ public class WarehousingRecordFormController {
@ApiOperation(value = "分页查询", notes = "分页查询") @ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page") @GetMapping("/page")
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_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(); Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
List<WarehousingRecordFormVO> warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOList(); Page<WarehousingRecordFormVO> warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOList(page);
return R.ok(warehousingRecordFormVOList); 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("入库失败"); return R.failed("入库失败");
} }
} }
} }

@ -14,30 +14,12 @@ public class PeriodVerificationImplementationDTO {
@ApiModelProperty(value="(核查时间)") @ApiModelProperty(value="(核查时间)")
private LocalDate checkingTime; private LocalDate checkingTime;
@ApiModelProperty(value="(偏差/不确定度)")
private String deviationAndUncertainty;
@ApiModelProperty(value="(核查实施情况及结果)") @ApiModelProperty(value="(核查实施情况及结果)")
private String implementationAndResults; private String implementationAndResults;
@ApiModelProperty(value="(标准物质编号)")
private String referenceMaterialNumber;
@ApiModelProperty(value="(标准物质ID)")
private String referenceMaterialId;
@ApiModelProperty(value="(标准物质名称)")
private String referenceMaterialName;
@ApiModelProperty(value="(备注)") @ApiModelProperty(value="(备注)")
private String remarks; private String remarks;
@ApiModelProperty(value="(标准值/纯度)")
private String standardValueAndPurity;
@ApiModelProperty(value="(核查方法)")
private String verificationMethod;
@ApiModelProperty(value="(期间核查计划明细ID)") @ApiModelProperty(value="(期间核查计划明细ID)")
private String periodVerificationPlanId; private String periodVerificationPlanId;
@ -49,4 +31,10 @@ public class PeriodVerificationImplementationDTO {
@ApiModelProperty(value="(核查结果:PDF)") @ApiModelProperty(value="(核查结果:PDF)")
private String result; private String result;
@ApiModelProperty(value="(核查方法)")
private String verificationMethod;
@ApiModelProperty(value="(偏差/不确定度)")
private String deviationAndUncertainty;
} }

@ -16,7 +16,7 @@ import java.time.LocalDateTime;
public class PeriodVerificationPlanDTO { public class PeriodVerificationPlanDTO {
@ApiModelProperty(value="(偏差/不确定度)") @ApiModelProperty(value="(偏差/不确定度)")
private String deviationAndUncertainty; private String deviationOrUncertainty;
@ApiModelProperty(value="(核查人ID)") @ApiModelProperty(value="(核查人ID)")
private String inspectorId; private String inspectorId;
@ -36,7 +36,7 @@ public class PeriodVerificationPlanDTO {
private LocalDate scheduledVerificationDate; private LocalDate scheduledVerificationDate;
@ApiModelProperty(value="(标准值/纯度)") @ApiModelProperty(value="(标准值/纯度)")
private String standardValueAndPurity; private String standardValueOrPurity;
@ApiModelProperty(value="(核查依据)") @ApiModelProperty(value="(核查依据)")
private String verificationBasis; 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; package digital.laboratory.platform.reagent.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@Data @Data
public class StandardMaterialApplicationDTO { public class StandardMaterialApplicationDTO {
@ApiModelProperty(value = "标准物质领用归还登记表Id")
private String standardMaterialApplicationId; private String standardMaterialApplicationId;
private String userId;
@ApiModelProperty(value = "归还数量")
private String useQuantity; private String useQuantity;
@ApiModelProperty(value = "格子id")
private String latticeId; private String latticeId;
@ApiModelProperty(value = "是否需要归还")
private Boolean outOfUse; private Boolean outOfUse;
} }

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

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

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

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

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

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

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

@ -93,6 +93,8 @@ public class StandardMaterialApplication extends BaseEntity {
@ApiModelProperty(value="(领用数量)") @ApiModelProperty(value="(领用数量)")
private Integer requisitionedQuantity; 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.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; 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; private Integer commitStatus;
@ -165,7 +166,7 @@ public class StandardMaterialApprovalForm extends BaseEntity {
* (处理时间) * (处理时间)
*/ */
@ApiModelProperty(value="(处理时间)") @ApiModelProperty(value="(处理时间)")
private LocalDateTime processingTime; private LocalDate processingTime;
/** /**
* (购置时间) * (购置时间)
@ -197,6 +198,9 @@ public class StandardMaterialApprovalForm extends BaseEntity {
@ApiModelProperty(value="(备注)") @ApiModelProperty(value="(备注)")
private String remarks; 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.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import io.swagger.models.auth.In; import io.swagger.models.auth.In;
@ -43,17 +44,11 @@ public class StandardReserveSolution extends BaseEntity {
*/ */
@ApiModelProperty(value="(定容体积(mL))") @ApiModelProperty(value="(定容体积(mL))")
private String constantVolume; private String constantVolume;
/** /**
* (配制人ID) * (配制人ID)
*/ */
@ApiModelProperty(value="(配制人ID)") @ApiModelProperty(value="(配制人ID)")
private String dispenserId; private String dispenserId;
private String quantityUsed;
/** /**
* (标准物质ID) * (标准物质ID)
*/ */
@ -105,7 +100,7 @@ public class StandardReserveSolution extends BaseEntity {
* (有效期限) * (有效期限)
*/ */
@ApiModelProperty(value="(有效期限)") @ApiModelProperty(value="(有效期限)")
private LocalDateTime validityPeriod; private Integer validityPeriod;
/** /**
* (有效期限) * (有效期限)
*/ */

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

@ -1,8 +1,10 @@
package digital.laboratory.platform.reagent.entity; package digital.laboratory.platform.reagent.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.common.mybatis.base.BaseEntity; import digital.laboratory.platform.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; 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="(生产日期)") @ApiModelProperty(value="(生产日期)")
private LocalDate dateOfProduction; 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="(有效日期)") @ApiModelProperty(value="(有效日期)")
private LocalDate expirationDate; private LocalDate expirationDate;
/** /**

@ -20,6 +20,11 @@ public class WarehousingContent extends BaseEntity {
*/ */
@ApiModelProperty(value = "(试剂耗材ID)") @ApiModelProperty(value = "(试剂耗材ID)")
private String reagentConsumableId; 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO; import digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import java.util.List; import java.util.List;
@ -20,5 +23,6 @@ import java.util.List;
public interface PeriodVerificationPlanMapper extends BaseMapper<PeriodVerificationPlan> { public interface PeriodVerificationPlanMapper extends BaseMapper<PeriodVerificationPlan> {
List <PeriodVerificationPlanVO> getPeriodVerificationPlanVOList (String checkScheduleId); 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.entity.StandardReserveSolution;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO; import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -19,6 +20,7 @@ public interface StandardReserveSolutionMapper extends BaseMapper<StandardReserv
StandardReserveSolutionVO getStandardReserveSolutionVOById (String id); 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; 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.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.entity.WarehousingContent;
import digital.laboratory.platform.reagent.vo.WarehousingContentVO; import digital.laboratory.platform.reagent.vo.WarehousingContentVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.yaml.snakeyaml.scanner.Constant;
import java.util.List; import java.util.List;
@ -11,4 +17,5 @@ import java.util.List;
public interface WarehousingContentMapper extends BaseMapper<WarehousingContent> { public interface WarehousingContentMapper extends BaseMapper<WarehousingContent> {
List<WarehousingContentVO> getWarehousingContentVOList(String signingRecordFormId); 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.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.PeriodVerificationImplementationDTO; import digital.laboratory.platform.reagent.dto.PeriodVerificationImplementationDTO;
import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation; import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO; import digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO;
/** /**
@ -21,9 +22,9 @@ public interface PeriodVerificationImplementationService extends IService<Period
PeriodVerificationImplementationVO getPeriodVerificationImplementationVO(String periodVerificationImplementationId); 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); 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.PeriodVerificationPlanDTO; import digital.laboratory.platform.reagent.dto.PeriodVerificationPlanDTO;
@ -18,4 +19,7 @@ import java.util.List;
*/ */
public interface PeriodVerificationPlanService extends IService<PeriodVerificationPlan> { public interface PeriodVerificationPlanService extends IService<PeriodVerificationPlan> {
List<PeriodVerificationPlanVO> getPeriodVerificationPlanVOList ( String checkScheduleId); 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> { public interface StandardMaterialApprovalFormService extends IService<StandardMaterialApprovalForm> {
StandardMaterialApprovalForm addById (StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser); StandardMaterialApprovalForm commitById (StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser);
StandardMaterialApprovalForm editById (StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO);
StandardMaterialApprovalForm commitById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser);
IPage<StandardMaterialApprovalFormVO> getVOPage(IPage<StandardMaterialApprovalForm> page, QueryWrapper<StandardMaterialApprovalForm> qw); IPage<StandardMaterialApprovalFormVO> getVOPage(IPage<StandardMaterialApprovalForm> page, QueryWrapper<StandardMaterialApprovalForm> qw);
StandardMaterialApprovalFormVO getVO(String standardMaterialApprovalFormId); StandardMaterialApprovalFormVO getVO(String standardMaterialApprovalFormId);

@ -5,10 +5,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionDTO; 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.entity.StandardReserveSolution;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionFullVO; import digital.laboratory.platform.reagent.vo.StandardReserveSolutionFullVO;
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO; 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); 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); IPage<StandardReserveSolutionVO> getStandardReserveSolutionVOList(IPage<StandardReserveSolution> page, QueryWrapper<StandardReserveSolution> qw);
StandardReserveSolution warehousingById(String solutionId, String latticeId); StandardReserveSolutionFullVO warehousingById(StandardReserveSolutionFullDTO standardReserveSolutionFullDTO);
StandardReserveSolutionFullVO getByFullVOId(String id); StandardReserveSolutionFullVO getByFullVOId(String id);
} }

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

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

@ -199,7 +199,6 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
centralizedRequestVO.setDetailsOfCentralizedVOList(detailsOfCentralizedService.getDetailsOfCentralizedVOList(centralizedRequestVO.getId())); centralizedRequestVO.setDetailsOfCentralizedVOList(detailsOfCentralizedService.getDetailsOfCentralizedVOList(centralizedRequestVO.getId()));
centralizedRequestVOArrayList.add(centralizedRequestVO); centralizedRequestVOArrayList.add(centralizedRequestVO);
} }
return centralizedRequestVOArrayList; 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.entity.PeriodVerificationPlan;
import digital.laboratory.platform.reagent.mapper.CheckScheduleMapper; import digital.laboratory.platform.reagent.mapper.CheckScheduleMapper;
import digital.laboratory.platform.reagent.service.CheckScheduleService; 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.service.PeriodVerificationPlanService;
import digital.laboratory.platform.reagent.vo.CheckScheduleVO; import digital.laboratory.platform.reagent.vo.CheckScheduleVO;
import digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
@ -33,6 +35,9 @@ import java.util.List;
@Service @Service
public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, CheckSchedule> implements CheckScheduleService { public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, CheckSchedule> implements CheckScheduleService {
@Autowired
private PeriodVerificationImplementationService periodVerificationImplementationService;
@Autowired @Autowired
private CheckScheduleService checkScheduleService; private CheckScheduleService checkScheduleService;
@Autowired @Autowired
@ -58,6 +63,8 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
periodVerificationPlan.setCheckScheduleId(checkSchedule.getId()); periodVerificationPlan.setCheckScheduleId(checkSchedule.getId());
periodVerificationPlan.setDeviationAndUncertainty(periodVerificationPlanDTO.getDeviationOrUncertainty());
periodVerificationPlans.add(periodVerificationPlan); periodVerificationPlans.add(periodVerificationPlan);
} }
@ -92,6 +99,8 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
BeanUtils.copyProperties(periodVerificationPlanDTO, periodVerificationPlan); BeanUtils.copyProperties(periodVerificationPlanDTO, periodVerificationPlan);
periodVerificationPlan.setDeviationAndUncertainty(periodVerificationPlanDTO.getDeviationOrUncertainty());
periodVerificationPlan.setCheckScheduleId(byId.getId()); periodVerificationPlan.setCheckScheduleId(byId.getId());
periodVerificationPlans.add(periodVerificationPlan); periodVerificationPlans.add(periodVerificationPlan);
@ -110,23 +119,27 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
CheckSchedule byId = checkScheduleService.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId()); CheckSchedule byId = checkScheduleService.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId());
if (byId == null) { if (byId == null) {
CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser); CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
checkSchedule.setStatus(1); checkSchedule.setStatus(1);
checkScheduleService.updateById(checkSchedule); checkScheduleService.updateById(checkSchedule);
return checkSchedule; return checkSchedule;
} else { } else {
byId.setStatus(1);
checkScheduleService.updateById(byId);} CheckSchedule checkSchedule = checkScheduleService.editPlan(periodVerificationPlanDTOS);
checkSchedule.setStatus(1);
checkScheduleService.updateById(checkSchedule);
return checkSchedule;
}
return byId;
} }
@Override @Override
public CheckSchedule auditPlan(AuditAndApproveDTO auditAndApproveDTO,DLPUser dlpUser){ public CheckSchedule auditPlan(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
CheckSchedule byId = checkScheduleService.getById(auditAndApproveDTO.getUuId()); CheckSchedule byId = checkScheduleService.getById(auditAndApproveDTO.getUuId());
@ -135,15 +148,27 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
byId.setAuditTimeOfTechnical(LocalDateTime.now()); byId.setAuditTimeOfTechnical(LocalDateTime.now());
byId.setTechnicalDirectorId(dlpUser.getId()); byId.setTechnicalDirectorId(dlpUser.getId());
if (auditAndApproveDTO.getAuditResult()==true){ if (auditAndApproveDTO.getAuditResult() == true) {
byId.setStatus(2);}
else { 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); byId.setStatus(-1);
} }
if (checkScheduleService.updateById(byId)){ if (checkScheduleService.updateById(byId)) {
return byId; return byId;
}else throw new RuntimeException(String.format("审核失败")); } else throw new RuntimeException(String.format("审核失败"));
} }
@Override @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()); 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<>(); LambdaQueryWrapper<ReferenceMaterial> referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>();
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getNumber,reagentConsumablesSet.getReferenceMaterialNumber()); referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getNumber, reagentConsumablesSet.getReferenceMaterialNumber());
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper); ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper);
@ -166,7 +166,9 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
outgoingContents.setDeliveryRegistrationFormId(byId.getId()); outgoingContents.setDeliveryRegistrationFormId(byId.getId());
if (reagentConsumables.getCategory().equals("标准物质")&&outgoingContents.isReturnOrNot()) { outgoingContents.setReferenceMaterialNumber(outgoingContentsDTO.getNumber());
if (reagentConsumables.getCategory().equals("标准物质") && outgoingContents.isReturnOrNot()) {
//生成标准物质领用/归还登记表 //生成标准物质领用/归还登记表
StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication(); StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication();
@ -180,25 +182,32 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel()); standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel());
standardMaterialApplication.setApplicationForUseId(one.getId()); standardMaterialApplication.setApplicationForUseId(one.getId());
standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId()); standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId());
standardMaterialApplication.setStatus(0); standardMaterialApplication.setAdministratorId(dlpUser.getId());
standardMaterialApplication.setReferenceMaterialNumber(outgoingContents.getReferenceMaterialNumber()); standardMaterialApplication.setReferenceMaterialNumber(outgoingContentsDTO.getNumber());
standardMaterialApplications.add(standardMaterialApplication); 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()); ReferenceMaterial byId1 = referenceMaterialService.getById(outgoingContentsDTO.getReferenceMaterialId());
byId1.setStatus(-1); byId1.setStatus(-1);
//查找出对应的仓库信息,将库存量减少 //查找出对应的仓库信息,将库存量减少
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.reduceById(outgoingContents.getReagentConsumableId(), outgoingContents.getQuantity()); ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.reduceById(outgoingContents.getReagentConsumableId(), outgoingContents.getQuantity());
if (reagentConsumableInventory.getTotalQuantity() < 0) { if (reagentConsumableInventory.getTotalQuantity() < 0) {
throw new RuntimeException(String.format("出库数量不能超过库存量")); throw new RuntimeException(String.format("出库数量不能超过库存量"));
} }
} else if (reagentConsumables.getCategory().equals("标准储备溶液")&&outgoingContents.isReturnOrNot()) { } else if (reagentConsumables.getCategory().equals("标准储备溶液") && outgoingContents.isReturnOrNot()) {
//创建标准物质领用/归还登记表 //创建标准物质领用/归还登记表
StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication(); StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication();
standardMaterialApplication.setReferenceMaterialNumber(outgoingContents.getReferenceMaterialNumber()); standardMaterialApplication.setReferenceMaterialNumber(outgoingContentsDTO.getNumber());
standardMaterialApplication.setStandardMaterialApplicationId(IdWorker.get32UUID().toUpperCase()); standardMaterialApplication.setStandardMaterialApplicationId(IdWorker.get32UUID().toUpperCase());
standardMaterialApplication.setPurpose(outgoingContents.getOutboundUse()); standardMaterialApplication.setPurpose(outgoingContents.getOutboundUse());
standardMaterialApplication.setDateOfClaim(LocalDateTime.now()); standardMaterialApplication.setDateOfClaim(LocalDateTime.now());
@ -208,7 +217,13 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
standardMaterialApplication.setRequisitionedQuantity(outgoingContents.getQuantity()); standardMaterialApplication.setRequisitionedQuantity(outgoingContents.getQuantity());
standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel()); standardMaterialApplication.setSpecification(reagentConsumables.getSpecificationAndModel());
standardMaterialApplication.setApplicationForUseId(one.getId()); standardMaterialApplication.setApplicationForUseId(one.getId());
standardMaterialApplication.setStatus(0); if (outgoingContentsDTO.getOutboundUse() == 2) {
standardMaterialApplication.setPurposeAndQuantity(outgoingContents.getQuantity().toString());
standardMaterialApplication.setStatus(1);
} else {
standardMaterialApplication.setStatus(0);
}
standardMaterialApplication.setAdministratorId(dlpUser.getId());
standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId()); standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId());
standardMaterialApplications.add(standardMaterialApplication); standardMaterialApplications.add(standardMaterialApplication);
@ -254,13 +269,16 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
} }
outgoingContentsList.add(outgoingContents); outgoingContentsList.add(outgoingContents);
} }
if (outgoingContentsService.saveBatch(outgoingContentsList) && standardMaterialApplicationService.saveBatch(standardMaterialApplications)) { if (standardMaterialApplications.size() != 0) {
standardMaterialApplicationService.saveBatch(standardMaterialApplications);
}
if (outgoingContentsService.saveBatch(outgoingContentsList)) {
return byId; return byId;
} else throw new RuntimeException(String.format("提交失败")); } else throw new RuntimeException(String.format("提交失败"));
} }
@Override//分页查询 @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); Page deliveryRegistrationFormVOPage = baseMapper.getDeliveryRegistrationFormVOPage(page, qw);
@ -268,46 +286,47 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
} }
@Override//通过ID查询出库内容 @Override//通过ID查询出库内容
public DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById(String deliveryRegistrationFormId){ public DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById(String deliveryRegistrationFormId) {
DeliveryRegistrationFormVO deliveryRegistrationFormVOById = baseMapper.getDeliveryRegistrationFormVOById(deliveryRegistrationFormId); DeliveryRegistrationFormVO deliveryRegistrationFormVOById = baseMapper.getDeliveryRegistrationFormVOById(deliveryRegistrationFormId);
LambdaQueryWrapper<OutgoingContents> outgoingContentsLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OutgoingContents> outgoingContentsLambdaQueryWrapper = new LambdaQueryWrapper<>();
outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId,deliveryRegistrationFormVOById.getId()); outgoingContentsLambdaQueryWrapper.eq(OutgoingContents::getDeliveryRegistrationFormId, deliveryRegistrationFormVOById.getId());
List<OutgoingContents> list = outgoingContentsService.list(outgoingContentsLambdaQueryWrapper); List<OutgoingContents> list = outgoingContentsService.list(outgoingContentsLambdaQueryWrapper);
List<OutgoingContentsVO> outgoingContentsVOS = new ArrayList<>(); List<OutgoingContentsVO> outgoingContentsVOS = new ArrayList<>();
if (list.size()!=0){ if (list.size() != 0) {
for (OutgoingContents outgoingContents : list) { for (OutgoingContents outgoingContents : list) {
OutgoingContentsVO outgoingContentsVO = new OutgoingContentsVO(); OutgoingContentsVO outgoingContentsVO = new OutgoingContentsVO();
BeanUtils.copyProperties(outgoingContents,outgoingContentsVO); BeanUtils.copyProperties(outgoingContents, outgoingContentsVO);
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,outgoingContents.getReagentConsumableId()); reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, outgoingContents.getReagentConsumableId());
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper); ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
outgoingContentsVO.setReagentConsumableInventory(one); outgoingContentsVO.setReagentConsumableInventory(one);
outgoingContentsVOS.add(outgoingContentsVO); outgoingContentsVOS.add(outgoingContentsVO);
} }
deliveryRegistrationFormVOById.setOutgoingContentsList(outgoingContentsVOS);} deliveryRegistrationFormVOById.setOutgoingContentsList(outgoingContentsVOS);
}
return deliveryRegistrationFormVOById; return deliveryRegistrationFormVOById;
} }
@Override @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); ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableId);
@ -315,20 +334,20 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO(); ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO();
BeanUtils.copyProperties(byId,reagentConsumablesVO); BeanUtils.copyProperties(byId, reagentConsumablesVO);
reagentConsumablesVO.setNumber(byId1.getNumber()); reagentConsumablesVO.setNumber(byId1.getNumber());
reagentConsumablesVO.setReferenceMaterialId(referenceMaterialId); reagentConsumablesVO.setReferenceMaterialId(referenceMaterialId);
return reagentConsumablesVO; return reagentConsumablesVO;
}else { } else {
ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableId); ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumableId);
ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO(); ReagentConsumablesVO reagentConsumablesVO = new ReagentConsumablesVO();
BeanUtils.copyProperties(byId,reagentConsumablesVO); BeanUtils.copyProperties(byId, reagentConsumablesVO);
return reagentConsumablesVO; return reagentConsumablesVO;
} }

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

@ -1,5 +1,6 @@
package digital.laboratory.platform.reagent.service.impl; 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; 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.dto.PeriodVerificationImplementationDTO;
import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation; import digital.laboratory.platform.reagent.entity.PeriodVerificationImplementation;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan; 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.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.mapper.PeriodVerificationImplementationMapper; import digital.laboratory.platform.reagent.mapper.PeriodVerificationImplementationMapper;
import digital.laboratory.platform.reagent.service.PeriodVerificationImplementationService; import digital.laboratory.platform.reagent.service.PeriodVerificationImplementationService;
@ -59,39 +61,58 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
return periodVerificationImplementationVO; return periodVerificationImplementationVO;
} }
@Override//新增期间核查结果录入表 @Override//新增期间核查结果录入表
public PeriodVerificationImplementation addById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser) { public PeriodVerificationImplementation addById(PeriodVerificationPlan periodVerificationPlan) {
PeriodVerificationImplementation periodVerificationImplementation = new PeriodVerificationImplementation(); 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 byId.setOpinionOfInspector(false);
.updateById(byId)) {
return periodVerificationImplementation; } else byId.setOpinionOfInspector(true);
} else throw new RuntimeException(String.format("保存失败"));
} ReferenceMaterial byId1 = referenceMaterialService.getById(byId.getReferenceMaterialId());
@Override//修改期间核查结果记录表 ReagentConsumables byId2 = reagentConsumablesService.getById(byId1.getReagentConsumableId());
public PeriodVerificationImplementation editById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO) {
PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(periodVerificationImplementationDTO.getPeriodVerificationImplementationId()); byId2.setDeviationOrUncertainty(periodVerificationImplementationDTO.getDeviationAndUncertainty());
BeanUtils.copyProperties(periodVerificationImplementationDTO, byId); reagentConsumablesService.updateById(byId2);
String result = periodVerificationImplementationDTO.getResult(); String result = periodVerificationImplementationDTO.getResult();
@ -108,33 +129,23 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
} else throw new RuntimeException(String.format("保存失败")); } else throw new RuntimeException(String.format("保存失败"));
} }
@Override//提交期间核查结果记录表
public PeriodVerificationImplementation commitById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser){
if (periodVerificationImplementationDTO.getPeriodVerificationImplementationId()==null){
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.addById(periodVerificationImplementationDTO, dlpUser); @Override//提交期间核查结果记录表
public PeriodVerificationImplementation commitById(PeriodVerificationImplementationDTO periodVerificationImplementationDTO, DLPUser dlpUser) {
periodVerificationImplementation.setCommitStatus(1);
if ( periodVerificationImplementationService.updateById(periodVerificationImplementation)){
return periodVerificationImplementation;
}else throw new RuntimeException(String.format("提交失败")); PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO, dlpUser);
}else {
PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(periodVerificationImplementationDTO.getPeriodVerificationImplementationId()); periodVerificationImplementation.setCommitStatus(1);
byId.setCommitStatus(1); if (periodVerificationImplementationService.updateById(periodVerificationImplementation)) {
if ( periodVerificationImplementationService.updateById(byId)){ return periodVerificationImplementation;
return byId;
}else throw new RuntimeException(String.format("提交失败")); } else return null;
}
} }
@Override//审核期间核查结果记录表 @Override//审核期间核查结果记录表
public PeriodVerificationImplementation auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser){ public PeriodVerificationImplementation auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(auditAndApproveDTO.getUuId()); PeriodVerificationImplementation byId = periodVerificationImplementationService.getById(auditAndApproveDTO.getUuId());
@ -143,11 +154,8 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
byId.setAuditTimeOfTechnical(LocalDate.now()); byId.setAuditTimeOfTechnical(LocalDate.now());
byId.setTechnicalDirectorId(dlpUser.getId()); byId.setTechnicalDirectorId(dlpUser.getId());
if (periodVerificationImplementationService.updateById(byId)){ if (periodVerificationImplementationService.updateById(byId)) {
return 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan; 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.mapper.PeriodVerificationPlanMapper;
import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService; 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 digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@ -20,11 +26,34 @@ import java.util.List;
@Service @Service
public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerificationPlanMapper, PeriodVerificationPlan> implements PeriodVerificationPlanService { public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerificationPlanMapper, PeriodVerificationPlan> implements PeriodVerificationPlanService {
@Autowired
private ReagentConsumablesService reagentConsumablesService;
@Autowired
private ReferenceMaterialService referenceMaterialService;
@Override @Override
public List<PeriodVerificationPlanVO> getPeriodVerificationPlanVOList(String checkScheduleId){ public List<PeriodVerificationPlanVO> getPeriodVerificationPlanVOList(String checkScheduleId){
List<PeriodVerificationPlanVO> periodVerificationPlanVOPage = baseMapper.getPeriodVerificationPlanVOList(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; return periodVerificationPlanVOPage;
} }

@ -50,6 +50,9 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
@Autowired @Autowired
private PurchasingPlanService purchasingPlanService; private PurchasingPlanService purchasingPlanService;
@Autowired
private ReagentConsumablesService reagentConsumablesService;
@Override//通过ID查找清单 @Override//通过ID查找清单
public PurchaseListVO getPurchaseList(String purchaseListId) { public PurchaseListVO getPurchaseList(String purchaseListId) {
@ -107,10 +110,14 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
for (PurchaseListDetails purchaseListDetails : purchaseListDetailsList) { for (PurchaseListDetails purchaseListDetails : purchaseListDetailsList) {
ReagentConsumables byId = reagentConsumablesService.getById(purchaseListDetails.getReagentConsumableId());
WarehousingContent warehousingContent = new WarehousingContent(); WarehousingContent warehousingContent = new WarehousingContent();
//完善入库内容信息 //完善入库内容信息
warehousingContent.setId(IdWorker.get32UUID().toUpperCase()); warehousingContent.setId(IdWorker.get32UUID().toUpperCase());
warehousingContent.setReagentConsumableName(byId.getReagentConsumableName());
warehousingContent.setTotalQuantity(purchaseListDetails.getPurchaseQuantity()); warehousingContent.setTotalQuantity(purchaseListDetails.getPurchaseQuantity());
warehousingContent.setReagentConsumableId(purchaseListDetails.getReagentConsumableId()); 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.BatchDetailsVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO; import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO; import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
import digital.laboratory.platform.reagent.vo.ReagentConsumablesVO;
import io.swagger.models.auth.In; import io.swagger.models.auth.In;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -42,11 +43,16 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
@Autowired @Autowired
private SupplierInformationService supplierInformationService; private SupplierInformationService supplierInformationService;
@Autowired
private FixedValueReportService fixedValueReportService;
@Override//试剂耗材管理列表 @Override//试剂耗材管理列表
public Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOList(Page page, String name) { public Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOList(Page page, String name) {
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>(); QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
reagentConsumableInventoryQueryWrapper.eq("status",1);
if (name != null) { if (name != null) {
reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or() reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or()
@ -143,6 +149,11 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
one.setTotalQuantity(one.getTotalQuantity() + quantity); one.setTotalQuantity(one.getTotalQuantity() + quantity);
if (one.getTotalQuantity()==0){
one.setStatus(-1);
}
if (reagentConsumableInventoryService.updateById(one)) { if (reagentConsumableInventoryService.updateById(one)) {
return one; return one;
@ -160,6 +171,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
one.setTotalQuantity(one.getTotalQuantity() - quantity); one.setTotalQuantity(one.getTotalQuantity() - quantity);
if (reagentConsumableInventoryService.updateById(one)) { if (reagentConsumableInventoryService.updateById(one)) {
return one; return one;
@ -200,6 +212,12 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
for (ReferenceMaterial referenceMaterial : list1) { for (ReferenceMaterial referenceMaterial : list1) {
LambdaQueryWrapper<FixedValueReport> fixedValueReportLambdaQueryWrapper = new LambdaQueryWrapper<>();
fixedValueReportLambdaQueryWrapper.eq(FixedValueReport::getReferenceSubstanceId,referenceMaterial.getId());
FixedValueReport one = fixedValueReportService.getOne(fixedValueReportLambdaQueryWrapper);
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO(); ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO); BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO);
@ -213,8 +231,17 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId()); SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId());
reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName()); reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName());
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch()); 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); reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
@ -251,10 +278,16 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId()); SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId());
reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName()); reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName());
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch()); 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); reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
} }
} }
@ -355,8 +388,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList); Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList);
return pages; return pages;
}
} }
}

@ -36,6 +36,7 @@ public class RequisitionRecordServiceImpl extends ServiceImpl<RequisitionRecordM
ReagentConsumables byId = reagentConsumablesService.getById(outgoingContents.getReagentConsumableId()); ReagentConsumables byId = reagentConsumablesService.getById(outgoingContents.getReagentConsumableId());
requisitionRecord.setRequisitionRecordId(IdWorker.get32UUID().toUpperCase()); requisitionRecord.setRequisitionRecordId(IdWorker.get32UUID().toUpperCase());
requisitionRecord.setReagentConsumableId(byId.getReagentConsumableId());
requisitionRecord.setRemarks(outgoingContents.getRemarks()); requisitionRecord.setRemarks(outgoingContents.getRemarks());
requisitionRecord.setDrawingAmount(outgoingContents.getQuantity()); requisitionRecord.setDrawingAmount(outgoingContents.getQuantity());
requisitionRecord.setSpecificationAndModel(byId.getSpecificationAndModel()); 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.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.dto.StandardMaterialApplicationDTO; import digital.laboratory.platform.reagent.dto.StandardMaterialApplicationDTO;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; import digital.laboratory.platform.reagent.entity.*;
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.mapper.StandardMaterialApplicationMapper; import digital.laboratory.platform.reagent.mapper.StandardMaterialApplicationMapper;
import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO; import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO;
@ -16,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
/** /**
* (标准物质领用/归还登记表)服务实现类 * (标准物质领用/归还登记表)服务实现类
@ -35,7 +33,6 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
@Autowired @Autowired
private ReagentConsumableInventoryService reagentConsumableInventoryService; private ReagentConsumableInventoryService reagentConsumableInventoryService;
@Autowired @Autowired
private SolutionUseFormService solutionUseFormService; private SolutionUseFormService solutionUseFormService;
@ -61,12 +58,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
one.setQuantityUsed(byId.getPurposeAndQuantity()); one.setQuantityUsed(byId.getPurposeAndQuantity());
solutionUseFormService.updateById(one); solutionUseFormService.updateById(one);
} }
if (standardMaterialApplicationDTO.getOutOfUse()==false){ //
reagentConsumableInventoryService.addById(byId.getReferenceSubstanceId(), byId.getRequisitionedQuantity());
}
if (standardMaterialApplicationService.updateById(byId)) { if (standardMaterialApplicationService.updateById(byId)) {
return byId; return byId;
} else throw new RuntimeException(String.format("归还失败")); } else throw new RuntimeException(String.format("归还失败"));
@ -87,10 +79,15 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
IPage<StandardMaterialApplicationVO> standardMaterialApplicationVOList = baseMapper.getStandardMaterialApplicationVOList(page, qw); 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.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO; import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.StandardMaterialApprovalFormDTO; 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.StandardMaterialApprovalForm;
import digital.laboratory.platform.reagent.entity.SupplierInformation; import digital.laboratory.platform.reagent.entity.SupplierInformation;
import digital.laboratory.platform.reagent.mapper.StandardMaterialApprovalFormMapper; 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.StandardMaterialApprovalFormService;
import digital.laboratory.platform.reagent.service.SupplierInformationService; import digital.laboratory.platform.reagent.service.SupplierInformationService;
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO; import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
@ -33,52 +35,49 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
@Autowired @Autowired
private SupplierInformationService supplierInformationService; private SupplierInformationService supplierInformationService;
@Autowired
private ReferenceMaterialService referenceMaterialService;
@Override @Override
public StandardMaterialApprovalForm addById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser){ public StandardMaterialApprovalForm commitById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser){
StandardMaterialApprovalForm standardMaterialApprovalForm = new StandardMaterialApprovalForm(); StandardMaterialApprovalForm standardMaterialApprovalForm = new StandardMaterialApprovalForm();
BeanUtils.copyProperties(standardMaterialApprovalFormDTO,standardMaterialApprovalForm); BeanUtils.copyProperties(standardMaterialApprovalFormDTO,standardMaterialApprovalForm);
standardMaterialApprovalForm.setId(IdWorker.get32UUID().toUpperCase()); standardMaterialApprovalForm.setApplicantId(dlpUser.getId());
standardMaterialApprovalForm.setApplicantName(dlpUser.getName());
if (standardMaterialApprovalFormService.save(standardMaterialApprovalForm)){
return standardMaterialApprovalForm;
}else throw new RuntimeException(String.format("保存失败"));
}
@Override standardMaterialApprovalForm.setId(IdWorker.get32UUID().toUpperCase());
public StandardMaterialApprovalForm editById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO){
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)){ byId.setStatus(-1);
return standardMaterialApprovalForm;
}else throw new RuntimeException(String.format("保存失败"));
}
@Override }else if (standardMaterialApprovalFormDTO.getApplicationContent()==4){
public StandardMaterialApprovalForm commitById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser){
if (standardMaterialApprovalFormDTO.getStandardMaterialApprovalFormId()==null){ ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
StandardMaterialApprovalForm standardMaterialApprovalForm = addById(standardMaterialApprovalFormDTO, dlpUser); byId.setStatus(-2);
return standardMaterialApprovalForm;
}else { }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 @Override
public IPage<StandardMaterialApprovalFormVO> getVOPage(IPage<StandardMaterialApprovalForm> page, QueryWrapper<StandardMaterialApprovalForm> qw){ 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.setPrimaryAuditorId(dlpUser.getId());
byId.setAuditTimeOfPrimary(LocalDateTime.now()); byId.setAuditTimeOfPrimary(LocalDateTime.now());
if (auditAndApproveDTO.getAuditResult()==true){
byId.setCommitStatus(2);
}else {
byId.setCommitStatus(-1);
}
if (standardMaterialApprovalFormService.updateById(byId)){ if (standardMaterialApprovalFormService.updateById(byId)){
return byId; return byId;
}else throw new RuntimeException(String.format("审核失败")); }else throw new RuntimeException(String.format("审核失败"));
@ -126,7 +131,11 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
byId.setAuditResultOfSecondary(auditAndApproveDTO.getAuditResult()); byId.setAuditResultOfSecondary(auditAndApproveDTO.getAuditResult());
byId.setSecondaryAuditorId(dlpUser.getId()); byId.setSecondaryAuditorId(dlpUser.getId());
byId.setAuditTimeOfSecondary(LocalDateTime.now()); byId.setAuditTimeOfSecondary(LocalDateTime.now());
if (auditAndApproveDTO.getAuditResult()==true){
byId.setCommitStatus(3);
}else {
byId.setCommitStatus(-1);
}
if (standardMaterialApprovalFormService.updateById(byId)){ if (standardMaterialApprovalFormService.updateById(byId)){
return byId; return byId;
}else throw new RuntimeException(String.format("审核失败")); }else throw new RuntimeException(String.format("审核失败"));
@ -141,7 +150,11 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
byId.setResultOfApproval(auditAndApproveDTO.getAuditResult()); byId.setResultOfApproval(auditAndApproveDTO.getAuditResult());
byId.setApproverId(dlpUser.getId()); byId.setApproverId(dlpUser.getId());
byId.setApprovalOfTime(LocalDateTime.now()); byId.setApprovalOfTime(LocalDateTime.now());
if (auditAndApproveDTO.getApproveResult()==true){
byId.setCommitStatus(4);
}else {
byId.setCommitStatus(-2);
}
if (standardMaterialApprovalFormService.updateById(byId)){ if (standardMaterialApprovalFormService.updateById(byId)){
return byId; return byId;
}else throw new RuntimeException(String.format("审批失败")); }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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionDTO; import digital.laboratory.platform.reagent.dto.StandardReserveSolutionDTO;
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory; import digital.laboratory.platform.reagent.dto.StandardReserveSolutionFullDTO;
import digital.laboratory.platform.reagent.entity.ReagentConsumables; import digital.laboratory.platform.reagent.entity.*;
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
import digital.laboratory.platform.reagent.entity.StandardReserveSolution;
import digital.laboratory.platform.reagent.mapper.StandardReserveSolutionMapper; import digital.laboratory.platform.reagent.mapper.StandardReserveSolutionMapper;
import digital.laboratory.platform.reagent.service.*; import digital.laboratory.platform.reagent.service.*;
import digital.laboratory.platform.reagent.vo.LocationVO; import digital.laboratory.platform.reagent.vo.LocationVO;
@ -24,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -60,6 +59,9 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
@Autowired @Autowired
private ReferenceMaterialService referenceMaterialService; private ReferenceMaterialService referenceMaterialService;
@Autowired
private BatchDetailsService batchDetailsService;
@Override//通过ID查询标准溶液的配置记录 @Override//通过ID查询标准溶液的配置记录
public StandardReserveSolutionVO getStandardReserveSolutionVOById(String id) { public StandardReserveSolutionVO getStandardReserveSolutionVOById(String id) {
@ -74,7 +76,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
@Override//配置标准储备溶液 @Override//配置标准储备溶液
@Transactional @Transactional
public StandardReserveSolution addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser) { public StandardReserveSolutionVO addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser) {
StandardReserveSolution standardReserveSolution = new StandardReserveSolution(); StandardReserveSolution standardReserveSolution = new StandardReserveSolution();
@ -90,12 +92,12 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName,standardReserveSolution.getSolutionName()); reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableName, standardReserveSolution.getSolutionName());
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration,standardReserveSolution.getConfigurationConcentration()); reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getConfigurationConcentration, standardReserveSolution.getConfigurationConcentration());
ReagentConsumables one = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); ReagentConsumables one = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper);
//判断是否存在过该标准储备溶液,若未存在,则将其存入试剂耗材类 //判断是否存在过该标准储备溶液,若未存在,则将其存入试剂耗材类
if (one==null){ if (one == null) {
ReagentConsumables reagentConsumables = new ReagentConsumables(); ReagentConsumables reagentConsumables = new ReagentConsumables();
@ -103,21 +105,25 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
ReagentConsumables reagentConsumables1 = reagentConsumablesService.getById(byId.getReagentConsumableId()); ReagentConsumables reagentConsumables1 = reagentConsumablesService.getById(byId.getReagentConsumableId());
BeanUtils.copyProperties(reagentConsumables1,reagentConsumables); BeanUtils.copyProperties(reagentConsumables1, reagentConsumables);
reagentConsumables1.setReagentConsumableId(IdWorker.get32UUID().toUpperCase()); reagentConsumables1.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
reagentConsumables1.setReagentConsumableName(standardReserveSolution.getSolutionName()); reagentConsumables1.setReagentConsumableName(standardReserveSolution.getSolutionName());
reagentConsumables1.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration()); reagentConsumables1.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration());
reagentConsumables1.setCategory("标准储备溶液");
reagentConsumablesService.save(reagentConsumables1); reagentConsumablesService.save(reagentConsumables1);
} }
if (standardReserveSolutionService.save(standardReserveSolution)) { if (standardReserveSolutionService.save(standardReserveSolution)) {
return standardReserveSolution;
StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(standardReserveSolution.getId());
return standardReserveSolutionVOById;
} else throw new RuntimeException(String.format("配置失败")); } else throw new RuntimeException(String.format("配置失败"));
} }
@Override//标准储备溶液入库任务(查询的为状态为0的标准储备溶液) @Override//标准储备溶液入库任务
public IPage<StandardReserveSolutionVO> getStandardReserveSolutionVOList(IPage<StandardReserveSolution> page, QueryWrapper<StandardReserveSolution> qw) { public IPage<StandardReserveSolutionVO> getStandardReserveSolutionVOList(IPage<StandardReserveSolution> page, QueryWrapper<StandardReserveSolution> qw) {
IPage<StandardReserveSolutionVO> standardReserveSolutionVOPage = baseMapper.getStandardReserveSolutionVOPage(page, qw); IPage<StandardReserveSolutionVO> standardReserveSolutionVOPage = baseMapper.getStandardReserveSolutionVOPage(page, qw);
@ -126,15 +132,26 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
} }
@Override//标准储备溶液配置入库 @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 //提供格子位置与标准储备溶液配置表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<>(); 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); ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper);
@ -150,11 +167,17 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory); BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory);
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
reagentConsumableInventory.setStatus(1);
reagentConsumableInventory.setConfigurationConcentration(byId.getConfigurationConcentration());
ReferenceMaterial referenceMaterial = new ReferenceMaterial(); ReferenceMaterial referenceMaterial = new ReferenceMaterial();
//获取当前年月日 //获取当前年月日
Date date = new Date(); Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-mm-dd");
formatter.format(date); formatter.format(date);
//创建标准溶液对象,并生成编号 //创建标准溶液对象,并生成编号
@ -163,6 +186,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId()); referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId());
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
referenceMaterial.setNumber(reagentConsumableInventory.getEnglishName() + "-" + formatter.format(date)); referenceMaterial.setNumber(reagentConsumableInventory.getEnglishName() + "-" + formatter.format(date));
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
referenceMaterialService.save(referenceMaterial); referenceMaterialService.save(referenceMaterial);
@ -170,9 +194,13 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
reagentConsumableInventory.setTotalQuantity(1); reagentConsumableInventory.setTotalQuantity(1);
reagentConsumableInventory.setStorageLife(byId.getValidityPeriod()); reagentConsumableInventory.setStorageLife(byId.getValidityPeriod());
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
byId.setStatus(1); byId.setStatus(1);
if (reagentConsumableInventoryService.save(reagentConsumableInventory)&&standardReserveSolutionService byId.setWarehousingRemarks(warehousingRemarks);
if (reagentConsumableInventoryService.save(reagentConsumableInventory) && standardReserveSolutionService
.updateById(byId)) { .updateById(byId)) {
StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId()); StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId());
return byFullVOId; return byFullVOId;
@ -186,7 +214,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
//获取当前年月日 //获取当前年月日
Date date = new Date(); Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-mm-dd");
formatter.format(date); formatter.format(date);
//创建标准溶液对象,并生成编号 //创建标准溶液对象,并生成编号
@ -195,6 +223,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId()); referenceMaterial.setReagentConsumableId(one.getReagentConsumableId());
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId()); referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
referenceMaterial.setNumber(one.getEnglishName() + "-" + formatter.format(date)); referenceMaterial.setNumber(one.getEnglishName() + "-" + formatter.format(date));
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
referenceMaterialService.save(referenceMaterial); referenceMaterialService.save(referenceMaterial);
//将存储信息录入仓库表 //将存储信息录入仓库表
@ -205,6 +234,9 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
byId.setStatus(1); byId.setStatus(1);
byId.setWarehousingRemarks(warehousingRemarks);
if (standardReserveSolutionService.updateById(byId) && reagentConsumableInventoryService.updateById(one)) { if (standardReserveSolutionService.updateById(byId) && reagentConsumableInventoryService.updateById(one)) {
StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId()); StandardReserveSolutionFullVO byFullVOId = standardReserveSolutionService.getByFullVOId(byId.getId());
@ -222,8 +254,10 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
StandardReserveSolutionFullVO standardReserveSolutionFullVO = new StandardReserveSolutionFullVO(); StandardReserveSolutionFullVO standardReserveSolutionFullVO = new StandardReserveSolutionFullVO();
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>(); 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()); reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getConfigurationConcentration, standardReserveSolutionVOById.getConfigurationConcentration());
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper); ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
@ -232,6 +266,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
LocationVO locationById = latticeFormService.getLocationById(latticeId); LocationVO locationById = latticeFormService.getLocationById(latticeId);
//赋值FullVO对象 //赋值FullVO对象
BeanUtils.copyProperties(standardReserveSolutionVOById,standardReserveSolutionFullVO);
standardReserveSolutionFullVO.setStorageRoomFormName(locationById.getStorageRoomFormName()); standardReserveSolutionFullVO.setStorageRoomFormName(locationById.getStorageRoomFormName());
standardReserveSolutionFullVO.setCabinetFormNumber(locationById.getCabinetFormNumber()); standardReserveSolutionFullVO.setCabinetFormNumber(locationById.getCabinetFormNumber());
standardReserveSolutionFullVO.setLatticeFormNumber(locationById.getLatticeFormNumber()); standardReserveSolutionFullVO.setLatticeFormNumber(locationById.getLatticeFormNumber());
@ -241,5 +276,4 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
return standardReserveSolutionFullVO; return standardReserveSolutionFullVO;
} }
} }

@ -1,5 +1,8 @@
package digital.laboratory.platform.reagent.service.impl; 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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.entity.ReagentConsumables; import digital.laboratory.platform.reagent.entity.ReagentConsumables;
import digital.laboratory.platform.reagent.entity.WarehousingContent; import digital.laboratory.platform.reagent.entity.WarehousingContent;
@ -44,4 +47,30 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
} }
return warehousingContentVOList; 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; package digital.laboratory.platform.reagent.service.impl;
import cn.hutool.core.util.PageUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; 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.dto.WarehousingRecordFormDTO;
import digital.laboratory.platform.reagent.entity.*; import digital.laboratory.platform.reagent.entity.*;
import digital.laboratory.platform.reagent.mapper.WarehousingRecordFormMapper; import digital.laboratory.platform.reagent.mapper.WarehousingRecordFormMapper;
@ -157,6 +160,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory); BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory);
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase()); reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
reagentConsumableInventory.setStatus(1);
BatchDetails batchDetails = new BatchDetails(); BatchDetails batchDetails = new BatchDetails();
@ -374,7 +378,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
} }
@Override @Override
public List<WarehousingRecordFormVO> getWarehousingRecordFormVOList() { public Page<WarehousingRecordFormVO> getWarehousingRecordFormVOList(Page page) {
List<WarehousingRecordFormVO> warehousingRecordFormVOList = baseMapper.getWarehousingRecordFormVOList(); List<WarehousingRecordFormVO> warehousingRecordFormVOList = baseMapper.getWarehousingRecordFormVOList();
@ -403,7 +407,14 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
warehousingRecordFormVO.setWarehousingQuantity(y); warehousingRecordFormVO.setWarehousingQuantity(y);
warehousingRecordFormVO.setQuantityPurchased(x); 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 = "(标准物质名称)") @ApiModelProperty(value = "(标准物质名称)")
private String referenceSubstanceName; private String referenceSubstanceName;
@ApiModelProperty(value = "(领用人名称)")
private String recipientName; private String recipientName;
@ApiModelProperty(value = "(管理员名称)")
private String administratorName;
@ApiModelProperty(value = "(类别)")
private String category;
} }

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

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

@ -12,7 +12,7 @@
<result property="commitStatus" column="commit_status"/> <result property="commitStatus" column="commit_status"/>
<result property="instructionBook" column="instruction_book"/> <result property="instructionBook" column="instruction_book"/>
<result property="makerId" column="maker_id"/> <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="setTime" column="set_time"/>
<result property="technicalDirectorId" column="technical_director_id"/> <result property="technicalDirectorId" column="technical_director_id"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>

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

@ -13,7 +13,6 @@
<result property="instructionBookId" column="instruction_book_id"/> <result property="instructionBookId" column="instruction_book_id"/>
<result property="plannedVerificationCycle" column="planned_verification_cycle"/> <result property="plannedVerificationCycle" column="planned_verification_cycle"/>
<result property="scheduledVerificationDate" column="scheduled_verification_date"/> <result property="scheduledVerificationDate" column="scheduled_verification_date"/>
<result property="standardValueAndPurity" column="standard_value_and_purity"/>
<result property="verificationBasis" column="verification_basis"/> <result property="verificationBasis" column="verification_basis"/>
<result property="implementationDate" column="implementation_date"/> <result property="implementationDate" column="implementation_date"/>
<result property="verificationResult" column="verification_result"/> <result property="verificationResult" column="verification_result"/>
@ -22,6 +21,7 @@
<result property="createBy" column="create_by"/> <result property="createBy" column="create_by"/>
<result property="updateBy" column="update_by"/> <result property="updateBy" column="update_by"/>
<result property="checkScheduleId" column="check_schedule_id"/> <result property="checkScheduleId" column="check_schedule_id"/>
<result property="standardValueOrPurity" column="standard_value_or_purity"/>
</resultMap> </resultMap>
<resultMap id="periodVerificationPlanVO" type="digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO" <resultMap id="periodVerificationPlanVO" type="digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO"
@ -32,9 +32,6 @@
<sql id="getPeriodVerificationPlanVOSQL"> <sql id="getPeriodVerificationPlanVOSQL">
select pvp.*, 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 (SELECT user.name
FROM dlp_base.sys_user user FROM dlp_base.sys_user user
WHERE user.user_id=pvp.inspector_id ) as inspector_name 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"> <select id="getPeriodVerificationPlanVOList" resultMap="periodVerificationPlanVO" resultType="digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO">
<include refid="getPeriodVerificationPlanVOSQL"></include> <include refid="getPeriodVerificationPlanVOSQL"></include>
</select> </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> </mapper>

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

@ -37,6 +37,7 @@
<result property="specification" column="specification"/> <result property="specification" column="specification"/>
<result property="secondaryAuditorId" column="secondary_auditor_id"/> <result property="secondaryAuditorId" column="secondary_auditor_id"/>
<result property="approverId" column="approver_id"/> <result property="approverId" column="approver_id"/>
<result property="applicationContent" column="application_content"/>
</resultMap> </resultMap>
@ -50,7 +51,7 @@
<select id="getVOPage" resultMap="standardMaterialApprovalFormVO" resultType="digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO"> <select id="getVOPage" resultMap="standardMaterialApprovalFormVO" resultType="digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO">
SELECT smaf.*, 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.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.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 (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 srs.*,
(select user.name from dlp_base.sys_user user where user.user_id = srs.dispenser_id) as dispenser_name (select user.name from dlp_base.sys_user user where user.user_id = srs.dispenser_id) as dispenser_name
from standard_reserve_solution srs from standard_reserve_solution srs
where srs.status = 0 ${ew.customSqlSegment}
</select> </select>
</mapper> </mapper>

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

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