5.20
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
<junit.version>5.7.1</junit.version>
|
||||
</properties>
|
||||
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!--注册中心客户端-->
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba.cloud/spring-cloud-starter-alibaba-nacos-discovery -->
|
||||
@@ -33,6 +35,28 @@
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--QR Code-->
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>3.5.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>javase</artifactId>
|
||||
<version>3.5.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- AOP依赖 -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>1.8.13</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--配置中心客户端-->
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba.cloud/spring-cloud-starter-alibaba-nacos-config -->
|
||||
<dependency>
|
||||
@@ -41,6 +65,13 @@
|
||||
<version>2021.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 业务数据的依赖 -->
|
||||
<dependency>
|
||||
<groupId>digital.laboratory.platform</groupId>
|
||||
<artifactId>dlp-admin-api</artifactId>
|
||||
<version>2022.10.11-snapshots</version>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger -->
|
||||
<dependency>
|
||||
<groupId>digital.laboratory.platform</groupId>
|
||||
@@ -97,6 +128,7 @@
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- 数据库 mysql依赖 -->
|
||||
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
|
||||
<dependency>
|
||||
@@ -151,6 +183,13 @@
|
||||
<artifactId>dlp-admin-api</artifactId>
|
||||
<version>2022.10.11-snapshots</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>digital.laboratory.platform</groupId>-->
|
||||
<!-- <artifactId>dlp-common-seata</artifactId>-->
|
||||
<!-- <version>2022.10.11-snapshots</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@Configuration // ???
|
||||
@EnableDLPSwagger2
|
||||
@@ -14,12 +15,12 @@ import org.springframework.context.annotation.Configuration;
|
||||
@EnableDiscoveryClient
|
||||
@EnableDLPResourceServer
|
||||
@SpringBootApplication(scanBasePackages="digital.laboratory.platform")
|
||||
@EnableScheduling
|
||||
public class ReagentManagmentApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ReagentManagmentApplication.class, args);
|
||||
|
||||
|
||||
// System.out.println("\n\n\n");
|
||||
// System.out.println("-----------------------------");
|
||||
// System.out.println("end of Spring Application main()");
|
||||
|
||||
+5
-5
@@ -69,7 +69,7 @@ public class AcceptanceRecordFormController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')" )
|
||||
public R<AcceptanceRecordFormVO> getById(String acceptanceRecordFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -88,7 +88,7 @@ public class AcceptanceRecordFormController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询验收任务", notes = "分页查询验收任务")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_page')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_page')" )
|
||||
public R<IPage<AcceptanceRecordFormVO>> getAcceptanceRecordFormPage(Page<AcceptanceRecordForm> page, String reagentConsumableName, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -111,7 +111,7 @@ public class AcceptanceRecordFormController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询验收记录", notes = "分页查询验收记录")
|
||||
@GetMapping("/recordPage")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_recordPage')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_recordPage')" )
|
||||
public R<IPage<AcceptanceRecordFormVO>> getAcceptanceRecordFormRecordPage(Page<AcceptanceRecordForm> page, String reagentConsumableName, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -138,7 +138,7 @@ public class AcceptanceRecordFormController {
|
||||
@ApiOperation(value = "录入(验收记录表)", notes = "录入(验收记录表)")
|
||||
@SysLog("录入(验收记录表)")
|
||||
@PutMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_add')" )
|
||||
public R<AcceptanceRecordForm> postAddObject(@RequestBody AcceptanceRecordFormDTO acceptanceRecordFormDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -255,7 +255,7 @@ public class AcceptanceRecordFormController {
|
||||
@ApiOperation(value = "验收记录打印", notes = "验收记录打印")
|
||||
@SysLog("验收记录打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_print')")
|
||||
public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+6
-6
@@ -53,7 +53,7 @@ public class ApplicationForUseController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_get')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_get')")
|
||||
public R<ApplicationForUseVO> getById( String applicationForUseId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -74,7 +74,7 @@ public class ApplicationForUseController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_page')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_page')")
|
||||
public R<IPage<ApplicationForUseVO>> getApplicationForUsePage(Page<ApplicationForUse> page, ApplicationForUse applicationForUse, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -95,7 +95,7 @@ public class ApplicationForUseController {
|
||||
@ApiOperation(value = "新增(试剂耗材领用申请表)", notes = "新增(试剂耗材领用申请表)")
|
||||
@SysLog("新增(试剂耗材领用申请表)")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_add')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_add')")
|
||||
public R<ApplicationForUseVO> postAddObject(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -118,7 +118,7 @@ public class ApplicationForUseController {
|
||||
@ApiOperation(value = "修改(试剂耗材领用申请表)", notes = "修改(试剂耗材领用申请表)")
|
||||
@SysLog("修改(试剂耗材领用申请表)")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_edit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_edit')")
|
||||
public R<ApplicationForUseVO> putUpdateById(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -141,7 +141,7 @@ public class ApplicationForUseController {
|
||||
@ApiOperation(value = "通过id删除(试剂耗材领用申请表)", notes = "通过id删除(试剂耗材领用申请表)")
|
||||
@SysLog("通过id删除(试剂耗材领用申请表)")
|
||||
@DeleteMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_del')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_del')")
|
||||
public R<String> deleteById( String applicationForUseId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -161,7 +161,7 @@ public class ApplicationForUseController {
|
||||
@ApiOperation(value = "提交试剂耗材领用申请表", notes = "提交试剂耗材领用申请表")
|
||||
@SysLog("修改试剂耗材领用申请表")
|
||||
@PostMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_application_for_use_commit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_commit')")
|
||||
public R<ApplicationForUseVO> commitById(@RequestBody List<ApplicationForUseDTO> applicationForUseDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+51
-9
@@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.dto.CentralizedRequestDTO;
|
||||
import digital.laboratory.platform.reagent.entity.CentralizedRequest;
|
||||
@@ -17,6 +18,7 @@ import digital.laboratory.platform.reagent.entity.DetailsOfCentralized;
|
||||
import digital.laboratory.platform.reagent.service.CentralizedRequestService;
|
||||
import digital.laboratory.platform.reagent.service.DetailsOfCentralizedService;
|
||||
import digital.laboratory.platform.reagent.vo.CentralizedRequestVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseRequestPrintVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -27,6 +29,7 @@ import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.security.Principal;
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
@@ -48,6 +51,7 @@ import java.util.List;
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/centralized_request")
|
||||
@Api(value = "centralized_request", tags = "集中采购申请管理")
|
||||
@SuppressWarnings("all")
|
||||
public class CentralizedRequestController {
|
||||
|
||||
@Autowired
|
||||
@@ -56,6 +60,9 @@ public class CentralizedRequestController {
|
||||
@Autowired
|
||||
private final DetailsOfCentralizedService detailsOfCentralizedService;
|
||||
|
||||
@Autowired
|
||||
private final OssFile ossFile;
|
||||
|
||||
/**
|
||||
* 通过id查询(集中采购申请)
|
||||
*
|
||||
@@ -64,7 +71,7 @@ public class CentralizedRequestController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询集中采购申请", notes = "通过id查询集中采购申请")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_centralized_request_get')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_get')")
|
||||
public R<CentralizedRequestVO> getById(String centralizedRequestId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -88,7 +95,7 @@ public class CentralizedRequestController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('CentralizedPurchaseRequestList')")
|
||||
@PreAuthorize("@pms.hasPermission('CentralizedPurchaseRequestList')")
|
||||
public R<IPage<CentralizedRequestVO>> getCentralizedRequestPage(Page<CentralizedRequest> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -110,7 +117,7 @@ public class CentralizedRequestController {
|
||||
*/
|
||||
@ApiOperation(value = "采购计划整合集中采购申请分页查询", notes = "采购计划整合集中采购申请分页查询")
|
||||
@GetMapping("/list")
|
||||
// @PreAuthorize("@pms.hasPermission('centralized_request_list_plan')")
|
||||
@PreAuthorize("@pms.hasPermission('centralized_request_list_plan')")
|
||||
public R<List<CentralizedRequestVO>> getCentralizedRequestVOPage(@JsonFormat(pattern = "yyyy-MM-dd") Date startTime, @JsonFormat(pattern = "yyyy-MM-dd") Date endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -136,7 +143,7 @@ public class CentralizedRequestController {
|
||||
@ApiOperation(value = "保存集中采购申请", notes = "保存集中采购申请")
|
||||
@SysLog("新增集中采购申请")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_centralized_request_add')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_add')")
|
||||
public R<CentralizedRequest> postAddObject(@RequestBody List<CentralizedRequestDTO> centralizedRequestDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -161,7 +168,7 @@ public class CentralizedRequestController {
|
||||
@ApiOperation(value = "新增集中采购申请明细", notes = "新增集中采购申请明细")
|
||||
@SysLog("新增集中采购申请明细")
|
||||
@PostMapping("/details")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_add')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_add')")
|
||||
public R<DetailsOfCentralized> postAddDetails(@RequestBody CentralizedRequestDTO centralizedRequestDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = centralizedRequestService.addDetailsById(centralizedRequestDto);
|
||||
@@ -182,7 +189,7 @@ public class CentralizedRequestController {
|
||||
@ApiOperation(value = "提交集中采购申请", notes = "提交集中采购申请")
|
||||
@SysLog("提交集中采购申请")
|
||||
@PostMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_centralized_request_commit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_commit')")
|
||||
public R<CentralizedRequest> postCommitObject(@RequestBody List<CentralizedRequestDTO> centralizedRequestDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -208,7 +215,7 @@ public class CentralizedRequestController {
|
||||
@ApiOperation(value = "修改集中采购申请明细", notes = "修改集中采购申请明细")
|
||||
@SysLog("修改(集中采购申请)")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_centralized_request_edit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_edit')")
|
||||
public R<DetailsOfCentralized> putUpdateById(@RequestBody CentralizedRequestDTO centralizedRequestDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -258,7 +265,7 @@ public class CentralizedRequestController {
|
||||
@ApiOperation(value = "通过id删除集中采购申请", notes = "通过id删除集中采购申请")
|
||||
@SysLog("通过id删除集中采购申请")
|
||||
@DeleteMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_centralized_request_del')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_del')")
|
||||
public R<String> deleteById(String centralizedRequestId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -280,7 +287,7 @@ public class CentralizedRequestController {
|
||||
@ApiOperation(value = "通过id删除集中采购申请明细", notes = "通过id删除集中采购申请明细")
|
||||
@SysLog("通过id删除(集中采购申请)")
|
||||
@DeleteMapping("/details")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_del')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_del')")
|
||||
public R<DetailsOfCentralized> deleteDetailsById(String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
DetailsOfCentralized oldDetailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId);
|
||||
@@ -291,6 +298,41 @@ public class CentralizedRequestController {
|
||||
return R.failed(oldDetailsOfCentralized, "删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**-------标准物质停用报废销毁恢复降级使用审批表打印*/
|
||||
/**
|
||||
* 标准物质停用报废销毁恢复降级使用审批表打印
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "标准物质采购申请表打印", notes = "标准物质采购申请表打印")
|
||||
@SysLog("标准物质采购申请表打印")
|
||||
@PostMapping("/print")
|
||||
@PreAuthorize("@pms.hasPermission('purchase_request_print')")
|
||||
public void bizGetPDFInventory(String id, String type,HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
List<PurchaseRequestPrintVO> voList = centralizedRequestService.getPurchaseRequestPrintList(id, type);
|
||||
|
||||
if (voList == null) {
|
||||
throw new RuntimeException("未查询到相关信息");
|
||||
}
|
||||
String applyFileName = "标准物质采购申请表-" + id;
|
||||
|
||||
String pdfFilePath = "document" + "/" + "purchaseRequest" + "/" + id + "/" + applyFileName + ".pdf";
|
||||
try {
|
||||
//直接调用pdf方法
|
||||
centralizedRequestService.purchaseRequestTablePDF(voList,id,type, theHttpServletRequest, httpServletResponse);
|
||||
ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
|
||||
httpServletResponse.setContentType(applyFileName);
|
||||
} catch (Exception e) {
|
||||
System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage()));
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+6
-6
@@ -66,7 +66,7 @@ public class CheckScheduleController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询新增标准物质期间核查计划和确认表", notes = "通过id查询新增标准物质期间核查计划和确认表")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_schedule_get')" )
|
||||
public R<CheckSchedule> getById(String checkScheduleId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -85,7 +85,7 @@ public class CheckScheduleController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询新增标准物质期间核查计划和确认表", notes = "分页查询新增标准物质期间核查计划和确认表")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_page)" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_schedule_page')" )
|
||||
public R<IPage<CheckScheduleVO>> getCheckSchedulePage(Page<CheckSchedule> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") Date startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") Date endTime, String status, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -109,7 +109,7 @@ public class CheckScheduleController {
|
||||
@ApiOperation(value = "新增标准物质期间核查计划和确认表", notes = "新增标准物质期间核查计划和确认表")
|
||||
@SysLog("新增")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_schedule_add')" )
|
||||
public R<CheckScheduleVO> postAddObject(@RequestBody List<PeriodVerificationPlanDTO> periodVerificationPlanDTOS, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
@@ -133,7 +133,7 @@ public class CheckScheduleController {
|
||||
@ApiOperation(value = "修改标准物质期间核查计划和确认表", notes = "修改标准物质期间核查计划和确认表")
|
||||
@SysLog("修改")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_edit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_schedule_edit')" )
|
||||
public R<CheckSchedule> putUpdateById(@RequestBody List<PeriodVerificationPlanDTO> periodVerificationPlanDTOS, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -154,7 +154,7 @@ public class CheckScheduleController {
|
||||
@ApiOperation(value = "提交计划标准物质期间核查计划和确认表", notes = "提交计划标准物质期间核查计划和确认表")
|
||||
@SysLog("提交计划")
|
||||
@PostMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_commit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_schedule_commit')" )
|
||||
public R<CheckSchedule> commitById(@RequestBody List<PeriodVerificationPlanDTO> periodVerificationPlanDTOS, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -197,7 +197,7 @@ public class CheckScheduleController {
|
||||
@ApiOperation(value = "期间核查计划打印", notes = "期间核查计划打印")
|
||||
@SysLog("期间核查计划打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_schedule_print')")
|
||||
public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+8
-8
@@ -85,7 +85,7 @@ public class ComplianceCheckController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')" )
|
||||
public R<ComplianceCheckVO> getById(String complianceCheckId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -104,7 +104,7 @@ public class ComplianceCheckController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_page)")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_page')")
|
||||
public R<IPage<ComplianceCheckVO>> getComplianceCheckPage(Page<ComplianceCheck> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -152,7 +152,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "手动新增符合性检查记录表(试剂耗材)", notes = "手动新增符合性检查记录表(试剂耗材)")
|
||||
@SysLog("新增(符合性检查记录表)")
|
||||
@PostMapping("/addList")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_add')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_add')")
|
||||
public R<List<ComplianceCheck>> addCheckList(@RequestBody List<ComplianceCheckDTO> complianceCheckDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -176,7 +176,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "通过id删除(符合性检查记录表)", notes = "通过id删除(符合性检查记录表)")
|
||||
@SysLog("通过id删除(符合性检查记录表)")
|
||||
@DeleteMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
|
||||
public R<String> deleteById(String complianceCheckId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -200,7 +200,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "编辑符合性检查记录表", notes = "编辑符合性检查记录表")
|
||||
@SysLog("编辑符合性检查记录表")
|
||||
@PutMapping("/edit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_edit)" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_edit')" )
|
||||
public R<String> editCheckById(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -224,7 +224,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "录入符合性检查方案", notes = "录入符合性检查方案")
|
||||
@SysLog("编辑符合性检查记录表")
|
||||
@PutMapping("/addScheme")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_input')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_input')" )
|
||||
public R<String> addScheme(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -248,7 +248,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "提交符合性检查记录表", notes = "提交符合性检查记录表")
|
||||
@SysLog("提交符合性检查记录表")
|
||||
@PutMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_commit)" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_commit')" )
|
||||
public R<String> commitCheck(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -318,7 +318,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "试剂耗材符合性检查打印", notes = "试剂耗材符合性检查打印")
|
||||
@SysLog("试剂耗材符合性检查打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_print')")
|
||||
public void bizGetPDFInventory(String complianceCheckId, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+19
-12
@@ -14,13 +14,15 @@ import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.dto.DecentralizedRequestDTO;
|
||||
import digital.laboratory.platform.reagent.dto.PurchaseListDTO;
|
||||
import digital.laboratory.platform.reagent.entity.DecentralizeDetails;
|
||||
import digital.laboratory.platform.reagent.entity.DecentralizedRequest;
|
||||
import digital.laboratory.platform.reagent.entity.PurchaseList;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.service.DecentralizeDetailsService;
|
||||
import digital.laboratory.platform.reagent.service.DecentralizedRequestService;
|
||||
import digital.laboratory.platform.reagent.service.PurchaseListService;
|
||||
import digital.laboratory.platform.reagent.vo.DecentralizedRequestVO;
|
||||
import digital.laboratory.platform.reagent.vo.ProcurementContentVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseRequestPrintVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchasingPlanVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -32,6 +34,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.security.Principal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -61,6 +64,8 @@ public class DecentralizedRequestController {
|
||||
@Autowired
|
||||
private PurchaseListService purchaseListService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询(分散采购申请)
|
||||
*
|
||||
@@ -69,7 +74,7 @@ public class DecentralizedRequestController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询分散采购申请", notes = "通过id查询分散采购申请")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')")
|
||||
public R<DecentralizedRequestVO> getById(String decentralizedRequestId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -88,7 +93,7 @@ public class DecentralizedRequestController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')")
|
||||
public R<IPage<DecentralizedRequestVO>> getDecentralizedRequestPage(Page<DecentralizedRequest> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime , @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -113,7 +118,7 @@ public class DecentralizedRequestController {
|
||||
@ApiOperation(value = "保存分散采购申请", notes = "保存分散采购申请")
|
||||
@SysLog("新增分散采购申请")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_add')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_add')")
|
||||
public R<DecentralizedRequest> postAddObject(@RequestBody List<DecentralizedRequestDTO> decentralizedRequestDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -141,7 +146,7 @@ public class DecentralizedRequestController {
|
||||
@ApiOperation(value = "新增分散采购申请明细", notes = "新增分散采购申请明细")
|
||||
@SysLog("新增分散采购申请明细")
|
||||
@PostMapping("/addDetails")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_add')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_add')")
|
||||
public R<DecentralizeDetails> addDetails(@RequestBody DecentralizedRequestDTO decentralizedRequestDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -169,7 +174,7 @@ public class DecentralizedRequestController {
|
||||
@ApiOperation(value = "修改分散采购申请明细", notes = "修改分散采购申请明细")
|
||||
@SysLog("修改(分散采购申请)")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_edit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_edit')")
|
||||
public R<DecentralizeDetails> putUpdateById(@RequestBody DecentralizedRequestDTO decentralizedRequestDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -192,7 +197,7 @@ public class DecentralizedRequestController {
|
||||
@ApiOperation(value = "通过id删除分散采购申请", notes = "通过id删除分散采购申请")
|
||||
@SysLog("通过id删除(分散采购申请)")
|
||||
@DeleteMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_del')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_del')")
|
||||
public R<String> deleteById(String decentralizedRequestId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -213,7 +218,7 @@ public class DecentralizedRequestController {
|
||||
@ApiOperation(value = "通过id删除分散采购申请明细", notes = "通过id删除分散采购申请明细")
|
||||
@SysLog("通过id删除分散采购申请明细")
|
||||
@DeleteMapping("/details")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralize_details_del')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_del')")
|
||||
public R<DecentralizeDetails> deleteDetailsById(String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -238,7 +243,7 @@ public class DecentralizedRequestController {
|
||||
@ApiOperation(value = "提交分散采购申请", notes = "提交分散采购申请")
|
||||
@SysLog("提交分散采购申请明细")
|
||||
@PutMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_commit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_commit')")
|
||||
public R<DecentralizedRequest> commitById(@RequestBody List<DecentralizedRequestDTO> decentralizedRequestDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -330,7 +335,7 @@ public class DecentralizedRequestController {
|
||||
@ApiOperation(value = "审批分散采购申请", notes = "审批分散采购申请")
|
||||
@SysLog("审批分散采购申请明细")
|
||||
@PutMapping("/approve")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_approve')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_approve')")
|
||||
public R<DecentralizedRequest> approveRequest(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -346,4 +351,6 @@ public class DecentralizedRequestController {
|
||||
return R.ok(decentralizedRequest, "审批成功");
|
||||
} else return R.failed("审批失败");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -58,7 +58,7 @@ public class DeliveryRegistrationFormController {
|
||||
*/
|
||||
@ApiOperation(value = "通过ID查询", notes = "通过ID查询")
|
||||
@GetMapping( )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
|
||||
public R<DeliveryRegistrationFormVO> getById(String deliveryRegistrationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -75,7 +75,7 @@ public class DeliveryRegistrationFormController {
|
||||
*/
|
||||
@ApiOperation(value = "通过领取码查询", notes = "通过领取码查询")
|
||||
@GetMapping("/code")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
|
||||
public R<DeliveryRegistrationFormVO> getDeliveryRegistrationFormVOByCode(String claimCode, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -93,7 +93,7 @@ public class DeliveryRegistrationFormController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_page')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_page')" )
|
||||
public R<IPage<DeliveryRegistrationFormVO>> getDeliveryRegistrationFormPage(Page<DeliveryRegistrationForm> page, DeliveryRegistrationForm deliveryRegistrationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -126,7 +126,7 @@ public class DeliveryRegistrationFormController {
|
||||
@ApiOperation(value = "提交(试剂耗材出库登记表)", notes = "提交(试剂耗材出库登记表)")
|
||||
@SysLog("提交(试剂耗材出库登记表)" )
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_commit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_commit')" )
|
||||
public R<DeliveryRegistrationForm> postAddObject(@RequestBody List<OutgoingContentsDTO> outgoingContentsDTOS, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
+2
-2
@@ -54,7 +54,7 @@ public class EvaluationFormController {
|
||||
@ApiOperation(value = "通过id查询(服务商/供应商评价表)", notes = "通过id查询(服务商/供应商评价表)")
|
||||
@SysLog("通过id查询(服务商/供应商评价表)" )
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_form_get')" )
|
||||
public R<EvaluationFormVO> getEvaluationFormVO(String id, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -75,7 +75,7 @@ public class EvaluationFormController {
|
||||
@ApiOperation(value = "录入并提交(服务商/供应商评价表)", notes = "录入并提交(服务商/供应商评价表)")
|
||||
@SysLog("录入并提交(服务商/供应商评价表)" )
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_form_add')" )
|
||||
public R<EvaluationForm> postAddObject(@RequestBody EvaluationFormDTO evaluationFormDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+3
-3
@@ -112,7 +112,7 @@ public class InstructionBookController {
|
||||
|
||||
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
|
||||
|
||||
instructionBookService.save(instructionBook1);
|
||||
instructionBookService.updateById(instructionBook1);
|
||||
|
||||
return R.ok(instructionBook1, "上传成功");
|
||||
} else return R.failed("上传失败");
|
||||
@@ -188,11 +188,11 @@ public class InstructionBookController {
|
||||
@SysLog("审核(标准物质期间核查指导书)(标准物质期间核查指导书)")
|
||||
@PostMapping("/audit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_audit')")
|
||||
public R<InstructionBookVO> auditById(AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
public R<InstructionBookVO> auditById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
InstructionBook instructionBook = instructionBookService.auditById(auditAndApproveDTO, dlpUser);
|
||||
InstructionBookVO instructionBook = instructionBookService.auditById(auditAndApproveDTO, dlpUser);
|
||||
|
||||
InstructionBookVO vo = instructionBookService.getVO(instructionBook.getReferenceMaterialTypeId());
|
||||
|
||||
|
||||
+10
-9
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -62,7 +63,7 @@ public class PeriodVerificationImplementationController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" )
|
||||
public R<PeriodVerificationImplementation> getById(String periodVerificationImplementationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -76,20 +77,20 @@ public class PeriodVerificationImplementationController {
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param periodVerificationImplementation (标准物质期间核查实施情况及结果记录表)
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_page')" )
|
||||
public R<IPage<PeriodVerificationImplementationVO>> getPeriodVerificationImplementationPage(Page<PeriodVerificationImplementation> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, String referenceMaterialName, PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_page')" )
|
||||
public R<IPage<PeriodVerificationImplementationVO>> getPeriodVerificationImplementationPage(Page<PeriodVerificationImplementation> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") java.time.LocalDate endTime, String referenceMaterialName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<PeriodVerificationImplementationVO> periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.<PeriodVerificationImplementation>query()
|
||||
.like(StrUtil.isNotBlank(referenceMaterialName), "reference_material_name", referenceMaterialName)
|
||||
.ge("create_time", startTime)
|
||||
.le("create_time", endTime)
|
||||
.ge(startTime!=null,"create_time", startTime)
|
||||
.le(endTime!=null,"create_time", endTime)
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(periodVerificationImplementationSList);
|
||||
@@ -106,7 +107,7 @@ public class PeriodVerificationImplementationController {
|
||||
@ApiOperation(value = "录入(标准物质期间核查实施情况及结果记录表)", notes = "录入((标准物质期间核查实施情况及结果记录表)")
|
||||
@SysLog("录入((标准物质期间核查实施情况及结果记录表)")
|
||||
@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) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -153,7 +154,7 @@ public class PeriodVerificationImplementationController {
|
||||
@ApiOperation(value = "提交(标准物质期间核查实施情况及结果记录表)", notes = "提交(标准物质期间核查实施情况及结果记录表)")
|
||||
@SysLog("提交(标准物质期间核查实施情况及结果记录表)")
|
||||
@PostMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_commit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_commit')" )
|
||||
public R<PeriodVerificationImplementation> commitById(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -201,7 +202,7 @@ public class PeriodVerificationImplementationController {
|
||||
@ApiOperation(value = "标准物质期间核查计划和确认表打印", notes = "标准物质期间核查计划和确认表打印")
|
||||
@SysLog("期间核查计划打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_print')")
|
||||
public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+12
-12
@@ -91,7 +91,7 @@ public class PurchaseCatalogueController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询已发布的采购目录明细", notes = "分页查询已发布的采购目录明细")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_pages')")
|
||||
public R<List<CatalogueDetails>> getPurchaseCataloguePage(String name,HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -112,7 +112,7 @@ public class PurchaseCatalogueController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询制定编辑的采购目录", notes = "分页查询制定编辑的采购目录")
|
||||
@GetMapping("/pages")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_pages')")
|
||||
public R<IPage<PurchaseCatalogueVO>> getPurchaseCatalogueVOPage(Page<PurchaseCatalogue> page,@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
IPage<PurchaseCatalogueVO> purchaseCatalogueVOPage = purchaseCatalogueService.getPurchaseCatalogueVOPage(page, Wrappers.<PurchaseCatalogue>query().orderByDesc("create_time"));
|
||||
@@ -139,7 +139,7 @@ public class PurchaseCatalogueController {
|
||||
*/
|
||||
@ApiOperation(value = "主页点击一行通过id查询", notes = "主页点击一行通过id查询")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_get')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_get')")
|
||||
public R<PurchaseCatalogueVO> getById(String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -167,7 +167,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "保存采购目录", notes = "保存采购目录")
|
||||
@SysLog("新增(采购目录)")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_add')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_add')")
|
||||
public R<PurchaseCatalogue> postAddObject(@RequestBody List<PurchaseCatalogueDTO> purchaseCatalogueDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -193,7 +193,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "修改采购目录明细", notes = "修改采购目录明细")
|
||||
@SysLog("修改明细采购目录明细")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_catalogue_details_edit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_edit')")
|
||||
public R<CatalogueDetails> putUpdateById(@RequestBody PurchaseCatalogueDTO purchaseCatalogueDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -218,7 +218,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "创建采购目录明细", notes = "创建采购目录明细")
|
||||
@SysLog("创建采购目录明细")
|
||||
@PostMapping("/details")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_catalogue_details_add')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_add')")
|
||||
public R<CatalogueDetails> addDetails(@RequestBody PurchaseCatalogueDTO purchaseCatalogueDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -243,7 +243,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "通过id删除采购目录", notes = "通过id删除采购目录")
|
||||
@SysLog("通过id删除采购目录")
|
||||
@DeleteMapping("/catalogue")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_del')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_del')")
|
||||
public R<String> deleteById(String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -267,7 +267,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "通过id删除采购目录明细", notes = "通过id删除采购目录明细")
|
||||
@SysLog("通过id删除采购目录")
|
||||
@DeleteMapping("/details")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_catalogue_details_del')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_del')")
|
||||
public R<CatalogueDetails> deleteDetailsById(String catalogueDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -292,7 +292,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "提交采购目录", notes = "提交采购目录")
|
||||
@SysLog("提交采购目录")
|
||||
@PostMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_commit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_commit')")
|
||||
public R<PurchaseCatalogue> commitById(@RequestBody List<PurchaseCatalogueDTO> purchaseCatalogueDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -367,7 +367,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "发布采购目录", notes = "发布采购目录")
|
||||
@SysLog("发布采购目录")
|
||||
@PutMapping("/release")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_release')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_release')")
|
||||
public R<PurchaseCatalogue> releaseById( String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.releaseCatalogue(purchaseCatalogueId);
|
||||
@@ -389,7 +389,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "导入采购目录", notes = "导入采购目录")
|
||||
@SysLog("导入采购目录")
|
||||
@PostMapping("/import")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_release')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_import')")
|
||||
public R<PurchaseCatalogue> getImport( @RequestBody List<PurchaseCatalogueDTO> purchaseCatalogueDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
PurchaseCatalogueVO anImport = purchaseCatalogueService.getImport(purchaseCatalogueDTOList);
|
||||
@@ -408,7 +408,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "采购目录打印", notes = "采购目录打印")
|
||||
@SysLog("采购目录打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_print')")
|
||||
public void bizGetPDFInventory(String purchaseCatalogueId, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+69
-62
@@ -1,5 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
@@ -8,13 +9,12 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.PurchaseListDTO;
|
||||
import digital.laboratory.platform.reagent.entity.PurchaseList;
|
||||
import digital.laboratory.platform.reagent.entity.PurchaseListDetails;
|
||||
import digital.laboratory.platform.reagent.service.PurchaseListService;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseListPageVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseListVO;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import org.joda.time.DateTime;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -38,105 +38,112 @@ import java.util.List;
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (采购清单) 前端控制器
|
||||
*
|
||||
* <p>
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/purchase_list" )
|
||||
@RequestMapping("/purchase_list")
|
||||
@Api(value = "purchase_list", tags = "(采购清单)管理")
|
||||
public class PurchaseListController {
|
||||
|
||||
private final PurchaseListService purchaseListService;
|
||||
private final PurchaseListService purchaseListService;
|
||||
private final OssFile ossFile;
|
||||
|
||||
/**
|
||||
* 通过id查询(采购清单)
|
||||
* @param purchaseListId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping( )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')" )
|
||||
public R<PurchaseList> getById(String purchaseListId, HttpServletRequest theHttpServletRequest) {
|
||||
/**
|
||||
* 通过id查询(采购清单)
|
||||
*
|
||||
* @param purchaseListId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')")
|
||||
public R<PurchaseList> getById(String purchaseListId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchaseListVO purchaseList = purchaseListService.getPurchaseList(purchaseListId);
|
||||
PurchaseListVO purchaseList = purchaseListService.getPurchaseList(purchaseListId);
|
||||
|
||||
return R.ok(purchaseList);
|
||||
}
|
||||
return R.ok(purchaseList);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_page')" )
|
||||
public R<IPage<PurchaseListPageVO>> getPurchaseListPage(Page<PurchaseList> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime , @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_page')")
|
||||
public R<IPage<PurchaseListPageVO>> getPurchaseListPage(Page<PurchaseList> page, Integer status, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<PurchaseListPageVO> purchaseListSList = purchaseListService.getPurchaseListVOPage(page, Wrappers.<PurchaseList>query()
|
||||
.ge(startTime!=null,"create_time",startTime)
|
||||
.le(endTime!=null,"create_time",endTime)
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(purchaseListSList);
|
||||
IPage<PurchaseListPageVO> purchaseListSList = purchaseListService.getPurchaseListVOPage(page, Wrappers.<PurchaseList>query()
|
||||
.eq(status != null, "status", status)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(purchaseListSList);
|
||||
// return R.ok(purchaseListService.page(page, Wrappers.query(purchaseList)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增(采购清单)
|
||||
*
|
||||
* @param purchaseListDTO (采购清单)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改采购清单明细", notes = "修改采购清单明细")
|
||||
@SysLog("修改采购清单明细" )
|
||||
@SysLog("修改采购清单明细")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_add')" )
|
||||
public R<String > postAddObject(@RequestBody List <PurchaseListDTO> purchaseListDTO, HttpServletRequest theHttpServletRequest) {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_add')")
|
||||
public R<String> postAddObject(@RequestBody List<PurchaseListDTO> purchaseListDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
purchaseListService.editById(purchaseListDTO);
|
||||
purchaseListService.editById(purchaseListDTO);
|
||||
|
||||
return R.ok("添加成功");
|
||||
return R.ok("添加成功");
|
||||
}
|
||||
/**
|
||||
* 新增(采购清单)
|
||||
* @param id (采购清单)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "提交采购清单明细", notes = "提交采购清单明细")
|
||||
@SysLog("提交采购清单明细" )
|
||||
@PutMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_commit)" )
|
||||
public R<PurchaseList> commitById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
/**
|
||||
* 新增(采购清单)
|
||||
*
|
||||
* @param id (采购清单)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "提交采购清单明细", notes = "提交采购清单明细")
|
||||
@SysLog("提交采购清单明细")
|
||||
@PutMapping("/commit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_commit')")
|
||||
public R<PurchaseList> commitById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
PurchaseList purchaseList = purchaseListService.commitById(id);
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchaseList purchaseList = purchaseListService.commitById(id);
|
||||
|
||||
if (purchaseList != null) {
|
||||
return R.ok(purchaseList, "提交成功");
|
||||
} else {
|
||||
return R.failed(purchaseList, "提交失败");
|
||||
}
|
||||
}
|
||||
|
||||
if (purchaseList!=null) {
|
||||
return R.ok(purchaseList, "提交成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(purchaseList, "提交失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+10
-10
@@ -84,7 +84,7 @@ public class PurchasingPlanController {
|
||||
*/
|
||||
@ApiOperation(value = "点击一行通过id查询采购计划明细", notes = "点击一行通过id查询采购计划明细")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')")
|
||||
public R<PurchasingPlan> getById(String purchasingPlanId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -103,7 +103,7 @@ public class PurchasingPlanController {
|
||||
*/
|
||||
@ApiOperation(value = "查询换货信息", notes = "查询换货信息")
|
||||
@GetMapping("/replacement")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_replacemen')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_replacemen')")
|
||||
public R<ReplacementVO> getReplacementVO(String id, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -122,7 +122,7 @@ public class PurchasingPlanController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')")
|
||||
public R<IPage<PurchasingPlanVO>> getPurchasingPlanPage(Page<PurchasingPlan> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime,
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
@@ -156,7 +156,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "新增(采购计划)", notes = "新增(采购计划) 参数DTO:(detailsOfCentralizedId,quantity = ,)")
|
||||
@SysLog("新增(采购计划)")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_add')" )
|
||||
public R<PurchasingPlanVO> postAddObject(@RequestBody List<PurchasingPlanDTO> purchasingPlanDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -179,7 +179,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "修改采购计划明细", notes = "修改采购计划明细")
|
||||
@SysLog("修改(采购计划)")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_procurement_content_edit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_procurement_content_edit')")
|
||||
public R<ProcurementContent> putUpdateById(@RequestBody PurchasingPlanDTO purchasingPlanDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -204,7 +204,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "修改采购计划合并明细", notes = "修改采购计划合并明细")
|
||||
@SysLog("修改(采购计划)")
|
||||
@PutMapping("/details")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_procurement_content_merge')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_procurement_content_merge')")
|
||||
public R<ProcurementContent> editDetails(@RequestBody PurchasingPlanDTO purchasingPlanDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -229,7 +229,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "通过id删除采购计划明细", notes = "通过id删除采购计划明细")
|
||||
@SysLog("通过id删除采购计划明细")
|
||||
@DeleteMapping("/content")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_procurement_content_del')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_procurement_content_del')")
|
||||
public R<String> deleteContentById(String procurementContentId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -253,7 +253,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "提交采购计划", notes = "提交采购计划")
|
||||
@SysLog("修改(采购计划)")
|
||||
@PutMapping("/commit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_commit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_commit')")
|
||||
public R<PurchasingPlan> commitById(String purchasingPlanId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -278,7 +278,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "换货", notes = "换货")
|
||||
@SysLog("(换货)")
|
||||
@PutMapping("/replacement")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_replacemen')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_replacemen')")
|
||||
public R<ProcurementContent> replacementById(@RequestBody PurchasingPlanDTO purchasingPlanDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -354,7 +354,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "采购计划打印", notes = "采购计划打印")
|
||||
@SysLog("采购计划打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_print')")
|
||||
public void bizGetPDFInventory(String purchasingPlanId, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+109
-80
@@ -11,12 +11,13 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.config.QRCodeUtils;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -24,11 +25,14 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
import java.sql.Date;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -54,23 +58,7 @@ public class ReagentConsumableInventoryController {
|
||||
|
||||
private final ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
/**
|
||||
* 通过id查询试剂耗材库存
|
||||
*
|
||||
* @param reagentConsumableInventoryId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{reagentConsumableInventoryId}")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<ReagentConsumableInventory> getById(@PathVariable("reagentConsumableInventoryId") String reagentConsumableInventoryId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(reagentConsumableInventoryId);
|
||||
return R.ok(reagentConsumableInventory);
|
||||
//return R.ok(reagentConsumableInventoryService.getById(reagentConsumableInventoryId));
|
||||
}
|
||||
private final OssFile ossFile;
|
||||
|
||||
/**
|
||||
* @param
|
||||
@@ -78,7 +66,7 @@ public class ReagentConsumableInventoryController {
|
||||
*/
|
||||
@ApiOperation(value = "标准物质列表", notes = "标准物质列表")
|
||||
@GetMapping("/RList")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<Page<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryPage(Integer current, Integer size, String reagentConsumableName, Integer referenceMaterialStatus, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -93,20 +81,21 @@ public class ReagentConsumableInventoryController {
|
||||
}
|
||||
|
||||
|
||||
Page<ReagentConsumableInventoryFullVO> allList = reagentConsumableInventoryService.getAllList(current, size, reagentConsumableInventoryQueryWrapper,referenceMaterialStatus);
|
||||
Page<ReagentConsumableInventoryFullVO> allList = reagentConsumableInventoryService.getAllList(current, size, reagentConsumableInventoryQueryWrapper, referenceMaterialStatus);
|
||||
return R.ok(allList);
|
||||
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
|
||||
@GetMapping("/standardList")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<IPage<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page<ReagentConsumableInventory> page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, Wrappers.<ReagentConsumableInventory>query()
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName),"reagent_consumable_name",reagentConsumableName)
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.eq("category", "标准物质").or()
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.eq("category", "标准储备溶液"));
|
||||
return R.ok(reagentConsumableInventoryRMVOList);
|
||||
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
|
||||
@@ -114,13 +103,14 @@ public class ReagentConsumableInventoryController {
|
||||
|
||||
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
|
||||
@GetMapping("/List")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<IPage<ReagentConsumableInventoryVO>> getList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, Wrappers.<ReagentConsumableInventory>query()
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName),"reagent_consumable_name",reagentConsumableName)
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.eq("category", "试剂").or()
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.eq("category", "耗材"));
|
||||
return R.ok(reagentConsumableInventoryRMVOList);
|
||||
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
|
||||
@@ -133,12 +123,20 @@ public class ReagentConsumableInventoryController {
|
||||
*/
|
||||
@ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表")
|
||||
@GetMapping("/MList")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<Page<ReagentConsumableInventoryFullVO>> getReferenceMaterialVOList(Integer current, Integer size, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<IPage<ReagentConsumableInventoryFullVO>> getReferenceMaterialVOList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
Page<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(current, size, reagentConsumableName);
|
||||
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
IPage<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(page, reagentConsumableInventoryQueryWrapper
|
||||
.eq("category", "试剂")
|
||||
.like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName).or()
|
||||
.eq("category", "耗材")
|
||||
.like(!StrUtil.isEmpty(reagentConsumableName), "reagent_consumable_name", reagentConsumableName));
|
||||
|
||||
|
||||
return R.ok(allRM);
|
||||
}
|
||||
|
||||
@@ -150,93 +148,124 @@ public class ReagentConsumableInventoryController {
|
||||
*/
|
||||
@ApiOperation(value = "试剂耗材/标准物质集合列表", notes = "试剂耗材/标准物质集合列表")
|
||||
@GetMapping("/full")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<List<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull( String category,String name, HttpServletRequest theHttpServletRequest) {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<List<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull(String category, String name, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (category!=null){
|
||||
reagentConsumableInventoryQueryWrapper.eq("category",category);
|
||||
if (category != null) {
|
||||
reagentConsumableInventoryQueryWrapper.eq("category", category);
|
||||
}
|
||||
if (name!=null){
|
||||
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name",name);
|
||||
if (name != null) {
|
||||
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", name);
|
||||
}
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFull = reagentConsumableInventoryService.getReagentConsumableInventoryFull(Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq((StrUtil.isNotBlank(category)),"category",category)
|
||||
.like((StrUtil.isNotBlank(name)),"reagent_consumable_name",name));
|
||||
.eq((StrUtil.isNotBlank(category)), "category", category)
|
||||
.like((StrUtil.isNotBlank(name)), "reagent_consumable_name", name));
|
||||
|
||||
return R.ok(reagentConsumableInventoryFull);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**-------标准物质一览表打印*/
|
||||
/**
|
||||
* 新增试剂耗材库存
|
||||
* 标准物质一览表打印
|
||||
*
|
||||
* @param reagentConsumableInventory 试剂耗材库存
|
||||
* @return R
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增试剂耗材库存", notes = "新增试剂耗材库存")
|
||||
@SysLog("新增试剂耗材库存")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_add')" )
|
||||
public R<ReagentConsumableInventory> postAddObject(@RequestBody ReagentConsumableInventory reagentConsumableInventory, HttpServletRequest theHttpServletRequest) {
|
||||
@ApiOperation(value = "标准物质一览表打印", notes = "标准物质一览表打印")
|
||||
@SysLog("标准物质一览表打印")
|
||||
@PostMapping("/print")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_print')")
|
||||
public void bizGetPDFInventory( HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
|
||||
if (reagentConsumableInventoryService.save(reagentConsumableInventory)) {
|
||||
return R.ok(reagentConsumableInventory, "对象创建成功");
|
||||
} else {
|
||||
return R.failed(reagentConsumableInventory, "对象创建失败");
|
||||
String id = IdWorker.get32UUID().toUpperCase();
|
||||
|
||||
List<ReferenceMaterialVO> voList = referenceMaterialService.getReferenceMaterialList();
|
||||
|
||||
if (voList.isEmpty()) {
|
||||
throw new RuntimeException("未查询到相关信息");
|
||||
}
|
||||
|
||||
|
||||
String applyFileName = "标准物质一览表-" + id;
|
||||
|
||||
String pdfFilePath = "document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".pdf";
|
||||
try {
|
||||
//直接调用pdf方法
|
||||
reagentConsumableInventoryService.referenceMaterialTablePDF(voList, id, theHttpServletRequest, httpServletResponse);
|
||||
ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
|
||||
httpServletResponse.setContentType(applyFileName);
|
||||
} catch (Exception e) {
|
||||
System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage()));
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试剂耗材库存
|
||||
* 生成 QRCODE 图像
|
||||
*
|
||||
* @param reagentConsumableInventory 试剂耗材库存
|
||||
* @return R
|
||||
* @param code QRCODE字符串
|
||||
*
|
||||
* @return R<CaseEventVO>
|
||||
*/
|
||||
@ApiOperation(value = "修改试剂耗材库存", notes = "修改试剂耗材库存")
|
||||
@SysLog("修改试剂耗材库存")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_edit')" )
|
||||
public R<ReagentConsumableInventory> putUpdateById(@RequestBody ReagentConsumableInventory reagentConsumableInventory, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (reagentConsumableInventoryService.updateById(reagentConsumableInventory)) {
|
||||
return R.ok(reagentConsumableInventory, "保存对象成功");
|
||||
} else {
|
||||
return R.failed(reagentConsumableInventory, "保存对象失败");
|
||||
@ApiOperation(value = "生成 QRCODE 图像", notes = "生成 QRCODE 图像")
|
||||
@GetMapping("/qrcode")
|
||||
public void genQRCode(String code, HttpServletResponse httpServletResponse) throws IOException {
|
||||
try {
|
||||
// QR Code
|
||||
httpServletResponse.setContentType("image/png");
|
||||
BufferedImage qrImage = QRCodeUtils.genQRCode(code, 150, 150);
|
||||
ImageIO.write(qrImage, "png", httpServletResponse.getOutputStream());
|
||||
} catch (Exception e) {
|
||||
httpServletResponse.sendError(501, e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除试剂耗材库存
|
||||
* 生成 BARCODE 图像
|
||||
*
|
||||
* @param reagentConsumableInventoryId id
|
||||
* @return R
|
||||
* @param code QRCODE字符串
|
||||
*
|
||||
* @return R<CaseEventVO>
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除试剂耗材库存", notes = "通过id删除试剂耗材库存")
|
||||
@SysLog("通过id删除试剂耗材库存")
|
||||
@DeleteMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_del')" )
|
||||
public R<ReagentConsumableInventory> deleteById(String reagentConsumableInventoryId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@ApiOperation(value = "生成条形码", notes = "生成条形码")
|
||||
@GetMapping("/code")
|
||||
@PreAuthorize("@pms.hasAnyPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
|
||||
ReagentConsumableInventory oldReagentConsumableInventory = reagentConsumableInventoryService.getById(reagentConsumableInventoryId);
|
||||
public String getBarCodeImageBase64( String code, HttpServletResponse httpServletResponse) throws IOException {
|
||||
|
||||
|
||||
return reagentConsumableInventoryService.buildCodeLabelContent(code);
|
||||
|
||||
if (reagentConsumableInventoryService.removeById(reagentConsumableInventoryId)) {
|
||||
return R.ok(oldReagentConsumableInventory, "对象删除成功");
|
||||
} else {
|
||||
return R.failed(oldReagentConsumableInventory, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成 BARCODE 图像
|
||||
*
|
||||
* @param code QRCODE字符串
|
||||
*
|
||||
* @return R<CaseEventVO>
|
||||
*/
|
||||
@ApiOperation(value = "扫码录入物品编码", notes = "扫码录入物品编码")
|
||||
@PutMapping("/code")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<String> setCode( String id,String code,HttpServletResponse httpServletResponse) {
|
||||
|
||||
reagentConsumableInventoryService.setCode(id,code);
|
||||
|
||||
return R.ok("录入成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+5
-3
@@ -54,14 +54,16 @@ public class ReagentConsumablesController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询试剂耗材类(包括标准物质)", notes = "分页查询试剂耗材类(包括标准物质)")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
|
||||
public R<List<ReagentConsumables>> getReagentConsumablesPage(Page<ReagentConsumables> page, String name, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
List<ReagentConsumables> list = reagentConsumablesService.list(Wrappers.<ReagentConsumables>query()
|
||||
.eq("category", "试剂").or()
|
||||
.eq("category", "耗材").or()
|
||||
.eq("category", "试剂")
|
||||
.like(StrUtil.isNotBlank(name), "reagent_consumable_name", name).or()
|
||||
.eq("category", "耗材")
|
||||
.like(StrUtil.isNotBlank(name), "reagent_consumable_name", name).or()
|
||||
.eq("category", "标准物质")
|
||||
.like(StrUtil.isNotBlank(name), "reagent_consumable_name", name)
|
||||
.orderByDesc("create_time")
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class RequisitionRecordController {
|
||||
@ApiOperation(value = "试剂耗材领用记录表打印", notes = "试剂耗材领用记录表打印")
|
||||
@SysLog("试剂耗材领用申请表打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_print')")
|
||||
public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+19
-10
@@ -67,7 +67,7 @@ public class StandardMaterialApprovalFormController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
|
||||
public R<StandardMaterialApprovalFormVO> getById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -86,7 +86,7 @@ public class StandardMaterialApprovalFormController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_page)" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_page')" )
|
||||
public R<IPage<StandardMaterialApprovalFormVO>> getStandardMaterialApprovalFormPage(Page<StandardMaterialApprovalForm> page, String referenceMaterialName, @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startTime,
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -112,7 +112,7 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("新增(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
|
||||
public R<StandardMaterialApprovalForm> postAddObject(@RequestBody StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -198,19 +198,28 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "标准物质停用", notes = "标准物质停用")
|
||||
@SysLog("标准物质停用")
|
||||
@PostMapping("/deactivate")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_deactivate')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_deactivate')" )
|
||||
public R<String> editById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(id);
|
||||
|
||||
byId.setStatus(-1);
|
||||
|
||||
if (referenceMaterialService.updateById(byId)) {
|
||||
return R.ok("停用成功");
|
||||
if (byId.getStatus() == -1) {
|
||||
byId.setStatus(0);
|
||||
if (referenceMaterialService.updateById(byId)) {
|
||||
return R.ok("启用成功");
|
||||
} else {
|
||||
return R.failed("启用失败");
|
||||
}
|
||||
} else {
|
||||
return R.failed("停用失败");
|
||||
byId.setStatus(-1);
|
||||
|
||||
if (referenceMaterialService.updateById(byId)) {
|
||||
return R.ok("停用成功");
|
||||
} else {
|
||||
return R.failed("停用失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +233,7 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "标准物质停用报废销毁恢复降级使用审批表打印", notes = "标准物质停用报废销毁恢复降级使用审批表打印")
|
||||
@SysLog("标准物质停用报废销毁恢复降级使用审批表打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_print')")
|
||||
public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+6
-6
@@ -67,7 +67,7 @@ public class StandardReserveSolutionController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping( )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
|
||||
public R<StandardReserveSolutionVO> getById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -85,7 +85,7 @@ public class StandardReserveSolutionController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_page')" )
|
||||
public R<IPage<StandardReserveSolutionVO>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, String solutionName, @DateTimeFormat(pattern = "yyyy-MM-dd")@JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd")@JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime , HttpServletRequest theHttpServletRequest) throws ParseException {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -108,7 +108,7 @@ public class StandardReserveSolutionController {
|
||||
@ApiOperation(value = "新增(标准储备溶液配制及使用记录表)", notes = "新增(标准储备溶液配制及使用记录表)")
|
||||
@SysLog("新增(标准储备溶液配制及使用记录表)" )
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" )
|
||||
public R<StandardReserveSolutionVO> postAddObject(@RequestBody StandardReserveSolutionDTO standardReserveSolutionDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -127,7 +127,7 @@ public class StandardReserveSolutionController {
|
||||
@ApiOperation(value = "入库(标准储备溶液配制及使用记录表)", notes = "入库(标准储备溶液配制及使用记录表)")
|
||||
@SysLog("入库(标准储备溶液配制及使用记录表)" )
|
||||
@PostMapping("warehousing")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_warehousing')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_warehousing')" )
|
||||
public R<StandardReserveSolutionFullVO> warehousingById(@RequestBody StandardReserveSolutionFullDTO standardReserveSolutionFullDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -146,7 +146,7 @@ public class StandardReserveSolutionController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询标准储备溶液入库记录", notes = "通过id查询标准储备溶液入库记录")
|
||||
@GetMapping( "/full")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_full')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_full')" )
|
||||
public R<StandardReserveSolutionVO> getFullVOById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -168,7 +168,7 @@ public class StandardReserveSolutionController {
|
||||
@ApiOperation(value = "标准储备溶液配制及使用记录表打印", notes = "标准储备溶液配制及使用记录表打印")
|
||||
@SysLog("标准储备溶液配制及使用记录表打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_print')")
|
||||
public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+3
-3
@@ -66,7 +66,7 @@ public class StandardSolutionCurveController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" )
|
||||
public R<IPage<StandardSolutionCurveVO>> getStandardSolutionCurvePage(Page<StandardSolutionCurve> page, String solutionName, @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
@@ -94,7 +94,7 @@ public class StandardSolutionCurveController {
|
||||
@ApiOperation(value = "新增(标准工作曲线溶液配置记录表)", notes = "新增(标准工作曲线溶液配置记录表)")
|
||||
@SysLog("新增(标准工作曲线溶液配置记录表)")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_add')" )
|
||||
public R<StandardSolutionCurve> postAddObject(@RequestBody StandardSolutionCurveDTO standardSolutionCurveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -118,7 +118,7 @@ public class StandardSolutionCurveController {
|
||||
@ApiOperation(value = "标准工作曲线溶液配置记录表打印", notes = "标准工作曲线溶液配置记录表打印")
|
||||
@SysLog("标准工作曲线溶液配置记录表打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_print')")
|
||||
public void bizGetPDFInventory(String idList, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
|
||||
String[] ids = idList.split(",");
|
||||
|
||||
+8
-48
@@ -70,7 +70,7 @@ public class SupplierInformationController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询(服务商/供应商信息)", notes = "通过id查询(服务商/供应商信息)")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
public R<SupplierInformationVO> getById(String supplierInformationId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -91,7 +91,7 @@ public class SupplierInformationController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_page')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_page')" )
|
||||
public R<IPage<SupplierInformation>> getSupplierInformationPage(Page<SupplierInformation> page, String supplierName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -116,7 +116,7 @@ public class SupplierInformationController {
|
||||
@SysLog("新增服务商/供应商信息")
|
||||
@PostMapping
|
||||
@Transactional
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
|
||||
public R<SupplierInformation> postAddObject(@RequestBody SupplierInformationDTO supplierInformationDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -142,7 +142,7 @@ public class SupplierInformationController {
|
||||
@ApiOperation(value = "修改服务商/供应商信息", notes = "修改服务商/供应商信息")
|
||||
@SysLog("修改服务商/供应商信息")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_edit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_edit')" )
|
||||
public R<SupplierInformation> putUpdateById(@RequestBody SupplierInformationDTO supplierInformationDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -159,51 +159,11 @@ public class SupplierInformationController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 上传供应人照片
|
||||
*
|
||||
* @param id 上传供应人照片
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "上传供应人照片", notes = "上传供应人照片/供应商信息")
|
||||
@SysLog("修改服务商/供应商信息")
|
||||
@PostMapping("/upload/{id}")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
|
||||
public R<SupplierInformation> putUpdateById(@PathVariable("id") String id, @RequestPart(value = "file") MultipartFile file, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
SupplierInformation supplierInformation = supplierInformationService.getById(id);
|
||||
|
||||
if (supplierInformation != null) {
|
||||
|
||||
String path = "reagen_managment" + "/" + "supplierInformation" + "/" + supplierInformation.getId();
|
||||
String fileName = FileNameUtil.getName(file.getOriginalFilename());
|
||||
boolean r = ossFile.fileUpload(file, path);
|
||||
Map<String, String> ResultData = new HashMap<>();
|
||||
ResultData.put("fileName", fileName);
|
||||
ResultData.put("path", path);
|
||||
|
||||
if (r) {
|
||||
//修改数据库
|
||||
supplierInformation.setPhotographOfSupplier(path);
|
||||
supplierInformation.setPhotograph(fileName);
|
||||
supplierInformationService.updateById(supplierInformation);
|
||||
String fileNames = path + "/" + fileName;
|
||||
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
|
||||
return R.ok(supplierInformation, "上传成功");
|
||||
} else return R.failed("上传失败");
|
||||
|
||||
} else return null;
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "上传资质文件", notes = "上传资质文件")
|
||||
@SysLog("上传资质文件")
|
||||
@PostMapping("/uploadQd")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
|
||||
@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();
|
||||
@@ -233,7 +193,7 @@ public class SupplierInformationController {
|
||||
@ApiOperation(value = "预览资质文件", notes = "预览资质文件")
|
||||
@SysLog("预览资质文件")
|
||||
@GetMapping("/downloadQd")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
public R<SupplierInformation> downloadById(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -262,7 +222,7 @@ public class SupplierInformationController {
|
||||
@ApiOperation(value = "预览供应人照片", notes = "预览供应人照片")
|
||||
@SysLog("预览供应人照片")
|
||||
@GetMapping("/download")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
public R<SupplierInformation> download(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -303,7 +263,7 @@ public class SupplierInformationController {
|
||||
notes = "上传供应商图片,使用fastjson 解析json 对象")
|
||||
@SysLog("上传供应商图片,使用fastjson 解析json 对象")
|
||||
@PostMapping(value = "/picture_base64/{id}")
|
||||
// @PreAuthorize("@pms.hasAnyPermission('HairJobSampleCreate')")
|
||||
@PreAuthorize("@pms.hasAnyPermission('reagent_supplier_information_add')")
|
||||
public R uploadPictureBase64(@PathVariable("id") String id, @RequestBody JSONObject jsonParam) throws Exception {
|
||||
// System.out.println(String.format("uploadPhotoObj: hairSampleId=%s jsonParam.size()=%d", hairSampleId, jsonParam.size()));
|
||||
SupplierInformation byId = supplierInformationService.getById(id);
|
||||
|
||||
+4
-4
@@ -66,7 +66,7 @@ public class WarehousingRecordFormController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询入库信息", notes = "通过id查询入库信息")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_get')" )
|
||||
public R<WarehousingRecordFormVO> getById(String warehousingRecordFormId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -85,7 +85,7 @@ public class WarehousingRecordFormController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
|
||||
public R<IPage<WarehousingRecordFormVO>> getWarehousingRecordFormVOPage(Page <WarehousingRecordForm>page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -108,7 +108,7 @@ public class WarehousingRecordFormController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/pageWC")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_page')")
|
||||
public R<IPage<WarehousingContentVO>> getWarehousingContentVOPage(Page page, String name, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -135,7 +135,7 @@ public class WarehousingRecordFormController {
|
||||
@ApiOperation(value = "新增签收记录表", notes = "新增签收记录表")
|
||||
@SysLog("新增签收记录表")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')")
|
||||
public R<WarehousingRecordFormVO> postAddObject(@RequestBody List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
public class ApplicationForUseDTO {
|
||||
|
||||
@ApiModelProperty(value = "(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
private String referenceMaterialId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "(备注)")
|
||||
|
||||
@@ -64,7 +64,7 @@ public class DecentralizedRequestDTO {
|
||||
private String alias;
|
||||
@ApiModelProperty(value="备注")
|
||||
|
||||
private String remark;
|
||||
private String remarks;
|
||||
@ApiModelProperty(value="(英文名)")
|
||||
|
||||
private String englishName;
|
||||
|
||||
+3
@@ -17,6 +17,9 @@ public class StandardMaterialApplicationDTO {
|
||||
@ApiModelProperty(value = "位置信息")
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty(value = "柜子ID")
|
||||
private String boxId;
|
||||
|
||||
@ApiModelProperty(value = "是否用完")
|
||||
private Boolean outOfUse;
|
||||
}
|
||||
|
||||
+2
@@ -9,4 +9,6 @@ public class StandardReserveSolutionFullDTO {
|
||||
private String latticeId;
|
||||
private String warehousingRemarks;
|
||||
private String location;
|
||||
|
||||
private String boxId;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@ public class WarehousingRecordFormDTO {
|
||||
@ApiModelProperty(value = "批号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JSONField(format = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "(生产日期)")
|
||||
@@ -60,5 +63,6 @@ public class WarehousingRecordFormDTO {
|
||||
@ApiModelProperty(value = "(保管人名称)")
|
||||
private String custodianName;
|
||||
|
||||
|
||||
@ApiModelProperty(value="柜子ID")
|
||||
private String boxId;
|
||||
}
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import digital.laboratory.platform.common.core.constant.CommonConstants;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.sys.entity.Dictionary;
|
||||
import digital.laboratory.platform.sys.feign.RemoteDictionaryService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* App 启动类
|
||||
* 当 Spring Application 启动完成后, 会调用这个类的 run() 方法进行一些最后的初始化。
|
||||
* 我们在这个方法中从数据库加载一些全局的配置
|
||||
*
|
||||
* @author Zhang Xiaolong
|
||||
*/
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class AppStartupRunner implements ApplicationRunner {
|
||||
|
||||
// @Value("${dlp.entrustment.processDefinitionId}")
|
||||
// public static String processDefinitionId;
|
||||
|
||||
//public static boolean clientChoiceCheckers;
|
||||
//public static boolean checkerChoiceApprovers;
|
||||
//public static boolean singleOperateUser;
|
||||
|
||||
// @Value("${dlp.entrustment.temporaryPath}")
|
||||
//public static String temporaryPath;
|
||||
|
||||
@Value("${dlp.entrustment.entrustmentLetterTemplate}")
|
||||
public static String entrustmentLetterTemplate;
|
||||
|
||||
private final RemoteDictionaryService remoteDictionaryService;
|
||||
|
||||
public static Map<String, String> entrustmentConfig = new HashMap<>();
|
||||
|
||||
public static String getCfg(String code) {
|
||||
return entrustmentConfig.get(code);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param args 参数
|
||||
* @throws Exception 异常
|
||||
*
|
||||
* // @SysLog("委托受理模块初始化") 这里不能使用 @SysLog(), 因为 SysLog 还没有初始化
|
||||
*/
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
// BusinessCodeUtils.removeSymbols("x-*/)——0*&……%¥#@xasdf!*&^&%^ 中文、/+)(()\n\\xx\rx");
|
||||
|
||||
{
|
||||
// 加载 entrustment 在字典中的配置
|
||||
R<List<Dictionary>> r = remoteDictionaryService.getDictionaryByType(CommonConstants.DLP_TYPE_ENTRUSTMENT);
|
||||
if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||
List<Dictionary> itemList = r.getData();
|
||||
for (Dictionary item : itemList) {
|
||||
entrustmentConfig.put(item.getCode(), item.getLabel());
|
||||
}
|
||||
}
|
||||
|
||||
for (String key : entrustmentConfig.keySet()) {
|
||||
System.out.println(String.format("entrustmentConfig[%s]=%s", key, entrustmentConfig.get(key)));
|
||||
}
|
||||
}
|
||||
|
||||
// {
|
||||
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_PROCESS_DEFINITION_ID);
|
||||
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||
// processDefinitionId = r.getData().get("label");
|
||||
// }
|
||||
// }
|
||||
// {
|
||||
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_CLIENT_CHOICE_CHECKERS);
|
||||
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||
// clientChoiceCheckers = "1".equals(r.getData().get("label"));
|
||||
// }
|
||||
// }
|
||||
// {
|
||||
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_CHECKER_CHOICE_APPROVERS);
|
||||
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||
// checkerChoiceApprovers = "1".equals(r.getData().get("label"));
|
||||
// }
|
||||
// }
|
||||
// {
|
||||
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_CLIENT_SINGLE_OPERATE_USER);
|
||||
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||
// singleOperateUser = "1".equals(r.getData().get("label"));
|
||||
// }
|
||||
// }
|
||||
// {
|
||||
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_TEMPORARY_PATH);
|
||||
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||
// temporaryPath = r.getData().get("label");
|
||||
// }
|
||||
// if (StrUtil.isEmpty(temporaryPath)) {
|
||||
// temporaryPath =new File(System.getProperty("user.dir")+"/temp").getCanonicalPath();
|
||||
// }
|
||||
//
|
||||
// System.out.printf("临时目录是 %s%n", temporaryPath);
|
||||
// File tempPathFile = new File(temporaryPath);
|
||||
// if (! tempPathFile.exists()) {
|
||||
// System.out.printf("临时目录 %s 不存在, 创建之...%n", tempPathFile.getCanonicalPath());
|
||||
// if (!tempPathFile.mkdirs()) {
|
||||
// System.out.printf("创建临时目录 %s 失败!%n", tempPathFile.getCanonicalPath());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// {
|
||||
// R<HashMap<String, String>> r = remoteDictionaryService.innerGetById(CommonConstants.DLP_ENTRUSTMENT_LETTER_TEMPLATE_PATH);
|
||||
// if (Optional.ofNullable(r).isPresent() && (r.getData() != null)) {
|
||||
// entrustmentLetterTemplate = r.getData().get("label");
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class BatchDetails extends BaseEntity {
|
||||
/**
|
||||
* (使用状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(使用状态)")
|
||||
@ApiModelProperty(value="(使用状态 1 库存充足 -1 库存为0)")
|
||||
private Integer serviceStatus;
|
||||
|
||||
/**
|
||||
@@ -117,6 +117,12 @@ public class BatchDetails extends BaseEntity {
|
||||
@ApiModelProperty(value = "(位置信息)")
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty(value="柜子ID")
|
||||
private String boxId;
|
||||
|
||||
@ApiModelProperty(value="预警信息")
|
||||
private String warningInformation;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -121,6 +121,8 @@ public class CatalogueDetails extends BaseEntity {
|
||||
@ApiModelProperty(value = "CAS-号")
|
||||
private String casNumber;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
||||
@@ -36,8 +36,6 @@ public class CentralizedRequest extends BaseEntity {
|
||||
@ApiModelProperty(value="申请人ID")
|
||||
private String applicantId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (申请日期)
|
||||
*/
|
||||
@@ -53,7 +51,7 @@ public class CentralizedRequest extends BaseEntity {
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value="状态(0:未提交,1:已提交,2:已被制定采购计划)")
|
||||
@ApiModelProperty(value="状态(0:未提交,1:已提交,2:已审核 3:已被制定采购计划 ,4:已被制定采购清单)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,6 +63,9 @@ public class OutgoingContents extends BaseEntity {
|
||||
@ApiModelProperty(value = "(标准物质ID)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
@ApiModelProperty(value = "(出库编码)")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "(批次ID)")
|
||||
private String batchDetailsId;
|
||||
|
||||
@@ -72,6 +75,8 @@ public class OutgoingContents extends BaseEntity {
|
||||
@ApiModelProperty(value = "(位置信息)")
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty(value="柜子ID")
|
||||
private String boxId;
|
||||
/**
|
||||
* outgoingContentsId
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,7 @@ import lombok.EqualsAndHashCode;
|
||||
@ApiModel(value = "(采购内容)")
|
||||
public class ProcurementContent extends BaseEntity {
|
||||
|
||||
|
||||
/**
|
||||
* (采购计划id)
|
||||
*/
|
||||
|
||||
+5
@@ -27,6 +27,11 @@ import lombok.EqualsAndHashCode;
|
||||
@ApiModel(value = "试剂耗材库存")
|
||||
public class ReagentConsumableInventory extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "CAS-号")
|
||||
private String casNumber;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
|
||||
@@ -30,6 +30,11 @@ public class ReagentConsumables extends BaseEntity {
|
||||
@ApiModelProperty(value="品牌")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty(value = "CAS-号")
|
||||
private String casNumber;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ReagentConsumablesSet extends BaseEntity {
|
||||
private String applicationForUseId;
|
||||
|
||||
@ApiModelProperty(value = "(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
private String referenceMaterialId;
|
||||
|
||||
@ApiModelProperty(value = "(出库明细ID)")
|
||||
private String outgoingContentId;
|
||||
|
||||
@@ -27,10 +27,13 @@ public class ReferenceMaterial extends BaseEntity {
|
||||
*/
|
||||
@ApiModelProperty(value="标准物质编号")
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value="打印序列号")
|
||||
private String code;
|
||||
/**
|
||||
* number
|
||||
*/
|
||||
@ApiModelProperty(value="状态(0为可以使用,-1为停用,-2为降级使用、-3 已被领用")
|
||||
@ApiModelProperty(value="状态(0为可以使用,-1为停用,-2为降级使用、-3 已被领用,-4 使用完毕,报废")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
@@ -53,6 +56,9 @@ public class ReferenceMaterial extends BaseEntity {
|
||||
@ApiModelProperty(value="位置信息")
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty(value="柜子ID")
|
||||
private String boxId;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@@ -63,7 +69,7 @@ public class ReferenceMaterial extends BaseEntity {
|
||||
@ApiModelProperty(value="试剂耗材(含标准物质)仓库表ID")
|
||||
private String reagentConsumableInventoryId;
|
||||
|
||||
@ApiModelProperty(value="试剂耗材(含标准物质)仓库表ID")
|
||||
@ApiModelProperty(value="保管人名称")
|
||||
private String custodianName;
|
||||
|
||||
}
|
||||
|
||||
@@ -32,6 +32,11 @@ public class WarehousingBatchList extends BaseEntity {
|
||||
*/
|
||||
@ApiModelProperty(value="(批次)")
|
||||
private Integer batch;
|
||||
/**
|
||||
* (批次)
|
||||
*/
|
||||
@ApiModelProperty(value="(批次)")
|
||||
private String batchId;
|
||||
|
||||
/**
|
||||
* (批号)
|
||||
|
||||
@@ -38,6 +38,8 @@ public class WarehousingContent extends BaseEntity {
|
||||
@ApiModelProperty(value = "(总数量)")
|
||||
private Integer totalQuantity;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
/**
|
||||
* (签收记录表ID)
|
||||
*/
|
||||
@@ -78,5 +80,8 @@ public class WarehousingContent extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "采购清单明细ID")
|
||||
private String purchaseListDetailsId;
|
||||
|
||||
@ApiModelProperty(value = "预警值")
|
||||
private Integer warningValue;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -17,5 +17,5 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface DecentralizeDetailsMapper extends BaseMapper<DecentralizeDetails> {
|
||||
|
||||
|
||||
List<DecentralizeDetails> getDecentralizeDetailsList(String id);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.InstructionBook;
|
||||
import digital.laboratory.platform.reagent.vo.InstructionBookVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -14,4 +15,5 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface InstructionBookMapper extends BaseMapper<InstructionBook> {
|
||||
|
||||
InstructionBookVO getInstructionBookVO(String id);
|
||||
}
|
||||
|
||||
+6
@@ -5,10 +5,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
|
||||
import digital.laboratory.platform.reagent.vo.UserVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 试剂耗材库存 Mapper 接口
|
||||
*
|
||||
@@ -19,5 +23,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
public interface ReagentConsumableInventoryMapper extends BaseMapper<ReagentConsumableInventory> {
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOPage (IPage<ReagentConsumableInventory>page, @Param(Constants.WRAPPER) QueryWrapper<ReagentConsumableInventory> qw);
|
||||
IPage<ReagentConsumableInventoryFullVO> getReagentConsumableInventoryFullVOPage (IPage<ReagentConsumableInventory>page, @Param(Constants.WRAPPER) QueryWrapper<ReagentConsumableInventory> qw);
|
||||
|
||||
List<UserVO> getUserList();
|
||||
}
|
||||
|
||||
@@ -2,9 +2,12 @@ package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.vo.ReferenceMaterialVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mapper 接口
|
||||
*
|
||||
@@ -14,4 +17,6 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface ReferenceMaterialMapper extends BaseMapper<ReferenceMaterial> {
|
||||
|
||||
List<ReferenceMaterialVO> getReferenceMaterialVOList ();
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -9,7 +9,10 @@ import digital.laboratory.platform.reagent.dto.CentralizedRequestDTO;
|
||||
import digital.laboratory.platform.reagent.entity.CentralizedRequest;
|
||||
import digital.laboratory.platform.reagent.entity.DetailsOfCentralized;
|
||||
import digital.laboratory.platform.reagent.vo.CentralizedRequestVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseRequestPrintVO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -38,4 +41,8 @@ public interface CentralizedRequestService extends IService<CentralizedRequest>
|
||||
List<CentralizedRequestVO> getVOList(QueryWrapper<CentralizedRequest> qw);
|
||||
|
||||
CentralizedRequest auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||
|
||||
List<PurchaseRequestPrintVO> getPurchaseRequestPrintList(String id, String type);
|
||||
|
||||
void purchaseRequestTablePDF(List<PurchaseRequestPrintVO> voList, String id, String type, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception;
|
||||
}
|
||||
|
||||
+2
@@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.DecentralizeDetails;
|
||||
import digital.laboratory.platform.reagent.vo.DecentralizeDetailsVO;
|
||||
import digital.laboratory.platform.reagent.vo.DecentralizedRequestVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,4 +17,5 @@ public interface DecentralizeDetailsService extends IService<DecentralizeDetails
|
||||
|
||||
List<DecentralizeDetails> getDecentralizeDetailsList (String decentralizedRequestId);
|
||||
|
||||
DecentralizedRequestVO getDecentralizedRequest(String id);
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import digital.laboratory.platform.reagent.vo.InstructionBookVO;
|
||||
*/
|
||||
public interface InstructionBookService extends IService<InstructionBook> {
|
||||
|
||||
InstructionBook auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||
InstructionBookVO auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||
|
||||
InstructionBookVO getVO(String id);
|
||||
}
|
||||
|
||||
@@ -10,8 +10,11 @@ import digital.laboratory.platform.reagent.entity.PurchaseListDetails;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseListPageVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseListVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseRequestPrintVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -33,4 +36,5 @@ public interface PurchaseListService extends IService<PurchaseList> {
|
||||
PurchaseListDetailsVO addDetails(PurchaseListDTO purchaseListDTO);
|
||||
|
||||
IPage<PurchaseListPageVO> getPurchaseListVOPage(IPage<PurchaseList> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseList> qw);
|
||||
|
||||
}
|
||||
|
||||
+12
-5
@@ -8,7 +8,11 @@ import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReferenceMaterialVO;
|
||||
import digital.laboratory.platform.reagent.vo.UserVO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -19,20 +23,23 @@ import java.util.List;
|
||||
*/
|
||||
public interface ReagentConsumableInventoryService extends IService<ReagentConsumableInventory> {
|
||||
|
||||
Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOList(Page page,String name);
|
||||
|
||||
ReagentConsumableInventory addById(String reagentConsumableId, Integer quantity);
|
||||
|
||||
ReagentConsumableInventory reduceById(String reagentConsumableId, Integer quantity);
|
||||
|
||||
ReferenceMaterial deactivateById(String referenceMaterialId);
|
||||
|
||||
Page<ReagentConsumableInventoryFullVO> getAllList(Integer current, Integer size, QueryWrapper<ReagentConsumableInventory> qw,Integer status);
|
||||
|
||||
//分页查询试剂耗材
|
||||
Page<ReagentConsumableInventoryFullVO> getAllRM(Integer current, Integer size,String reagentConsumableName);
|
||||
IPage<ReagentConsumableInventoryFullVO> getAllRM(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw);
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(IPage<ReagentConsumableInventory> page,QueryWrapper<ReagentConsumableInventory>qw);
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw);
|
||||
|
||||
void referenceMaterialTablePDF(List<ReferenceMaterialVO> voList, String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception;
|
||||
|
||||
//试剂/耗材扫描物品编码进行持久化
|
||||
void setCode(String id, String code);
|
||||
|
||||
String buildCodeLabelContent(String code);
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,5 +19,5 @@ public interface ReferenceMaterialService extends IService<ReferenceMaterial> {
|
||||
|
||||
List<ReferenceMaterialVO> getReferenceMaterialVOList(String batchDetailsId);
|
||||
|
||||
void standardSolutionCurveTablePDF(List<StandardSolutionCurveVO> voList, String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception;
|
||||
List<ReferenceMaterialVO> getReferenceMaterialList();
|
||||
}
|
||||
|
||||
+9
-1
@@ -112,7 +112,14 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
reagentConsumablesSet.setApplicationForUseId(applicationForUse.getId());
|
||||
|
||||
reagentConsumablesSet.setReferenceMaterialNumber(applicationForUseDTO.getReferenceMaterialNumber());
|
||||
if (applicationForUseDTO.getReferenceMaterialId()!=null){
|
||||
|
||||
reagentConsumablesSet.setReferenceMaterialId(applicationForUseDTO.getReferenceMaterialId());
|
||||
//判定标准物质状态是否为可以领用
|
||||
if (referenceMaterialService.getById(applicationForUseDTO.getReferenceMaterialId()).getStatus()!=0){
|
||||
|
||||
throw new RuntimeException(String.format("当前标准物质不可领用"));
|
||||
}}
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -155,6 +162,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
}
|
||||
|
||||
@Override//提交领用申请记录
|
||||
@Transactional
|
||||
|
||||
public ApplicationForUseVO commitApplication(List<ApplicationForUseDTO> applicationForUseDTOList, DLPUser dlpUser) {
|
||||
|
||||
|
||||
+2
@@ -17,6 +17,8 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
+210
-6
@@ -1,27 +1,40 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.config.ConfigureBuilder;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.dto.CentralizedRequestDTO;
|
||||
import digital.laboratory.platform.reagent.entity.CentralizedRequest;
|
||||
import digital.laboratory.platform.reagent.entity.DetailsOfCentralized;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.CentralizedRequestMapper;
|
||||
import digital.laboratory.platform.reagent.service.CentralizedRequestService;
|
||||
import digital.laboratory.platform.reagent.service.DetailsOfCentralizedService;
|
||||
import digital.laboratory.platform.reagent.vo.CentralizedRequestVO;
|
||||
import digital.laboratory.platform.reagent.vo.DetailsOfCentralizedVO;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import feign.Response;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -40,6 +53,32 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
@Autowired
|
||||
private DetailsOfCentralizedService detailsOfCentralizedService;
|
||||
|
||||
@Autowired
|
||||
private ProcurementContentService procurementContentService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
@Autowired
|
||||
|
||||
private PurchasingPlanService purchasingPlanService;
|
||||
|
||||
@Autowired
|
||||
private SupplierInformationService supplierInformationService;
|
||||
|
||||
@Autowired
|
||||
private PurchaseListDetailsService purchaseListDetailsService;
|
||||
|
||||
@Autowired
|
||||
private DecentralizeDetailsService decentralizeDetailsService;
|
||||
|
||||
@Autowired
|
||||
private DecentralizedRequestService decentralizedRequestService;
|
||||
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
@Autowired
|
||||
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
@Transactional
|
||||
@Override//增加集中采购申请
|
||||
public CentralizedRequest addRequest( List<CentralizedRequestDTO> centralizedRequestDTOList, DLPUser dlpUser) {
|
||||
@@ -224,6 +263,171 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
return byId;
|
||||
}else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PurchaseRequestPrintVO> getPurchaseRequestPrintList(String id, String type) {
|
||||
ArrayList<PurchaseRequestPrintVO> purchaseRequestPrintVOList = new ArrayList<>();
|
||||
|
||||
if(type.equals("集中采购申请")){
|
||||
|
||||
CentralizedRequestVO centralizedRequest = centralizedRequestService.getCentralizedRequestVO(id);
|
||||
|
||||
List<DetailsOfCentralizedVO> detailsOfCentralizedVOList = centralizedRequest.getDetailsOfCentralizedVOList();
|
||||
|
||||
|
||||
for (DetailsOfCentralizedVO detailsOfCentralized : detailsOfCentralizedVOList) {
|
||||
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(detailsOfCentralized.getReagentConsumableId());
|
||||
|
||||
if (reagentConsumables.getCategory().equals("标准物质")){
|
||||
|
||||
PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO();
|
||||
purchaseRequestPrintVO.setApplicantName(centralizedRequest.getApplicantName());
|
||||
purchaseRequestPrintVO.setPurpose(detailsOfCentralized.getPurpose());
|
||||
purchaseRequestPrintVO.setQuantity(detailsOfCentralized.getQuantityPurchased());
|
||||
purchaseRequestPrintVO.setRemarks(detailsOfCentralized.getRemarks());
|
||||
purchaseRequestPrintVO.setReagentConsumableName(reagentConsumables.getReagentConsumableName());
|
||||
purchaseRequestPrintVO.setSpecificationAndModel(reagentConsumables.getSpecificationAndModel());
|
||||
purchaseRequestPrintVO.setUnitPrice(procurementContentService.getById(detailsOfCentralized.getProcurementContentId()).getUnitPrice());
|
||||
purchaseRequestPrintVO.setSubtotal(procurementContentService.getById(detailsOfCentralized.getProcurementContentId()).getSubtotal());
|
||||
purchaseRequestPrintVO.setSupplierName(supplierInformationService.getById(purchaseListDetailsService.getOne(Wrappers.<PurchaseListDetails>query().eq("procurement_content_id", detailsOfCentralized.getProcurementContentId())).getSupplierId()).getSupplierName());
|
||||
purchaseRequestPrintVOList.add(purchaseRequestPrintVO);}
|
||||
|
||||
|
||||
}
|
||||
}else {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(id);
|
||||
|
||||
for (DecentralizeDetails decentralizeDetails : requestById.getDecentralizeDetailsVOList()) {
|
||||
|
||||
if (decentralizeDetails.getCategory().equals("标准物质")){
|
||||
|
||||
PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO();
|
||||
|
||||
BeanUtils.copyProperties(decentralizeDetails, purchaseRequestPrintVO);
|
||||
|
||||
purchaseRequestPrintVO.setPurpose(decentralizeDetails.getPurpose());
|
||||
purchaseRequestPrintVO.setApplicantName(requestById.getApplicantName());
|
||||
purchaseRequestPrintVO.setRemarks(decentralizeDetails.getRemarks());
|
||||
|
||||
purchaseRequestPrintVO.setSubtotal(purchaseRequestPrintVO.getUnitPrice() * purchaseRequestPrintVO.getQuantity());
|
||||
//查找出供应商名称
|
||||
purchaseRequestPrintVO.setSupplierName(supplierInformationService.getById(purchaseListDetailsService.getById(decentralizeDetails.getPurchaseListDetailsId()).getSupplierId()).getSupplierName());
|
||||
|
||||
purchaseRequestPrintVOList.add(purchaseRequestPrintVO);}
|
||||
}
|
||||
}
|
||||
return purchaseRequestPrintVOList;
|
||||
}
|
||||
@Override
|
||||
public void purchaseRequestTablePDF(List<PurchaseRequestPrintVO> voList, String id, String type, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
System.out.println("purchaseRequestTablePDF.................");
|
||||
|
||||
int x = 1;
|
||||
|
||||
double total = 0;
|
||||
|
||||
for (PurchaseRequestPrintVO purchaseRequestPrintVO : voList) {
|
||||
purchaseRequestPrintVO.setI(x);
|
||||
total = total + purchaseRequestPrintVO.getSubtotal();
|
||||
x++;
|
||||
}
|
||||
|
||||
String firstAuditName =null;
|
||||
String secondAuditName = null;
|
||||
String thirdAuditName = null;
|
||||
String fourthAuditName = null;
|
||||
String commitTime = null;
|
||||
|
||||
//-----------------------------
|
||||
// 生成 word 版本的 采购目录
|
||||
|
||||
if (type.equals("集中采购申请")){
|
||||
|
||||
CentralizedRequestVO centralizedRequestVO = centralizedRequestService.getCentralizedRequestVO(id);
|
||||
PurchasingPlanVO byId = purchasingPlanService.getPurchasingPlanVO(centralizedRequestVO.getPurchasingPlanId());
|
||||
firstAuditName = centralizedRequestVO.getAuditorName();
|
||||
secondAuditName = byId.getCreateName();
|
||||
thirdAuditName = byId.getPrimaryAuditorName();
|
||||
fourthAuditName = byId.getApproverName();
|
||||
commitTime = LocalDateTimeUtil.format(centralizedRequestVO.getDateOfApplication(),"yyyy年MM月dd日");
|
||||
|
||||
}
|
||||
else {
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(id);
|
||||
firstAuditName = requestById.getPrimaryAuditorName();
|
||||
secondAuditName = requestById.getSecondaryAuditorName();
|
||||
thirdAuditName = requestById.getThreeLevelAuditName();
|
||||
fourthAuditName = requestById.getApproverName();
|
||||
commitTime = LocalDateTimeUtil.format(requestById.getCommitTime(),"yyyy年MM月dd日");
|
||||
}
|
||||
String applyFileName = "标准物质采购申请表-" + id;
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
ossFile.fileGet("template" + "/" + "标准物质采购申请表模板.docx", bos);
|
||||
|
||||
byte[] templateArray = bos.toByteArray();
|
||||
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(templateArray);
|
||||
bos.close();
|
||||
|
||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
|
||||
ConfigureBuilder builder = Configure.builder().buildGramer("${", "}").useSpringEL(false);
|
||||
builder.bind("voList", policy).build();
|
||||
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
double finalTotal = total;
|
||||
String finalFourthAuditName = fourthAuditName;
|
||||
String finalSecondAuditName = secondAuditName;
|
||||
String finalThirdAuditName = thirdAuditName;
|
||||
String finalFirstAuditName = firstAuditName;
|
||||
String finalCommitTime = commitTime;
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
put("total", finalTotal);
|
||||
put("finalFirstAuditName", finalFirstAuditName);
|
||||
put("finalSecondAuditName", finalSecondAuditName);
|
||||
put("finalThirdAuditName", finalThirdAuditName);
|
||||
put("finalFourthAuditName", finalFourthAuditName);
|
||||
put("commitTime", finalCommitTime);
|
||||
}}
|
||||
);
|
||||
bis.close();
|
||||
|
||||
ByteArrayOutputStream fosWord = new ByteArrayOutputStream();
|
||||
template.write(fosWord);
|
||||
template.close();
|
||||
|
||||
//------------
|
||||
ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
|
||||
fosWord.close();
|
||||
|
||||
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
||||
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
||||
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||
fisWord.close();
|
||||
|
||||
|
||||
ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
|
||||
IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
|
||||
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
||||
outPDF.close();
|
||||
|
||||
|
||||
ossFile.fileSave("document" + "/" + "purchaseRequest" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
||||
isPDF.close();
|
||||
|
||||
|
||||
System.out.println(String.format("转换为 PDF 结束"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+15
-1
@@ -5,7 +5,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.DecentralizeDetails;
|
||||
import digital.laboratory.platform.reagent.mapper.DecentralizeDetailsMapper;
|
||||
import digital.laboratory.platform.reagent.service.DecentralizeDetailsService;
|
||||
import digital.laboratory.platform.reagent.vo.DecentralizeDetailsVO;
|
||||
import digital.laboratory.platform.reagent.service.DecentralizedRequestService;
|
||||
import digital.laboratory.platform.reagent.vo.DecentralizedRequestVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -23,6 +24,9 @@ public class DecentralizeDetailsServiceImpl extends ServiceImpl<DecentralizeDeta
|
||||
@Autowired
|
||||
private DecentralizeDetailsService decentralizeDetailsService;
|
||||
|
||||
@Autowired
|
||||
private DecentralizedRequestService decentralizedRequestService;
|
||||
|
||||
@Override
|
||||
public List<DecentralizeDetails> getDecentralizeDetailsList(String decentralizedRequestId) {
|
||||
|
||||
@@ -34,4 +38,14 @@ public class DecentralizeDetailsServiceImpl extends ServiceImpl<DecentralizeDeta
|
||||
|
||||
return decentralizeDetailsList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DecentralizedRequestVO getDecentralizedRequest(String id){
|
||||
|
||||
List<DecentralizeDetails> decentralizeDetailsList = baseMapper.getDecentralizeDetailsList(id);
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(decentralizeDetailsList.get(0).getDecentralizedRequestId());
|
||||
|
||||
return requestById;
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -301,6 +301,9 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
purchaseList.setStatus(0);
|
||||
purchaseList.setType("分散采购申请");
|
||||
|
||||
byId.setPurchaseListId(purchaseList.getId());
|
||||
decentralizedRequestService.updateById(byId);
|
||||
|
||||
purchaseListService.save(purchaseList);
|
||||
|
||||
for (DecentralizeDetails decentralizeDetails : list) {
|
||||
|
||||
+14
-6
@@ -105,9 +105,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
LambdaQueryWrapper<ReferenceMaterial> referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getNumber, reagentConsumablesSet.getReferenceMaterialNumber());
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper);
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(reagentConsumablesSet.getReferenceMaterialId());
|
||||
|
||||
outgoingContents.setReferenceMaterialId(referenceMaterial.getId());
|
||||
|
||||
@@ -118,10 +116,13 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
outgoingContents.setOutboundUse(reagentConsumablesSet.getPurpose());
|
||||
outgoingContents.setReagentConsumableId(reagentConsumablesSet.getReagentConsumableId());
|
||||
outgoingContents.setReagentConsumableType(one.getCategory());
|
||||
outgoingContents.setReferenceMaterialNumber(reagentConsumablesSet.getReferenceMaterialNumber());
|
||||
outgoingContents.setReferenceMaterialNumber(referenceMaterial.getNumber());
|
||||
outgoingContents.setBatchDetailsId(reagentConsumablesSet.getBatchDetailsId());
|
||||
outgoingContents.setLocation(referenceMaterial.getLocation());
|
||||
outgoingContents.setLatticeId(referenceMaterial.getLatticeId());
|
||||
outgoingContents.setBoxId(referenceMaterial.getBoxId());
|
||||
outgoingContents.setCode(referenceMaterial.getCode());
|
||||
|
||||
outgoingContentsList.add(outgoingContents);
|
||||
}else {
|
||||
|
||||
@@ -134,11 +135,13 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
outgoingContents.setOutboundUse(reagentConsumablesSet.getPurpose());
|
||||
outgoingContents.setReagentConsumableId(reagentConsumablesSet.getReagentConsumableId());
|
||||
outgoingContents.setReagentConsumableType(one.getCategory());
|
||||
outgoingContents.setReferenceMaterialNumber(reagentConsumablesSet.getReferenceMaterialNumber());
|
||||
outgoingContents.setBatchDetailsId(reagentConsumablesSet.getBatchDetailsId());
|
||||
outgoingContents.setLocation(byId1.getLocation());
|
||||
outgoingContents.setLatticeId(byId1.getLatticeId());
|
||||
outgoingContents.setBoxId(byId1.getBoxId());
|
||||
outgoingContents.setCode(one.getCode());
|
||||
outgoingContentsList.add(outgoingContents);
|
||||
|
||||
}
|
||||
reagentConsumablesSet.setOutgoingContentId(outgoingContents.getId());
|
||||
|
||||
@@ -332,7 +335,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
/*
|
||||
* 若某个批次的物品已被领用完毕,则改变该批次的状态即可,就不会显示在领用页面*/
|
||||
if (batchDetails!=null){
|
||||
|
||||
//减少对应批次数量
|
||||
batchDetails.setQuantity(batchDetails.getQuantity()-outgoingContentsDTO.getQuantity());
|
||||
|
||||
if (batchDetails.getQuantity()==0){
|
||||
@@ -432,6 +435,11 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
ApplicationForUse applicationForUse = applicationForUseService.getOne(Wrappers.<ApplicationForUse>query()
|
||||
.eq("claim_code", claimCode));
|
||||
|
||||
if (applicationForUse==null){
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
DeliveryRegistrationFormVO deliveryRegistrationFormVOById = baseMapper.getDeliveryRegistrationFormVOById(applicationForUse.getDeliveryRegistrationFormId());
|
||||
|
||||
LambdaQueryWrapper<OutgoingContents> outgoingContentsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
+3
-18
@@ -36,9 +36,9 @@ public class InstructionBookServiceImpl extends ServiceImpl<InstructionBookMappe
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
@Override
|
||||
public InstructionBook auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser){
|
||||
public InstructionBookVO auditById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser){
|
||||
|
||||
InstructionBook byId = instructionBookService.getById(auditAndApproveDTO.getUuId());
|
||||
InstructionBookVO byId = baseMapper.getInstructionBookVO(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setAuditOpinionOfTechnical(auditAndApproveDTO.getAuditOpinion());
|
||||
byId.setAuditResultOfTechnical(auditAndApproveDTO.getAuditResult());
|
||||
@@ -61,24 +61,9 @@ public class InstructionBookServiceImpl extends ServiceImpl<InstructionBookMappe
|
||||
@Override
|
||||
public InstructionBookVO getVO(String id){
|
||||
|
||||
LambdaQueryWrapper<InstructionBook> instructionBookLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
instructionBookLambdaQueryWrapper.eq(InstructionBook::getReferenceMaterialTypeId,id);
|
||||
|
||||
InstructionBook one = instructionBookService.getOne(instructionBookLambdaQueryWrapper);
|
||||
|
||||
InstructionBookVO instructionBookVO = new InstructionBookVO();
|
||||
|
||||
|
||||
if (one!=null){
|
||||
|
||||
BeanUtils.copyProperties(one,instructionBookVO);
|
||||
|
||||
}
|
||||
InstructionBookVO instructionBookVO = baseMapper.getInstructionBookVO(id);
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(id);
|
||||
|
||||
instructionBookVO.setReagentConsumables(byId);
|
||||
|
||||
return instructionBookVO;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -47,6 +47,7 @@ import java.util.HashMap;
|
||||
* @describe (标准物质期间核查实施情况及结果记录表) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
@SuppressWarnings("all")
|
||||
public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<PeriodVerificationImplementationMapper, PeriodVerificationImplementation> implements PeriodVerificationImplementationService {
|
||||
@Autowired
|
||||
private PeriodVerificationPlanService periodVerificationPlanService;
|
||||
@@ -136,8 +137,6 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
reagentConsumablesService.updateById(byId2);
|
||||
|
||||
|
||||
|
||||
if (periodVerificationImplementationService.updateById(byId) ) {
|
||||
|
||||
return byId;
|
||||
|
||||
+28
-11
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
@@ -76,7 +77,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
String yyyy = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy");
|
||||
|
||||
catalogueDetails.setPurchaseCatalogueNumber( yyyy+"-"+ i.toString());
|
||||
catalogueDetails.setPurchaseCatalogueNumber(yyyy + "-" + i.toString());
|
||||
|
||||
i++;
|
||||
|
||||
@@ -106,13 +107,18 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
@Override//删除采购目录
|
||||
@Transactional
|
||||
public Boolean delCatalogue(String purchaseCatalogueId) {
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogueId);
|
||||
|
||||
List<CatalogueDetails> list = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
|
||||
|
||||
return catalogueDetailsService.removeBatchByIds(list) &&
|
||||
if (list.size() > 0 & list != null) {
|
||||
catalogueDetailsService.removeBatchByIds(list);
|
||||
}
|
||||
|
||||
return
|
||||
purchaseCatalogueService.removeById(purchaseCatalogueId);
|
||||
}
|
||||
|
||||
@@ -178,7 +184,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
@Transactional
|
||||
public PurchaseCatalogue commitById(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList, DLPUser dlpUser) {
|
||||
|
||||
if (purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId().equals("")) {
|
||||
if (purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId() == null) {
|
||||
|
||||
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.addCatalogue(dlpUser, purchaseCatalogueDTOList);
|
||||
|
||||
@@ -258,13 +264,20 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
if (catalogueDetails.getReagentConsumableId() == null) {
|
||||
catalogueDetails.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
|
||||
catalogueDetailsService.updateById(catalogueDetails);
|
||||
}
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(catalogueDetails.getReagentConsumableId());
|
||||
|
||||
if (byId == null) {
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
|
||||
} else {
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(catalogueDetails.getReagentConsumableId());
|
||||
if (byId == null) {
|
||||
ReagentConsumables one = reagentConsumablesService.getOne(Wrappers.<ReagentConsumables>query()
|
||||
.eq("reagent_consumable_name", catalogueDetails.getReagentConsumableName())
|
||||
.eq("cas_number", catalogueDetails.getCasNumber())
|
||||
.eq("specification_and_model", catalogueDetails.getSpecificationAndModel())
|
||||
.eq("standard_value_or_purity", catalogueDetails.getStandardValueOrPurity()));
|
||||
if (one == null) {
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
purchaseCatalogue.setStatus(-3);
|
||||
@@ -314,7 +327,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
List<CatalogueDetails> catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
|
||||
|
||||
if (list == null&list.size()==0) {
|
||||
if (list == null & list.size() == 0) {
|
||||
|
||||
throw new RuntimeException(String.format("未存在已发布的采购目录"));
|
||||
}
|
||||
@@ -322,10 +335,11 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
}
|
||||
|
||||
@Override
|
||||
//导入方法,验证填写内容是否有误
|
||||
public PurchaseCatalogueVO getImport(List<PurchaseCatalogueDTO> purchaseCatalogueDTOList) {
|
||||
|
||||
int i = 1;
|
||||
String message = null;
|
||||
String message = "";
|
||||
try {
|
||||
|
||||
for (PurchaseCatalogueDTO purchaseCatalogueDTO : purchaseCatalogueDTOList) {
|
||||
@@ -345,7 +359,6 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
StrUtil.isNotBlank(purchaseCatalogueDTO.getRemark()) &
|
||||
StrUtil.isNotBlank(purchaseCatalogueDTO.getMinimumUnit()) &
|
||||
StrUtil.isNotBlank(purchaseCatalogueDTO.getCasNumber())
|
||||
|
||||
) {
|
||||
i++;
|
||||
} else {
|
||||
@@ -360,6 +373,10 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
throw new RuntimeException(message);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(message)) {
|
||||
throw new RuntimeException(message);
|
||||
}
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = new PurchaseCatalogueVO();
|
||||
|
||||
List<CatalogueDetails> catalogueDetailsList = new ArrayList<>();
|
||||
|
||||
+68
-9
@@ -1,26 +1,39 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.config.ConfigureBuilder;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.PurchaseListDTO;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.PurchaseListMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseListPageVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseListVO;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import feign.Response;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -30,6 +43,7 @@ import java.util.List;
|
||||
* @describe (采购清单) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
@SuppressWarnings("all")
|
||||
public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, PurchaseList> implements PurchaseListService {
|
||||
|
||||
@Autowired
|
||||
@@ -46,6 +60,9 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
@Autowired
|
||||
private WarehousingContentService warehousingContentService;
|
||||
|
||||
@Autowired
|
||||
private DecentralizeDetailsService decentralizeDetailsService;
|
||||
|
||||
@Autowired
|
||||
private SupplierInformationService supplierInformationService;
|
||||
@Autowired
|
||||
@@ -53,9 +70,25 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
@Autowired
|
||||
private PurchasingPlanService purchasingPlanService;
|
||||
|
||||
@Autowired
|
||||
private ProcurementContentService procurementContentService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@Autowired
|
||||
private CentralizedRequestService centralizedRequestService;
|
||||
|
||||
@Autowired
|
||||
private DetailsOfCentralizedService detailsOfCentralizedService;
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
@Autowired
|
||||
private ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
|
||||
@Override//通过ID查找清单
|
||||
public PurchaseListVO getPurchaseList(String purchaseListId) {
|
||||
|
||||
@@ -71,14 +104,15 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
|
||||
LambdaQueryWrapper<SupplierInformation> supplierInformationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
if (purchaseListDetailsVO.getSupplierId()!=null){
|
||||
if (purchaseListDetailsVO.getSupplierId() != null) {
|
||||
|
||||
supplierInformationLambdaQueryWrapper.eq(SupplierInformation::getId, purchaseListDetailsVO.getSupplierId());
|
||||
supplierInformationLambdaQueryWrapper.eq(SupplierInformation::getId, purchaseListDetailsVO.getSupplierId());
|
||||
|
||||
SupplierInformation one = supplierInformationService.getOne(supplierInformationLambdaQueryWrapper);
|
||||
SupplierInformation one = supplierInformationService.getOne(supplierInformationLambdaQueryWrapper);
|
||||
|
||||
purchaseListDetailsVO.setSupplierName(one.getSupplierName());
|
||||
}}
|
||||
purchaseListDetailsVO.setSupplierName(one.getSupplierName());
|
||||
}
|
||||
}
|
||||
|
||||
purchaseListVO.setPurchaseListDetailsVOS(purchaseListDetailsVOList);
|
||||
|
||||
@@ -87,7 +121,7 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void editById (List<PurchaseListDTO> purchaseListDTOList){
|
||||
public void editById(List<PurchaseListDTO> purchaseListDTOList) {
|
||||
|
||||
for (PurchaseListDTO purchaseListDTO : purchaseListDTOList) {
|
||||
|
||||
@@ -104,7 +138,24 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
public PurchaseList commitById(String id) {
|
||||
|
||||
PurchaseList purchaseList = purchaseListService.getById(id);
|
||||
//将集中采购与分散采购申请的状态改变
|
||||
if (purchaseList.getType().equals("采购计划")) {
|
||||
|
||||
PurchasingPlan plan = purchasingPlanService.getOne(Wrappers.<PurchasingPlan>query()
|
||||
.eq("purchase_list_id", id));
|
||||
|
||||
PurchasingPlanVO purchasingPlanVO = purchasingPlanService.getPurchasingPlanVO(plan.getPurchasingPlanId());
|
||||
List<CentralizedRequest> centralizedRequestList = centralizedRequestService.list(Wrappers.<CentralizedRequest>query().eq("purchasing_plan_id", plan.getPurchasingPlanId()));
|
||||
for (CentralizedRequest centralizedRequest : centralizedRequestList) {
|
||||
centralizedRequest.setStatus(4);
|
||||
centralizedRequestService.updateById(centralizedRequest);
|
||||
}
|
||||
} else {
|
||||
DecentralizedRequest purchase_list_id = decentralizedRequestService.getOne(Wrappers.<DecentralizedRequest>query()
|
||||
.eq("purchase_list_id", id));
|
||||
purchase_list_id.setStatus(6);
|
||||
decentralizedRequestService.updateById(purchase_list_id);
|
||||
}
|
||||
purchaseList.setStatus(1);
|
||||
|
||||
LambdaQueryWrapper<PurchaseListDetails> purchaseListDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -128,6 +179,9 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
for (PurchaseListDetails purchaseListDetails : purchaseListDetailsList) {
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(purchaseListDetails.getReagentConsumableId());
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq("reagent_consumable_id", byId.getReagentConsumableId()));
|
||||
|
||||
|
||||
WarehousingContent warehousingContent = new WarehousingContent();
|
||||
//完善入库内容信息
|
||||
@@ -145,8 +199,13 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
|
||||
warehousingContent.setWarehousingQuantity(0);
|
||||
|
||||
warehousingContent.setCode(byId.getCode());
|
||||
|
||||
warehousingContent.setPurchaseListDetailsId(purchaseListDetails.getId());
|
||||
|
||||
if (one!=null){
|
||||
warehousingContent.setWarningValue(one.getWarningValue());
|
||||
}
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getReagentConsumableId, warehousingContent.getReagentConsumableId());
|
||||
|
||||
+4
@@ -116,6 +116,8 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
|
||||
byId3.setStatus(3);
|
||||
|
||||
byId3.setPurchasingPlanId(purchasingPlan.getPurchasingPlanId());
|
||||
|
||||
requestService.updateById(byId3);
|
||||
|
||||
flag = true;
|
||||
@@ -510,6 +512,8 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
|
||||
purchaseListService.save(purchaseList);
|
||||
|
||||
purchasingPlan.setPurchaseListId(purchaseList.getId());
|
||||
|
||||
for (ProcurementContent procurementContent : list) {
|
||||
|
||||
PurchaseListDetails purchaseListDetails = new PurchaseListDetails();
|
||||
|
||||
+167
-91
@@ -1,26 +1,41 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.config.ConfigureBuilder;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import digital.laboratory.platform.common.feign.RemoteTemplate2htmlService;
|
||||
import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.config.PageUtils;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.handle.AppStartupRunner;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.BatchDetailsVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import feign.Response;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 试剂耗材库存服务实现类
|
||||
@@ -39,6 +54,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@Autowired
|
||||
private RemoteTemplate2htmlService remoteTemplate2htmlService;
|
||||
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
@@ -51,52 +69,13 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Autowired
|
||||
private StandardReserveSolutionService standardReserveSolutionService;
|
||||
|
||||
@Override//试剂耗材管理列表
|
||||
public Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOList(Page page, String name) {
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
|
||||
reagentConsumableInventoryQueryWrapper.eq("status", 1);
|
||||
|
||||
if (StrUtil.isNotBlank(name)) {
|
||||
|
||||
reagentConsumableInventoryQueryWrapper
|
||||
.eq("category", "试剂").or()
|
||||
.eq("category", "耗材")
|
||||
.like("reagent_consumable_name", name);
|
||||
} else {
|
||||
|
||||
reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or()
|
||||
.eq("category", "耗材");
|
||||
}
|
||||
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper);
|
||||
|
||||
ArrayList<ReagentConsumableInventoryVO> reagentConsumableInventoryVOS = new ArrayList<>();
|
||||
|
||||
for (ReagentConsumableInventory reagentConsumableInventory : list) {
|
||||
|
||||
List<BatchDetailsVO> batchDetailsVOList = batchDetailsService.getBatchDetailsList(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
|
||||
ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO();
|
||||
|
||||
BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryVO);
|
||||
//赋值试剂耗材批次明细
|
||||
reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsVOList);
|
||||
|
||||
reagentConsumableInventoryVOS.add(reagentConsumableInventoryVO);
|
||||
}
|
||||
if (reagentConsumableInventoryVOS != null) {
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
|
||||
Page pages = pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), reagentConsumableInventoryVOS);
|
||||
|
||||
return pages;
|
||||
} else return null;
|
||||
|
||||
}
|
||||
|
||||
@Override//标准物质管理列表
|
||||
@Override//试剂耗材/标准物质标准物质管理列表
|
||||
public IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw) {
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryVOPage = baseMapper.getReagentConsumableInventoryVOPage(page, qw);
|
||||
@@ -149,16 +128,6 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
}
|
||||
|
||||
|
||||
@Override//标准物质/溶液停用
|
||||
public ReferenceMaterial deactivateById(String referenceMaterialId) {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(referenceMaterialId);
|
||||
|
||||
byId.setStatus(-1);
|
||||
|
||||
return byId;
|
||||
}
|
||||
|
||||
@Override//分页查询标准物质
|
||||
public Page<ReagentConsumableInventoryFullVO> getAllList(Integer current, Integer size, QueryWrapper<ReagentConsumableInventory> qw, Integer status) {
|
||||
|
||||
@@ -209,7 +178,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getSolutionNumbering, referenceMaterial.getNumber());
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, referenceMaterial.getId());
|
||||
|
||||
StandardReserveSolution one1 = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
|
||||
|
||||
@@ -242,54 +211,47 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
//分页查询试剂耗材
|
||||
@Override
|
||||
public Page<ReagentConsumableInventoryFullVO> getAllRM(Integer current, Integer size, String reagentConsumableName) {
|
||||
public IPage<ReagentConsumableInventoryFullVO> getAllRM(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw) {
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOList = new ArrayList<>();
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
|
||||
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq("category", "试剂").or()
|
||||
.eq("category", "耗材")
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName));
|
||||
//找出对应的仓库信息
|
||||
for (ReagentConsumableInventory reagentConsumableInventory : list) {
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOS = new ArrayList<>();
|
||||
|
||||
LambdaQueryWrapper<BatchDetails> batchDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
for (ReagentConsumableInventory reagentConsumableInventory : list) {
|
||||
|
||||
batchDetailsLambdaQueryWrapper
|
||||
.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId())
|
||||
.eq(BatchDetails::getServiceStatus, 1);
|
||||
List<BatchDetails> list1 = batchDetailsService.list(Wrappers.<BatchDetails>query()
|
||||
.eq("reagent_consumable_inventory_id", reagentConsumableInventory.getReagentConsumableInventoryId())
|
||||
.eq("service_status", 1));
|
||||
|
||||
List<BatchDetails> list1 = batchDetailsService.list(batchDetailsLambdaQueryWrapper);
|
||||
//将不同批次的物品展示出来
|
||||
for (BatchDetails batchDetails : list1) {
|
||||
//将不同批次的物品展示出来
|
||||
for (BatchDetails batchDetails : list1) {
|
||||
|
||||
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
|
||||
BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO);
|
||||
BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO);
|
||||
|
||||
SupplierInformation byId = supplierInformationService.getById(batchDetails.getSupplierId());
|
||||
reagentConsumableInventoryFullVO.setSupplierName(supplierInformationService.getById(batchDetails.getSupplierId()).getSupplierName());
|
||||
|
||||
reagentConsumableInventoryFullVO.setSupplierName(byId.getSupplierName());
|
||||
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
|
||||
|
||||
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
|
||||
reagentConsumableInventoryFullVO.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
|
||||
reagentConsumableInventoryFullVO.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
reagentConsumableInventoryFullVO.setTotalQuantity(batchDetails.getQuantity());
|
||||
|
||||
reagentConsumableInventoryFullVO.setTotalQuantity(batchDetails.getQuantity());
|
||||
|
||||
reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
|
||||
}
|
||||
reagentConsumableInventoryFullVOS.add(reagentConsumableInventoryFullVO);
|
||||
}
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
|
||||
Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList);
|
||||
|
||||
return pages;
|
||||
}
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
|
||||
Page pages = pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), reagentConsumableInventoryFullVOS);
|
||||
|
||||
return pages;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ReagentConsumableInventoryFullVO> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw){
|
||||
public List<ReagentConsumableInventoryFullVO> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw) {
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
|
||||
// return list;
|
||||
|
||||
@@ -326,4 +288,118 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
}
|
||||
return reagentConsumableInventoryFullVOList;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void referenceMaterialTablePDF(List<ReferenceMaterialVO> voList, String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
System.out.println("referenceMaterialTablePDF.................");
|
||||
|
||||
int x = 1;
|
||||
|
||||
for (ReferenceMaterialVO referenceMaterialVO : voList) {
|
||||
|
||||
referenceMaterialVO.setI(x);
|
||||
x++;
|
||||
}
|
||||
//-----------------------------
|
||||
// 生成 word 版本的 采购目录
|
||||
|
||||
|
||||
String applyFileName = "标准物质一览表-" + id;
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
ossFile.fileGet("template" + "/" + "标准物质一览表模板.docx", bos);
|
||||
|
||||
byte[] templateArray = bos.toByteArray();
|
||||
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(templateArray);
|
||||
bos.close();
|
||||
|
||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
|
||||
ConfigureBuilder builder = Configure.builder().buildGramer("${", "}").useSpringEL(false);
|
||||
builder.bind("voList", policy).build();
|
||||
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
}}
|
||||
);
|
||||
bis.close();
|
||||
|
||||
ByteArrayOutputStream fosWord = new ByteArrayOutputStream();
|
||||
template.write(fosWord);
|
||||
template.close();
|
||||
|
||||
//------------
|
||||
ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
|
||||
fosWord.close();
|
||||
|
||||
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
||||
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
||||
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||
fisWord.close();
|
||||
|
||||
|
||||
ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
|
||||
IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
|
||||
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
||||
outPDF.close();
|
||||
|
||||
|
||||
ossFile.fileSave("document" + "/" + "referenceMaterial" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
||||
isPDF.close();
|
||||
|
||||
|
||||
System.out.println(String.format("转换为 PDF 结束"));
|
||||
|
||||
}
|
||||
|
||||
//试剂/耗材扫描物品编码进行持久化
|
||||
@Override
|
||||
public void setCode(String id, String code) {
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(id);
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq("reagent_consumable_id", id));
|
||||
|
||||
if (byId != null & one != null) {
|
||||
byId.setCode(code);
|
||||
one.setCode(code);
|
||||
|
||||
reagentConsumableInventoryService.updateById(one);
|
||||
reagentConsumablesService.updateById(byId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//标准物质条形码打印
|
||||
public String buildCodeLabelContent(String id) {
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(id);
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
referenceMaterialServiceById.setCode(LocalDateTimeUtil.format(LocalDateTime.now(),"yyyyMMddHHmmssSSS"));
|
||||
|
||||
referenceMaterialService.updateById(referenceMaterialServiceById);
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(referenceMaterialServiceById.getReagentConsumableId());
|
||||
String reagentConsumableName = byId.getReagentConsumableName();
|
||||
ReferenceMaterialVO referenceMaterial = new ReferenceMaterialVO();
|
||||
BeanUtils.copyProperties(referenceMaterialServiceById,referenceMaterial);
|
||||
referenceMaterial.setCodeName(reagentConsumableName+":"+referenceMaterialServiceById.getCode());
|
||||
data.put("referenceMaterial", referenceMaterial);
|
||||
|
||||
String templateFileName = AppStartupRunner.getCfg( "labelTemplate_standardSubstance");
|
||||
|
||||
return remoteTemplate2htmlService.getHtml(templateFileName,data);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+4
-81
@@ -1,12 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.config.ConfigureBuilder;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
@@ -15,19 +10,11 @@ import digital.laboratory.platform.reagent.mapper.ReferenceMaterialMapper;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.vo.ReferenceMaterialVO;
|
||||
import digital.laboratory.platform.reagent.vo.StandardSolutionCurveVO;
|
||||
import feign.Response;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -81,77 +68,13 @@ public class ReferenceMaterialServiceImpl extends ServiceImpl<ReferenceMaterialM
|
||||
}
|
||||
|
||||
@Override
|
||||
public void standardSolutionCurveTablePDF(List<StandardSolutionCurveVO> voList, String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
System.out.println("standardSolutionCurveTablePDF.................");
|
||||
public List<ReferenceMaterialVO> getReferenceMaterialList(){
|
||||
|
||||
Integer x = 1;
|
||||
for (StandardSolutionCurveVO standardSolutionCurveVO : voList) {
|
||||
List<ReferenceMaterialVO> referenceMaterialVOList = baseMapper.getReferenceMaterialVOList();
|
||||
|
||||
standardSolutionCurveVO.setSerialnNumber(x.toString());
|
||||
|
||||
x++;
|
||||
}
|
||||
|
||||
String applyFileName = "标准工作曲线溶液配制记录表-" + id;
|
||||
//-----------------------------
|
||||
// 生成 word 版本的 验收记录表
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
|
||||
ossFile.fileGet("template" + "/" + "标准工作曲线溶液配制记录表模板.docx", bos);
|
||||
|
||||
byte[] templateArray = bos.toByteArray();
|
||||
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(templateArray);
|
||||
|
||||
bos.close();
|
||||
|
||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
|
||||
ConfigureBuilder builder = Configure.builder().buildGramer("${", "}").useSpringEL(false);
|
||||
|
||||
builder.bind("voList", policy).build();
|
||||
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList",voList);
|
||||
put("id",id);
|
||||
put("size",1);
|
||||
return referenceMaterialVOList;
|
||||
};
|
||||
|
||||
|
||||
}}
|
||||
);
|
||||
bis.close();
|
||||
|
||||
ByteArrayOutputStream fosWord = new ByteArrayOutputStream();
|
||||
template.write(fosWord);
|
||||
template.close();
|
||||
|
||||
//------------
|
||||
ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
|
||||
fosWord.close();
|
||||
|
||||
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
||||
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
||||
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||
fisWord.close();
|
||||
|
||||
|
||||
ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
|
||||
IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
|
||||
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
||||
outPDF.close();
|
||||
|
||||
|
||||
ossFile.fileSave("document" + "/" + "standardSolutionCurve" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
||||
isPDF.close();
|
||||
|
||||
|
||||
System.out.println(String.format("转换为 PDF 结束"));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+34
-34
@@ -505,7 +505,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
for (InstructionBook instructionBook : list) {
|
||||
|
||||
InstructionBookVO vo = instructionBookService.getVO(instructionBook.getId());
|
||||
InstructionBookVO vo = instructionBookService.getVO(instructionBook.getReferenceMaterialTypeId());
|
||||
|
||||
instructionBookVOS1.add(vo);
|
||||
}
|
||||
@@ -534,29 +534,29 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
Set<String> permissions = dlpUser.getPermissions();
|
||||
|
||||
ReviewAndApprove reviewAndApprove = new ReviewAndApprove();
|
||||
//分散采购申请待审核列表
|
||||
//分散采购申请已审核列表
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOS = new ArrayList<>();
|
||||
//采购目录待审核列表
|
||||
//采购目录已审核列表
|
||||
List<PurchaseCatalogueVO> purchaseCatalogueVOList = new ArrayList<>();
|
||||
//采购计划待审核列表
|
||||
//采购计划已审核列表
|
||||
List<PurchasingPlanVO> purchasingPlanVOS = new ArrayList<>();
|
||||
//符合性检查待审核列表
|
||||
//符合性检查已审核列表
|
||||
List<ComplianceCheckVO> complianceCheckVOS = new ArrayList<>();
|
||||
//指导书待审核列表
|
||||
//指导书已审核列表
|
||||
List<InstructionBookVO> instructionBookVOS = new ArrayList<>();
|
||||
//期间核查待审核列表
|
||||
//期间核查已审核列表
|
||||
List<CheckScheduleVO> checkScheduleVOS = new ArrayList<>();
|
||||
//标准物质管理待审核列表
|
||||
//标准物质管理已审核列表
|
||||
List<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS = new ArrayList<>();
|
||||
//验收记录待审核列表
|
||||
//验收记录已审核列表
|
||||
List<AcceptanceRecordFormVO> acceptanceRecordFormVOS = new ArrayList<>();
|
||||
//期间核查结果录入待审核列表
|
||||
//期间核查结果录入已审核列表
|
||||
List<PeriodVerificationImplementationVO> periodVerificationImplementationVOS = new ArrayList<>();
|
||||
//供应商评价待审核列表
|
||||
//供应商评价已审核列表
|
||||
List<EvaluationFormVO> evaluationFormVOS = new ArrayList<>();
|
||||
|
||||
List<CentralizedRequestVO> centralizedRequestVOList = new ArrayList<>();
|
||||
|
||||
//集中采购申请已审核列表
|
||||
if (permissions.contains("reagent_centralized_request_audit")){
|
||||
|
||||
LambdaQueryWrapper<CentralizedRequest> centralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -576,7 +576,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_primary")) {
|
||||
|
||||
//分散采购申请一级审核列表
|
||||
//分散采购申请一级已审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 2).or().eq(DecentralizedRequest::getStatus, -2);
|
||||
@@ -596,7 +596,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_secondary")) {
|
||||
|
||||
//分散采购申请二级审核列表
|
||||
//分散采购申请二级已审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 3).or().eq(DecentralizedRequest::getStatus, -3);
|
||||
@@ -616,7 +616,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_threeLevel")) {
|
||||
|
||||
//分散采购申请三级审核列表
|
||||
//分散采购申请三级已审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 4).or().eq(DecentralizedRequest::getStatus, -4);
|
||||
@@ -635,7 +635,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_approve")) {
|
||||
//分散采购申请审批列表
|
||||
//分散采购申请已审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 5).or().eq(DecentralizedRequest::getStatus, -5);
|
||||
@@ -654,7 +654,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_purchase_catalogue_primary")) {
|
||||
//采购目录一级审核列表
|
||||
//采购目录一级已审核列表
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getStatus, 2).or().eq(PurchaseCatalogue::getStatus, -2);
|
||||
@@ -672,7 +672,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
purchaseCatalogueVOList.addAll(purchaseCatalogueVOArrayList);
|
||||
|
||||
}
|
||||
//采购目录二级审核
|
||||
//采购目录已审核列表
|
||||
if (permissions.contains("reagent_purchase_catalogue_secondary")) {
|
||||
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -693,7 +693,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
purchaseCatalogueVOList.addAll(purchaseCatalogueVOArrayList);
|
||||
|
||||
}
|
||||
//采购计划审核
|
||||
//采购计划已审核列表
|
||||
if (permissions.contains("reagent_purchasing_plan_audit")) {
|
||||
|
||||
LambdaQueryWrapper<PurchasingPlan> purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -712,7 +712,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
}
|
||||
purchasingPlanVOS.addAll(purchasingPlanVOS1);
|
||||
}
|
||||
//采购计划审批
|
||||
//采购计划已审批列表
|
||||
if (permissions.contains("reagent_purchasing_plan_approve")) {
|
||||
|
||||
LambdaQueryWrapper<PurchasingPlan> purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -732,7 +732,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
purchasingPlanVOS.addAll(purchasingPlanVOS1);
|
||||
|
||||
}
|
||||
//采购验收一级审核
|
||||
//采购验收一级已审核列表
|
||||
if (permissions.contains("reagent_acceptance_record_form_primary")){
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -753,7 +753,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
}
|
||||
|
||||
//采购验收二级审核
|
||||
//采购验收二级已审核列表
|
||||
if (permissions.contains("reagent_acceptance_record_form_secondary")){
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -774,7 +774,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
}
|
||||
|
||||
//采购验收三级审核
|
||||
//采购验收三级已审核列表
|
||||
if (permissions.contains("reagent_acceptance_record_form_threeLevel")){
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -794,7 +794,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
acceptanceRecordFormVOS.addAll(acceptanceRecordFormVOS1);
|
||||
|
||||
}
|
||||
//符合性检查一级审核
|
||||
//符合性检查一级已审核列表
|
||||
if (permissions.contains("reagent_compliance_check_primaryAudit")){
|
||||
|
||||
LambdaQueryWrapper<ComplianceCheck> complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -814,7 +814,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
complianceCheckVOS.addAll(complianceCheckVOS1);
|
||||
}
|
||||
|
||||
//符合性检查二级审核
|
||||
//符合性检查二级已审核列表
|
||||
if (permissions.contains("reagent_compliance_check_secondaryAudit")){
|
||||
|
||||
LambdaQueryWrapper<ComplianceCheck> complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -833,7 +833,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
}
|
||||
complianceCheckVOS.addAll(complianceCheckVOS1);
|
||||
}
|
||||
//期间核查计划审核
|
||||
//期间核查计划已审核列表
|
||||
if (permissions.contains("reagent_check_schedule_audit")){
|
||||
|
||||
LambdaQueryWrapper<CheckSchedule> checkScheduleLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -852,7 +852,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
}
|
||||
checkScheduleVOS.addAll(checkScheduleVOS1);
|
||||
}
|
||||
//期间核查录入结果审核
|
||||
//期间核查录入结果已审核列表
|
||||
if (permissions.contains("reagent_period_verification_implementation_audit")){
|
||||
|
||||
LambdaQueryWrapper<PeriodVerificationImplementation> periodVerificationImplementationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -872,7 +872,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
periodVerificationImplementationVOS.addAll(periodVerificationImplementationVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理一级审核
|
||||
//标准物质管理一级已审核列表
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditPrimary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -892,7 +892,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理二级审核
|
||||
//标准物质管理二级已审核列表
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditSecondary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -911,7 +911,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
//标准物质管理审批
|
||||
//标准物质管理已审批列表
|
||||
if (permissions.contains("reagent_standard_material_approval_form_approve")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -930,7 +930,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
|
||||
//供应商评价二级已审核列表
|
||||
if (permissions.contains("reagent_evaluation_form_secondaryAudit")){
|
||||
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -949,7 +949,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
}
|
||||
evaluationFormVOS.addAll(evaluationFormVOS1);
|
||||
}
|
||||
|
||||
//供应商评价三级已审核列表
|
||||
if (permissions.contains("reagent_evaluation_form_three_level_audit")){
|
||||
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -968,7 +968,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
}
|
||||
evaluationFormVOS.addAll(evaluationFormVOS1);
|
||||
}
|
||||
//指导书审核列表
|
||||
//指导书已审核列表
|
||||
if (permissions.contains("reagent_instruction_book_audit")){
|
||||
|
||||
LambdaQueryWrapper<InstructionBook> instructionBookLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -981,7 +981,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
for (InstructionBook instructionBook : list) {
|
||||
|
||||
InstructionBookVO vo = instructionBookService.getVO(instructionBook.getId());
|
||||
InstructionBookVO vo = instructionBookService.getVO(instructionBook.getReferenceMaterialTypeId());
|
||||
|
||||
instructionBookVOS1.add(vo);
|
||||
}
|
||||
|
||||
+29
-5
@@ -18,7 +18,10 @@ import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.StandardMaterialApplicationMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO;
|
||||
|
||||
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
|
||||
import feign.Response;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -41,6 +44,7 @@ import java.util.List;
|
||||
* @describe (标准物质领用 / 归还登记表) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@SuppressWarnings("all")
|
||||
public class StandardMaterialApplicationServiceImpl extends ServiceImpl<StandardMaterialApplicationMapper, StandardMaterialApplication> implements StandardMaterialApplicationService {
|
||||
|
||||
@@ -61,18 +65,21 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
@Autowired
|
||||
private BatchDetailsService batchDetailsService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private StandardReserveSolutionService standardReserveSolutionService;
|
||||
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
|
||||
@Autowired
|
||||
|
||||
private RemoteCabinetService remoteCabinetService;
|
||||
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
@Override//归还标准物质
|
||||
@Transactional
|
||||
@Transactional
|
||||
public StandardMaterialApplication returnById(StandardMaterialApplicationDTO standardMaterialApplicationDTO) {
|
||||
|
||||
StandardMaterialApplication byId = standardMaterialApplicationService.getById(standardMaterialApplicationDTO.getStandardMaterialApplicationId());
|
||||
@@ -83,10 +90,13 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(byId.getReferenceMaterialId());
|
||||
|
||||
remoteCabinetService.updateCabinet(standardMaterialApplicationDTO.getLatticeId(), referenceMaterial.getId(), "1");
|
||||
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId());
|
||||
|
||||
referenceMaterial.setLocation(standardMaterialApplicationDTO.getLocation());
|
||||
referenceMaterial.setLocation(standardMaterialApplicationDTO.getLocation());
|
||||
referenceMaterial.setBoxId(standardMaterialApplicationDTO.getBoxId());
|
||||
//若无需归还,则证明标准物质/标准储备溶液已经使用完毕,删除记录即可
|
||||
if (standardMaterialApplicationDTO.getOutOfUse()) {
|
||||
|
||||
@@ -94,7 +104,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
|
||||
if (reagentConsumables.getCategory().equals("标准储备溶液")) {
|
||||
|
||||
StandardReserveSolution solution_numbering = standardReserveSolutionService.getOne(Wrappers.<StandardReserveSolution>query().eq("solution_numbering", referenceMaterial.getNumber()));
|
||||
StandardReserveSolution solution_numbering = standardReserveSolutionService.getOne(Wrappers.<StandardReserveSolution>query().eq("reference_id", referenceMaterial.getId()));
|
||||
|
||||
solution_numbering.setStatus(-1);
|
||||
|
||||
@@ -107,7 +117,9 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
byId2.setQuantity(byId2.getQuantity() + 1);
|
||||
ReagentConsumableInventory byId1 = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
byId1.setTotalQuantity(byId1.getTotalQuantity() + 1);
|
||||
|
||||
if (byId2.getQuantity()>0){
|
||||
byId2.setServiceStatus(1);
|
||||
}
|
||||
batchDetailsService.updateById(byId2);
|
||||
reagentConsumableInventoryService.updateById(byId1);
|
||||
|
||||
@@ -152,6 +164,12 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(record.getReferenceSubstanceId());
|
||||
|
||||
record.setCategory(byId.getCategory());
|
||||
//将位置信息传入VO对象
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(record.getReferenceMaterialId());
|
||||
|
||||
record.setLocation(byId1.getLocation());
|
||||
record.setLatticeId(byId1.getLatticeId());
|
||||
record.setBoxId(byId1.getBoxId());
|
||||
|
||||
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -173,7 +191,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
|
||||
|
||||
@Override
|
||||
public void standardMaterialApplicationTablePDF(List<StandardMaterialApplicationVO> voList, String ids,HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
public void standardMaterialApplicationTablePDF(List<StandardMaterialApplicationVO> voList, String ids, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
System.out.println("standardMaterialApplicationTablePDF.................");
|
||||
|
||||
int x = 1;
|
||||
@@ -255,6 +273,12 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
|
||||
StandardMaterialApplicationVO standardMaterialApplicationVO = baseMapper.getStandardMaterialApplicationVO(id);
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApplicationVO.getReferenceMaterialId());
|
||||
|
||||
standardMaterialApplicationVO.setLocation(byId.getLocation());
|
||||
standardMaterialApplicationVO.setBoxId(byId.getBoxId());
|
||||
standardMaterialApplicationVO.setLatticeId(byId.getLatticeId());
|
||||
|
||||
return standardMaterialApplicationVO;
|
||||
}
|
||||
|
||||
|
||||
+9
-1
@@ -95,7 +95,15 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
|
||||
} else {
|
||||
}else if (standardMaterialApprovalFormDTO.getApplicationContent()==5){
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
|
||||
|
||||
byId.setStatus(-4);
|
||||
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
|
||||
|
||||
|
||||
+24
-17
@@ -21,7 +21,9 @@ import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.StandardReserveSolutionMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
|
||||
import feign.Response;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -55,13 +57,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
private SolutionUseFormService solutionUseFormService;
|
||||
|
||||
@Autowired
|
||||
private LatticeFormService latticeFormService;
|
||||
|
||||
@Autowired
|
||||
private StorageRoomFormService storageRoomFormService;
|
||||
|
||||
@Autowired
|
||||
private CabinetFormService cabinetFormService;
|
||||
private RemoteCabinetService remoteCabinetService;
|
||||
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
@@ -87,7 +83,8 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
//查出该标准储备溶液对应的所有使用记录
|
||||
List<SolutionUseFormVO> solutionUseFormVOList = solutionUseFormService.getSolutionUseFormVOList(standardReserveSolutionVOById.getId());
|
||||
|
||||
standardReserveSolutionVOById.setSolutionUseFormVOList(solutionUseFormVOList);
|
||||
if (solutionUseFormVOList!=null){
|
||||
standardReserveSolutionVOById.setSolutionUseFormVOList(solutionUseFormVOList);}
|
||||
|
||||
return standardReserveSolutionVOById;
|
||||
}
|
||||
@@ -144,10 +141,24 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
}
|
||||
|
||||
@Override//标准储备溶液入库任务
|
||||
@GlobalTransactional
|
||||
public IPage<StandardReserveSolutionVO> getStandardReserveSolutionVOList(IPage<StandardReserveSolution> page, QueryWrapper<StandardReserveSolution> qw) {
|
||||
|
||||
IPage<StandardReserveSolutionVO> standardReserveSolutionVOPage = baseMapper.getStandardReserveSolutionVOPage(page, qw);
|
||||
|
||||
List<StandardReserveSolutionVO> records = standardReserveSolutionVOPage.getRecords();
|
||||
|
||||
for (StandardReserveSolutionVO record : records) {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(record.getReferenceId());
|
||||
|
||||
if (byId!=null) {
|
||||
record.setLocation(byId.getLocation());
|
||||
record.setLatticeId(byId.getLatticeId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return standardReserveSolutionVOPage;
|
||||
}
|
||||
|
||||
@@ -159,6 +170,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
String location = standardReserveSolutionFullDTO.getLocation();
|
||||
String latticeId = standardReserveSolutionFullDTO.getLatticeId();
|
||||
String boxId = standardReserveSolutionFullDTO.getBoxId();
|
||||
|
||||
String warehousingRemarks = standardReserveSolutionFullDTO.getWarehousingRemarks();
|
||||
//提供格子位置与标准储备溶液配置表ID
|
||||
@@ -166,6 +178,8 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(byId.getReferenceMaterialId());
|
||||
|
||||
remoteCabinetService.updateCabinet(standardReserveSolutionFullDTO.getLatticeId(),byId1.getId(),"1");
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(byId1.getBatchDetailsId());
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -209,9 +223,9 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setNumber(reagentConsumableInventory.getEnglishName() + "-" + formatter.format(date));
|
||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
referenceMaterial.setLatticeId(latticeId);
|
||||
referenceMaterial.setLocation(standardReserveSolutionFullDTO.getLocation());
|
||||
referenceMaterial.setBoxId(boxId);
|
||||
|
||||
byId.setReferenceId(referenceMaterial.getId());
|
||||
|
||||
@@ -255,6 +269,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
referenceMaterial.setLatticeId(latticeId);
|
||||
referenceMaterial.setLocation(standardReserveSolutionFullDTO.getLocation());
|
||||
referenceMaterial.setBoxId(boxId);
|
||||
|
||||
byId.setReferenceId(referenceMaterial.getId());
|
||||
|
||||
@@ -288,14 +303,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
BeanUtils.copyProperties(standardReserveSolutionVOById,standardReserveSolutionFullVO);
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardReserveSolutionVOById.getReferenceId());
|
||||
|
||||
if (byId!=null) {
|
||||
standardReserveSolutionFullVO.setLocation(byId.getLocation());
|
||||
standardReserveSolutionFullVO.setLatticeId(byId.getLatticeId());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return standardReserveSolutionFullVO;
|
||||
|
||||
+27
-1
@@ -1,14 +1,19 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.entity.WarehousingBatchList;
|
||||
import digital.laboratory.platform.reagent.mapper.WarehousingBatchListMapper;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.service.WarehousingBatchListService;
|
||||
import digital.laboratory.platform.reagent.service.WarehousingContentService;
|
||||
import digital.laboratory.platform.reagent.vo.WarehousingBatchListVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Wrapper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -24,11 +29,32 @@ public class WarehousingBatchListServiceImpl extends ServiceImpl<WarehousingBatc
|
||||
|
||||
private WarehousingContentService warehousingContentService;
|
||||
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
|
||||
@Override
|
||||
public List<WarehousingBatchListVO> getWarehousingBatchListVOList(String warehousingContentId) {
|
||||
|
||||
List<WarehousingBatchListVO> warehousingBatchListVOList = baseMapper.getWarehousingBatchListVOList(warehousingContentId);
|
||||
List<WarehousingBatchListVO> warehousingBatchListVOList = baseMapper.getWarehousingBatchListVOList(warehousingContentId);
|
||||
|
||||
ArrayList<String> strings = new ArrayList<>();
|
||||
|
||||
for (WarehousingBatchListVO warehousingBatchListVO : warehousingBatchListVOList) {
|
||||
|
||||
if (warehousingBatchListVO.getBatchId() != null) {
|
||||
|
||||
List<ReferenceMaterial> batch_details_id = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query().eq("batch_details_id", warehousingBatchListVO.getBatchId()));
|
||||
|
||||
for (ReferenceMaterial referenceMaterial : batch_details_id) {
|
||||
|
||||
strings.add(referenceMaterial.getId());
|
||||
}
|
||||
}
|
||||
warehousingBatchListVO.setIdList(strings);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return warehousingBatchListVOList;
|
||||
}
|
||||
|
||||
+2
@@ -43,6 +43,8 @@ public class WarehousingContentServiceImpl extends ServiceImpl<WarehousingConten
|
||||
warehousingContentVO.setBrand(byId.getBrand());
|
||||
warehousingContentVO.setSpecificationAndModel(byId.getSpecificationAndModel());
|
||||
warehousingContentVO.setStandardValueOrPurity(byId.getStandardValueOrPurity());
|
||||
warehousingContentVO.setDeviationOrUncertainty(byId.getDeviationOrUncertainty());
|
||||
warehousingContentVO.setUnitPrice(byId.getUnitPrice());
|
||||
|
||||
}
|
||||
return warehousingContentVOList;
|
||||
|
||||
+83
-140
@@ -1,5 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.PageUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -20,7 +21,9 @@ import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.WarehousingRecordFormMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
|
||||
import feign.Response;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -65,14 +68,10 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
@Autowired
|
||||
private LatticeFormService latticeFormService;
|
||||
|
||||
@Autowired
|
||||
private StorageRoomFormService storageRoomFormService;
|
||||
private RemoteCabinetService remoteCabinetService;
|
||||
|
||||
@Autowired
|
||||
private CabinetFormService cabinetFormService;
|
||||
|
||||
@Autowired
|
||||
private BatchDetailsService batchDetailsService;
|
||||
@@ -129,13 +128,14 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
@GlobalTransactional
|
||||
@Override//录入入库明细
|
||||
public WarehousingRecordFormVO addFormById(List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, DLPUser dlpUser) {
|
||||
|
||||
for (WarehousingRecordFormDTO warehousingRecordFormDTO : warehousingRecordFormDTOList) {
|
||||
|
||||
if (warehousingRecordFormDTO.getLatticeId().isEmpty()&warehousingRecordFormDTO.getLocation().isEmpty()){
|
||||
if (warehousingRecordFormDTO.getLatticeId().isEmpty() & warehousingRecordFormDTO.getLocation().isEmpty() &
|
||||
warehousingRecordFormDTO.getBoxId().isEmpty()) {
|
||||
|
||||
throw new RuntimeException(String.format("请选择存放位置后再进行提交"));
|
||||
}
|
||||
@@ -146,6 +146,8 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
int i = 0;
|
||||
//签收内容循环
|
||||
for (WarehousingRecordFormDTO warehousingRecordFormDTO : warehousingRecordFormDTOList) {
|
||||
|
||||
String latticeId = warehousingRecordFormDTO.getLatticeId();
|
||||
//录入签收批次信息
|
||||
WarehousingBatchList warehousingBatchList = new WarehousingBatchList();
|
||||
|
||||
@@ -157,6 +159,8 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
warehousingBatchList.setDateOfReceipt(LocalDateTime.now());
|
||||
|
||||
warehousingBatchList.setLocation(warehousingRecordFormDTO.getLocation());
|
||||
|
||||
LambdaQueryWrapper<WarehousingBatchList> warehousingBatchListLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
warehousingBatchListLambdaQueryWrapper.eq(WarehousingBatchList::getWarehousingContentId, warehousingBatchList.getWarehousingContentId());
|
||||
@@ -165,37 +169,16 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
WarehousingContent byId = warehousingContentService.getById(warehousingBatchList.getWarehousingContentId());
|
||||
|
||||
|
||||
byId.setWarehousingQuantity(byId.getWarehousingQuantity() + warehousingBatchList.getQuantity());
|
||||
//判断采购数量与签收数量
|
||||
if (byId.getWarehousingQuantity() > byId.getTotalQuantity()) {
|
||||
throw new RuntimeException(String.format("入库数量不能大于采购数量"));
|
||||
}
|
||||
|
||||
if (warehousingContentService.updateById(byId) & warehousingBatchListService.save(warehousingBatchList)) {
|
||||
warehousingContentService.updateById(byId);
|
||||
|
||||
flag = true;
|
||||
} else {
|
||||
flag = false;
|
||||
}
|
||||
//入库登记表更新
|
||||
StorageRegistrationForm storageRegistrationForm = new StorageRegistrationForm();
|
||||
|
||||
storageRegistrationForm.setStorageRegistrationFormId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
storageRegistrationForm.setReagentConsumableId(byId.getReagentConsumableId());
|
||||
|
||||
storageRegistrationForm.setQuantity(warehousingBatchList.getQuantity());
|
||||
|
||||
storageRegistrationForm.setRemarks(warehousingRecordFormDTO.getRemark());
|
||||
|
||||
storageRegistrationFormService.save(storageRegistrationForm);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, byId.getReagentConsumableId());
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", byId.getReagentConsumableId()));
|
||||
//录入仓库批次信息,若仓库不存在该物品,则新增该物品的库存信息
|
||||
if (one == null) {
|
||||
|
||||
@@ -214,6 +197,12 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setWarningValue(warehousingRecordFormDTO.getWarningValue());
|
||||
//如果供应商未提供物品编码,则需在入库时扫描标签录入编码
|
||||
if (warehousingRecordFormDTO.getCode() != null) {
|
||||
reagentConsumableInventory.setCode(warehousingRecordFormDTO.getCode());
|
||||
reagentConsumables.setCode(warehousingRecordFormDTO.getCode());
|
||||
reagentConsumablesService.updateById(reagentConsumables);
|
||||
}
|
||||
|
||||
BatchDetails batchDetails = new BatchDetails();
|
||||
|
||||
@@ -225,16 +214,21 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
batchDetails.setSupplierId(byId.getSupplierId());
|
||||
batchDetails.setBatch(1);
|
||||
batchDetails.setExpirationDate(warehousingRecordFormDTO.getExpirationDate());
|
||||
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity()*Integer.valueOf(reagentConsumables.getPackagedCopies()));
|
||||
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity() * Integer.valueOf(reagentConsumables.getPackagedCopies()));
|
||||
|
||||
if (batchDetails.getQuantity()==null){
|
||||
warehousingBatchList.setBatchId(batchDetails.getBatchDetailsId());
|
||||
|
||||
if (batchDetails.getQuantity() == null) {
|
||||
batchDetails.setQuantity(0);
|
||||
}
|
||||
|
||||
|
||||
if (reagentConsumables.getCategory().equals("试剂")|reagentConsumables.getCategory().equals("耗材")){
|
||||
if (reagentConsumables.getCategory().equals("试剂") | reagentConsumables.getCategory().equals("耗材")) {
|
||||
//更新格子信息(试剂耗材传入类ID)
|
||||
remoteCabinetService.updateCabinet(latticeId, byId.getReagentConsumableId(), "1");
|
||||
batchDetails.setLatticeId(warehousingRecordFormDTO.getLatticeId());
|
||||
batchDetails.setLocation(warehousingRecordFormDTO.getLocation());
|
||||
batchDetails.setBoxId(warehousingRecordFormDTO.getBoxId());
|
||||
}
|
||||
|
||||
if (reagentConsumableInventory.getTotalQuantity() == null) {
|
||||
@@ -247,6 +241,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
//如果是标准物质,则赋值编号
|
||||
if (reagentConsumables.getCategory().equals("标准物质")) {
|
||||
|
||||
|
||||
for (int j = 0; j < batchDetails.getQuantity(); j++) {
|
||||
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
@@ -258,6 +253,11 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
referenceMaterial.setLocation(warehousingRecordFormDTO.getLocation());
|
||||
referenceMaterial.setLatticeId(warehousingRecordFormDTO.getLatticeId());
|
||||
referenceMaterial.setCustodianName(warehousingRecordFormDTO.getCustodianName());
|
||||
referenceMaterial.setBoxId(warehousingRecordFormDTO.getBoxId());
|
||||
|
||||
|
||||
//更新格子信息(标准物质传入对象ID)
|
||||
remoteCabinetService.updateCabinet(latticeId, referenceMaterial.getId(), "1");
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
@@ -265,7 +265,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
String location = warehousingRecordFormDTO.getLocation();
|
||||
|
||||
String prefix = reagentConsumables.getEnglishName() + "-" + year + "-" + location.charAt(2) + "-";
|
||||
String prefix = reagentConsumables.getEnglishName() + "-" + year + "-" + location.charAt(1) + "-";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
@@ -297,6 +297,12 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
} else {
|
||||
//如果仓库存在该物品
|
||||
|
||||
if (warehousingRecordFormDTO.getCode() != null) {
|
||||
one.setCode(warehousingRecordFormDTO.getCode());
|
||||
ReagentConsumables byId1 = reagentConsumablesService.getById(one.getReagentConsumableId());
|
||||
byId1.setCode(one.getCode());
|
||||
reagentConsumablesService.updateById(byId1);
|
||||
}
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId, byId.getReagentConsumableId());
|
||||
@@ -313,19 +319,23 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
batchDetails.setSupplierId(byId.getSupplierId());
|
||||
batchDetails.setExpirationDate(warehousingRecordFormDTO.getExpirationDate());
|
||||
batchDetails.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId());
|
||||
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity()*Integer.valueOf(one.getPackagedCopies()));
|
||||
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity() * Integer.valueOf(one.getPackagedCopies()));
|
||||
warehousingBatchList.setBatchId(batchDetails.getBatchDetailsId());
|
||||
|
||||
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId())
|
||||
.eq("supplier_id",byId.getSupplierId()));
|
||||
.eq("supplier_id", byId.getSupplierId()));
|
||||
|
||||
if (batchDetailsList.size()==0){
|
||||
if (batchDetailsList.size() == 0) {
|
||||
batchDetails.setBatch(1);
|
||||
}else {
|
||||
batchDetails.setBatch(batchDetailsList.size()+1);
|
||||
} else {
|
||||
batchDetails.setBatch(batchDetailsList.size() + 1);
|
||||
}
|
||||
if (one.getCategory().equals("试剂")|one.getCategory().equals("耗材")){
|
||||
if (one.getCategory().equals("试剂") | one.getCategory().equals("耗材")) {
|
||||
batchDetails.setLocation(warehousingRecordFormDTO.getLocation());
|
||||
batchDetails.setLatticeId(warehousingRecordFormDTO.getLatticeId());
|
||||
batchDetails.setBoxId(warehousingRecordFormDTO.getBoxId());
|
||||
//更新格子信息(试剂耗材传入类ID)
|
||||
remoteCabinetService.updateCabinet(latticeId, byId.getReagentConsumableId(), "1");
|
||||
}
|
||||
|
||||
one.setTotalQuantity(one.getTotalQuantity() + batchDetails.getQuantity());
|
||||
@@ -343,15 +353,18 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
referenceMaterial.setStatus(0);
|
||||
referenceMaterial.setLocation(warehousingRecordFormDTO.getLocation());
|
||||
referenceMaterial.setLatticeId(warehousingRecordFormDTO.getLatticeId());
|
||||
referenceMaterial.setBoxId(warehousingRecordFormDTO.getBoxId());
|
||||
referenceMaterial.setCustodianName(warehousingRecordFormDTO.getCustodianName());
|
||||
//更新格子信息(试剂耗材传入类ID)
|
||||
|
||||
remoteCabinetService.updateCabinet(latticeId, referenceMaterial.getId(), "1");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
|
||||
String location = warehousingRecordFormDTO.getLocation();
|
||||
|
||||
String prefix = reagentConsumables.getEnglishName() + "-" + year + "-" + location.charAt(2) + "-";
|
||||
String prefix = reagentConsumables.getEnglishName() + "-" + year + "-" + location.charAt(1) + "-";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
@@ -380,7 +393,9 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
batchDetailsService.save(batchDetails);
|
||||
}
|
||||
warehousingBatchListService.save(warehousingBatchList);
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<WarehousingContent> warehousingContentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
WarehousingContent byId = warehousingContentService.getById(warehousingRecordFormDTOList.get(0).getWarehousingContentId());
|
||||
@@ -392,6 +407,9 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
List<WarehousingContent> list = warehousingContentService.list(warehousingContentLambdaQueryWrapper);
|
||||
|
||||
WarehousingRecordForm warehousingRecordForm = warehousingRecordFormService.getById(warehousingRecordFormId);
|
||||
|
||||
|
||||
|
||||
//遍历采购内容,判断试剂耗材是否入库完毕
|
||||
for (WarehousingContent warehousingContent : list) {
|
||||
|
||||
@@ -427,19 +445,19 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
SupplierInformation supplierInformation = supplierInformationService.getById(warehousingContent.getSupplierId());
|
||||
|
||||
if (!supplierInformations.contains(supplierInformation)){
|
||||
if (!supplierInformations.contains(supplierInformation)) {
|
||||
supplierInformations.add(supplierInformation);
|
||||
EvaluationForm evaluationForm = evaluationFormService.addForm(supplierInformation.getId());
|
||||
warehousingContent.setEvaluationFormId(evaluationForm.getId());
|
||||
provideServicesOrSuppliesService.addById(evaluationForm.getId(),warehousingContent.getReagentConsumableId());
|
||||
}else {
|
||||
provideServicesOrSuppliesService.addById(evaluationForm.getId(), warehousingContent.getReagentConsumableId());
|
||||
} else {
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSupplierInformationId,supplierInformation.getId())
|
||||
.orderByDesc(EvaluationForm::getCreateTime);
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSupplierInformationId, supplierInformation.getId())
|
||||
.orderByDesc(EvaluationForm::getCreateTime);
|
||||
|
||||
List<EvaluationForm> list1 = evaluationFormService.list(evaluationFormLambdaQueryWrapper);
|
||||
|
||||
provideServicesOrSuppliesService.addById(list1.get(0).getId(),warehousingContent.getReagentConsumableId());
|
||||
provideServicesOrSuppliesService.addById(list1.get(0).getId(), warehousingContent.getReagentConsumableId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +478,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
@Override
|
||||
public IPage<WarehousingRecordFormVO> getWarehousingRecordFormVOPage(Page<WarehousingRecordForm> page, QueryWrapper<WarehousingRecordForm> qw) {
|
||||
|
||||
IPage<WarehousingRecordFormVO> warehousingRecordFormVOPage = baseMapper.getWarehousingRecordFormVOPage(page,qw);
|
||||
IPage<WarehousingRecordFormVO> warehousingRecordFormVOPage = baseMapper.getWarehousingRecordFormVOPage(page, qw);
|
||||
|
||||
List<WarehousingRecordFormVO> records = warehousingRecordFormVOPage.getRecords();
|
||||
|
||||
@@ -472,19 +490,19 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
Integer warehousingQuantity = warehousingContent.getWarehousingQuantity();
|
||||
Integer totalQuantity = warehousingContent.getTotalQuantity();
|
||||
if (record.getWarehousingQuantity()==null&record.getQuantityPurchased()==null){
|
||||
if (record.getWarehousingQuantity() == null & record.getQuantityPurchased() == null) {
|
||||
record.setWarehousingQuantity(0);
|
||||
record.setQuantityPurchased(0);
|
||||
}
|
||||
record.setWarehousingQuantity(record.getWarehousingQuantity()+warehousingQuantity);
|
||||
record.setQuantityPurchased(record.getQuantityPurchased()+totalQuantity);
|
||||
record.setWarehousingQuantity(record.getWarehousingQuantity() + warehousingQuantity);
|
||||
record.setQuantityPurchased(record.getQuantityPurchased() + totalQuantity);
|
||||
}
|
||||
|
||||
}
|
||||
return warehousingRecordFormVOPage;
|
||||
}
|
||||
|
||||
public List<PurchaseRequestPrintVO> getPurchaseRequestPrint(String id){
|
||||
public List<PurchaseRequestPrintVO> getPurchaseRequestPrint(String id) {
|
||||
|
||||
WarehousingRecordForm byId = warehousingRecordFormService.getById(id);
|
||||
|
||||
@@ -494,7 +512,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
DecentralizedRequest request = decentralizedRequestService.getOne(Wrappers.<DecentralizedRequest>query().eq("purchase_list_id", purchaseListDetails1.getPurchaseListId()));
|
||||
|
||||
if (request!=null){
|
||||
if (request != null) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(request.getId());
|
||||
|
||||
@@ -514,7 +532,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
// DecentralizedRequest request = decentralizedRequestService.getOne(Wrappers.<DecentralizedRequest>query().eq("purchase_list_id", purchaseListId));
|
||||
|
||||
if (request!=null){
|
||||
if (request != null) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(request.getId());
|
||||
|
||||
@@ -524,16 +542,17 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
PurchaseRequestPrintVO purchaseRequestPrintVO = new PurchaseRequestPrintVO();
|
||||
|
||||
if (decentralizeDetail.getCategory().equals("标准物质")){
|
||||
if (decentralizeDetail.getCategory().equals("标准物质")) {
|
||||
|
||||
purchaseRequestPrintVO.setRemarks(decentralizeDetail.getRemarks());
|
||||
purchaseRequestPrintVO.setQuantity(decentralizeDetail.getQuantity());
|
||||
purchaseRequestPrintVO.setPurpose(decentralizeDetail.getPurpose());
|
||||
purchaseRequestPrintVO.setSubtotal(decentralizeDetail.getUnitPrice()*decentralizeDetail.getQuantity());
|
||||
purchaseRequestPrintVO.setApplicantName(requestById.getApplicantName());
|
||||
purchaseRequestPrintVO.setReagentConsumableName(decentralizeDetail.getReagentConsumableName());
|
||||
purchaseRequestPrintVO.setRemarks(decentralizeDetail.getRemarks());
|
||||
purchaseRequestPrintVO.setQuantity(decentralizeDetail.getQuantity());
|
||||
purchaseRequestPrintVO.setPurpose(decentralizeDetail.getPurpose());
|
||||
purchaseRequestPrintVO.setSubtotal(decentralizeDetail.getUnitPrice() * decentralizeDetail.getQuantity());
|
||||
purchaseRequestPrintVO.setApplicantName(requestById.getApplicantName());
|
||||
purchaseRequestPrintVO.setReagentConsumableName(decentralizeDetail.getReagentConsumableName());
|
||||
// purchaseRequestPrintVO.setSupplierName();
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -541,89 +560,13 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
ProcurementContent procurementContent = procurementContentService.getById(purchaseListDetails.getProcurementContentId());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return
|
||||
null;
|
||||
return
|
||||
null;
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void PurchaseRequestPrintTablePDF(PurchaseRequestPrintVO purchaseRequestPrintVO, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
//
|
||||
// System.out.println("PurchaseRequestPrintTablePDF.................");
|
||||
//
|
||||
// ReagentConsumables byId = reagentConsumablesService.getById(acceptanceRecordFormVO.getReagentConsumableId());
|
||||
//
|
||||
// String id = acceptanceRecordFormVO.getId();
|
||||
//
|
||||
// String applyFileName = null;
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
// if (byId.getCategory().equals("试剂") | byId.getCategory().equals("耗材")) {
|
||||
//
|
||||
// ossFile.fileGet("template" + "/" + "试剂耗材验收记录表模板.docx", bos);
|
||||
//
|
||||
// applyFileName = "试剂耗材验收记录表" + id;
|
||||
// } else {
|
||||
//
|
||||
// ossFile.fileGet("template" + "/" + "标准物质验收记录表模板.docx", bos);
|
||||
//
|
||||
// applyFileName = "标准物质验收记录表" + id;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// //-----------------------------
|
||||
// // 生成 word 版本的 验收记录表
|
||||
//
|
||||
// byte[] templateArray = bos.toByteArray();
|
||||
//
|
||||
// ByteArrayInputStream bis = new ByteArrayInputStream(templateArray);
|
||||
// bos.close();
|
||||
//
|
||||
// LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
//
|
||||
// Configure config = Configure.builder().
|
||||
// bind("voList", policy).build();
|
||||
// /**
|
||||
// * 循环表格
|
||||
// */
|
||||
// XWPFTemplate template = XWPFTemplate.compile(bis, config).render(
|
||||
// new HashMap<String, Object>() {{
|
||||
// put("theSameBrandAndModel", acceptanceRecordFormVO.getTheSameBrandAndModel());
|
||||
// }}
|
||||
// );
|
||||
// bis.close();
|
||||
//
|
||||
// ByteArrayOutputStream fosWord = new ByteArrayOutputStream();
|
||||
// template.write(fosWord);
|
||||
// template.close();
|
||||
//
|
||||
// //------------
|
||||
// ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
|
||||
// fosWord.close();
|
||||
//
|
||||
// //MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
||||
// MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
||||
// Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||
// fisWord.close();
|
||||
//
|
||||
//
|
||||
// ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
|
||||
// IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
|
||||
// ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
||||
// outPDF.close();
|
||||
//
|
||||
//
|
||||
// ossFile.fileSave("document" + "/" + "acceptanceRecordForm" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
||||
// isPDF.close();
|
||||
//
|
||||
//
|
||||
// System.out.println(String.format("转换为 PDF 结束"));
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -26,10 +27,11 @@ public class CentralizedRequestVO extends CentralizedRequest {
|
||||
private List<DetailsOfCentralizedVO> detailsOfCentralizedVOList;
|
||||
@ApiModelProperty(value="申请人名称")
|
||||
|
||||
private String applicantName;
|
||||
private String createName;
|
||||
|
||||
private String auditorName;
|
||||
|
||||
|
||||
private String type = "集中采购申请";
|
||||
|
||||
|
||||
|
||||
+3
@@ -14,6 +14,9 @@ public class PeriodVerificationImplementationVO extends PeriodVerificationImplem
|
||||
@ApiModelProperty(value = "标准物质名称")
|
||||
private String referenceMaterialName;
|
||||
|
||||
@ApiModelProperty(value = "类ID")
|
||||
private String reagentConsumableId;
|
||||
|
||||
@ApiModelProperty(value = "技术负责人名称")
|
||||
private String technicalDirectorName;
|
||||
|
||||
|
||||
@@ -36,4 +36,6 @@ public class PurchaseRequestPrintVO {
|
||||
@ApiModelProperty(value="(小计)")
|
||||
private Double subtotal;
|
||||
|
||||
private Integer i;
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -59,5 +59,8 @@ public class ReagentConsumableInventoryFullVO extends ReagentConsumableInventory
|
||||
@ApiModelProperty(value="(有效期限)")
|
||||
private Integer validityPeriod;
|
||||
|
||||
@ApiModelProperty(value="(打印序号)")
|
||||
private Integer i;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -9,4 +9,16 @@ public class ReferenceMaterialVO extends ReferenceMaterial {
|
||||
|
||||
@ApiModelProperty(value="标准物质名称")
|
||||
private String referenceMaterialName;
|
||||
|
||||
|
||||
@ApiModelProperty(value="规格型号")
|
||||
private String specificationAndModel;
|
||||
|
||||
|
||||
@ApiModelProperty(value="纯度")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
private Integer i ;
|
||||
|
||||
private String codeName;
|
||||
}
|
||||
|
||||
+9
@@ -39,4 +39,13 @@ public class StandardMaterialApplicationVO extends StandardMaterialApplication {
|
||||
*/
|
||||
@ApiModelProperty(value="(归还日期)")
|
||||
private String dateOfReturns;
|
||||
|
||||
@ApiModelProperty(value="格子ID")
|
||||
private String latticeId;
|
||||
|
||||
@ApiModelProperty(value="位置信息")
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty(value="柜子ID")
|
||||
private String boxId;
|
||||
}
|
||||
|
||||
@@ -14,4 +14,10 @@ public class StandardReserveSolutionVO extends StandardReserveSolution {
|
||||
|
||||
private List<SolutionUseFormVO> solutionUseFormVOList;
|
||||
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty(value = "存储期限")
|
||||
private Integer storageLife;
|
||||
|
||||
private String latticeId;
|
||||
}
|
||||
|
||||
@@ -5,10 +5,13 @@ import digital.laboratory.platform.reagent.entity.WarehousingBatchList;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WarehousingBatchListVO extends WarehousingBatchList {
|
||||
|
||||
@ApiModelProperty(value="入库人名称")
|
||||
private String depositorName;
|
||||
|
||||
private List<String> idList;
|
||||
}
|
||||
|
||||
@@ -30,4 +30,13 @@ public class WarehousingContentVO extends WarehousingContent {
|
||||
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
@ApiModelProperty(value="单价")
|
||||
private Double unitPrice;
|
||||
|
||||
@ApiModelProperty(value="偏差/不确定度")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
<result property="latticeId" column="lattice_id"/>
|
||||
<result property="location" column="location"/>
|
||||
<result property="limitDate" column="limit_date"/>
|
||||
<result property="boxId" column="box_id"/>
|
||||
<result property="warningInformation" column="warning_information"/>
|
||||
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="minimumUnit" column="minimum_unit"/>
|
||||
<result property="casNumber" column="cas_number"/>
|
||||
<result property="code" column="code"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
@@ -19,13 +19,14 @@
|
||||
<result property="auditOpinion" column="audit_opinion"/>
|
||||
<result property="auditId" column="audit_id"/>
|
||||
<result property="auditTime" column="audit_time"/>
|
||||
<result property="commitTime" column="commit_time"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="CentralizedRequestVO" type="digital.laboratory.platform.reagent.vo.CentralizedRequestVO"
|
||||
extends="centralizedRequestMap">
|
||||
<result property="department" column="department"/>
|
||||
<result property="applicantName" column="applicant_name"/>
|
||||
<result property="createName" column="create_name"/>
|
||||
<result property="auditorName" column="auditor_name"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -35,7 +36,7 @@
|
||||
(SELECT user.name
|
||||
FROM dlp_base.sys_user user
|
||||
WHERE user.user_id=cr.applicant_id
|
||||
) AS applicant_name,
|
||||
) AS create_name,
|
||||
(SELECT user.name
|
||||
FROM dlp_base.sys_user user
|
||||
WHERE user.user_id=cr.audit_id
|
||||
@@ -47,7 +48,7 @@
|
||||
|
||||
select cr.*,
|
||||
(select department from dlp_base.sys_user where user_id = cr.applicant_id) as department,
|
||||
(select user.name from dlp_base.sys_user user where user.user_id=cr.applicant_id ) as applicant_name,
|
||||
(select user.name from dlp_base.sys_user user where user.user_id=cr.applicant_id ) as create_name,
|
||||
(select user.name from dlp_base.sys_user user where user.user_id=cr.audit_id ) as auditor_name
|
||||
from centralized_request cr
|
||||
where cr.id =#{id}
|
||||
@@ -79,7 +80,7 @@
|
||||
(SELECT user.name
|
||||
FROM dlp_base.sys_user user
|
||||
WHERE user.user_id=cr.applicant_id
|
||||
) AS applicant_name,
|
||||
) AS create_name,
|
||||
(SELECT user.name
|
||||
FROM dlp_base.sys_user user
|
||||
WHERE user.user_id=cr.audit_id
|
||||
|
||||
@@ -27,5 +27,10 @@
|
||||
<result property="minimumUnit" column="minimum_unit"/>
|
||||
<result property="purchaseListDetailsId" column="purchase_list_details_id"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getDecentralizeDetailsList" resultMap="decentralizeDetailsMap" resultType="digital.laboratory.platform.reagent.entity.DecentralizeDetails">
|
||||
|
||||
SELECT * FROM decentralize_details WHERE purchase_list_details_id in (SELECT id FROM purchase_list_details WHERE purchase_list_id = #{id})
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
@@ -22,7 +22,18 @@
|
||||
<result property="createName" column="create_name"/>
|
||||
<result property="commitTime" column="commit_time"/>
|
||||
|
||||
|
||||
</resultMap>
|
||||
<resultMap id="instructionBookVO" type="digital.laboratory.platform.reagent.vo.InstructionBookVO" extends="instructionBookMap">
|
||||
<result property="createName" column="create_name"></result>
|
||||
</resultMap>
|
||||
|
||||
<select id="getInstructionBookVO" resultMap="instructionBookVO" resultType="digital.laboratory.platform.reagent.vo.InstructionBookVO">
|
||||
SELECT ib.*,
|
||||
(SELECT user.name
|
||||
FROM dlp_base.sys_user user
|
||||
WHERE user.user_id =ib.create_by) AS create_name
|
||||
FROM instruction_book ib
|
||||
WHERE ib.reference_material_type_id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
<result property="batchDetailsId" column="batch_details_id"/>
|
||||
<result property="latticeId" column="lattice_Id"/>
|
||||
<result property="location" column="location"/>
|
||||
<result property="boxId" column="box_id"/>
|
||||
<result property="code" column="code"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,11 +37,13 @@
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="periodVerificationImplementationVO" type="digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO"
|
||||
<resultMap id="periodVerificationImplementationVO"
|
||||
type="digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO"
|
||||
extends="periodVerificationImplementationMap">
|
||||
<result property="inspectorName" column="inspector_name"></result>
|
||||
<result property="technicalDirectorName" column="technical_director_name"></result>
|
||||
<result property="createName" column="create_name"></result>
|
||||
<result property="reagentConsumableId" column="reagent_consumable_id"></result>
|
||||
</resultMap>
|
||||
|
||||
<sql id="getPeriodVerificationImplementationVOSQL">
|
||||
@@ -50,6 +52,10 @@
|
||||
FROM dlp_base.sys_user user
|
||||
WHERE user.user_id=pvi.inspector_id ) as inspector_name
|
||||
, (
|
||||
SELECT rm.reagent_consumable_id
|
||||
From reference_material rm
|
||||
WHERE rm.id = pvi.reference_material_id ) as reagent_consumable_id,
|
||||
(
|
||||
SELECT user.name
|
||||
FROM dlp_base.sys_user user
|
||||
WHERE user.user_id=pvi.technical_director_id ) as technical_director_name
|
||||
@@ -57,24 +63,27 @@
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="getPeriodVerificationImplementationVOPage" resultMap="periodVerificationImplementationVO" resultType="digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO">
|
||||
<select id="getPeriodVerificationImplementationVOPage" resultMap="periodVerificationImplementationVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO">
|
||||
<include refid="getPeriodVerificationImplementationVOSQL"></include>
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getPeriodVerificationImplementationVO" resultMap="periodVerificationImplementationVO" resultType="digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO">
|
||||
<select id="getPeriodVerificationImplementationVO" resultMap="periodVerificationImplementationVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO">
|
||||
select pvi.*,
|
||||
(select rc.reagent_consumable_name
|
||||
from reagent_consumables rc
|
||||
where rc.reagent_consumable_id = pvi.reference_material_id) as reference_material_name,
|
||||
(SELECT user.name
|
||||
FROM dlp_base.sys_user user
|
||||
WHERE user.user_id=pvi.inspector_id ) as inspector_name
|
||||
, (
|
||||
,
|
||||
(
|
||||
SELECT rm.reagent_consumable_id
|
||||
From reference_material rm
|
||||
WHERE rm.id = pvi.reference_material_id ) as reagent_consumable_id, (
|
||||
SELECT user.name
|
||||
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
|
||||
, (
|
||||
SELECT user.name
|
||||
FROM dlp_base.sys_user user
|
||||
WHERE user.user_id=pvi.create_by ) as create_name
|
||||
|
||||
@@ -4,42 +4,60 @@
|
||||
|
||||
<mapper namespace="digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper">
|
||||
|
||||
<resultMap id="reagentConsumableInventoryMap" type="digital.laboratory.platform.reagent.entity.ReagentConsumableInventory">
|
||||
<id property="reagentConsumableInventoryId" column="reagent_consumable_inventory_id"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="deviationOrUncertainty" column="deviation_or_uncertainty"/>
|
||||
<result property="instructionBookId" column="instruction_book_id"/>
|
||||
<result property="reagentConsumableId" column="reagent_consumable_id"/>
|
||||
<result property="specificationAndModel" column="specification_and_model"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="standardValueOrPurity" column="standard_value_or_purity"/>
|
||||
<result property="technicalParameter" column="technical_parameter"/>
|
||||
<result property="totalQuantity" column="total_quantity"/>
|
||||
<result property="species" column="species"/>
|
||||
<result property="packagedCopies" column="packaged_copies"/>
|
||||
<result property="configurationConcentration" column="configuration_concentration"/>
|
||||
<result property="minimumUnit" column="minimum_unit"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="storageCondition" column="storage_condition"/>
|
||||
<result property="alias" column="alias"/>
|
||||
<result property="englishName" column="english_name"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"/>
|
||||
<result property="storageLife" column="storage_life"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="warningValue" column="warning_value"/>
|
||||
<result property="warningInformation" column="warning_information"/>
|
||||
<resultMap id="reagentConsumableInventoryMap"
|
||||
type="digital.laboratory.platform.reagent.entity.ReagentConsumableInventory">
|
||||
<id property="reagentConsumableInventoryId" column="reagent_consumable_inventory_id"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="deviationOrUncertainty" column="deviation_or_uncertainty"/>
|
||||
<result property="instructionBookId" column="instruction_book_id"/>
|
||||
<result property="reagentConsumableId" column="reagent_consumable_id"/>
|
||||
<result property="specificationAndModel" column="specification_and_model"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="standardValueOrPurity" column="standard_value_or_purity"/>
|
||||
<result property="technicalParameter" column="technical_parameter"/>
|
||||
<result property="totalQuantity" column="total_quantity"/>
|
||||
<result property="species" column="species"/>
|
||||
<result property="packagedCopies" column="packaged_copies"/>
|
||||
<result property="configurationConcentration" column="configuration_concentration"/>
|
||||
<result property="minimumUnit" column="minimum_unit"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="storageCondition" column="storage_condition"/>
|
||||
<result property="alias" column="alias"/>
|
||||
<result property="englishName" column="english_name"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"/>
|
||||
<result property="storageLife" column="storage_life"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="warningValue" column="warning_value"/>
|
||||
<result property="warningInformation" column="warning_information"/>
|
||||
<result property="casNumber" column="cas_number"/>
|
||||
<result property="code" column="code"/>
|
||||
|
||||
</resultMap>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="reagentConsumableInventoryVO" type="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO" extends="reagentConsumableInventoryMap"></resultMap>
|
||||
<resultMap id="reagentConsumableInventoryVO"
|
||||
type="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO"
|
||||
extends="reagentConsumableInventoryMap"></resultMap>
|
||||
|
||||
<select id="getReagentConsumableInventoryVOPage" resultMap="reagentConsumableInventoryVO" resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO">
|
||||
select * from reagent_consumable_inventory
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
<select id="getReagentConsumableInventoryFullVOPage"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO">
|
||||
select *
|
||||
from reagent_consumable_inventory
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getReagentConsumableInventoryVOPage" resultMap="reagentConsumableInventoryVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO">
|
||||
select *
|
||||
from reagent_consumable_inventory ${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getUserList" resultType="digital.laboratory.platform.reagent.vo.UserVO">
|
||||
SELECT *
|
||||
FROM dlp_base.sys_user user
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
<result property="minimumUnit" column="minimum_unit"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="configurationConcentration" column="configuration_concentration"/>
|
||||
<result property="casNumber" column="cas_number"/>
|
||||
<result property="code" column="code"/>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<result property="remarks" column="remarks"/>
|
||||
<result property="purpose" column="purpose"/>
|
||||
<result property="batchDetailsId" column="batch_details_id"/>
|
||||
<result property="referenceMaterialNumber" column="reference_material_number"/>
|
||||
<result property="referenceMaterialId" column="reference_material_id"/>
|
||||
<result property="quantityDelivered" column="quantity_delivered"/>
|
||||
<result property="outgoingContentId" column="outgoing_content_id"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -18,5 +18,30 @@
|
||||
<result property="latticeId" column="lattice_id"/>
|
||||
<result property="location" column="location"/>
|
||||
<result property="custodianName" column="custodian_name"/>
|
||||
<result property="boxId" column="box_id"/>
|
||||
<result property="code" column="code"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="referenceMaterialVO" type="digital.laboratory.platform.reagent.vo.ReferenceMaterialVO" extends="referenceMaterialMap">
|
||||
|
||||
<result property="referenceMaterialName" column="reference_material_name"></result>
|
||||
<result property="specificationAndModel" column="specification_and_model"></result>
|
||||
<result property="standardValueOrPurity" column="standard_value_or_purity"></result>
|
||||
</resultMap>
|
||||
|
||||
<select id="getReferenceMaterialVOList" resultMap="referenceMaterialVO" resultType="digital.laboratory.platform.reagent.vo.ReferenceMaterialVO">
|
||||
select rm.*,
|
||||
(SELECT rc.reagent_consumable_name
|
||||
FROM reagent_consumables rc
|
||||
WHERE rc.reagent_consumable_id = rm.reagent_consumable_id) AS reference_material_name,
|
||||
(SELECT rc.specification_and_model
|
||||
FROM reagent_consumables rc
|
||||
WHERE rc.reagent_consumable_id = rm.reagent_consumable_id) AS specification_and_model,
|
||||
(SELECT rc.standard_value_or_purity
|
||||
FROM reagent_consumables rc
|
||||
WHERE rc.reagent_consumable_id = rm.reagent_consumable_id) AS standard_value_or_purity
|
||||
from reference_material rm
|
||||
where rm.status = 0 or rm.status = -2 or rm.status = -3
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<result property="limitDate" column="limit_date"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="location" column="location"/>
|
||||
<result property="batchId" column="batch_id"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
<result property="evaluationFormId" column="evaluation_form_id"/>
|
||||
<result property="purchaseListDetailsId" column="purchase_list_details_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="warningValue" column="warning_value"/>
|
||||
<result property="code" column="code"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user