5.9日,提供试剂耗材/标准物质类集合接口
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
//package digital.laboratory.platform.reagent.config;
|
||||
//
|
||||
//import digital.laboratory.platform.reagent.utils.MinioProp;
|
||||
//import io.minio.MinioClient;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//
|
||||
///**
|
||||
// * minio 核心配置类
|
||||
// */
|
||||
//@Configuration
|
||||
//@EnableConfigurationProperties(MinioProp.class)
|
||||
//public class MinioConfig {
|
||||
//
|
||||
// @Autowired
|
||||
// private MinioProp minioProp;
|
||||
//
|
||||
// /**
|
||||
// * 获取 MinioClient
|
||||
// *
|
||||
// * @return
|
||||
// * @throws InvalidPortException
|
||||
// * @throws InvalidEndpointException
|
||||
// */
|
||||
// @Bean
|
||||
// public MinioClient minioClient() throws InvalidPortException, InvalidEndpointException {
|
||||
// return new MinioClient(minioProp.getEndpoint(), minioProp.getAccesskey(), minioProp.getSecretKey());
|
||||
// }
|
||||
//}
|
||||
//
|
||||
@@ -0,0 +1,50 @@
|
||||
package digital.laboratory.platform.reagent.config;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PageUtils {
|
||||
|
||||
/**
|
||||
* 分页函数
|
||||
* @author pochettino
|
||||
* @param currentPage 当前页数
|
||||
* @param pageSize 每一页的数据条数
|
||||
* @param list 要进行分页的数据列表
|
||||
* @return 当前页要展示的数据
|
||||
*/
|
||||
public Page getPages(Integer currentPage, Integer pageSize, List list) {
|
||||
Page page = new Page();
|
||||
if(list==null){
|
||||
return null;
|
||||
}
|
||||
int size = list.size();
|
||||
|
||||
if(pageSize > size) {
|
||||
pageSize = size;
|
||||
}
|
||||
if (pageSize!=0){
|
||||
// 求出最大页数,防止currentPage越界
|
||||
int maxPage = size % pageSize == 0 ? size / pageSize : size / pageSize + 1;
|
||||
|
||||
if(currentPage > maxPage) {
|
||||
currentPage = maxPage;
|
||||
}
|
||||
}
|
||||
// 当前页第一条数据的下标
|
||||
int curIdx = currentPage > 1 ? (currentPage - 1) * pageSize : 0;
|
||||
|
||||
List pageList = new ArrayList();
|
||||
|
||||
// 将当前页的数据放进pageList
|
||||
for(int i = 0; i < pageSize && curIdx + i < size; i++) {
|
||||
pageList.add(list.get(curIdx + i));
|
||||
}
|
||||
|
||||
page.setCurrent(currentPage).setSize(pageSize).setTotal(list.size()).setRecords(pageList);
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -169,7 +169,7 @@ public class AcceptanceRecordFormController {
|
||||
@ApiOperation(value = "一级审核(验收记录表)", notes = "一级审核(验收记录表)")
|
||||
@SysLog("一级审核(验收记录表)")
|
||||
@PutMapping("/primary")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_primary')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_primary')")
|
||||
public R<AcceptanceRecordForm> primaryAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -190,7 +190,7 @@ public class AcceptanceRecordFormController {
|
||||
@ApiOperation(value = "二级审核(验收记录表)", notes = "二级审核(验收记录表)")
|
||||
@SysLog("二级审核(验收记录表)")
|
||||
@PutMapping("/secondary")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_secondary')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_secondary')")
|
||||
public R<AcceptanceRecordForm> secondaryAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -211,7 +211,7 @@ public class AcceptanceRecordFormController {
|
||||
@ApiOperation(value = "三级审核(验收记录表)", notes = "三级审核(验收记录表)")
|
||||
@SysLog("三级审核(验收记录表)")
|
||||
@PutMapping("/threeLevel")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_threeLevel')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_threeLevel')")
|
||||
public R<AcceptanceRecordForm> threeLevelAudit(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@ public class CheckScheduleController {
|
||||
@ApiOperation(value = "审核标准物质期间核查计划和确认表", notes = "审核标准物质期间核查计划和确认表")
|
||||
@SysLog("修改")
|
||||
@PutMapping("/audit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_audit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_schedule_audit')" )
|
||||
public R<CheckSchedule> auditPlan(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
+2
-2
@@ -238,7 +238,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "一级审核符合性检查记录表", notes = "一级审核符合性检查记录表")
|
||||
@SysLog("一级审核符合性检查记录表")
|
||||
@PutMapping("/primaryAudit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_primaryAudit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_primaryAudit')" )
|
||||
public R<String> primaryAuditCheck(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -261,7 +261,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "二级审核符合性检查记录表", notes = "二级审核符合性检查记录表")
|
||||
@SysLog("二级审核符合性检查记录表")
|
||||
@PutMapping("/secondaryAudit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_compliance_check_secondaryAudit)" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_secondaryAudit')" )
|
||||
public R<String> secondaryAuditCheck(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
+2
-2
@@ -256,7 +256,7 @@ public class DecentralizedRequestController {
|
||||
@ApiOperation(value = "一级审核分散采购申请", notes = "一级审核分散采购申请")
|
||||
@SysLog("审核分散采购申请明细")
|
||||
@PutMapping("/primary/audit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_primary')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_primary')")
|
||||
public R<DecentralizedRequest> primaryAuditRequest(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -302,7 +302,7 @@ public class DecentralizedRequestController {
|
||||
@ApiOperation(value = "三级审核分散采购申请", notes = "三级审核分散采购申请")
|
||||
@SysLog("审核分散采购申请明细")
|
||||
@PutMapping("/threeLevel/audit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_decentralized_request_threeLevel')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_threeLevel')")
|
||||
public R<DecentralizedRequest> threeLevelAuditRequest(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+7
-7
@@ -45,28 +45,28 @@ public class EvaluationFormController {
|
||||
|
||||
private final EvaluationFormService evaluationFormService;
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询(服务商/供应商评价表)
|
||||
* @param supplierInformationId id
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询(服务商/供应商评价表)", notes = "通过id查询(服务商/供应商评价表)")
|
||||
@SysLog("通过id查询(服务商/供应商评价表)" )
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_get')" )
|
||||
public R<EvaluationFormVO> getById(String supplierInformationId, HttpServletRequest theHttpServletRequest) {
|
||||
public R<EvaluationFormVO> getEvaluationFormVO(String id, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
// EvaluationFormVO formById = evaluationFormService.getFormById(supplierInformationId);
|
||||
EvaluationFormVO evaluationFormVO = evaluationFormService.getEvaluationFormVO(id);
|
||||
|
||||
return R.ok(null);
|
||||
return R.ok(evaluationFormVO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增(服务商/供应商评价表)
|
||||
* @param evaluationFormDTO (服务商/供应商评价表)
|
||||
@@ -99,7 +99,7 @@ public class EvaluationFormController {
|
||||
@ApiOperation(value = "二级审核(服务商/供应商评价表)", notes = "二级审核(服务商/供应商评价表)")
|
||||
@SysLog("二级审核(服务商/供应商评价表)" )
|
||||
@PutMapping("/secondary")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_secondaryAudit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_form_secondaryAudit')" )
|
||||
public R<EvaluationForm> auditFormOfSecondary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -123,7 +123,7 @@ public class EvaluationFormController {
|
||||
@ApiOperation(value = "三级审核(服务商/供应商评价表)", notes = "三级审核(服务商/供应商评价表)")
|
||||
@SysLog("三级审核(服务商/供应商评价表)" )
|
||||
@PutMapping("/three_level")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_evaluation_form_three_level_audit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_form_three_level_audit')" )
|
||||
public R<EvaluationForm> auditFormOfThreeLevel(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ public class InstructionBookController {
|
||||
|
||||
if (b) {
|
||||
instructionBook.setId(IdWorker.get32UUID().toUpperCase());
|
||||
instructionBook.setSetTime(LocalDateTime.now());
|
||||
instructionBook.setCommitTime(LocalDateTime.now());
|
||||
instructionBook.setMakerId(dlpUser.getId());
|
||||
instructionBook.setReferenceMaterialTypeId(byId.getReagentConsumableId());
|
||||
instructionBook.setInstructionBook(fileName);
|
||||
@@ -167,7 +167,7 @@ public class InstructionBookController {
|
||||
@ApiOperation(value = "审核(标准物质期间核查指导书)", notes = "审核(标准物质期间核查指导书)(标准物质期间核查指导书)")
|
||||
@SysLog("审核(标准物质期间核查指导书)(标准物质期间核查指导书)")
|
||||
@PostMapping("/audit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_instruction_book_audit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_audit')" )
|
||||
public R<InstructionBookVO> auditById(AuditAndApproveDTO auditAndApproveDTO , HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ public class PeriodVerificationImplementationController {
|
||||
@ApiOperation(value = "审核(标准物质期间核查实施情况及结果记录表)", notes = "审核(标准物质期间核查实施情况及结果记录表)")
|
||||
@SysLog("审核(标准物质期间核查实施情况及结果记录表)" )
|
||||
@PutMapping("/audit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_audit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_audit')" )
|
||||
public R<PeriodVerificationImplementation> auditById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
+5
-3
@@ -51,17 +51,19 @@ public class ProvideServicesOrSuppliesController {
|
||||
|
||||
/**
|
||||
* 通过id查询提供服务或供应品
|
||||
* @param supplierInformationId id
|
||||
* @param evaluationFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过供应商id查询该供应商提供的所有物品", notes = "通过供应商id查询该供应商提供的所有物品")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_get')" )
|
||||
public R<List<ProvideServicesOrSuppliesVO>> getById(String supplierInformationId, HttpServletRequest theHttpServletRequest) {
|
||||
public R<List<ProvideServicesOrSuppliesVO>> getById(String evaluationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(supplierInformationId);
|
||||
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(evaluationFormId);
|
||||
return R.ok(voList);
|
||||
//return R.ok(provideServicesOrSuppliesService.getById(provideServicesOrSuppliesid));
|
||||
}
|
||||
|
||||
+6
-5
@@ -1,5 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -68,13 +69,13 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "分页查询已发布的采购目录明细", notes = "分页查询已发布的采购目录明细")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')")
|
||||
public R<Page<CatalogueDetailsVO>> getPurchaseCataloguePage(HttpServletRequest theHttpServletRequest) {
|
||||
public R<Page<CatalogueDetailsVO>> getPurchaseCataloguePage(String name,HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
Page vOpage = purchaseCatalogueService.getVOpage();
|
||||
Page vOpage = purchaseCatalogueService.getVOpage(name);
|
||||
|
||||
return R.ok(vOpage);
|
||||
|
||||
@@ -89,7 +90,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "分页查询制定编辑的采购目录", notes = "分页查询制定编辑的采购目录")
|
||||
@GetMapping("/pages")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')")
|
||||
public R<IPage<PurchaseCatalogueVO>> getPurchaseCatalogueVOPage(Page<PurchaseCatalogue> page, @JsonFormat(pattern = "yyyy-MM-dd") Date startTime, @JsonFormat(pattern = "yyyy-MM-dd") Date endTime, HttpServletRequest theHttpServletRequest) {
|
||||
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"));
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -293,7 +294,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "一级审核采购目录", notes = "一级审核采购目录")
|
||||
@SysLog("一级审核采购目录")
|
||||
@PutMapping("/primary/audit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_primary')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_primary')")
|
||||
public R<PurchaseCatalogue> primaryAuditCatalogue(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -318,7 +319,7 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "二级审核采购目录", notes = "二级审核采购目录")
|
||||
@SysLog("二级审核采购目录")
|
||||
@PutMapping("/secondary/audit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_secondary')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_secondary')")
|
||||
public R<PurchaseCatalogue> secondaryAuditCatalogue(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+26
-4
@@ -16,11 +16,13 @@ import digital.laboratory.platform.reagent.entity.PurchasingPlan;
|
||||
import digital.laboratory.platform.reagent.service.PurchasingPlanService;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchasingPlanVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReplacementVO;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -70,6 +72,26 @@ public class PurchasingPlanController {
|
||||
//return R.ok(purchasingPlanService.getById(purchasingPlanId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询(采购计划)
|
||||
*
|
||||
* @param id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "查询换货信息", notes = "查询换货信息")
|
||||
@GetMapping("/replacement")
|
||||
// @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();
|
||||
|
||||
ReplacementVO replacementVO = purchasingPlanService.getReplacementVO(id);
|
||||
|
||||
return R.ok(replacementVO);
|
||||
//return R.ok(purchasingPlanService.getById(purchasingPlanId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@@ -79,8 +101,8 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')")
|
||||
public R<IPage<PurchasingPlanVO>> getPurchasingPlanPage(Page<PurchasingPlan> page, @JsonFormat(pattern = "yyyy-MM-dd") Date startTime,
|
||||
@JsonFormat(pattern = "yyyy-MM-dd") Date endTime, HttpServletRequest theHttpServletRequest) {
|
||||
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) {
|
||||
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -259,7 +281,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "审核采购计划", notes = "审核采购计划")
|
||||
@SysLog("修改(采购计划)")
|
||||
@PutMapping("/audit")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_audit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_audit')")
|
||||
public R<PurchasingPlan> auditById(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -284,7 +306,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "审批采购计划", notes = "审批采购计划")
|
||||
@SysLog("修改(采购计划)")
|
||||
@PutMapping("/approve")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_approve)")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_approve')")
|
||||
public R<PurchasingPlan> approveById(@RequestBody AuditAndApproveDTO auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+129
-84
@@ -1,14 +1,19 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.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 org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -22,6 +27,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -29,159 +35,198 @@ import java.util.List;
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe 试剂耗材库存 前端控制器
|
||||
*
|
||||
* <p>
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/reagent_consumable_inventory" )
|
||||
@RequestMapping("/reagent_consumable_inventory")
|
||||
@Api(value = "reagent_consumable_inventory", tags = "试剂耗材库存管理")
|
||||
public class ReagentConsumableInventoryController {
|
||||
|
||||
private final ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
private final ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
|
||||
/**
|
||||
* 通过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();
|
||||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
return R.ok(reagentConsumableInventory);
|
||||
//return R.ok(reagentConsumableInventoryService.getById(reagentConsumableInventoryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "标准物质列表", notes = "标准物质列表")
|
||||
@GetMapping("/RList" )
|
||||
@GetMapping("/RList")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<Page<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryPage(Integer current,Integer size, String reagentConsumableName,HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
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();
|
||||
|
||||
Page<ReagentConsumableInventoryFullVO> allList = reagentConsumableInventoryService.getAllList(current,size,reagentConsumableName);
|
||||
return R.ok(allList);
|
||||
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
|
||||
QueryWrapper<ReferenceMaterial> referenceMaterialQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (reagentConsumableName != null) {
|
||||
|
||||
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", reagentConsumableName);
|
||||
|
||||
}
|
||||
|
||||
|
||||
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" )
|
||||
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
|
||||
@GetMapping("/standardList")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<Page<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page page,String name,HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page,name);
|
||||
return R.ok(reagentConsumableInventoryRMVOList);
|
||||
public R<Page<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page page, String name, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, name);
|
||||
return R.ok(reagentConsumableInventoryRMVOList);
|
||||
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
|
||||
@GetMapping("/List" )
|
||||
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
|
||||
@GetMapping("/List")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<Page<ReagentConsumableInventoryVO>> getList(Page page,String name,HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = reagentConsumableInventoryService.getReagentConsumableInventoryVOList(page,name);
|
||||
return R.ok(reagentConsumableInventoryVOList);
|
||||
public R<Page<ReagentConsumableInventoryVO>> getList(Page page, String name, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
Page<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = reagentConsumableInventoryService.getReagentConsumableInventoryVOList(page, name);
|
||||
return R.ok(reagentConsumableInventoryVOList);
|
||||
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "试剂耗材列表", notes = "试剂耗材列表")
|
||||
@GetMapping("/MList" )
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@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) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
public R<Page<ReagentConsumableInventoryFullVO>> getReferenceMaterialVOList(Integer current, Integer size, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
Page<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(current, size,reagentConsumableName);
|
||||
return R.ok(allRM);
|
||||
}
|
||||
Page<ReagentConsumableInventoryFullVO> allRM = reagentConsumableInventoryService.getAllRM(current, size, reagentConsumableName);
|
||||
return R.ok(allRM);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "试剂耗材/标准物质集合列表", notes = "试剂耗材/标准物质集合列表")
|
||||
@GetMapping("/full")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<List<ReagentConsumableInventory>> 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 (name!=null){
|
||||
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name",name);
|
||||
}
|
||||
|
||||
List<ReagentConsumableInventory> reagentConsumableInventoryFull = reagentConsumableInventoryService.getReagentConsumableInventoryFull(reagentConsumableInventoryQueryWrapper);
|
||||
|
||||
return R.ok(reagentConsumableInventoryFull);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增试剂耗材库存
|
||||
*
|
||||
* @param reagentConsumableInventory 试剂耗材库存
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增试剂耗材库存", notes = "新增试剂耗材库存")
|
||||
@SysLog("新增试剂耗材库存" )
|
||||
@SysLog("新增试剂耗材库存")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_add')" )
|
||||
public R<ReagentConsumableInventory> postAddObject(@RequestBody ReagentConsumableInventory reagentConsumableInventory, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
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, "对象创建失败");
|
||||
}
|
||||
if (reagentConsumableInventoryService.save(reagentConsumableInventory)) {
|
||||
return R.ok(reagentConsumableInventory, "对象创建成功");
|
||||
} else {
|
||||
return R.failed(reagentConsumableInventory, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试剂耗材库存
|
||||
*
|
||||
* @param reagentConsumableInventory 试剂耗材库存
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改试剂耗材库存", notes = "修改试剂耗材库存")
|
||||
@SysLog("修改试剂耗材库存" )
|
||||
@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();
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (reagentConsumableInventoryService.updateById(reagentConsumableInventory)) {
|
||||
return R.ok(reagentConsumableInventory, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(reagentConsumableInventory, "保存对象失败");
|
||||
}
|
||||
if (reagentConsumableInventoryService.updateById(reagentConsumableInventory)) {
|
||||
return R.ok(reagentConsumableInventory, "保存对象成功");
|
||||
} else {
|
||||
return R.failed(reagentConsumableInventory, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除试剂耗材库存
|
||||
*
|
||||
* @param reagentConsumableInventoryId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除试剂耗材库存", notes = "通过id删除试剂耗材库存")
|
||||
@SysLog("通过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();
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReagentConsumableInventory oldReagentConsumableInventory = reagentConsumableInventoryService.getById(reagentConsumableInventoryId);
|
||||
|
||||
if (reagentConsumableInventoryService.removeById(reagentConsumableInventoryId)) {
|
||||
return R.ok(oldReagentConsumableInventory, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldReagentConsumableInventory, "对象删除失败");
|
||||
}
|
||||
if (reagentConsumableInventoryService.removeById(reagentConsumableInventoryId)) {
|
||||
return R.ok(oldReagentConsumableInventory, "对象删除成功");
|
||||
} else {
|
||||
return R.failed(oldReagentConsumableInventory, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+19
-15
@@ -26,40 +26,44 @@ import java.security.Principal;
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (试剂耗材类) 前端控制器
|
||||
*
|
||||
* <p>
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/reagent_consumables" )
|
||||
@RequestMapping("/reagent_consumables")
|
||||
@Api(value = "reagent_consumables", tags = "(试剂耗材类)管理")
|
||||
public class ReagentConsumablesController {
|
||||
|
||||
private final ReagentConsumablesService reagentConsumablesService;
|
||||
private final ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param reagentConsumables (试剂耗材类)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询试剂耗材类(包括标准物质)", notes = "分页查询试剂耗材类(包括标准物质)")
|
||||
@GetMapping("/page" )
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
|
||||
public R<IPage<ReagentConsumables>> getReagentConsumablesPage(Page<ReagentConsumables> page, ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<ReagentConsumables> reagentConsumablesSList = reagentConsumablesService.page(page, Wrappers.<ReagentConsumables>query()
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(reagentConsumablesSList);
|
||||
IPage<ReagentConsumables> reagentConsumablesSList = reagentConsumablesService.page(page, Wrappers.<ReagentConsumables>query()
|
||||
.eq("category", "试剂").or()
|
||||
.eq("category", "耗材").or()
|
||||
.eq("category", "标准物质")
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(reagentConsumablesSList);
|
||||
// return R.ok(reagentConsumablesService.page(page, Wrappers.query(reagentConsumables)));
|
||||
}
|
||||
}
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.entity.ReviewAndApprove;
|
||||
import digital.laboratory.platform.reagent.service.ReviewAndApproveService;
|
||||
import digital.laboratory.platform.reagent.vo.CatalogueDetailsVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.security.Principal;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/review_and_approve")
|
||||
@Api(value = "review_and_approve", tags = "审核审批列表")
|
||||
public class ReviewAndApproveController {
|
||||
|
||||
@Autowired
|
||||
private ReviewAndApproveService reviewAndApproveService;
|
||||
|
||||
@ApiOperation(value = "审核审批列表", notes = "审核审批列表")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')")
|
||||
public R<ReviewAndApprove> getVOpage(HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReviewAndApprove reviewAndApproveList = reviewAndApproveService.getReviewAndApproveList(dlpUser);
|
||||
|
||||
return R.ok(reviewAndApproveList);
|
||||
|
||||
} @ApiOperation(value = "审核审批记录", notes = "审核审批记录")
|
||||
@GetMapping("/record/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_getPage')")
|
||||
public R<ReviewAndApprove> getReviewAndApproveRecordList(HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReviewAndApprove reviewAndApproveList = reviewAndApproveService.getReviewAndApproveRecordList(dlpUser);
|
||||
|
||||
return R.ok(reviewAndApproveList);
|
||||
|
||||
}
|
||||
}
|
||||
+29
-6
@@ -1,5 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
@@ -50,9 +51,9 @@ public class StandardMaterialApplicationController {
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{standardMaterialApplicationId}" )
|
||||
@GetMapping( )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
|
||||
public R<StandardMaterialApplication> getById(@PathVariable("standardMaterialApplicationId" ) String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
|
||||
public R<StandardMaterialApplication> getById( String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
@@ -87,7 +88,7 @@ public class StandardMaterialApplicationController {
|
||||
* @param standardMaterialApplication (标准物质领用/归还登记表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "归还分页查询", notes = "归还分页查询")
|
||||
@ApiOperation(value = "归还任务分页查询", notes = "归还任务分页查询")
|
||||
@GetMapping("/return/page" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
|
||||
public R<IPage<StandardMaterialApplicationVO>> getList(Page<StandardMaterialApplication> page, StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
|
||||
@@ -95,8 +96,29 @@ public class StandardMaterialApplicationController {
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StandardMaterialApplicationVO> standardMaterialApplicationSList = standardMaterialApplicationService.getList(page, Wrappers.<StandardMaterialApplication>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
.eq("status",0)
|
||||
);
|
||||
return R.ok(standardMaterialApplicationSList);
|
||||
// return R.ok(standardMaterialApplicationService.page(page, Wrappers.query(standardMaterialApplication)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param standardMaterialApplication (标准物质领用/归还登记表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "归还记录分页查询", notes = "归还记录分页查询")
|
||||
@GetMapping("/return" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
|
||||
public R<IPage<StandardMaterialApplicationVO>> getPage(Page<StandardMaterialApplication> page, StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StandardMaterialApplicationVO> standardMaterialApplicationSList = standardMaterialApplicationService.getList(page, Wrappers.<StandardMaterialApplication>query()
|
||||
.orderByDesc("create_time")
|
||||
.eq("status",1)
|
||||
);
|
||||
return R.ok(standardMaterialApplicationSList);
|
||||
// return R.ok(standardMaterialApplicationService.page(page, Wrappers.query(standardMaterialApplication)));
|
||||
@@ -131,8 +153,8 @@ public class StandardMaterialApplicationController {
|
||||
@ApiOperation(value = "通过id删除(标准物质领用/归还登记表)", notes = "通过id删除(标准物质领用/归还登记表)")
|
||||
@SysLog("通过id删除(标准物质领用/归还登记表)" )
|
||||
@DeleteMapping("/{standardMaterialApplicationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_del')" )
|
||||
public R<StandardMaterialApplication> deleteById(@PathVariable String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_del')" )
|
||||
public R<StandardMaterialApplication> deleteById( String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
@@ -147,4 +169,5 @@ public class StandardMaterialApplicationController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+24
-7
@@ -1,9 +1,12 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
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.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
@@ -14,6 +17,7 @@ import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.service.StandardMaterialApprovalFormService;
|
||||
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -69,17 +73,30 @@ public class StandardMaterialApprovalFormController {
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param standardMaterialApprovalForm (标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @param referenceMaterialName (标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_page)" )
|
||||
public R<IPage<StandardMaterialApprovalFormVO>> getStandardMaterialApprovalFormPage(Page<StandardMaterialApprovalForm> page, StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) {
|
||||
public R<IPage<StandardMaterialApprovalFormVO>> getStandardMaterialApprovalFormPage(Page<StandardMaterialApprovalForm> page, String referenceMaterialName, @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") DateTime startTime,
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime,HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StandardMaterialApprovalFormVO> standardMaterialApprovalFormSList = standardMaterialApprovalFormService.getVOPage(page, Wrappers.<StandardMaterialApprovalForm>query()
|
||||
QueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (referenceMaterialName!=null){
|
||||
|
||||
standardMaterialApprovalFormQueryWrapper.eq("reference_material_name",referenceMaterialName);
|
||||
}
|
||||
|
||||
if (startTime!=null&&endTime!=null){
|
||||
|
||||
standardMaterialApprovalFormQueryWrapper.ge("create_time",startTime).le("create_time",endTime);
|
||||
}
|
||||
|
||||
IPage<StandardMaterialApprovalFormVO> standardMaterialApprovalFormSList = standardMaterialApprovalFormService.getVOPage(page, standardMaterialApprovalFormQueryWrapper
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(standardMaterialApprovalFormSList);
|
||||
@@ -118,7 +135,7 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" )
|
||||
@PutMapping("/auditPrimary")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditPrimary')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditPrimary')" )
|
||||
public R<StandardMaterialApprovalForm> auditPrimary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -141,7 +158,7 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)" )
|
||||
@PutMapping("/auditSecondary")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditSecondary')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditSecondary')" )
|
||||
public R<StandardMaterialApprovalForm> auditSecondary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -164,7 +181,7 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "审批(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("审批(标准物质停用/报废销毁/恢复/降级使用审批表)" )
|
||||
@PutMapping("/approve")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_approve')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_approve')" )
|
||||
public R<StandardMaterialApprovalForm> approveById(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -182,7 +199,7 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "标准物质停用", notes = "标准物质停用")
|
||||
@SysLog("标准物质停用" )
|
||||
@PostMapping("/deactivate")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
|
||||
// @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();
|
||||
|
||||
+23
-5
@@ -1,9 +1,12 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
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.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;
|
||||
@@ -11,8 +14,10 @@ import digital.laboratory.platform.reagent.dto.StandardReserveSolutionDTO;
|
||||
import digital.laboratory.platform.reagent.dto.StandardReserveSolutionFullDTO;
|
||||
import digital.laboratory.platform.reagent.entity.StandardReserveSolution;
|
||||
import digital.laboratory.platform.reagent.service.StandardReserveSolutionService;
|
||||
import digital.laboratory.platform.reagent.utils.String2DateConverter;
|
||||
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionFullVO;
|
||||
import digital.laboratory.platform.reagent.vo.StandardReserveSolutionVO;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -24,6 +29,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
import java.sql.Date;
|
||||
import java.text.ParseException;
|
||||
|
||||
/**
|
||||
* (标准储备溶液配制及使用记录表)
|
||||
@@ -66,17 +73,28 @@ public class StandardReserveSolutionController {
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param standardReserveSolution (标准储备溶液配制及使用记录表)
|
||||
* @param solutionName (标准储备溶液配制及使用记录表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
|
||||
public R<IPage<StandardReserveSolutionVO>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) {
|
||||
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();
|
||||
|
||||
IPage<StandardReserveSolutionVO> standardReserveSolutionSList = standardReserveSolutionService.getStandardReserveSolutionVOList(page, Wrappers.<StandardReserveSolution>query()
|
||||
QueryWrapper<StandardReserveSolution> standardReserveSolutionQueryWrapper = new QueryWrapper<>();
|
||||
//通过名称查询
|
||||
if (solutionName!=null){
|
||||
|
||||
standardReserveSolutionQueryWrapper.like("solution_name",solutionName);
|
||||
}
|
||||
if (startTime != null && endTime != null) {
|
||||
|
||||
standardReserveSolutionQueryWrapper.ge("create_time",startTime).le("create_time",endTime);
|
||||
}
|
||||
|
||||
IPage<StandardReserveSolutionVO> standardReserveSolutionSList = standardReserveSolutionService.getStandardReserveSolutionVOList(page,standardReserveSolutionQueryWrapper
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(standardReserveSolutionSList);
|
||||
@@ -111,7 +129,7 @@ public class StandardReserveSolutionController {
|
||||
@ApiOperation(value = "入库(标准储备溶液配制及使用记录表)", notes = "入库(标准储备溶液配制及使用记录表)")
|
||||
@SysLog("入库(标准储备溶液配制及使用记录表)" )
|
||||
@PostMapping("warehousing")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" )
|
||||
// @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();
|
||||
@@ -130,7 +148,7 @@ public class StandardReserveSolutionController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询标准储备溶液入库记录", notes = "通过id查询标准储备溶液入库记录")
|
||||
@GetMapping( "/full")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
|
||||
// @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();
|
||||
|
||||
+20
-2
@@ -1,9 +1,12 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
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.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;
|
||||
@@ -11,6 +14,7 @@ import digital.laboratory.platform.reagent.dto.StandardSolutionCurveDTO;
|
||||
import digital.laboratory.platform.reagent.entity.StandardSolutionCurve;
|
||||
import digital.laboratory.platform.reagent.service.StandardSolutionCurveService;
|
||||
import digital.laboratory.platform.reagent.vo.StandardSolutionCurveVO;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -52,13 +56,27 @@ public class StandardSolutionCurveController {
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" )
|
||||
public R<IPage<StandardSolutionCurveVO>> getStandardSolutionCurvePage(Page<StandardSolutionCurve> page, HttpServletRequest theHttpServletRequest) {
|
||||
public R<IPage<StandardSolutionCurveVO>> getStandardSolutionCurvePage(Page<StandardSolutionCurve> page, String solutionName, @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")DateTime startTime,@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
QueryWrapper<StandardSolutionCurve> standardSolutionCurveQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StandardSolutionCurveVO> standardSolutionCurveVOPage = standardSolutionCurveService.getStandardSolutionCurveVOPage(page, Wrappers.<StandardSolutionCurve>query()
|
||||
if (solutionName!=null){
|
||||
|
||||
standardSolutionCurveQueryWrapper.like("solution_name",solutionName);
|
||||
}
|
||||
|
||||
if (startTime!=null&&endTime!=null){
|
||||
|
||||
standardSolutionCurveQueryWrapper.ge("create_time",startTime).le("create_time",endTime);
|
||||
}
|
||||
|
||||
IPage<StandardSolutionCurveVO> standardSolutionCurveVOPage = standardSolutionCurveService.getStandardSolutionCurveVOPage(page, standardSolutionCurveQueryWrapper
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(standardSolutionCurveVOPage);
|
||||
|
||||
+12
-3
@@ -3,6 +3,7 @@ package digital.laboratory.platform.reagent.controller;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.file.FileNameUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
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.StringUtils;
|
||||
@@ -25,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
||||
import javax.activation.MimetypesFileTypeMap;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -83,17 +85,24 @@ public class SupplierInformationController {
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param supplierInformation (服务商/供应商信息)
|
||||
* @param type (服务商/供应商信息)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_page')" )
|
||||
public R<IPage<SupplierInformation>> getSupplierInformationPage(Page<SupplierInformation> page, SupplierInformation supplierInformation, HttpServletRequest theHttpServletRequest) {
|
||||
public R<IPage<SupplierInformation>> getSupplierInformationPage(Page<SupplierInformation> page, String type, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<SupplierInformation> supplierInformationSList = supplierInformationService.page(page, Wrappers.<SupplierInformation>query()
|
||||
QueryWrapper<SupplierInformation> supplierInformationQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (type!=null) {
|
||||
|
||||
supplierInformationQueryWrapper.eq("acceptable_condition","合格");
|
||||
}
|
||||
|
||||
IPage<SupplierInformation> supplierInformationSList = supplierInformationService.page(page, supplierInformationQueryWrapper
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(supplierInformationSList);
|
||||
|
||||
+3
-2
@@ -109,11 +109,12 @@ public class WarehousingRecordFormController {
|
||||
|
||||
QueryWrapper<WarehousingContent> warehousingContentQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (!name.equals("")){
|
||||
if (name!=null){
|
||||
|
||||
warehousingContentQueryWrapper.eq("reagentConsumableName",name);
|
||||
warehousingContentQueryWrapper.like("reagent_consumable_name",name);
|
||||
|
||||
}
|
||||
|
||||
IPage<WarehousingContentVO> warehousingContentVOPage = warehousingContentService.getWarehousingContentVOPage(page, warehousingContentQueryWrapper);
|
||||
|
||||
return R.ok(warehousingContentVOPage);
|
||||
|
||||
@@ -12,8 +12,6 @@ public class ApplicationForUseDTO {
|
||||
@ApiModelProperty(value = "(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
|
||||
@ApiModelProperty(value = "(是否归还)")
|
||||
private boolean returnOrNot;
|
||||
|
||||
@ApiModelProperty(value = "(备注)")
|
||||
private String remarks;
|
||||
|
||||
@@ -22,9 +22,6 @@ EvaluationFormDTO {
|
||||
@ApiModelProperty(value = "(联系人)")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty(value="供应商信息评价表id")
|
||||
private String evaluationFormId;
|
||||
|
||||
@ApiModelProperty(value = "(供应商营业执照)")
|
||||
private String supplierBusinessLicense;
|
||||
|
||||
@@ -58,5 +55,8 @@ EvaluationFormDTO {
|
||||
@ApiModelProperty(value = "(一级评价意见//该意见为当前登录用户的评价意见,不同于审核)")
|
||||
private String commentsFromPrimary;
|
||||
|
||||
@ApiModelProperty(value = "供应商评价表ID")
|
||||
private String evaluationFormId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,5 +13,6 @@ public class OutgoingContentsDTO {
|
||||
private String referenceMaterialId;
|
||||
private String number;
|
||||
private boolean returnOrNot;
|
||||
private String batchDetailsId;
|
||||
|
||||
}
|
||||
|
||||
@@ -43,4 +43,10 @@ public class PurchasingPlanDTO {
|
||||
@ApiModelProperty(value = "采购计划明细修改备注")
|
||||
private String planRemark;
|
||||
|
||||
@ApiModelProperty(value = "采购计划换货备注")
|
||||
private String replacementRemark;
|
||||
|
||||
@ApiModelProperty(value = "换货供应商ID")
|
||||
private String supplierId;
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -8,12 +8,12 @@ public class StandardMaterialApplicationDTO {
|
||||
@ApiModelProperty(value = "标准物质领用归还登记表Id")
|
||||
private String standardMaterialApplicationId;
|
||||
|
||||
@ApiModelProperty(value = "归还数量")
|
||||
private String useQuantity;
|
||||
@ApiModelProperty(value = "使用数量")
|
||||
private String purposeAndQuantity;
|
||||
|
||||
@ApiModelProperty(value = "格子id")
|
||||
private String latticeId;
|
||||
|
||||
@ApiModelProperty(value = "是否需要归还")
|
||||
@ApiModelProperty(value = "是否用完")
|
||||
private Boolean outOfUse;
|
||||
}
|
||||
|
||||
-1
@@ -57,5 +57,4 @@ public class StandardMaterialApprovalFormDTO {
|
||||
@ApiModelProperty(value="ID")
|
||||
private String standardMaterialApprovalFormId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package digital.laboratory.platform.reagent.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
@Data
|
||||
public class StandardReserveSolutionDTO {
|
||||
|
||||
@ApiModelProperty(value = "(定容体积(mL))")
|
||||
private String constantVolume;
|
||||
|
||||
@ApiModelProperty(value = "(配置浓度(mg/mL))")
|
||||
private String configurationConcentration;
|
||||
|
||||
@ApiModelProperty(value="(标准物质ID)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
@ApiModelProperty(value="(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
|
||||
@ApiModelProperty(value="(标准物质称取量)")
|
||||
private String referenceMaterialScale;
|
||||
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value="(溶液名称)")
|
||||
private String solutionName;
|
||||
|
||||
@ApiModelProperty(value="(使用溶剂)")
|
||||
private String useOfSolvent;
|
||||
|
||||
@ApiModelProperty(value="(有效期限)")
|
||||
private Integer validityPeriod;
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package digital.laboratory.platform.reagent.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StandardReserveSolutionFullDTO {
|
||||
|
||||
private String id;
|
||||
private String latticeId;
|
||||
private String warehousingRemarks;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package digital.laboratory.platform.reagent.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StandardSolutionCurveDTO {
|
||||
|
||||
|
||||
@ApiModelProperty(value="(标准储备溶液编号)")
|
||||
private String solutionNumbering;
|
||||
|
||||
@ApiModelProperty(value="(逐级溶液浓度)")
|
||||
private String stepSolutionConcentration;
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.time.LocalDate;
|
||||
@@ -20,25 +21,21 @@ public class WarehousingRecordFormDTO {
|
||||
@ApiModelProperty(value="批号")
|
||||
private String batchNumber;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JSONField(format = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value="(生产日期)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate dateOfProduction;
|
||||
|
||||
@ApiModelProperty(value="入库日期")
|
||||
private LocalDateTime dateOfReceipt;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@JSONField(format = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value="(有效日期)")
|
||||
private LocalDate expirationDate;
|
||||
|
||||
@ApiModelProperty(value="(数量)")
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty(value="(预警值)")
|
||||
private Integer warningValue;
|
||||
|
||||
@ApiModelProperty(value="(入库批次明细ID)")
|
||||
private String warehousingBatchListId;
|
||||
|
||||
@@ -51,5 +48,8 @@ public class WarehousingRecordFormDTO {
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value="(存储期限)")
|
||||
private String limitDate;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -51,6 +51,9 @@ public class AcceptanceRecordForm extends BaseEntity {
|
||||
@ApiModelProperty(value = "(三及审核意见)")
|
||||
private String auditOpinionOfThreeLevel;
|
||||
|
||||
@ApiModelProperty(value = "(提交时间)")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
/**
|
||||
* (部门负责人ID)
|
||||
*/
|
||||
|
||||
@@ -108,14 +108,7 @@ public class BatchDetails extends BaseEntity {
|
||||
@ApiModelProperty(value="(供应商ID)")
|
||||
private String supplierId;
|
||||
|
||||
/**
|
||||
* (预警值)
|
||||
*/
|
||||
@ApiModelProperty(value="(预警值)")
|
||||
private Integer warningValue;
|
||||
|
||||
@ApiModelProperty(value="(预警信息)")
|
||||
private String warningInformation;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -73,7 +73,8 @@ public class CheckSchedule extends BaseEntity {
|
||||
@ApiModelProperty(value="(状态)")
|
||||
private Integer status;
|
||||
|
||||
|
||||
@ApiModelProperty(value="(提交时间)")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -111,6 +111,8 @@ public class ComplianceCheck extends BaseEntity {
|
||||
@ApiModelProperty(value = "品牌")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty(value = "提交时间")
|
||||
private LocalDateTime commitTime;
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
|
||||
@@ -30,6 +30,9 @@ public class DecentralizedRequest extends BaseEntity {
|
||||
@ApiModelProperty(value="(申请人id)")
|
||||
private String applicantId;
|
||||
|
||||
@ApiModelProperty(value="(提交时间)")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
/**
|
||||
* (主任审批意见)
|
||||
*/
|
||||
|
||||
@@ -90,5 +90,12 @@ public class DetailsOfCentralized extends BaseEntity {
|
||||
@ApiModelProperty(value="采购计划修改备注")
|
||||
private String detailsRemark;
|
||||
|
||||
/**
|
||||
* (采购计划换货备注)
|
||||
*/
|
||||
@ApiModelProperty(value="采购计划换货备注")
|
||||
private String replacementRemark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -179,10 +179,13 @@ public class EvaluationForm extends BaseEntity {
|
||||
@ApiModelProperty(value="(编号)")
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty(value="(提交时间)")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
/**
|
||||
* supplierInformationId
|
||||
*/
|
||||
@ApiModelProperty(value="状态:(0:未提交,1:已提交,2:二级审核通过,3:三级审核通过)")
|
||||
@ApiModelProperty(value="状态:(0:未评价,1:已评价,2:二级审核通过,3:三级审核通过, -1 :审核未通过)")
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public class InstructionBook extends BaseEntity {
|
||||
* (制定时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(制定时间)")
|
||||
private LocalDateTime setTime;
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
/**
|
||||
* 技术负责人ID
|
||||
@@ -80,6 +80,10 @@ public class InstructionBook extends BaseEntity {
|
||||
@ApiModelProperty(value="技术负责人ID")
|
||||
private String technicalDirectorId;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value="申请人")
|
||||
private String createName;
|
||||
/**
|
||||
* instructionBookId
|
||||
*/
|
||||
|
||||
@@ -57,15 +57,15 @@ public class OutgoingContents extends BaseEntity {
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value = "(是否归还)")
|
||||
private boolean returnOrNot;
|
||||
|
||||
@ApiModelProperty(value = "(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
|
||||
@ApiModelProperty(value = "(标准物质ID)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
@ApiModelProperty(value = "(批次ID)")
|
||||
private String batchDetailsId;
|
||||
|
||||
/**
|
||||
* outgoingContentsId
|
||||
*/
|
||||
|
||||
+2
@@ -153,4 +153,6 @@ public class PeriodVerificationImplementation extends BaseEntity {
|
||||
@ApiModelProperty(value="periodVerificationPlanId")
|
||||
private String periodVerificationPlanId;
|
||||
|
||||
@ApiModelProperty(value="提交时间")
|
||||
private LocalDateTime commitTime;
|
||||
}
|
||||
|
||||
@@ -82,13 +82,20 @@ public class ProcurementContent extends BaseEntity {
|
||||
@ApiModelProperty(value="(换货单价)")
|
||||
private Double replacementPrice;
|
||||
|
||||
/**
|
||||
* (换货备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(换货备注)")
|
||||
private String replacementRemark;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购计划明细备注)")
|
||||
private String planRemark;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "换货供应商ID")
|
||||
private String supplierId;
|
||||
/**
|
||||
* procurementContentId
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,9 @@ public class PurchaseCatalogue extends BaseEntity {
|
||||
@ApiModelProperty(value="二级审核时间")
|
||||
private LocalDateTime auditTimeOfSecondary;
|
||||
|
||||
@ApiModelProperty(value="提交时间")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
/**
|
||||
* (一级审核人ID)
|
||||
*/
|
||||
|
||||
@@ -54,5 +54,7 @@ public class PurchaseListDetails extends BaseEntity {
|
||||
@ApiModelProperty(value="采购清单明细ID")
|
||||
private String id;
|
||||
|
||||
private String procurementContentId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ import lombok.EqualsAndHashCode;
|
||||
@ApiModel(value = "(采购计划)")
|
||||
public class PurchasingPlan extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value="提交时间")
|
||||
private LocalDateTime commitTime;
|
||||
/**
|
||||
* (经费预算)
|
||||
*/
|
||||
|
||||
+8
@@ -160,5 +160,13 @@ public class ReagentConsumableInventory extends BaseEntity {
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* (预警值)
|
||||
*/
|
||||
@ApiModelProperty(value="(预警值)")
|
||||
private Integer warningValue;
|
||||
|
||||
@ApiModelProperty(value="(预警信息)")
|
||||
private String warningInformation;
|
||||
|
||||
}
|
||||
|
||||
@@ -33,9 +33,6 @@ public class ReagentConsumablesSet extends BaseEntity {
|
||||
@ApiModelProperty(value = "(试剂耗材领用申请表ID)")
|
||||
private String applicationForUseId;
|
||||
|
||||
@ApiModelProperty(value = "(是否归还)")
|
||||
private boolean returnOrNot;
|
||||
|
||||
@ApiModelProperty(value = "(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
/**
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ReferenceMaterial extends BaseEntity {
|
||||
/**
|
||||
* number
|
||||
*/
|
||||
@ApiModelProperty(value="状态(0为可以使用,-1为停用)")
|
||||
@ApiModelProperty(value="状态(0为可以使用,-1为停用,-2为降级使用、-3 已被领用")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class ReviewAndApprove {
|
||||
|
||||
@ApiModelProperty(value="分散采购申请数组")
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOList;
|
||||
|
||||
@ApiModelProperty(value="采购计划数组")
|
||||
List<PurchasingPlanVO> purchasingPlanVOList;
|
||||
|
||||
@ApiModelProperty(value="验收记录表数组")
|
||||
List<AcceptanceRecordFormVO> acceptanceRecordFormVOList;
|
||||
|
||||
@ApiModelProperty(value="符合性检查数组")
|
||||
List<ComplianceCheckVO> complianceCheckVOList;
|
||||
|
||||
@ApiModelProperty(value="期间核查计划数组")
|
||||
List<CheckScheduleVO> checkScheduleVOList;
|
||||
|
||||
@ApiModelProperty(value="期间核查结果实施表数组")
|
||||
List<PeriodVerificationImplementationVO> periodVerificationImplementationVOList;
|
||||
|
||||
@ApiModelProperty(value="采购目录数组")
|
||||
List<PurchaseCatalogueVO> purchaseCatalogueVOList;
|
||||
|
||||
@ApiModelProperty(value="标准物质报废降级审批表数组")
|
||||
List<StandardMaterialApprovalFormVO> standardMaterialApprovalFormList;
|
||||
|
||||
@ApiModelProperty(value="供应商评价表数组")
|
||||
List<EvaluationFormVO> evaluationFormVOList;
|
||||
|
||||
@ApiModelProperty(value="指导书数组")
|
||||
List<InstructionBookVO> instructionBookList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@TableName(value = "solution_use_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "(标准溶液使用记录表)")
|
||||
public class SolutionUseForm {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="标准溶液使用记录表ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value="标准溶液配置记录表ID")
|
||||
private String solutionId;
|
||||
|
||||
@ApiModelProperty(value="(使用数量(mL))")
|
||||
private String quantityUsed;
|
||||
|
||||
@ApiModelProperty(value="(使用次序)")
|
||||
private Integer orderOfUse;
|
||||
|
||||
@ApiModelProperty(value="(使用人ID)")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value="(标准物质领用/归还登记表ID)")
|
||||
private String standardMaterialApplicationId;
|
||||
}
|
||||
+2
@@ -91,6 +91,8 @@ public class StandardMaterialApprovalForm extends BaseEntity {
|
||||
@ApiModelProperty(value="(审批结果)")
|
||||
private Boolean resultOfApproval;
|
||||
|
||||
@ApiModelProperty(value="(提交时间)")
|
||||
private LocalDateTime commitTime;
|
||||
/**
|
||||
* (审批时间)
|
||||
*/
|
||||
|
||||
@@ -48,9 +48,6 @@ public class WarehousingBatchList extends BaseEntity {
|
||||
/**
|
||||
* (生产日期)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@JSONField(format = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value="(生产日期)")
|
||||
private LocalDate dateOfProduction;
|
||||
|
||||
|
||||
@@ -63,9 +60,7 @@ public class WarehousingBatchList extends BaseEntity {
|
||||
/**
|
||||
* (有效日期)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@JSONField(format = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value="(有效日期)")
|
||||
|
||||
private LocalDate expirationDate;
|
||||
/**
|
||||
* (有效日期)
|
||||
|
||||
@@ -66,5 +66,11 @@ public class WarehousingContent extends BaseEntity {
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "供应商评价表ID")
|
||||
private String evaluationFormId;
|
||||
|
||||
@ApiModelProperty(value = "采购清单明细ID")
|
||||
private String purchaseListDetailsId;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import digital.laboratory.platform.reagent.entity.DeliveryRegistrationForm;
|
||||
import digital.laboratory.platform.reagent.vo.DeliveryRegistrationFormVO;
|
||||
@@ -17,7 +18,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface DeliveryRegistrationFormMapper extends BaseMapper<DeliveryRegistrationForm> {
|
||||
|
||||
Page<DeliveryRegistrationFormVO> getDeliveryRegistrationFormVOPage (Page <DeliveryRegistrationForm> page , QueryWrapper<DeliveryRegistrationForm> qw);
|
||||
Page<DeliveryRegistrationFormVO> getDeliveryRegistrationFormVOPage (Page <DeliveryRegistrationForm> page , @Param(Constants.WRAPPER) QueryWrapper<DeliveryRegistrationForm> qw);
|
||||
|
||||
DeliveryRegistrationFormVO getDeliveryRegistrationFormVOById (String deliveryRegistrationFormId);
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.ReviewAndApprove;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ReviewAndApproveMapper extends BaseMapper<ReviewAndApprove> {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.SolutionUseForm;
|
||||
import digital.laboratory.platform.reagent.vo.SolutionUseFormVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@Mapper
|
||||
public interface SolutionUseFormMapper extends BaseMapper<SolutionUseForm> {
|
||||
|
||||
List<SolutionUseFormVO> getSolutionUseFormVOList(String solutionId);
|
||||
}
|
||||
+4
-2
@@ -3,11 +3,13 @@ package digital.laboratory.platform.reagent.mapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.entity.StandardMaterialApplication;
|
||||
import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.security.core.parameters.P;
|
||||
|
||||
/**
|
||||
* (标准物质领用/归还登记表) Mapper 接口
|
||||
@@ -18,9 +20,9 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface StandardMaterialApplicationMapper extends BaseMapper<StandardMaterialApplication> {
|
||||
|
||||
IPage<StandardMaterialApplicationVO> getStandardMaterialApplicationVOPage (IPage<StandardMaterialApplication> page , QueryWrapper<StandardMaterialApplication> qw);
|
||||
IPage<StandardMaterialApplicationVO> getStandardMaterialApplicationVOPage (IPage<StandardMaterialApplication> page ,@Param(Constants.WRAPPER) QueryWrapper<StandardMaterialApplication> qw);
|
||||
|
||||
IPage<StandardMaterialApplicationVO> getStandardMaterialApplicationVOList (IPage<StandardMaterialApplication> page , QueryWrapper<StandardMaterialApplication> qw);
|
||||
IPage<StandardMaterialApplicationVO> getStandardMaterialApplicationVOList (IPage<StandardMaterialApplication> page , @Param(Constants.WRAPPER)QueryWrapper<StandardMaterialApplication> qw);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -19,5 +19,6 @@ public interface StandardMaterialApprovalFormMapper extends BaseMapper<StandardM
|
||||
|
||||
IPage<StandardMaterialApprovalFormVO> getVOPage(IPage<StandardMaterialApprovalForm> page, QueryWrapper<StandardMaterialApprovalForm> qw);
|
||||
|
||||
StandardMaterialApprovalFormVO getVO (String id);
|
||||
|
||||
}
|
||||
|
||||
+6
-3
@@ -23,14 +23,17 @@ public interface EvaluationFormService extends IService<EvaluationForm> {
|
||||
|
||||
|
||||
//增加/修改评价表
|
||||
EvaluationForm addFormById(String supplierInformationId);
|
||||
|
||||
EvaluationForm editFormById(EvaluationFormDTO evaluationFormDTO,DLPUser dlpUser);
|
||||
EvaluationForm addForm(String supplierInformationId);
|
||||
|
||||
EvaluationForm editFormById(EvaluationFormDTO evaluationFormDTO, DLPUser dlpUser);
|
||||
|
||||
EvaluationForm auditFormOfSecondary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||
|
||||
EvaluationForm auditFormOfThreeLevel(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||
|
||||
List<EvaluationFormVO> getEvaluationFormVOList (String supplierInformationId);
|
||||
List<EvaluationFormVO> getEvaluationFormVOList (String evaluationFormId);
|
||||
|
||||
//通过供应商ID查询评价表列表
|
||||
EvaluationFormVO getEvaluationFormVO(String id);
|
||||
}
|
||||
|
||||
+1
-1
@@ -43,5 +43,5 @@ public interface PurchaseCatalogueService extends IService<PurchaseCatalogue> {
|
||||
|
||||
PurchaseCatalogue releaseCatalogue(String purchaseCatalogueId);
|
||||
|
||||
Page getVOpage();
|
||||
Page getVOpage(String name);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import digital.laboratory.platform.reagent.entity.ProcurementContent;
|
||||
import digital.laboratory.platform.reagent.entity.PurchasingPlan;
|
||||
import digital.laboratory.platform.reagent.vo.ProcurementContentVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchasingPlanVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReplacementVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -49,4 +50,5 @@ public interface PurchasingPlanService extends IService<PurchasingPlan> {
|
||||
|
||||
PurchasingPlan approveById(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser);
|
||||
|
||||
ReplacementVO getReplacementVO(String id);
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,5 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
@@ -26,11 +27,12 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
|
||||
|
||||
ReferenceMaterial deactivateById(String referenceMaterialId);
|
||||
|
||||
Page<ReagentConsumableInventoryFullVO> getAllList(Integer current,Integer size,String reagentConsumableName);
|
||||
Page<ReagentConsumableInventoryFullVO> getAllList(Integer current, Integer size, QueryWrapper<ReagentConsumableInventory> qw,Integer status);
|
||||
|
||||
//分页查询试剂耗材
|
||||
Page<ReagentConsumableInventoryFullVO> getAllRM(Integer current, Integer size,String reagentConsumableName);
|
||||
|
||||
public Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(Page page,String name);
|
||||
|
||||
}
|
||||
List<ReagentConsumableInventory> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw);
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.entity.ReviewAndApprove;
|
||||
|
||||
public interface ReviewAndApproveService extends IService<ReviewAndApprove> {
|
||||
|
||||
|
||||
// 进行审核的列表
|
||||
ReviewAndApprove getReviewAndApproveList(DLPUser dlpUser);
|
||||
|
||||
ReviewAndApprove getReviewAndApproveRecordList(DLPUser dlpUser);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.entity.SolutionUseForm;
|
||||
import digital.laboratory.platform.reagent.vo.SolutionUseFormVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SolutionUseFormService extends IService<SolutionUseForm> {
|
||||
List<SolutionUseFormVO> getSolutionUseFormVOList(String solutionId);
|
||||
|
||||
SolutionUseForm useById (String referenceMaterialId, DLPUser dlpUser);
|
||||
}
|
||||
+16
-3
@@ -48,10 +48,14 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
AcceptanceRecordForm byId = acceptanceRecordFormService.getById(acceptanceRecordFormDTO.getAcceptanceRecordFormId());
|
||||
|
||||
if (byId.getStatus()!=0){
|
||||
throw new RuntimeException(String.format("当前状态不能提交"));
|
||||
}
|
||||
BeanUtils.copyProperties(acceptanceRecordFormDTO, byId);
|
||||
|
||||
byId.setUserName(dlpUser.getName());
|
||||
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
|
||||
byId.setStatus(1);
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
@@ -137,6 +141,9 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
AcceptanceRecordForm byId = acceptanceRecordFormService.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus()!=1){
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
}
|
||||
byId.setPrimaryAuditorId(dlpUser.getId());
|
||||
byId.setAuditOpinionOfPrimary(auditAndApproveDTO.getAuditOpinion());
|
||||
byId.setAuditTimeOfPrimary(LocalDateTime.now());
|
||||
@@ -144,7 +151,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult()==true){
|
||||
byId.setStatus(2);
|
||||
}else byId.setStatus(-1);
|
||||
}else byId.setStatus(-2);
|
||||
|
||||
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
@@ -156,6 +163,9 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
AcceptanceRecordForm byId = acceptanceRecordFormService.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus()!=2){
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
}
|
||||
byId.setSecondaryAuditorId(dlpUser.getId());
|
||||
byId.setAuditOpinionOfSecondary(auditAndApproveDTO.getAuditOpinion());
|
||||
byId.setAuditTimeOfSecondary(LocalDateTime.now());
|
||||
@@ -163,7 +173,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult()==true){
|
||||
byId.setStatus(3);
|
||||
}else byId.setStatus(-1);
|
||||
}else byId.setStatus(-3);
|
||||
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
return byId;
|
||||
@@ -174,6 +184,9 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
|
||||
AcceptanceRecordForm byId = acceptanceRecordFormService.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus()!=3){
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
}
|
||||
byId.setThreeLevelAuditorId(dlpUser.getId());
|
||||
byId.setAuditOpinionOfThreeLevel(auditAndApproveDTO.getAuditOpinion());
|
||||
byId.setAuditTimeOfThreeLevel(LocalDateTime.now());
|
||||
@@ -186,7 +199,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
blacklistService.addListById2(byId.getReagentConsumableId(),byId.getSupplierId());
|
||||
}
|
||||
byId.setStatus(4);
|
||||
}else byId.setStatus(-1);
|
||||
}else byId.setStatus(-4);
|
||||
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
return byId;
|
||||
|
||||
+35
-15
@@ -77,7 +77,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(record.getId());
|
||||
|
||||
BeanUtils.copyProperties(applicationForUseVO,record);
|
||||
BeanUtils.copyProperties(applicationForUseVO, record);
|
||||
}
|
||||
|
||||
return applicationForUseVOPage;
|
||||
@@ -116,7 +116,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,applicationForUseDTO.getReagentConsumableId());
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, applicationForUseDTO.getReagentConsumableId());
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
|
||||
@@ -124,7 +124,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
reagentConsumablesSets.add(reagentConsumablesSet);
|
||||
|
||||
if (reagentConsumablesSet.getQuantity()>totalQuantity){
|
||||
if (reagentConsumablesSet.getQuantity() > totalQuantity) {
|
||||
|
||||
throw new RuntimeException(String.format("领用数量不能大于库存量"));
|
||||
}
|
||||
@@ -146,12 +146,12 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
ApplicationForUse applicationForUse1 = applicationForUseService.addApplication(applicationForUseDTOList, dlpUser);
|
||||
|
||||
if (applicationForUse1!=null){
|
||||
if (applicationForUse1 != null) {
|
||||
|
||||
ApplicationForUseVO applicationForUseVO = applicationForUseService.getApplicationForUseVO(applicationForUse1.getId());
|
||||
|
||||
return applicationForUseVO;
|
||||
}else throw new RuntimeException(String.format("保存失败"));
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
}
|
||||
|
||||
@Override//提交领用申请记录
|
||||
@@ -164,9 +164,9 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
applicationForUse.setStatus(1);
|
||||
|
||||
String random = "" + Math.random();
|
||||
String code = getCode();
|
||||
//领取码
|
||||
applicationForUse.setClaimCode(random.substring(random.length() - 4));
|
||||
applicationForUse.setClaimCode(code);
|
||||
|
||||
applicationForUse.setDateOfCollection(LocalDateTime.now());
|
||||
|
||||
@@ -197,9 +197,9 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
applicationForUse.setDateOfCollection(LocalDateTime.now());
|
||||
|
||||
String random = "" + Math.random();
|
||||
String code = getCode();
|
||||
|
||||
applicationForUse.setClaimCode(random.substring(random.length() - 4));
|
||||
applicationForUse.setClaimCode(code);
|
||||
|
||||
applicationForUseService.updateById(applicationForUse);
|
||||
|
||||
@@ -217,15 +217,35 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
ApplicationForUse applicationForUse = applicationForUseService.getById(applicationForUseId);
|
||||
|
||||
if (applicationForUse.getStatus()==0){
|
||||
if (applicationForUse.getStatus() == 0) {
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumablesSet> reagentConsumablesSetLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
LambdaQueryWrapper<ReagentConsumablesSet> reagentConsumablesSetLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUse.getId());
|
||||
reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUse.getId());
|
||||
|
||||
List<ReagentConsumablesSet> list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper);
|
||||
List<ReagentConsumablesSet> list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper);
|
||||
|
||||
return reagentConsumablesSetService.removeBatchByIds(list) & applicationForUseService.removeById(applicationForUse);
|
||||
return reagentConsumablesSetService.removeBatchByIds(list) & applicationForUseService.removeById(applicationForUse);
|
||||
|
||||
}else throw new RuntimeException(String.format("当前状态不能删除"));}
|
||||
} else throw new RuntimeException(String.format("当前状态不能删除"));
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
//生成随机数
|
||||
String random = "" + Math.random();
|
||||
|
||||
String substring = random.substring(random.length() - 6);
|
||||
|
||||
QueryWrapper<ApplicationForUse> applicationForUseQueryWrapper = new QueryWrapper<>();
|
||||
//判断随机数是否重复
|
||||
applicationForUseQueryWrapper.eq("claim_code", substring);
|
||||
|
||||
if (applicationForUseService.getOne(applicationForUseQueryWrapper) != null) {
|
||||
|
||||
substring = random.substring(random.length() - 6);
|
||||
|
||||
getCode();
|
||||
}
|
||||
return substring;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -45,7 +45,8 @@ public class BatchDetailsServiceImpl extends ServiceImpl<BatchDetailsMapper, Bat
|
||||
|
||||
LambdaQueryWrapper<BatchDetails> batchDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId,reagentConsumableInventoryId);
|
||||
batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId,reagentConsumableInventoryId)
|
||||
.eq(BatchDetails::getServiceStatus,1);
|
||||
|
||||
List<BatchDetails> list = batchDetailsService.list(batchDetailsLambdaQueryWrapper);
|
||||
|
||||
|
||||
+6
-1
@@ -138,7 +138,12 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
|
||||
List<DetailsOfCentralized> list = detailsOfCentralizedService.list(detailsOfCentralizedLambdaQueryWrapper);
|
||||
|
||||
return detailsOfCentralizedService.removeBatchByIds(list)&¢ralizedRequestService.removeById(centralizedRequestId);
|
||||
if (list.size()!=0){
|
||||
|
||||
detailsOfCentralizedService.removeBatchByIds(list);
|
||||
|
||||
}
|
||||
return centralizedRequestService.removeById(centralizedRequestId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -118,6 +118,8 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
|
||||
CheckSchedule byId = checkScheduleService.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId());
|
||||
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (byId == null) {
|
||||
CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
|
||||
checkSchedule.setStatus(1);
|
||||
@@ -163,7 +165,7 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
}
|
||||
byId.setStatus(2);
|
||||
} else {
|
||||
byId.setStatus(-1);
|
||||
byId.setStatus(-2);
|
||||
}
|
||||
|
||||
if (checkScheduleService.updateById(byId)) {
|
||||
|
||||
+10
-10
@@ -100,7 +100,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
BeanUtils.copyProperties(complianceCheckDTO, complianceCheck);
|
||||
|
||||
complianceCheck.setStatus(0);
|
||||
complianceCheck.setStatus(-1);
|
||||
|
||||
if (complianceCheckService.save(complianceCheck)) {
|
||||
return complianceCheck;
|
||||
@@ -164,7 +164,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
byId.setInspectionScheme(complianceCheckDTO.getInspectionScheme());
|
||||
byId.setExecutorId(dlpUser.getId());
|
||||
byId.setStatus(1);
|
||||
byId.setStatus(0);
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
return byId;
|
||||
@@ -184,6 +184,8 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
byId.setInspectionScheme(complianceCheckDTO.getInspectionScheme());
|
||||
byId.setNonconformingItem(nonconformingItem);
|
||||
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (nonconformingItem != null) {
|
||||
//若存在不合格项目,将其添加至黑名单
|
||||
BatchDetails batchDetails = batchDetailsService.getById(byId.getBatchDetailsId());
|
||||
@@ -193,7 +195,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
blacklistService.addListById(byId.getReagentConsumableId(), batchDetails.getSupplierId());
|
||||
}
|
||||
|
||||
byId.setStatus(2);
|
||||
byId.setStatus(1);
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
return byId;
|
||||
@@ -211,8 +213,6 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
if (byId.getStatus() != 1) {
|
||||
throw new RuntimeException(String.format("当前状态不可审核"));
|
||||
}
|
||||
|
||||
|
||||
byId.setAuditOpinionOfPrimary(auditAndApproveDTO.getAuditOpinion());
|
||||
|
||||
byId.setAuditResultOfPrimary(auditAndApproveDTO.getAuditResult());
|
||||
@@ -222,9 +222,9 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
byId.setPrimaryAuditorId(dlpUser.getId());
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
|
||||
byId.setStatus(3);
|
||||
byId.setStatus(2);
|
||||
} else {
|
||||
byId.setStatus(-1);
|
||||
byId.setStatus(-2);
|
||||
}
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
@@ -239,7 +239,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
ComplianceCheck byId = complianceCheckService.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus() != 1) {
|
||||
if (byId.getStatus() != 2) {
|
||||
throw new RuntimeException(String.format("当前状态不可审核"));
|
||||
}
|
||||
byId.setAuditOpinionOfSecondary(auditAndApproveDTO.getAuditOpinion());
|
||||
@@ -250,9 +250,9 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
byId.setSecondaryAuditorId(dlpUser.getId());
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
byId.setStatus(4);
|
||||
byId.setStatus(3);
|
||||
} else {
|
||||
byId.setStatus(-1);
|
||||
byId.setStatus(-3);
|
||||
}
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
|
||||
+20
-4
@@ -161,6 +161,8 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
decentralizedRequest.setStatus(1);
|
||||
|
||||
decentralizedRequest.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (decentralizedRequestService.updateById(decentralizedRequest)) {
|
||||
return decentralizedRequest;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
@@ -170,6 +172,8 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
@@ -182,6 +186,9 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
DecentralizedRequest byId = decentralizedRequestService.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (byId.getStatus()!=1){
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
}
|
||||
|
||||
byId.setPrimaryAuditorId(dlpUser.getId());
|
||||
|
||||
@@ -194,7 +201,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
if (auditAndApproveDto.getAuditResult() == true) {
|
||||
byId.setStatus(2);
|
||||
} else {
|
||||
byId.setStatus(-1);
|
||||
byId.setStatus(-2);
|
||||
}
|
||||
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
@@ -209,6 +216,9 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
DecentralizedRequest byId = decentralizedRequestService.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (byId.getStatus()!=2){
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
}
|
||||
|
||||
byId.setSecondaryAuditorId(dlpUser.getId());
|
||||
|
||||
@@ -221,7 +231,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
if (auditAndApproveDto.getAuditResult() == true) {
|
||||
byId.setStatus(3);
|
||||
} else {
|
||||
byId.setStatus(-1);
|
||||
byId.setStatus(-3);
|
||||
}
|
||||
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
@@ -235,6 +245,9 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
DecentralizedRequest byId = decentralizedRequestService.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
if (byId.getStatus()!=3){
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
}
|
||||
|
||||
byId.setThreeLevelAuditId(dlpUser.getId());
|
||||
|
||||
@@ -248,7 +261,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
byId.setStatus(4);
|
||||
} else {
|
||||
|
||||
byId.setStatus(-1);
|
||||
byId.setStatus(-4);
|
||||
}
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
return byId;
|
||||
@@ -261,6 +274,9 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
DecentralizedRequest byId = decentralizedRequestService.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (byId.getStatus()!=4){
|
||||
throw new RuntimeException(String.format("当前状态不能审批"));
|
||||
}
|
||||
byId.setApproverId(dlpUser.getId());
|
||||
|
||||
byId.setResultOfApproval(auditAndApproveDto.getApproveResult());
|
||||
@@ -322,7 +338,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
byId.setStatus(5);
|
||||
} else {
|
||||
byId.setStatus(-1);
|
||||
byId.setStatus(-5);
|
||||
}
|
||||
if (decentralizedRequestService.updateById(byId)) {
|
||||
return byId;
|
||||
|
||||
+55
-8
@@ -66,6 +66,9 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
@Autowired
|
||||
private BatchDetailsService batchDetailsService;
|
||||
|
||||
@Override
|
||||
@Transactional//创建出库任务
|
||||
public DeliveryRegistrationForm addFrom(String applicationForUseId) {
|
||||
@@ -111,8 +114,9 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
outgoingContents.setOutboundUse(reagentConsumablesSet.getPurpose());
|
||||
outgoingContents.setReagentConsumableId(reagentConsumablesSet.getReagentConsumableId());
|
||||
outgoingContents.setReagentConsumableType(one.getCategory());
|
||||
outgoingContents.setReturnOrNot(reagentConsumablesSet.isReturnOrNot());
|
||||
outgoingContents.setReferenceMaterialNumber(reagentConsumablesSet.getReferenceMaterialNumber());
|
||||
outgoingContents.setBatchDetailsId(reagentConsumablesSet.getBatchDetailsId());
|
||||
|
||||
|
||||
outgoingContentsList.add(outgoingContents);
|
||||
|
||||
@@ -150,7 +154,11 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
//查询领用申请表
|
||||
ApplicationForUse one = applicationForUseService.getOne(applicationForUseLambdaQueryWrapper);
|
||||
|
||||
one.setClaimCode("0000");
|
||||
one.setClaimCode("");
|
||||
|
||||
one.setStatus(2);
|
||||
|
||||
applicationForUseService.updateById(one);
|
||||
|
||||
for (OutgoingContentsDTO outgoingContentsDTO : outgoingContentsDTOS) {
|
||||
|
||||
@@ -168,7 +176,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
outgoingContents.setReferenceMaterialNumber(outgoingContentsDTO.getNumber());
|
||||
|
||||
if (reagentConsumables.getCategory().equals("标准物质") && outgoingContents.isReturnOrNot()) {
|
||||
if (reagentConsumables.getCategory().equals("标准物质") ) {
|
||||
//生成标准物质领用/归还登记表
|
||||
StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication();
|
||||
|
||||
@@ -194,7 +202,21 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
}
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(outgoingContentsDTO.getReferenceMaterialId());
|
||||
|
||||
byId1.setStatus(-1);
|
||||
byId1.setStatus(-3);
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(outgoingContentsDTO.getBatchDetailsId());
|
||||
|
||||
if (batchDetails!=null){
|
||||
|
||||
batchDetails.setQuantity(batchDetails.getQuantity()-outgoingContentsDTO.getQuantity());
|
||||
|
||||
if (batchDetails.getQuantity()==0){
|
||||
|
||||
batchDetails.setServiceStatus(-1);
|
||||
}
|
||||
|
||||
batchDetailsService.updateById(batchDetails);}
|
||||
|
||||
//查找出对应的仓库信息,将库存量减少
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.reduceById(outgoingContents.getReagentConsumableId(), outgoingContents.getQuantity());
|
||||
|
||||
@@ -204,7 +226,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
throw new RuntimeException(String.format("出库数量不能超过库存量"));
|
||||
}
|
||||
|
||||
} else if (reagentConsumables.getCategory().equals("标准储备溶液") && outgoingContents.isReturnOrNot()) {
|
||||
} else if (reagentConsumables.getCategory().equals("标准储备溶液") ) {
|
||||
//创建标准物质领用/归还登记表
|
||||
StandardMaterialApplication standardMaterialApplication = new StandardMaterialApplication();
|
||||
standardMaterialApplication.setReferenceMaterialNumber(outgoingContentsDTO.getNumber());
|
||||
@@ -227,24 +249,49 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId());
|
||||
standardMaterialApplications.add(standardMaterialApplication);
|
||||
|
||||
solutionUseFormService.useById(outgoingContentsDTO.getReferenceMaterialId(), dlpUser);
|
||||
solutionUseFormService.useById(outgoingContentsDTO.getNumber(), dlpUser);
|
||||
//通过标准物质ID,查找出对应的仓库信息,将库存量减少
|
||||
String referenceMaterialId = outgoingContentsDTO.getReferenceMaterialId();
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(referenceMaterialId);
|
||||
|
||||
referenceMaterial.setStatus(-1);
|
||||
referenceMaterial.setStatus(-3);
|
||||
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
|
||||
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() - outgoingContentsDTO.getQuantity());
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(outgoingContentsDTO.getBatchDetailsId());
|
||||
|
||||
if (batchDetails!=null){
|
||||
|
||||
batchDetails.setQuantity(batchDetails.getQuantity()-outgoingContentsDTO.getQuantity());
|
||||
|
||||
if (batchDetails.getQuantity()==0){
|
||||
|
||||
batchDetails.setServiceStatus(-1);
|
||||
}
|
||||
batchDetailsService.updateById(batchDetails);}
|
||||
if (reagentConsumableInventory.getTotalQuantity() < 0) {
|
||||
throw new RuntimeException(String.format("出库数量不能超过库存量"));
|
||||
}
|
||||
|
||||
} else {
|
||||
RequisitionRecord requisitionRecord = requisitionRecordService.addRecord(outgoingContents);
|
||||
//查找对应的批次ID,将批次数量减少
|
||||
BatchDetails batchDetails = batchDetailsService.getById(outgoingContentsDTO.getBatchDetailsId());
|
||||
/*
|
||||
* 若某个批次的物品已被领用完毕,则改变该批次的状态即可,就不会显示在领用页面*/
|
||||
if (batchDetails!=null){
|
||||
|
||||
batchDetails.setQuantity(batchDetails.getQuantity()-outgoingContentsDTO.getQuantity());
|
||||
|
||||
if (batchDetails.getQuantity()==0){
|
||||
|
||||
batchDetails.setServiceStatus(-1);
|
||||
}
|
||||
|
||||
batchDetailsService.updateById(batchDetails);}
|
||||
|
||||
requisitionRecord.setDateOfClaim(LocalDateTime.now());
|
||||
requisitionRecord.setRecipientId(one.getRecipientId());
|
||||
@@ -272,7 +319,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
if (standardMaterialApplications.size() != 0) {
|
||||
standardMaterialApplicationService.saveBatch(standardMaterialApplications);
|
||||
}
|
||||
if (outgoingContentsService.saveBatch(outgoingContentsList)) {
|
||||
if (outgoingContentsService.saveBatch(outgoingContentsList)&& deliveryRegistrationFormService.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
}
|
||||
|
||||
+50
-20
@@ -1,8 +1,5 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
@@ -15,12 +12,13 @@ import digital.laboratory.platform.reagent.service.ProvideServicesOrSuppliesServ
|
||||
import digital.laboratory.platform.reagent.service.PurchaseListDetailsService;
|
||||
import digital.laboratory.platform.reagent.service.SupplierInformationService;
|
||||
import digital.laboratory.platform.reagent.vo.EvaluationFormVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import digital.laboratory.platform.reagent.vo.ProvideServicesOrSuppliesVO;
|
||||
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.List;
|
||||
|
||||
/**
|
||||
@@ -47,46 +45,57 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
|
||||
List<EvaluationFormVO> evaluationFormVOList = baseMapper.getEvaluationFormVOList(supplierInformationId);
|
||||
|
||||
for (EvaluationFormVO evaluationFormVO : evaluationFormVOList) {
|
||||
|
||||
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(evaluationFormVO.getId());
|
||||
|
||||
evaluationFormVO.setProvideServicesOrSuppliesVOList(voList);
|
||||
}
|
||||
|
||||
return evaluationFormVOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EvaluationFormVO getFormById(String evaluationFormId) {
|
||||
|
||||
EvaluationFormVO evaluationForm = baseMapper.getEvaluationForm(evaluationFormId);
|
||||
|
||||
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(evaluationFormId);
|
||||
|
||||
evaluationForm.setProvideServicesOrSuppliesVOList(voList);
|
||||
|
||||
return evaluationForm;
|
||||
}
|
||||
|
||||
@Override//增加评价表
|
||||
public EvaluationForm addFormById(String supplierInformationId) {
|
||||
@Override
|
||||
public EvaluationForm addForm(String supplierInformationId){
|
||||
|
||||
EvaluationForm evaluationForm = new EvaluationForm();
|
||||
|
||||
evaluationForm.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
evaluationForm.setSupplierInformationId(supplierInformationId);
|
||||
|
||||
evaluationFormService.save(evaluationForm);
|
||||
if (evaluationFormService.save(evaluationForm)){
|
||||
return evaluationForm;
|
||||
}else return null;
|
||||
|
||||
return evaluationForm;
|
||||
}
|
||||
|
||||
|
||||
@Override//填写评价表并提交
|
||||
public EvaluationForm editFormById(EvaluationFormDTO evaluationFormDTO,DLPUser dlpUser) {
|
||||
|
||||
EvaluationForm byId = evaluationFormService.getById(evaluationFormDTO.getEvaluationFormId());
|
||||
EvaluationForm evaluationForm = evaluationFormService.getById(evaluationFormDTO.getEvaluationFormId());
|
||||
|
||||
BeanUtils.copyProperties(evaluationFormDTO, byId);
|
||||
BeanUtils.copyProperties(evaluationFormDTO, evaluationForm);
|
||||
|
||||
byId.setPrimaryUserId(dlpUser.getId());
|
||||
evaluationForm.setPrimaryUserId(dlpUser.getId());
|
||||
|
||||
byId.setCommentsDateFromPrimary(LocalDate.now());
|
||||
evaluationForm.setCommentsDateFromPrimary(LocalDate.now());
|
||||
|
||||
byId.setStatus(1);
|
||||
evaluationForm.setStatus(2);
|
||||
|
||||
if (evaluationFormService.updateById(byId)) {
|
||||
return byId;
|
||||
evaluationForm.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (evaluationFormService.updateById(evaluationForm)) {
|
||||
return evaluationForm;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
}
|
||||
|
||||
@@ -103,6 +112,10 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
|
||||
byId.setCommentsResultFromSecondary(auditAndApproveDTO.getAuditResult());
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
byId.setStatus(3);
|
||||
} else byId.setStatus(-3);
|
||||
|
||||
if (evaluationFormService.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
@@ -124,7 +137,9 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
|
||||
byId.setCommentsResultFromThreeLevel(auditAndApproveDTO.getAuditResult());
|
||||
|
||||
byId.setStatus(2);
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
byId.setStatus(4);
|
||||
} else byId.setStatus(-4);
|
||||
|
||||
if (evaluationFormService.updateById(byId)) {
|
||||
return byId;
|
||||
@@ -133,6 +148,21 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
}
|
||||
}
|
||||
|
||||
@Override//通过供应商ID查询评价表列表
|
||||
public EvaluationFormVO getEvaluationFormVO(String id) {
|
||||
|
||||
EvaluationFormVO evaluationForm = baseMapper.getEvaluationForm(id);
|
||||
|
||||
|
||||
|
||||
List<ProvideServicesOrSuppliesVO> voList = provideServicesOrSuppliesService.getVOList(evaluationForm.getId());
|
||||
|
||||
evaluationForm.setProvideServicesOrSuppliesVOList(voList);
|
||||
|
||||
|
||||
return evaluationForm;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -39,12 +39,13 @@ public class InstructionBookServiceImpl extends ServiceImpl<InstructionBookMappe
|
||||
byId.setAuditResultOfTechnical(auditAndApproveDTO.getAuditResult());
|
||||
byId.setAuditTimeOfTechnical(LocalDateTime.now());
|
||||
byId.setTechnicalDirectorId(dlpUser.getId());
|
||||
byId.setCreateName(dlpUser.getName());
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult()==true){
|
||||
|
||||
byId.setCommitStatus(2);
|
||||
}
|
||||
else byId.setCommitStatus(-1);
|
||||
else byId.setCommitStatus(-2);
|
||||
|
||||
if (instructionBookService.updateById(byId)){
|
||||
|
||||
|
||||
+9
@@ -116,6 +116,8 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
String result = periodVerificationImplementationDTO.getResult();
|
||||
|
||||
byId.setCheckingTime(LocalDate.now());
|
||||
|
||||
PeriodVerificationPlan periodVerificationPlan = periodVerificationPlanService.getById(periodVerificationImplementationDTO.getPeriodVerificationPlanId());
|
||||
|
||||
periodVerificationPlan.setVerificationResult(result);
|
||||
@@ -137,6 +139,8 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
periodVerificationImplementation.setCommitStatus(1);
|
||||
|
||||
periodVerificationImplementation.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (periodVerificationImplementationService.updateById(periodVerificationImplementation)) {
|
||||
|
||||
return periodVerificationImplementation;
|
||||
@@ -154,6 +158,11 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
byId.setAuditTimeOfTechnical(LocalDate.now());
|
||||
byId.setTechnicalDirectorId(dlpUser.getId());
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
|
||||
byId.setCommitStatus(2);
|
||||
} else byId.setCommitStatus(-2);
|
||||
|
||||
if (periodVerificationImplementationService.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
|
||||
+8
-5
@@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.DetailsOfCentralized;
|
||||
import digital.laboratory.platform.reagent.entity.ProcurementContent;
|
||||
@@ -44,19 +45,21 @@ public class ProcurementContentServiceImpl extends ServiceImpl<ProcurementConten
|
||||
|
||||
List<ProcurementContentVO> procurementContentVOList = baseMapper.getProcurementContentVOList(purchasingPlanId);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
for (ProcurementContentVO procurementContentVO : procurementContentVOList) {
|
||||
|
||||
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
List<DetailsOfCentralizedVO> detailsOfCentralizedVOList = detailsOfCentralizedService.getDetailsOfCentralizedList(procurementContentVO.getProcurementContentId());
|
||||
|
||||
procurementContentVO.setDetailsOfCentralizedVOS(detailsOfCentralizedVOList);
|
||||
|
||||
//赋值耗材信息
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(detailsOfCentralizedVOList.get(0).getReagentConsumableId());
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,procurementContentVO.getReagentConsumableId());
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
reagentConsumableInventoryQueryWrapper.eq("reagent_consumable_id",byId.getReagentConsumableId());
|
||||
//找出仓库信息,并赋值总数量信息
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryQueryWrapper);
|
||||
|
||||
if (one!=null){
|
||||
|
||||
|
||||
+4
-12
@@ -38,17 +38,13 @@ public class ProvideServicesOrSuppliesServiceImpl extends ServiceImpl<ProvideSer
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@Override
|
||||
public ProvideServicesOrSupplies addById(String supplierInformationId,String reagentConsumableId){
|
||||
public ProvideServicesOrSupplies addById(String evaluationFormId,String reagentConsumableId){
|
||||
|
||||
ProvideServicesOrSupplies provideServicesOrSupplies = new ProvideServicesOrSupplies();
|
||||
|
||||
provideServicesOrSupplies.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSupplierInformationId,supplierInformationId);
|
||||
|
||||
EvaluationForm one = evaluationFormService.getOne(evaluationFormLambdaQueryWrapper);
|
||||
EvaluationForm one = evaluationFormService.getById(evaluationFormId);
|
||||
|
||||
provideServicesOrSupplies.setEvaluationFormId(one.getId());
|
||||
|
||||
@@ -60,13 +56,9 @@ public class ProvideServicesOrSuppliesServiceImpl extends ServiceImpl<ProvideSer
|
||||
|
||||
}
|
||||
@Override
|
||||
public List<ProvideServicesOrSuppliesVO> getVOList(String supplierInformationId){
|
||||
public List<ProvideServicesOrSuppliesVO> getVOList(String evaluationFormId){
|
||||
//通过供应商ID找出对应的评价表
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getSupplierInformationId,supplierInformationId);
|
||||
|
||||
EvaluationForm one = evaluationFormService.getOne(evaluationFormLambdaQueryWrapper);
|
||||
EvaluationForm one = evaluationFormService.getById(evaluationFormId);
|
||||
|
||||
LambdaQueryWrapper<ProvideServicesOrSupplies> provideServicesOrSuppliesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
+39
-28
@@ -46,7 +46,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
@Autowired
|
||||
@Autowired
|
||||
private CategoryTableServiceImpl typeTableService;
|
||||
|
||||
@Override//新增采购目录
|
||||
@@ -73,7 +73,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
catalogueDetailsList.add(catalogueDetails);
|
||||
|
||||
typeTableService.addSpecies(catalogueDetails.getCategory(),catalogueDetails.getSpecies());
|
||||
typeTableService.addSpecies(catalogueDetails.getCategory(), catalogueDetails.getSpecies());
|
||||
}
|
||||
|
||||
if (purchaseCatalogueService.save(purchaseCatalogue) & catalogueDetailsService.saveBatch(catalogueDetailsList)) {
|
||||
@@ -87,11 +87,11 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
CatalogueDetails byId = catalogueDetailsService.getById(purchaseCatalogueDTO.getCatalogueDetailsId());
|
||||
|
||||
BeanUtils.copyProperties(purchaseCatalogueDTO,byId);
|
||||
BeanUtils.copyProperties(purchaseCatalogueDTO, byId);
|
||||
|
||||
if (catalogueDetailsService.updateById(byId)){
|
||||
if (catalogueDetailsService.updateById(byId)) {
|
||||
return byId;
|
||||
}else return null;
|
||||
} else return null;
|
||||
}
|
||||
|
||||
@Override//删除采购目录
|
||||
@@ -99,23 +99,24 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
public Boolean delCatalogue(String purchaseCatalogueId) {
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId,purchaseCatalogueId);
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogueId);
|
||||
|
||||
return catalogueDetailsService.removeBatchByIds(catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper))&&
|
||||
purchaseCatalogueService.removeById(purchaseCatalogueId);
|
||||
return catalogueDetailsService.removeBatchByIds(catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper)) &&
|
||||
purchaseCatalogueService.removeById(purchaseCatalogueId);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public CatalogueDetails addDetails(PurchaseCatalogueDTO purchaseCatalogueDTO){
|
||||
public CatalogueDetails addDetails(PurchaseCatalogueDTO purchaseCatalogueDTO) {
|
||||
|
||||
CatalogueDetails catalogueDetails = new CatalogueDetails();
|
||||
|
||||
BeanUtils.copyProperties(purchaseCatalogueDTO,catalogueDetails);
|
||||
BeanUtils.copyProperties(purchaseCatalogueDTO, catalogueDetails);
|
||||
|
||||
if (catalogueDetailsService.save(catalogueDetails)){
|
||||
if (catalogueDetailsService.save(catalogueDetails)) {
|
||||
|
||||
return catalogueDetails;
|
||||
}else return null;
|
||||
} else return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,7 +132,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId,byId.getPurchaseCatalogueId());
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, byId.getPurchaseCatalogueId());
|
||||
|
||||
List<CatalogueDetails> list = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
|
||||
|
||||
@@ -173,6 +174,8 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
purchaseCatalogue.setStatus(1);
|
||||
|
||||
purchaseCatalogue.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
@@ -181,7 +184,9 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
PurchaseCatalogue purchaseCatalogue = purchaseCatalogueService.getById(purchaseCatalogueDTOList.get(0).getPurchaseCatalogueId()
|
||||
);
|
||||
|
||||
purchaseCatalogue.setStatus(1);
|
||||
purchaseCatalogue.setStatus(1);
|
||||
purchaseCatalogue.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
} else return null;
|
||||
@@ -201,11 +206,11 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
purchaseCatalogue.setAuditTimeOfPrimary(LocalDateTime.now());
|
||||
|
||||
if (purchaseCatalogue.getAuditResultOfPrimary()==true){
|
||||
purchaseCatalogue.setStatus(2);}
|
||||
else {
|
||||
purchaseCatalogue.setStatus(-1);
|
||||
}
|
||||
if (purchaseCatalogue.getAuditResultOfPrimary() == true) {
|
||||
purchaseCatalogue.setStatus(2);
|
||||
} else {
|
||||
purchaseCatalogue.setStatus(-2);
|
||||
}
|
||||
|
||||
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
|
||||
return purchaseCatalogue;
|
||||
@@ -226,7 +231,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
purchaseCatalogue.setAuditTimeOfSecondary(LocalDateTime.now());
|
||||
|
||||
if (purchaseCatalogue.getAuditResultOfSecondary()==true) {
|
||||
if (purchaseCatalogue.getAuditResultOfSecondary() == true) {
|
||||
|
||||
purchaseCatalogue.setStatus(3);
|
||||
|
||||
@@ -251,9 +256,8 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
purchaseCatalogue.setStatus(-1);
|
||||
} else {
|
||||
purchaseCatalogue.setStatus(-3);
|
||||
}
|
||||
|
||||
if (purchaseCatalogueService.updateById(purchaseCatalogue)) {
|
||||
@@ -274,24 +278,30 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
}
|
||||
|
||||
@Override//查询已发布的采购目录
|
||||
public Page getVOpage(){
|
||||
public Page getVOpage(String name) {
|
||||
|
||||
QueryWrapper<PurchaseCatalogue> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper.eq("status",4);
|
||||
queryWrapper.eq("status", 4);
|
||||
|
||||
|
||||
QueryWrapper<PurchaseCatalogue> queryWrapper1 = queryWrapper.orderByDesc("create_time");
|
||||
|
||||
List<PurchaseCatalogue> list = purchaseCatalogueService.list(queryWrapper1);
|
||||
|
||||
if (list.size()==0){
|
||||
if (list.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
PurchaseCatalogue purchaseCatalogue = list.get(0);
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId,purchaseCatalogue.getPurchaseCatalogueId());
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogue.getPurchaseCatalogueId());
|
||||
|
||||
if (name != null) {
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.like(CatalogueDetails::getReagentConsumableName, name);
|
||||
}
|
||||
|
||||
List<CatalogueDetails> catalogueDetailsList = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper);
|
||||
|
||||
@@ -299,10 +309,11 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
Page pages = pageUtils.getPages(1, 10, catalogueDetailsList);
|
||||
|
||||
if (pages==null){
|
||||
if (pages == null) {
|
||||
|
||||
throw new RuntimeException(String.format("未存在已发布的采购目录"));
|
||||
}
|
||||
return pages;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -38,6 +38,8 @@ public class PurchaseListDetailsServiceImpl extends ServiceImpl<PurchaseListDeta
|
||||
purchaseListDetailsVO.setBrand(byId.getBrand());
|
||||
|
||||
purchaseListDetailsVO.setSpecificationAndModel(byId.getSpecificationAndModel());
|
||||
|
||||
purchaseListDetailsVO.setCategory(byId.getCategory());
|
||||
}
|
||||
|
||||
return purchaseListDetailsVOList;
|
||||
|
||||
+3
-1
@@ -128,6 +128,8 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
|
||||
warehousingContent.setWarehousingQuantity(0);
|
||||
|
||||
warehousingContent.setPurchaseListDetailsId(purchaseListDetails.getId());
|
||||
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getReagentConsumableId, warehousingContent.getReagentConsumableId());
|
||||
@@ -155,7 +157,7 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
|
||||
PurchaseListDetails purchaseListDetails = purchaseListDetailsService.getById(purchaseListDTO.getId());
|
||||
|
||||
BeanUtils.copyProperties(purchaseListDTO, purchaseListDetails);
|
||||
purchaseListDetails.setSupplierId(purchaseListDTO.getSupplierId());
|
||||
|
||||
purchaseListDetailsService.updateById(purchaseListDetails);
|
||||
|
||||
|
||||
+107
-17
@@ -1,7 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -16,6 +15,7 @@ import digital.laboratory.platform.reagent.mapper.PurchasingPlanMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.ProcurementContentVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchasingPlanVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReplacementVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -54,6 +54,12 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
@Autowired
|
||||
private PurchaseListDetailsService purchaseListDetailsService;
|
||||
|
||||
@Autowired
|
||||
private WarehousingContentService warehousingContentService;
|
||||
|
||||
@Autowired
|
||||
private SupplierInformationService supplierInformationService;
|
||||
|
||||
@Override//分页
|
||||
public IPage<PurchasingPlanVO> getPurchasingPlanVOPage(IPage<PurchasingPlan> page, QueryWrapper<PurchasingPlan> qw) {
|
||||
IPage<PurchasingPlanVO> purchasingPlanVOPage = baseMapper.getPurchasingPlanVOPage(page, qw);
|
||||
@@ -336,7 +342,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override//换货
|
||||
public ProcurementContent replacementById(PurchasingPlanDTO purchasingPlanDTO) {
|
||||
|
||||
String replacementReagentConsumableId = purchasingPlanDTO.getReplacementReagentConsumableId();
|
||||
@@ -346,17 +352,65 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
byId.setReplacementReagentConsumableId(replacementReagentConsumableId);
|
||||
byId.setReplacementQuantity(purchasingPlanDTO.getReplacementQuantity());
|
||||
byId.setReplacementPrice(purchasingPlanDTO.getReplacementPrice());
|
||||
byId.setReplacementRemark(purchasingPlanDTO.getReplacementRemark());
|
||||
byId.setSupplierId(purchasingPlanDTO.getSupplierId());
|
||||
|
||||
LambdaQueryWrapper<DetailsOfCentralized> detailsOfCentralizedLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getId, byId.getDetailsOfCentralizedId());
|
||||
detailsOfCentralizedLambdaQueryWrapper.eq(DetailsOfCentralized::getProcurementContentId, byId.getProcurementContentId());
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getOne(detailsOfCentralizedLambdaQueryWrapper);
|
||||
List<DetailsOfCentralized> list = detailsOfCentralizedService.list(detailsOfCentralizedLambdaQueryWrapper);
|
||||
|
||||
LambdaQueryWrapper<PurchaseListDetails> purchaseListDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseListDetailsLambdaQueryWrapper.eq(PurchaseListDetails::getProcurementContentId, byId.getProcurementContentId());
|
||||
|
||||
PurchaseListDetails one = purchaseListDetailsService.getOne(purchaseListDetailsLambdaQueryWrapper);
|
||||
//如果存在采购清单,则需修改清单信息
|
||||
if (one != null) {
|
||||
|
||||
LambdaQueryWrapper<WarehousingContent> warehousingContentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
warehousingContentLambdaQueryWrapper.eq(WarehousingContent::getPurchaseListDetailsId, one.getId());
|
||||
|
||||
one.setSupplierId(purchasingPlanDTO.getSupplierId());
|
||||
one.setPurchaseQuantity(purchasingPlanDTO.getReplacementQuantity());
|
||||
one.setReagentConsumableId(purchasingPlanDTO.getReplacementReagentConsumableId());
|
||||
|
||||
purchaseListDetailsService.updateById(one);
|
||||
|
||||
WarehousingContent one1 = warehousingContentService.getOne(warehousingContentLambdaQueryWrapper);
|
||||
//若存在入库信息,则需修改入库记录
|
||||
if (one1 != null) {
|
||||
|
||||
if (one1.getWarehousingQuantity() == 0) {
|
||||
|
||||
one1.setReagentConsumableId(purchasingPlanDTO.getReplacementReagentConsumableId());
|
||||
one1.setTotalQuantity(purchasingPlanDTO.getReplacementQuantity());
|
||||
one1.setSupplierId(purchasingPlanDTO.getSupplierId());
|
||||
ReagentConsumables byId1 = reagentConsumablesService.getById(purchasingPlanDTO.getReplacementReagentConsumableId());
|
||||
one1.setReagentConsumableName(byId1.getReagentConsumableName());
|
||||
warehousingContentService.updateById(one1);
|
||||
} else {
|
||||
|
||||
throw new RuntimeException(String.format("该物品已被签收入库,无法进行换货处理"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (DetailsOfCentralized detailsOfCentralized : list) {
|
||||
|
||||
detailsOfCentralized.setReplacementReagentConsumableId(replacementReagentConsumableId);
|
||||
detailsOfCentralized.setReplacementQuantity(purchasingPlanDTO.getReplacementQuantity());
|
||||
detailsOfCentralized.setReplacementRemark(purchasingPlanDTO.getReplacementRemark());
|
||||
|
||||
detailsOfCentralizedService.updateById(detailsOfCentralized);
|
||||
}
|
||||
//将换货信息补充至集中采购申请明细
|
||||
detailsOfCentralized.setReplacementReagentConsumableId(replacementReagentConsumableId);
|
||||
detailsOfCentralized.setReplacementQuantity(purchasingPlanDTO.getReplacementQuantity());
|
||||
|
||||
if (procurementContentService.updateById(byId) && detailsOfCentralizedService.updateById(detailsOfCentralized)) {
|
||||
|
||||
if (procurementContentService.updateById(byId)) {
|
||||
|
||||
return byId;
|
||||
|
||||
@@ -368,9 +422,16 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
@Override
|
||||
public PurchasingPlan commitById(String purchasingPlanId) {
|
||||
|
||||
|
||||
PurchasingPlan byId = purchasingPlanService.getById(purchasingPlanId);
|
||||
|
||||
if (byId.getStatus()!=0){
|
||||
throw new RuntimeException(String.format("当前状态无法提交"));
|
||||
}
|
||||
|
||||
byId.setStatus(1);
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
|
||||
|
||||
if (purchasingPlanService.updateById(byId)) {
|
||||
calculatedAmount(byId.getPurchasingPlanId());
|
||||
@@ -397,9 +458,9 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
purchasingPlan.setPrimaryAuditorId(dlpUser.getId());
|
||||
|
||||
if (auditAndApproveDto.getAuditResult() == true) {
|
||||
purchasingPlan.setStatus(2);
|
||||
purchasingPlan.setStatus(4);
|
||||
} else {
|
||||
purchasingPlan.setStatus(-1);
|
||||
purchasingPlan.setStatus(-4);
|
||||
}
|
||||
|
||||
if (purchasingPlanService.updateById(purchasingPlan)) {
|
||||
@@ -414,22 +475,22 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
|
||||
PurchasingPlan purchasingPlan = purchasingPlanService.getById(auditAndApproveDto.getUuId());
|
||||
|
||||
if (purchasingPlan.getStatus() != 2) {
|
||||
if (purchasingPlan.getStatus() != 4) {
|
||||
throw new RuntimeException(String.format("当前状态不可审批"));
|
||||
}
|
||||
|
||||
|
||||
purchasingPlan.setApprovalResult(auditAndApproveDto.getApproveResult());
|
||||
purchasingPlan.setApprovalResult(auditAndApproveDto.getApproveResult());
|
||||
|
||||
purchasingPlan.setApprovalOpinion(auditAndApproveDto.getApproveOpinion());
|
||||
purchasingPlan.setApprovalOpinion(auditAndApproveDto.getApproveOpinion());
|
||||
|
||||
purchasingPlan.setApprovalTime(LocalDateTime.now());
|
||||
purchasingPlan.setApprovalTime(LocalDateTime.now());
|
||||
|
||||
purchasingPlan.setApproverId(dlpUser.getId());
|
||||
//审批通过则创建采购清单
|
||||
//审批通过则创建采购清单
|
||||
if (auditAndApproveDto.getApproveResult() == true) {
|
||||
|
||||
purchasingPlan.setStatus(3);
|
||||
purchasingPlan.setStatus(5);
|
||||
|
||||
LambdaQueryWrapper<ProcurementContent> procurementContentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -437,7 +498,6 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
|
||||
List<ProcurementContent> list = procurementContentService.list(procurementContentLambdaQueryWrapper);
|
||||
|
||||
|
||||
PurchaseListDTO purchaseListDTO = new PurchaseListDTO();
|
||||
|
||||
PurchaseList purchaseList = new PurchaseList();
|
||||
@@ -456,12 +516,13 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
purchaseListDetails.setPurchaseQuantity(procurementContent.getQuantityPurchased());
|
||||
purchaseListDetails.setReagentConsumableId(procurementContent.getReagentConsumableId());
|
||||
purchaseListDetails.setId(IdWorker.get32UUID().toUpperCase());
|
||||
purchaseListDetails.setProcurementContentId(procurementContent.getProcurementContentId());
|
||||
|
||||
purchaseListDetailsService.save(purchaseListDetails);
|
||||
}
|
||||
} else {
|
||||
|
||||
purchasingPlan.setStatus(-1);
|
||||
purchasingPlan.setStatus(-5);
|
||||
}
|
||||
|
||||
if (purchasingPlanService.updateById(purchasingPlan)) {
|
||||
@@ -470,6 +531,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//计算经费预算方法
|
||||
public PurchasingPlan calculatedAmount(String purchasingPlanId) {
|
||||
|
||||
@@ -493,4 +555,32 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
return purchasingPlan;
|
||||
} else throw new RuntimeException(String.format("计算失败"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReplacementVO getReplacementVO(String id){
|
||||
|
||||
ProcurementContent byId = procurementContentService.getById(id);
|
||||
|
||||
ReplacementVO replacementVO = new ReplacementVO();
|
||||
|
||||
if (byId.getReplacementQuantity()!=null&&byId.getReplacementPrice()!=null&&byId.getReplacementRemark()!=null
|
||||
&&byId.getReplacementReagentConsumableId()!=null&&byId.getSupplierId()!=null){
|
||||
|
||||
replacementVO.setReplacementQuantity(byId.getReplacementQuantity());
|
||||
replacementVO.setReplacementRemark(byId.getReplacementRemark());
|
||||
replacementVO.setReplacementPrice(byId.getReplacementPrice());
|
||||
replacementVO.setReplacementReagentConsumableId(byId.getReplacementReagentConsumableId());
|
||||
replacementVO.setSupplierId(byId.getSupplierId());
|
||||
|
||||
SupplierInformation byId1 = supplierInformationService.getById(byId.getSupplierId());
|
||||
|
||||
replacementVO.setSupplierName(byId1.getSupplierName());
|
||||
|
||||
ReagentConsumables byId2 = reagentConsumablesService.getById(byId.getReplacementReagentConsumableId());
|
||||
|
||||
replacementVO.setReagentConsumables(byId2);}
|
||||
|
||||
return replacementVO;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+68
-86
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.reagent.config.PageUtils;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper;
|
||||
@@ -12,8 +11,6 @@ import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.BatchDetailsVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumablesVO;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -46,18 +43,21 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Autowired
|
||||
private FixedValueReportService fixedValueReportService;
|
||||
|
||||
@Autowired
|
||||
private StandardReserveSolutionService standardReserveSolutionService;
|
||||
|
||||
@Override//试剂耗材管理列表
|
||||
public Page<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOList(Page page, String name) {
|
||||
|
||||
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryQueryWrapper.eq("status",1);
|
||||
reagentConsumableInventoryQueryWrapper.eq("status", 1);
|
||||
|
||||
if (name != null) {
|
||||
|
||||
reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or()
|
||||
.eq("category", "耗材")
|
||||
.like("reagentConsumableInventory_name",name);
|
||||
.like("reagentConsumableInventory_name", name);
|
||||
} else {
|
||||
|
||||
reagentConsumableInventoryQueryWrapper.eq("category", "试剂").or()
|
||||
@@ -149,7 +149,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
one.setTotalQuantity(one.getTotalQuantity() + quantity);
|
||||
|
||||
if (one.getTotalQuantity()==0){
|
||||
if (one.getTotalQuantity() == 0) {
|
||||
|
||||
one.setStatus(-1);
|
||||
}
|
||||
@@ -190,78 +190,38 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
}
|
||||
|
||||
@Override//分页查询标准物质
|
||||
public Page<ReagentConsumableInventoryFullVO> getAllList(Integer current, Integer size, String reagentConsumableName) {
|
||||
|
||||
if (reagentConsumableName != null) {
|
||||
|
||||
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", reagentConsumableName);
|
||||
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper);
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOList = new ArrayList<>();
|
||||
|
||||
for (ReagentConsumableInventory reagentConsumableInventory : list) {
|
||||
|
||||
LambdaQueryWrapper<ReferenceMaterial> referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
|
||||
List<ReferenceMaterial> list1 = referenceMaterialService.list(referenceMaterialLambdaQueryWrapper);
|
||||
|
||||
for (ReferenceMaterial referenceMaterial : list1) {
|
||||
|
||||
LambdaQueryWrapper<FixedValueReport> fixedValueReportLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
fixedValueReportLambdaQueryWrapper.eq(FixedValueReport::getReferenceSubstanceId,referenceMaterial.getId());
|
||||
|
||||
FixedValueReport one = fixedValueReportService.getOne(fixedValueReportLambdaQueryWrapper);
|
||||
|
||||
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
|
||||
BeanUtils.copyProperties(reagentConsumableInventory, reagentConsumableInventoryFullVO);
|
||||
|
||||
reagentConsumableInventoryFullVO.setNumber(referenceMaterial.getNumber());
|
||||
|
||||
reagentConsumableInventoryFullVO.setBatchDetailsId(referenceMaterial.getBatchDetailsId());
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
|
||||
|
||||
SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId());
|
||||
|
||||
reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName());
|
||||
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
|
||||
reagentConsumableInventoryFullVO.setBatchNumber(batchDetails.getBatchNumber());
|
||||
reagentConsumableInventoryFullVO.setManufacturerId(batchDetails.getSupplierId());
|
||||
reagentConsumableInventoryFullVO.setPurchaseTime(batchDetails.getPurchaseTime());
|
||||
reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId());
|
||||
reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus());
|
||||
|
||||
if (one!=null){
|
||||
|
||||
reagentConsumableInventoryFullVO.setFixedResult(one.getFixedResult());
|
||||
}
|
||||
|
||||
reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
|
||||
|
||||
}
|
||||
}
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
|
||||
Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList);
|
||||
|
||||
return pages;
|
||||
}
|
||||
|
||||
public Page<ReagentConsumableInventoryFullVO> getAllList(Integer current, Integer size, QueryWrapper<ReagentConsumableInventory> qw, Integer status) {
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFullVOList = new ArrayList<>();
|
||||
|
||||
List<ReferenceMaterial> referenceMaterialList = referenceMaterialService.list();
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
|
||||
|
||||
for (ReferenceMaterial referenceMaterial : referenceMaterialList) {
|
||||
ArrayList<ReferenceMaterial> referenceMaterialList = new ArrayList<>();
|
||||
|
||||
if (referenceMaterial.getStatus() == 0) {
|
||||
for (ReagentConsumableInventory reagentConsumableInventory : list) {
|
||||
|
||||
if (reagentConsumableInventory.getTotalQuantity() > 0) {
|
||||
|
||||
LambdaQueryWrapper<ReferenceMaterial> referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
if (status != null) {
|
||||
|
||||
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getStatus, status).
|
||||
eq(ReferenceMaterial::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId())
|
||||
.ne(ReferenceMaterial::getStatus, -4);
|
||||
} else {
|
||||
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId())
|
||||
.ne(ReferenceMaterial::getStatus, -4);
|
||||
}
|
||||
List<ReferenceMaterial> list1 = referenceMaterialService.list(referenceMaterialLambdaQueryWrapper);
|
||||
|
||||
referenceMaterialList.addAll(list1);
|
||||
}
|
||||
}
|
||||
|
||||
if (referenceMaterialList.size() != 0) {
|
||||
|
||||
for (ReferenceMaterial referenceMaterial : referenceMaterialList) {
|
||||
|
||||
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
|
||||
@@ -277,6 +237,12 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
SupplierInformation supplierInformation = supplierInformationService.getById(batchDetails.getSupplierId());
|
||||
|
||||
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getSolutionNumbering, referenceMaterial.getNumber());
|
||||
|
||||
StandardReserveSolution one1 = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
|
||||
|
||||
reagentConsumableInventoryFullVO.setSupplierName(supplierInformation.getSupplierName());
|
||||
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
|
||||
reagentConsumableInventoryFullVO.setBatchNumber(batchDetails.getBatchNumber());
|
||||
@@ -284,10 +250,14 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
reagentConsumableInventoryFullVO.setPurchaseTime(batchDetails.getPurchaseTime());
|
||||
reagentConsumableInventoryFullVO.setReferenceMaterialId(referenceMaterial.getId());
|
||||
reagentConsumableInventoryFullVO.setReferenceMaterialStatus(referenceMaterial.getStatus());
|
||||
if (one1 != null) {
|
||||
|
||||
reagentConsumableInventoryFullVO.setConfigurationConcentration(one1.getConfigurationConcentration());
|
||||
reagentConsumableInventoryFullVO.setConfigurationDate(one1.getConfigurationDate());
|
||||
reagentConsumableInventoryFullVO.setSolutionNumbering(referenceMaterial.getNumber());
|
||||
reagentConsumableInventoryFullVO.setValidityPeriod(one1.getValidityPeriod());
|
||||
}
|
||||
reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,9 +266,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList);
|
||||
|
||||
return pages;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//分页查询试剂耗材
|
||||
@Override
|
||||
public Page<ReagentConsumableInventoryFullVO> getAllRM(Integer current, Integer size, String reagentConsumableName) {
|
||||
@@ -312,15 +282,16 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", reagentConsumableName);
|
||||
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(reagentConsumableInventoryQueryWrapper);
|
||||
|
||||
//找出对应的仓库信息
|
||||
for (ReagentConsumableInventory reagentConsumableInventory : list) {
|
||||
|
||||
LambdaQueryWrapper<BatchDetails> batchDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId())
|
||||
.or().eq(BatchDetails::getServiceStatus, 1);
|
||||
|
||||
List<BatchDetails> list1 = batchDetailsService.list(batchDetailsLambdaQueryWrapper);
|
||||
|
||||
//将不同批次的物品展示出来
|
||||
for (BatchDetails batchDetails : list1) {
|
||||
|
||||
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
@@ -335,11 +306,11 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
reagentConsumableInventoryFullVO.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
|
||||
reagentConsumableInventoryFullVO.setTotalQuantity(batchDetails.getQuantity());
|
||||
|
||||
reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
|
||||
Page pages = pageUtils.getPages(current, size, reagentConsumableInventoryFullVOList);
|
||||
@@ -360,8 +331,8 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
if (reagentConsumableInventory.getTotalQuantity() > 0) {
|
||||
|
||||
batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
|
||||
batchDetailsLambdaQueryWrapper.eq(BatchDetails::getReagentConsumableInventoryId, reagentConsumableInventory.getReagentConsumableInventoryId())
|
||||
.or().eq(BatchDetails::getServiceStatus, 1);
|
||||
List<BatchDetails> batchDetailsList = batchDetailsService.list(batchDetailsLambdaQueryWrapper);
|
||||
|
||||
for (BatchDetails batchDetails : batchDetailsList) {
|
||||
@@ -376,11 +347,12 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
reagentConsumableInventoryFullVO.setBatch(batchDetails.getBatch());
|
||||
|
||||
reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
|
||||
reagentConsumableInventoryFullVO.setTotalQuantity(batchDetails.getQuantity());
|
||||
|
||||
reagentConsumableInventoryFullVO.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
}
|
||||
|
||||
reagentConsumableInventoryFullVOList.add(reagentConsumableInventoryFullVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
@@ -389,5 +361,15 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
return pages;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReagentConsumableInventory> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw){
|
||||
|
||||
|
||||
List<ReagentConsumableInventory> list = reagentConsumableInventoryService.list(qw);
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+19
@@ -2,9 +2,11 @@ package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumablesSet;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumablesSetMapper;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesSetService;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumablesSetVO;
|
||||
@@ -31,6 +33,9 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsuma
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
|
||||
@Override
|
||||
public List<ReagentConsumablesSetVO> getList(String applicationForUseId){
|
||||
|
||||
@@ -42,6 +47,8 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsuma
|
||||
|
||||
List<ReagentConsumablesSetVO> reagentConsumablesSetVOS = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
if (list.size()!=0){
|
||||
//查找出试剂耗材名称
|
||||
for (ReagentConsumablesSet reagentConsumablesSet : list) {
|
||||
@@ -52,6 +59,18 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsuma
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumablesSetVO.getReagentConsumableId());
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,reagentConsumablesSet.getReagentConsumableId());
|
||||
|
||||
if (byId.getCategory().equals("试剂")|byId.getCategory().equals("耗材")){
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
|
||||
reagentConsumablesSetVO.setTotalQuantity(one.getTotalQuantity());
|
||||
|
||||
}
|
||||
|
||||
reagentConsumablesSetVO.setReagentConsumables(byId);
|
||||
|
||||
reagentConsumablesSetVOS.add(reagentConsumablesSetVO);
|
||||
|
||||
+965
@@ -0,0 +1,965 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.ReviewAndApproveMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Service
|
||||
@SuppressWarnings("all")
|
||||
public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMapper, ReviewAndApprove> implements ReviewAndApproveService {
|
||||
|
||||
@Autowired
|
||||
private DecentralizedRequestService decentralizedRequestService;
|
||||
|
||||
@Autowired
|
||||
private PurchasingPlanService purchasingPlanService;
|
||||
|
||||
@Autowired
|
||||
private AcceptanceRecordFormService acceptanceRecordFormService;
|
||||
|
||||
@Autowired
|
||||
private ComplianceCheckService complianceCheckService;
|
||||
|
||||
@Autowired
|
||||
private CheckScheduleService checkScheduleService;
|
||||
|
||||
@Autowired
|
||||
private PeriodVerificationImplementationService periodVerificationImplementationService;
|
||||
|
||||
@Autowired
|
||||
private PurchaseCatalogueService purchaseCatalogueService;
|
||||
|
||||
@Autowired
|
||||
private StandardMaterialApprovalFormService standardMaterialApprovalFormService;
|
||||
|
||||
@Autowired
|
||||
private EvaluationFormService evaluationFormService;
|
||||
|
||||
@Autowired
|
||||
private InstructionBookService instructionBookService;
|
||||
|
||||
@Override
|
||||
// 进行审核的列表
|
||||
public ReviewAndApprove getReviewAndApproveList(DLPUser dlpUser) {
|
||||
|
||||
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<>();
|
||||
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_primary")) {
|
||||
|
||||
//分散采购申请一级审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 1);
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOList = new ArrayList<>();
|
||||
|
||||
for (DecentralizedRequest decentralizedRequest : decentralizedRequestList) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(decentralizedRequest.getId());
|
||||
|
||||
decentralizedRequestVOList.add(requestById);
|
||||
}
|
||||
decentralizedRequestVOS.addAll(decentralizedRequestVOList);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_secondary")) {
|
||||
|
||||
//分散采购申请二级审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 2);
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOList = new ArrayList<>();
|
||||
|
||||
for (DecentralizedRequest decentralizedRequest : decentralizedRequestList) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(decentralizedRequest.getId());
|
||||
|
||||
decentralizedRequestVOList.add(requestById);
|
||||
}
|
||||
decentralizedRequestVOS.addAll(decentralizedRequestVOList);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_threeLevel")) {
|
||||
|
||||
//分散采购申请三级审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 3);
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOList = new ArrayList<>();
|
||||
|
||||
for (DecentralizedRequest decentralizedRequest : decentralizedRequestList) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(decentralizedRequest.getId());
|
||||
|
||||
decentralizedRequestVOList.add(requestById);
|
||||
}
|
||||
decentralizedRequestVOS.addAll(decentralizedRequestVOList);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_approve")) {
|
||||
//分散采购申请审批列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 4);
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOList = new ArrayList<>();
|
||||
|
||||
for (DecentralizedRequest decentralizedRequest : decentralizedRequestList) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(decentralizedRequest.getId());
|
||||
|
||||
decentralizedRequestVOList.add(requestById);
|
||||
}
|
||||
decentralizedRequestVOS.addAll(decentralizedRequestVOList);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_purchase_catalogue_primary")) {
|
||||
//采购目录一级审核列表
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getStatus, 1);
|
||||
|
||||
List<PurchaseCatalogue> list = purchaseCatalogueService.list(purchaseCatalogueLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PurchaseCatalogueVO> purchaseCatalogueVOArrayList = new ArrayList<>();
|
||||
|
||||
for (PurchaseCatalogue purchaseCatalogue : list) {
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = purchaseCatalogueService.getPurchaseCatalogueVO(purchaseCatalogue.getPurchaseCatalogueId());
|
||||
|
||||
purchaseCatalogueVOArrayList.add(purchaseCatalogueVO);
|
||||
}
|
||||
purchaseCatalogueVOList.addAll(purchaseCatalogueVOArrayList);
|
||||
|
||||
}
|
||||
//采购目录二级审核
|
||||
if (permissions.contains("reagent_purchase_catalogue_secondary")) {
|
||||
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getStatus, 2);
|
||||
|
||||
List<PurchaseCatalogue> list = purchaseCatalogueService.list(purchaseCatalogueLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PurchaseCatalogueVO> purchaseCatalogueVOArrayList = new ArrayList<>();
|
||||
|
||||
for (PurchaseCatalogue purchaseCatalogue : list) {
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = purchaseCatalogueService.getPurchaseCatalogueVO(purchaseCatalogue.getPurchaseCatalogueId());
|
||||
|
||||
purchaseCatalogueVOArrayList.add(purchaseCatalogueVO);
|
||||
|
||||
}
|
||||
purchaseCatalogueVOList.addAll(purchaseCatalogueVOArrayList);
|
||||
|
||||
}
|
||||
//采购计划审核
|
||||
if (permissions.contains("reagent_purchasing_plan_audit")) {
|
||||
|
||||
LambdaQueryWrapper<PurchasingPlan> purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getStatus, 1);
|
||||
|
||||
List<PurchasingPlan> list = purchasingPlanService.list(purchasingPlanLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PurchasingPlanVO> purchasingPlanVOS1 = new ArrayList<>();
|
||||
|
||||
for (PurchasingPlan purchasingPlan : list) {
|
||||
|
||||
PurchasingPlanVO purchasingPlanVO = purchasingPlanService.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());
|
||||
|
||||
purchasingPlanVOS1.add(purchasingPlanVO);
|
||||
}
|
||||
purchasingPlanVOS.addAll(purchasingPlanVOS1);
|
||||
}
|
||||
//采购计划审批
|
||||
if (permissions.contains("reagent_purchasing_plan_approve")) {
|
||||
|
||||
LambdaQueryWrapper<PurchasingPlan> purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getStatus, 4);
|
||||
|
||||
List<PurchasingPlan> list = purchasingPlanService.list(purchasingPlanLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PurchasingPlanVO> purchasingPlanVOS1 = new ArrayList<>();
|
||||
|
||||
for (PurchasingPlan purchasingPlan : list) {
|
||||
|
||||
PurchasingPlanVO purchasingPlanVO = purchasingPlanService.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());
|
||||
|
||||
purchasingPlanVOS1.add(purchasingPlanVO);
|
||||
}
|
||||
purchasingPlanVOS.addAll(purchasingPlanVOS1);
|
||||
|
||||
}
|
||||
//采购验收一级审核
|
||||
if (permissions.contains("reagent_acceptance_record_form_primary")){
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,1);
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<AcceptanceRecordFormVO> acceptanceRecordFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (AcceptanceRecordForm acceptanceRecordForm : list) {
|
||||
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordForm.getId());
|
||||
|
||||
acceptanceRecordFormVOS1.add(acceptanceRecordFormVO);
|
||||
}
|
||||
acceptanceRecordFormVOS.addAll(acceptanceRecordFormVOS1);
|
||||
|
||||
}
|
||||
|
||||
//采购验收二级审核
|
||||
if (permissions.contains("reagent_acceptance_record_form_secondary")){
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,2);
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<AcceptanceRecordFormVO> acceptanceRecordFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (AcceptanceRecordForm acceptanceRecordForm : list) {
|
||||
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordForm.getId());
|
||||
|
||||
acceptanceRecordFormVOS1.add(acceptanceRecordFormVO);
|
||||
}
|
||||
acceptanceRecordFormVOS.addAll(acceptanceRecordFormVOS1);
|
||||
|
||||
}
|
||||
|
||||
//采购验收三级审核
|
||||
if (permissions.contains("reagent_acceptance_record_form_threeLevel")){
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,3);
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<AcceptanceRecordFormVO> acceptanceRecordFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (AcceptanceRecordForm acceptanceRecordForm : list) {
|
||||
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordForm.getId());
|
||||
|
||||
acceptanceRecordFormVOS1.add(acceptanceRecordFormVO);
|
||||
}
|
||||
acceptanceRecordFormVOS.addAll(acceptanceRecordFormVOS1);
|
||||
|
||||
}
|
||||
//符合性检查一级审核
|
||||
if (permissions.contains("reagent_compliance_check_primaryAudit")){
|
||||
|
||||
LambdaQueryWrapper<ComplianceCheck> complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus,1);
|
||||
|
||||
List<ComplianceCheck> list = complianceCheckService.list(complianceCheckLambdaQueryWrapper);
|
||||
|
||||
ArrayList<ComplianceCheckVO> complianceCheckVOS1 = new ArrayList<>();
|
||||
|
||||
for (ComplianceCheck complianceCheck : list) {
|
||||
|
||||
ComplianceCheckVO complianceCheckVO = complianceCheckService.getComplianceCheckVO(complianceCheck.getId());
|
||||
|
||||
complianceCheckVOS1.add(complianceCheckVO);
|
||||
}
|
||||
complianceCheckVOS.addAll(complianceCheckVOS1);
|
||||
}
|
||||
|
||||
//符合性检查二级审核
|
||||
if (permissions.contains("reagent_compliance_check_secondaryAudit")){
|
||||
|
||||
LambdaQueryWrapper<ComplianceCheck> complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus,2);
|
||||
|
||||
List<ComplianceCheck> list = complianceCheckService.list(complianceCheckLambdaQueryWrapper);
|
||||
|
||||
ArrayList<ComplianceCheckVO> complianceCheckVOS1 = new ArrayList<>();
|
||||
|
||||
for (ComplianceCheck complianceCheck : list) {
|
||||
|
||||
ComplianceCheckVO complianceCheckVO = complianceCheckService.getComplianceCheckVO(complianceCheck.getId());
|
||||
|
||||
complianceCheckVOS1.add(complianceCheckVO);
|
||||
}
|
||||
complianceCheckVOS.addAll(complianceCheckVOS1);
|
||||
}
|
||||
//期间核查计划审核
|
||||
if (permissions.contains("reagent_check_schedule_audit")){
|
||||
|
||||
LambdaQueryWrapper<CheckSchedule> checkScheduleLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
checkScheduleLambdaQueryWrapper.eq(CheckSchedule::getStatus,1);
|
||||
|
||||
List<CheckSchedule> list = checkScheduleService.list(checkScheduleLambdaQueryWrapper);
|
||||
|
||||
ArrayList<CheckScheduleVO> checkScheduleVOS1 = new ArrayList<>();
|
||||
|
||||
for (CheckSchedule checkSchedule : list) {
|
||||
|
||||
CheckScheduleVO checkScheduleVO = checkScheduleService.getCheckScheduleVO(checkSchedule.getId());
|
||||
|
||||
checkScheduleVOS1.add(checkScheduleVO);
|
||||
}
|
||||
checkScheduleVOS.addAll(checkScheduleVOS1);
|
||||
}
|
||||
//期间核查录入结果审核
|
||||
if (permissions.contains("reagent_period_verification_implementation_audit")){
|
||||
|
||||
LambdaQueryWrapper<PeriodVerificationImplementation> periodVerificationImplementationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
periodVerificationImplementationLambdaQueryWrapper.eq(PeriodVerificationImplementation::getCommitStatus,1);
|
||||
|
||||
List<PeriodVerificationImplementation> list = periodVerificationImplementationService.list(periodVerificationImplementationLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PeriodVerificationImplementationVO> periodVerificationImplementationVOS1 = new ArrayList<>();
|
||||
|
||||
for (PeriodVerificationImplementation periodVerificationImplementation : list) {
|
||||
|
||||
PeriodVerificationImplementationVO periodVerificationImplementationVO = periodVerificationImplementationService.getPeriodVerificationImplementationVO(periodVerificationImplementation.getId());
|
||||
|
||||
periodVerificationImplementationVOS1.add(periodVerificationImplementationVO);
|
||||
}
|
||||
periodVerificationImplementationVOS.addAll(periodVerificationImplementationVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理一级审核
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditPrimary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,1);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (StandardMaterialApprovalForm standardMaterialApprovalForm : list) {
|
||||
|
||||
StandardMaterialApprovalFormVO vo = standardMaterialApprovalFormService.getVO(standardMaterialApprovalForm.getId());
|
||||
|
||||
standardMaterialApprovalFormVOS1.add(vo);
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理二级审核
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditSecondary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,2);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (StandardMaterialApprovalForm standardMaterialApprovalForm : list) {
|
||||
|
||||
StandardMaterialApprovalFormVO vo = standardMaterialApprovalFormService.getVO(standardMaterialApprovalForm.getId());
|
||||
|
||||
standardMaterialApprovalFormVOS1.add(vo);
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
//标准物质管理审批
|
||||
if (permissions.contains("reagent_standard_material_approval_form_approve")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,3);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (StandardMaterialApprovalForm standardMaterialApprovalForm : list) {
|
||||
|
||||
StandardMaterialApprovalFormVO vo = standardMaterialApprovalFormService.getVO(standardMaterialApprovalForm.getId());
|
||||
|
||||
standardMaterialApprovalFormVOS1.add(vo);
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
//供应商评价审核
|
||||
if (permissions.contains("reagent_evaluation_form_secondaryAudit")){
|
||||
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus,2);
|
||||
|
||||
List<EvaluationForm> list = evaluationFormService.list(evaluationFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<EvaluationFormVO> evaluationFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (EvaluationForm evaluationForm : list) {
|
||||
|
||||
EvaluationFormVO formById = evaluationFormService.getFormById(evaluationForm.getId());
|
||||
|
||||
evaluationFormVOS1.add(formById);
|
||||
}
|
||||
evaluationFormVOS.addAll(evaluationFormVOS1);
|
||||
}
|
||||
if (permissions.contains("reagent_evaluation_form_three_level_audit")){
|
||||
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus,3);
|
||||
|
||||
List<EvaluationForm> list = evaluationFormService.list(evaluationFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<EvaluationFormVO> evaluationFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (EvaluationForm evaluationForm : list) {
|
||||
|
||||
EvaluationFormVO formById = evaluationFormService.getFormById(evaluationForm.getId());
|
||||
|
||||
evaluationFormVOS1.add(formById);
|
||||
}
|
||||
evaluationFormVOS.addAll(evaluationFormVOS1);
|
||||
}
|
||||
//指导书审核列表
|
||||
if (permissions.contains("reagent_instruction_book_audit")){
|
||||
|
||||
LambdaQueryWrapper<InstructionBook> instructionBookLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
instructionBookLambdaQueryWrapper.eq(InstructionBook::getCommitStatus,1);
|
||||
|
||||
List<InstructionBook> list = instructionBookService.list(instructionBookLambdaQueryWrapper);
|
||||
|
||||
ArrayList<InstructionBookVO> instructionBookVOS1 = new ArrayList<>();
|
||||
|
||||
for (InstructionBook instructionBook : list) {
|
||||
|
||||
InstructionBookVO vo = instructionBookService.getVO(instructionBook.getId());
|
||||
|
||||
instructionBookVOS1.add(vo);
|
||||
}
|
||||
instructionBookVOS.addAll(instructionBookVOS1);
|
||||
|
||||
}
|
||||
|
||||
reviewAndApprove.setComplianceCheckVOList(complianceCheckVOS);
|
||||
reviewAndApprove.setDecentralizedRequestVOList(decentralizedRequestVOS);
|
||||
reviewAndApprove.setCheckScheduleVOList(checkScheduleVOS);
|
||||
reviewAndApprove.setEvaluationFormVOList(evaluationFormVOS);
|
||||
reviewAndApprove.setAcceptanceRecordFormVOList(acceptanceRecordFormVOS);
|
||||
reviewAndApprove.setPeriodVerificationImplementationVOList(periodVerificationImplementationVOS);
|
||||
reviewAndApprove.setPurchasingPlanVOList(purchasingPlanVOS);
|
||||
reviewAndApprove.setPurchaseCatalogueVOList(purchaseCatalogueVOList);
|
||||
reviewAndApprove.setStandardMaterialApprovalFormList(standardMaterialApprovalFormVOS);
|
||||
reviewAndApprove.setInstructionBookList(instructionBookVOS);
|
||||
|
||||
return reviewAndApprove;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReviewAndApprove getReviewAndApproveRecordList(DLPUser dlpUser) {
|
||||
|
||||
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<>();
|
||||
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_primary")) {
|
||||
|
||||
//分散采购申请一级审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 2).or().eq(DecentralizedRequest::getStatus, -2);
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOList = new ArrayList<>();
|
||||
|
||||
for (DecentralizedRequest decentralizedRequest : decentralizedRequestList) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(decentralizedRequest.getId());
|
||||
|
||||
decentralizedRequestVOList.add(requestById);
|
||||
}
|
||||
decentralizedRequestVOS.addAll(decentralizedRequestVOList);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_secondary")) {
|
||||
|
||||
//分散采购申请二级审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 3).or().eq(DecentralizedRequest::getStatus, -3);
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOList = new ArrayList<>();
|
||||
|
||||
for (DecentralizedRequest decentralizedRequest : decentralizedRequestList) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(decentralizedRequest.getId());
|
||||
|
||||
decentralizedRequestVOList.add(requestById);
|
||||
}
|
||||
decentralizedRequestVOS.addAll(decentralizedRequestVOList);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_threeLevel")) {
|
||||
|
||||
//分散采购申请三级审核列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 4).or().eq(DecentralizedRequest::getStatus, -4);
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOList = new ArrayList<>();
|
||||
|
||||
for (DecentralizedRequest decentralizedRequest : decentralizedRequestList) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(decentralizedRequest.getId());
|
||||
|
||||
decentralizedRequestVOList.add(requestById);
|
||||
}
|
||||
decentralizedRequestVOS.addAll(decentralizedRequestVOList);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_decentralized_request_approve")) {
|
||||
//分散采购申请审批列表
|
||||
LambdaQueryWrapper<DecentralizedRequest> decentralizedRequestLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizedRequestLambdaQueryWrapper.eq(DecentralizedRequest::getStatus, 5).or().eq(DecentralizedRequest::getStatus, -5);
|
||||
|
||||
List<DecentralizedRequest> decentralizedRequestList = decentralizedRequestService.list(decentralizedRequestLambdaQueryWrapper);
|
||||
|
||||
List<DecentralizedRequestVO> decentralizedRequestVOList = new ArrayList<>();
|
||||
|
||||
for (DecentralizedRequest decentralizedRequest : decentralizedRequestList) {
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(decentralizedRequest.getId());
|
||||
|
||||
decentralizedRequestVOList.add(requestById);
|
||||
}
|
||||
decentralizedRequestVOS.addAll(decentralizedRequestVOList);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_purchase_catalogue_primary")) {
|
||||
//采购目录一级审核列表
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getStatus, 2).or().eq(PurchaseCatalogue::getStatus, -2);
|
||||
|
||||
List<PurchaseCatalogue> list = purchaseCatalogueService.list(purchaseCatalogueLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PurchaseCatalogueVO> purchaseCatalogueVOArrayList = new ArrayList<>();
|
||||
|
||||
for (PurchaseCatalogue purchaseCatalogue : list) {
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = purchaseCatalogueService.getPurchaseCatalogueVO(purchaseCatalogue.getPurchaseCatalogueId());
|
||||
|
||||
purchaseCatalogueVOArrayList.add(purchaseCatalogueVO);
|
||||
}
|
||||
purchaseCatalogueVOList.addAll(purchaseCatalogueVOArrayList);
|
||||
|
||||
}
|
||||
//采购目录二级审核
|
||||
if (permissions.contains("reagent_purchase_catalogue_secondary")) {
|
||||
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getStatus, 3).or().eq(PurchaseCatalogue::getStatus, -3);
|
||||
|
||||
List<PurchaseCatalogue> list = purchaseCatalogueService.list(purchaseCatalogueLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PurchaseCatalogueVO> purchaseCatalogueVOArrayList = new ArrayList<>();
|
||||
|
||||
for (PurchaseCatalogue purchaseCatalogue : list) {
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = purchaseCatalogueService.getPurchaseCatalogueVO(purchaseCatalogue.getPurchaseCatalogueId());
|
||||
|
||||
purchaseCatalogueVOArrayList.add(purchaseCatalogueVO);
|
||||
|
||||
}
|
||||
purchaseCatalogueVOList.addAll(purchaseCatalogueVOArrayList);
|
||||
|
||||
}
|
||||
//采购计划审核
|
||||
if (permissions.contains("reagent_purchasing_plan_audit")) {
|
||||
|
||||
LambdaQueryWrapper<PurchasingPlan> purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getStatus, 2).or().eq(PurchasingPlan::getStatus, -2);
|
||||
|
||||
List<PurchasingPlan> list = purchasingPlanService.list(purchasingPlanLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PurchasingPlanVO> purchasingPlanVOS1 = new ArrayList<>();
|
||||
|
||||
for (PurchasingPlan purchasingPlan : list) {
|
||||
|
||||
PurchasingPlanVO purchasingPlanVO = purchasingPlanService.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());
|
||||
|
||||
purchasingPlanVOS1.add(purchasingPlanVO);
|
||||
}
|
||||
purchasingPlanVOS.addAll(purchasingPlanVOS1);
|
||||
}
|
||||
//采购计划审批
|
||||
if (permissions.contains("reagent_purchasing_plan_approve")) {
|
||||
|
||||
LambdaQueryWrapper<PurchasingPlan> purchasingPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchasingPlanLambdaQueryWrapper.eq(PurchasingPlan::getStatus, 5).or().eq(PurchasingPlan::getStatus, -5);
|
||||
|
||||
List<PurchasingPlan> list = purchasingPlanService.list(purchasingPlanLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PurchasingPlanVO> purchasingPlanVOS1 = new ArrayList<>();
|
||||
|
||||
for (PurchasingPlan purchasingPlan : list) {
|
||||
|
||||
PurchasingPlanVO purchasingPlanVO = purchasingPlanService.getPurchasingPlanVO(purchasingPlan.getPurchasingPlanId());
|
||||
|
||||
purchasingPlanVOS1.add(purchasingPlanVO);
|
||||
}
|
||||
purchasingPlanVOS.addAll(purchasingPlanVOS1);
|
||||
|
||||
}
|
||||
//采购验收一级审核
|
||||
if (permissions.contains("reagent_acceptance_record_form_primary")){
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,2).or().eq(AcceptanceRecordForm::getStatus, -2);
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<AcceptanceRecordFormVO> acceptanceRecordFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (AcceptanceRecordForm acceptanceRecordForm : list) {
|
||||
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordForm.getId());
|
||||
|
||||
acceptanceRecordFormVOS1.add(acceptanceRecordFormVO);
|
||||
}
|
||||
acceptanceRecordFormVOS.addAll(acceptanceRecordFormVOS1);
|
||||
|
||||
}
|
||||
|
||||
//采购验收二级审核
|
||||
if (permissions.contains("reagent_acceptance_record_form_secondary")){
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,3).or().eq(AcceptanceRecordForm::getStatus, -3);
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<AcceptanceRecordFormVO> acceptanceRecordFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (AcceptanceRecordForm acceptanceRecordForm : list) {
|
||||
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordForm.getId());
|
||||
|
||||
acceptanceRecordFormVOS1.add(acceptanceRecordFormVO);
|
||||
}
|
||||
acceptanceRecordFormVOS.addAll(acceptanceRecordFormVOS1);
|
||||
|
||||
}
|
||||
|
||||
//采购验收三级审核
|
||||
if (permissions.contains("reagent_acceptance_record_form_threeLevel")){
|
||||
|
||||
LambdaQueryWrapper<AcceptanceRecordForm> acceptanceRecordFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
acceptanceRecordFormLambdaQueryWrapper.eq(AcceptanceRecordForm::getStatus,4).or().eq(AcceptanceRecordForm::getStatus, -4);
|
||||
|
||||
List<AcceptanceRecordForm> list = acceptanceRecordFormService.list(acceptanceRecordFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<AcceptanceRecordFormVO> acceptanceRecordFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (AcceptanceRecordForm acceptanceRecordForm : list) {
|
||||
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordForm.getId());
|
||||
|
||||
acceptanceRecordFormVOS1.add(acceptanceRecordFormVO);
|
||||
}
|
||||
acceptanceRecordFormVOS.addAll(acceptanceRecordFormVOS1);
|
||||
|
||||
}
|
||||
//符合性检查一级审核
|
||||
if (permissions.contains("reagent_compliance_check_primaryAudit")){
|
||||
|
||||
LambdaQueryWrapper<ComplianceCheck> complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus,2).or().eq(ComplianceCheck::getStatus, -2);
|
||||
|
||||
List<ComplianceCheck> list = complianceCheckService.list(complianceCheckLambdaQueryWrapper);
|
||||
|
||||
ArrayList<ComplianceCheckVO> complianceCheckVOS1 = new ArrayList<>();
|
||||
|
||||
for (ComplianceCheck complianceCheck : list) {
|
||||
|
||||
ComplianceCheckVO complianceCheckVO = complianceCheckService.getComplianceCheckVO(complianceCheck.getId());
|
||||
|
||||
complianceCheckVOS1.add(complianceCheckVO);
|
||||
}
|
||||
complianceCheckVOS.addAll(complianceCheckVOS1);
|
||||
}
|
||||
|
||||
//符合性检查二级审核
|
||||
if (permissions.contains("reagent_compliance_check_secondaryAudit")){
|
||||
|
||||
LambdaQueryWrapper<ComplianceCheck> complianceCheckLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
complianceCheckLambdaQueryWrapper.eq(ComplianceCheck::getStatus,3).or().eq(ComplianceCheck::getStatus, -3);
|
||||
|
||||
List<ComplianceCheck> list = complianceCheckService.list(complianceCheckLambdaQueryWrapper);
|
||||
|
||||
ArrayList<ComplianceCheckVO> complianceCheckVOS1 = new ArrayList<>();
|
||||
|
||||
for (ComplianceCheck complianceCheck : list) {
|
||||
|
||||
ComplianceCheckVO complianceCheckVO = complianceCheckService.getComplianceCheckVO(complianceCheck.getId());
|
||||
|
||||
complianceCheckVOS1.add(complianceCheckVO);
|
||||
}
|
||||
complianceCheckVOS.addAll(complianceCheckVOS1);
|
||||
}
|
||||
//期间核查计划审核
|
||||
if (permissions.contains("reagent_check_schedule_audit")){
|
||||
|
||||
LambdaQueryWrapper<CheckSchedule> checkScheduleLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
checkScheduleLambdaQueryWrapper.eq(CheckSchedule::getStatus,2).or().eq(CheckSchedule::getStatus, -2);
|
||||
|
||||
List<CheckSchedule> list = checkScheduleService.list(checkScheduleLambdaQueryWrapper);
|
||||
|
||||
ArrayList<CheckScheduleVO> checkScheduleVOS1 = new ArrayList<>();
|
||||
|
||||
for (CheckSchedule checkSchedule : list) {
|
||||
|
||||
CheckScheduleVO checkScheduleVO = checkScheduleService.getCheckScheduleVO(checkSchedule.getId());
|
||||
|
||||
checkScheduleVOS1.add(checkScheduleVO);
|
||||
}
|
||||
checkScheduleVOS.addAll(checkScheduleVOS1);
|
||||
}
|
||||
//期间核查录入结果审核
|
||||
if (permissions.contains("reagent_period_verification_implementation_audit")){
|
||||
|
||||
LambdaQueryWrapper<PeriodVerificationImplementation> periodVerificationImplementationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
periodVerificationImplementationLambdaQueryWrapper.eq(PeriodVerificationImplementation::getCommitStatus,2).or().eq(PeriodVerificationImplementation::getCommitStatus, -2);
|
||||
|
||||
List<PeriodVerificationImplementation> list = periodVerificationImplementationService.list(periodVerificationImplementationLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PeriodVerificationImplementationVO> periodVerificationImplementationVOS1 = new ArrayList<>();
|
||||
|
||||
for (PeriodVerificationImplementation periodVerificationImplementation : list) {
|
||||
|
||||
PeriodVerificationImplementationVO periodVerificationImplementationVO = periodVerificationImplementationService.getPeriodVerificationImplementationVO(periodVerificationImplementation.getId());
|
||||
|
||||
periodVerificationImplementationVOS1.add(periodVerificationImplementationVO);
|
||||
}
|
||||
periodVerificationImplementationVOS.addAll(periodVerificationImplementationVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理一级审核
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditPrimary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,2).or().eq(StandardMaterialApprovalForm::getCommitStatus, -2);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (StandardMaterialApprovalForm standardMaterialApprovalForm : list) {
|
||||
|
||||
StandardMaterialApprovalFormVO vo = standardMaterialApprovalFormService.getVO(standardMaterialApprovalForm.getId());
|
||||
|
||||
standardMaterialApprovalFormVOS1.add(vo);
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理二级审核
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditSecondary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,3).or().eq(StandardMaterialApprovalForm::getCommitStatus, -3);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (StandardMaterialApprovalForm standardMaterialApprovalForm : list) {
|
||||
|
||||
StandardMaterialApprovalFormVO vo = standardMaterialApprovalFormService.getVO(standardMaterialApprovalForm.getId());
|
||||
|
||||
standardMaterialApprovalFormVOS1.add(vo);
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
//标准物质管理审批
|
||||
if (permissions.contains("reagent_standard_material_approval_form_approve")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,4).or().eq(StandardMaterialApprovalForm::getCommitStatus, -4);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (StandardMaterialApprovalForm standardMaterialApprovalForm : list) {
|
||||
|
||||
StandardMaterialApprovalFormVO vo = standardMaterialApprovalFormService.getVO(standardMaterialApprovalForm.getId());
|
||||
|
||||
standardMaterialApprovalFormVOS1.add(vo);
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_evaluation_form_secondaryAudit")){
|
||||
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus,3).or().eq(EvaluationForm::getStatus, -3);
|
||||
|
||||
List<EvaluationForm> list = evaluationFormService.list(evaluationFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<EvaluationFormVO> evaluationFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (EvaluationForm evaluationForm : list) {
|
||||
|
||||
EvaluationFormVO formById = evaluationFormService.getFormById(evaluationForm.getId());
|
||||
|
||||
evaluationFormVOS1.add(formById);
|
||||
}
|
||||
evaluationFormVOS.addAll(evaluationFormVOS1);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_evaluation_form_three_level_audit")){
|
||||
|
||||
LambdaQueryWrapper<EvaluationForm> evaluationFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
evaluationFormLambdaQueryWrapper.eq(EvaluationForm::getStatus,4).or().eq(EvaluationForm::getStatus, -4);
|
||||
|
||||
List<EvaluationForm> list = evaluationFormService.list(evaluationFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<EvaluationFormVO> evaluationFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (EvaluationForm evaluationForm : list) {
|
||||
|
||||
EvaluationFormVO formById = evaluationFormService.getFormById(evaluationForm.getId());
|
||||
|
||||
evaluationFormVOS1.add(formById);
|
||||
}
|
||||
evaluationFormVOS.addAll(evaluationFormVOS1);
|
||||
}
|
||||
//指导书审核列表
|
||||
if (permissions.contains("reagent_instruction_book_audit")){
|
||||
|
||||
LambdaQueryWrapper<InstructionBook> instructionBookLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
instructionBookLambdaQueryWrapper.eq(InstructionBook::getCommitStatus,2).or().eq(InstructionBook::getCommitStatus, -2);
|
||||
|
||||
List<InstructionBook> list = instructionBookService.list(instructionBookLambdaQueryWrapper);
|
||||
|
||||
ArrayList<InstructionBookVO> instructionBookVOS1 = new ArrayList<>();
|
||||
|
||||
for (InstructionBook instructionBook : list) {
|
||||
|
||||
InstructionBookVO vo = instructionBookService.getVO(instructionBook.getId());
|
||||
|
||||
instructionBookVOS1.add(vo);
|
||||
}
|
||||
instructionBookVOS.addAll(instructionBookVOS1);
|
||||
|
||||
}
|
||||
|
||||
reviewAndApprove.setComplianceCheckVOList(complianceCheckVOS);
|
||||
reviewAndApprove.setDecentralizedRequestVOList(decentralizedRequestVOS);
|
||||
reviewAndApprove.setCheckScheduleVOList(checkScheduleVOS);
|
||||
reviewAndApprove.setEvaluationFormVOList(evaluationFormVOS);
|
||||
reviewAndApprove.setAcceptanceRecordFormVOList(acceptanceRecordFormVOS);
|
||||
reviewAndApprove.setPeriodVerificationImplementationVOList(periodVerificationImplementationVOS);
|
||||
reviewAndApprove.setPurchasingPlanVOList(purchasingPlanVOS);
|
||||
reviewAndApprove.setPurchaseCatalogueVOList(purchaseCatalogueVOList);
|
||||
reviewAndApprove.setStandardMaterialApprovalFormList(standardMaterialApprovalFormVOS);
|
||||
reviewAndApprove.setInstructionBookList(instructionBookVOS);
|
||||
|
||||
return reviewAndApprove;
|
||||
}
|
||||
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.entity.SolutionUseForm;
|
||||
import digital.laboratory.platform.reagent.entity.StandardReserveSolution;
|
||||
import digital.laboratory.platform.reagent.mapper.SolutionUseFormMapper;
|
||||
import digital.laboratory.platform.reagent.service.SolutionUseFormService;
|
||||
import digital.laboratory.platform.reagent.service.StandardReserveSolutionService;
|
||||
import digital.laboratory.platform.reagent.vo.SolutionUseFormVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@Service//标准溶液使用记录
|
||||
public class SolutionUseFormServiceImpl extends ServiceImpl<SolutionUseFormMapper, SolutionUseForm> implements SolutionUseFormService {
|
||||
|
||||
@Autowired
|
||||
private SolutionUseFormService solutionUseFormService;
|
||||
@Autowired
|
||||
private StandardReserveSolutionService standardReserveSolutionService;
|
||||
@Override
|
||||
public List<SolutionUseFormVO> getSolutionUseFormVOList(String solutionId){
|
||||
|
||||
List<SolutionUseFormVO> solutionUseFormVOList = baseMapper.getSolutionUseFormVOList(solutionId);
|
||||
|
||||
return solutionUseFormVOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SolutionUseForm useById(String solutionNumbering, DLPUser dlpUser){
|
||||
|
||||
SolutionUseForm solutionUseForm = new SolutionUseForm();
|
||||
|
||||
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getSolutionNumbering,solutionNumbering);
|
||||
|
||||
StandardReserveSolution standardReserveSolution = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
|
||||
|
||||
solutionUseForm.setSolutionId(standardReserveSolution.getId());
|
||||
|
||||
solutionUseForm.setUserId(dlpUser.getId());
|
||||
|
||||
solutionUseForm.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
LambdaQueryWrapper<SolutionUseForm> solutionUseFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
solutionUseFormLambdaQueryWrapper.eq(SolutionUseForm::getSolutionId,standardReserveSolution.getId());
|
||||
|
||||
List<SolutionUseForm> list = solutionUseFormService.list(solutionUseFormLambdaQueryWrapper);
|
||||
//判断使用次序
|
||||
if (list==null){
|
||||
solutionUseForm.setOrderOfUse(1);
|
||||
}else {
|
||||
solutionUseForm.setOrderOfUse(list.size()+1);
|
||||
}
|
||||
if (solutionUseFormService.save(solutionUseForm)){
|
||||
return solutionUseForm;
|
||||
}else throw new RuntimeException(String.format("标准储备溶液使用记录保存失败"));
|
||||
}
|
||||
}
|
||||
+32
-1
@@ -11,6 +11,7 @@ import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.StandardMaterialApplicationVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
@@ -39,14 +40,27 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private StandardReserveSolutionService standardReserveSolutionService;
|
||||
|
||||
@Override//归还标准物质
|
||||
@Transactional
|
||||
public StandardMaterialApplication returnById(StandardMaterialApplicationDTO standardMaterialApplicationDTO) {
|
||||
|
||||
StandardMaterialApplication byId = standardMaterialApplicationService.getById(standardMaterialApplicationDTO.getStandardMaterialApplicationId());
|
||||
|
||||
byId.setPurposeAndQuantity(standardMaterialApplicationDTO.getUseQuantity());
|
||||
byId.setPurposeAndQuantity(standardMaterialApplicationDTO.getPurposeAndQuantity());
|
||||
byId.setDateOfReturn(LocalDateTime.now());
|
||||
byId.setStatus(1);
|
||||
//若无需归还,则证明标准物质/标准储备溶液已经使用完毕,删除记录即可
|
||||
if (!standardMaterialApplicationDTO.getOutOfUse()){
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(byId.getReferenceMaterialId());
|
||||
|
||||
referenceMaterial.setStatus(-4);
|
||||
referenceMaterialService.updateById(referenceMaterial);
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<SolutionUseForm> solutionUseFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -86,6 +100,23 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(record.getReferenceSubstanceId());
|
||||
|
||||
record.setCategory(byId.getCategory());
|
||||
|
||||
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getSolutionNumbering,record.getReferenceMaterialNumber());
|
||||
|
||||
StandardReserveSolution one = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
|
||||
|
||||
record.setReagentConsumables(byId);
|
||||
|
||||
if (one!=null){
|
||||
String configurationConcentration = one.getConfigurationConcentration();
|
||||
record.setConfigurationConcentration(configurationConcentration);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
return standardMaterialApplicationVOList;
|
||||
}
|
||||
|
||||
+12
-11
@@ -47,12 +47,17 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
BeanUtils.copyProperties(standardMaterialApprovalFormDTO, standardMaterialApprovalForm);
|
||||
|
||||
standardMaterialApprovalForm.setApplicantId(dlpUser.getId());
|
||||
|
||||
standardMaterialApprovalForm.setApplicantName(dlpUser.getName());
|
||||
|
||||
standardMaterialApprovalForm.setCommitStatus(1);
|
||||
|
||||
standardMaterialApprovalForm.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
standardMaterialApprovalForm.setApprovalOfTime(LocalDateTime.now());
|
||||
|
||||
standardMaterialApprovalForm.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (standardMaterialApprovalFormDTO.getApplicationContent() == 1 | standardMaterialApprovalFormDTO.getApplicationContent() == 2) {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
|
||||
@@ -98,17 +103,13 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
@Override
|
||||
public StandardMaterialApprovalFormVO getVO(String standardMaterialApprovalFormId) {
|
||||
|
||||
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId);
|
||||
StandardMaterialApprovalFormVO vo = baseMapper.getVO(standardMaterialApprovalFormId);
|
||||
|
||||
StandardMaterialApprovalFormVO standardMaterialApprovalFormVO = new StandardMaterialApprovalFormVO();
|
||||
SupplierInformation byId1 = supplierInformationService.getById(vo.getManufacturerId());
|
||||
|
||||
BeanUtils.copyProperties(byId, standardMaterialApprovalFormVO);
|
||||
vo.setManufacturerName(byId1.getSupplierName());
|
||||
|
||||
SupplierInformation byId1 = supplierInformationService.getById(standardMaterialApprovalFormVO.getManufacturerId());
|
||||
|
||||
standardMaterialApprovalFormVO.setManufacturerName(byId1.getSupplierName());
|
||||
|
||||
return standardMaterialApprovalFormVO;
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override//一级审核
|
||||
@@ -124,7 +125,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
byId.setCommitStatus(2);
|
||||
} else {
|
||||
byId.setCommitStatus(-1);
|
||||
byId.setCommitStatus(-2);
|
||||
}
|
||||
|
||||
if (standardMaterialApprovalFormService.updateById(byId)) {
|
||||
@@ -144,7 +145,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
byId.setCommitStatus(3);
|
||||
} else {
|
||||
byId.setCommitStatus(-1);
|
||||
byId.setCommitStatus(-3);
|
||||
}
|
||||
if (standardMaterialApprovalFormService.updateById(byId)) {
|
||||
return byId;
|
||||
@@ -163,7 +164,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
if (auditAndApproveDTO.getApproveResult() == true) {
|
||||
byId.setCommitStatus(4);
|
||||
} else {
|
||||
byId.setCommitStatus(-2);
|
||||
byId.setCommitStatus(-4);
|
||||
}
|
||||
if (standardMaterialApprovalFormService.updateById(byId)) {
|
||||
return byId;
|
||||
|
||||
+7
-1
@@ -111,6 +111,8 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
reagentConsumables1.setReagentConsumableName(standardReserveSolution.getSolutionName());
|
||||
reagentConsumables1.setConfigurationConcentration(standardReserveSolution.getConfigurationConcentration());
|
||||
reagentConsumables1.setCategory("标准储备溶液");
|
||||
reagentConsumables1.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumables1.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
reagentConsumablesService.save(reagentConsumables1);
|
||||
}
|
||||
@@ -172,12 +174,14 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
reagentConsumableInventory.setStatus(1);
|
||||
|
||||
reagentConsumableInventory.setConfigurationConcentration(byId.getConfigurationConcentration());
|
||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
//获取当前年月日
|
||||
Date date = new Date();
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-mm-dd");
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
formatter.format(date);
|
||||
//创建标准溶液对象,并生成编号
|
||||
@@ -196,6 +200,8 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
|
||||
byId.setSolutionNumbering(referenceMaterial.getNumber());
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
byId.setWarehousingRemarks(warehousingRemarks);
|
||||
|
||||
+8
-3
@@ -1,5 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
@@ -50,9 +51,13 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
|
||||
StandardSolutionCurve standardSolutionCurve = new StandardSolutionCurve();
|
||||
|
||||
String referenceMaterialId = standardSolutionCurveDTO.getReferenceMaterialId();
|
||||
String solutionNumbering = standardSolutionCurveDTO.getSolutionNumbering();
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(referenceMaterialId);
|
||||
LambdaQueryWrapper<ReferenceMaterial> referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getNumber,solutionNumbering);
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper);
|
||||
|
||||
standardSolutionCurve.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
@@ -63,7 +68,7 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
standardSolutionCurve.setConfigurationDate(LocalDateTime.now());
|
||||
standardSolutionCurve.setConcentrationNumbering(referenceMaterial.getNumber());
|
||||
standardSolutionCurve.setStepSolutionConcentration(standardSolutionCurveDTO.getStepSolutionConcentration());
|
||||
standardSolutionCurve.setReferenceMaterialId(referenceMaterialId);
|
||||
standardSolutionCurve.setReferenceMaterialId(referenceMaterial.getId());
|
||||
standardSolutionCurve.setDispenserId(dlpUser.getId());
|
||||
|
||||
if (standardSolutionCurveService.save(standardSolutionCurve)){
|
||||
|
||||
-2
@@ -61,8 +61,6 @@ public class SupplierInformationServiceImpl extends ServiceImpl<SupplierInformat
|
||||
|
||||
supplierInformationService.save(supplierInformation);
|
||||
|
||||
EvaluationForm evaluationForm = evaluationFormService.addFormById(supplierInformation.getId());
|
||||
|
||||
return supplierInformation;
|
||||
|
||||
}
|
||||
|
||||
+38
-1
@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
@@ -69,6 +70,12 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
@Autowired
|
||||
private ProvideServicesOrSuppliesService provideServicesOrSuppliesService;
|
||||
|
||||
@Autowired
|
||||
private EvaluationFormService evaluationFormService;
|
||||
|
||||
@Autowired
|
||||
private SupplierInformationService supplierInformationService;
|
||||
|
||||
@Override//查看采购入库
|
||||
public WarehousingRecordFormVO getWarehousingRecordFormVO(String warehousingFormId) {
|
||||
|
||||
@@ -114,7 +121,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
WarehousingContent byId = warehousingContentService.getById(warehousingBatchList.getWarehousingContentId());
|
||||
|
||||
provideServicesOrSuppliesService.addById(byId.getSupplierId(), byId.getReagentConsumableId());
|
||||
|
||||
byId.setWarehousingQuantity(byId.getWarehousingQuantity() + warehousingBatchList.getQuantity());
|
||||
//判断采购数量与签收数量
|
||||
@@ -161,6 +167,8 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
|
||||
reagentConsumableInventory.setStatus(1);
|
||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
BatchDetails batchDetails = new BatchDetails();
|
||||
|
||||
@@ -176,6 +184,8 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
batchDetails.setSupplierId(byId.getSupplierId());
|
||||
|
||||
batchDetails.setExpirationDate(Integer.valueOf(warehousingBatchList.getLimitDate()));
|
||||
|
||||
if (reagentConsumableInventory.getTotalQuantity() == null) {
|
||||
|
||||
reagentConsumableInventory.setTotalQuantity(0);
|
||||
@@ -365,7 +375,34 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
}
|
||||
//判断该清单所有试剂耗材是否入库完成
|
||||
if (i == list.size()) {
|
||||
|
||||
List<SupplierInformation> supplierInformations = new ArrayList<>();
|
||||
|
||||
for (WarehousingContent warehousingContent : list) {
|
||||
|
||||
SupplierInformation supplierInformation = supplierInformationService.getById(warehousingContent.getSupplierId());
|
||||
|
||||
if (supplierInformations.size()==0){
|
||||
supplierInformations.add(supplierInformation);
|
||||
EvaluationForm evaluationForm = evaluationFormService.addForm(supplierInformation.getId());
|
||||
provideServicesOrSuppliesService.addById(evaluationForm.getId(),warehousingContent.getReagentConsumableId());
|
||||
|
||||
warehousingContent.setEvaluationFormId(evaluationForm.getId());
|
||||
|
||||
}else if (!(supplierInformations.contains(supplierInformation))){
|
||||
supplierInformations.add(supplierInformation);
|
||||
EvaluationForm evaluationForm = evaluationFormService.addForm(supplierInformation.getId());
|
||||
warehousingContent.setEvaluationFormId(evaluationForm.getId());
|
||||
provideServicesOrSuppliesService.addById(evaluationForm.getId(),warehousingContent.getReagentConsumableId());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
warehousingRecordForm.setStatus(2);
|
||||
|
||||
|
||||
} else {
|
||||
warehousingRecordForm.setStatus(1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package digital.laboratory.platform.reagent.utils;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* minio 属性值
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "minio")
|
||||
public class MinioProp {
|
||||
/**
|
||||
* 连接url
|
||||
*/
|
||||
private String endpoint;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String accesskey;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String secretKey;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
//package digital.laboratory.platform.reagent.utils;
|
||||
//import com.alibaba.fastjson.JSONObject;
|
||||
//import io.minio.MinioClient;
|
||||
//import lombok.SneakyThrows;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//import org.springframework.web.multipart.MultipartFile;
|
||||
//
|
||||
//@Slf4j
|
||||
//@Component
|
||||
//public class MinioUtils {
|
||||
//
|
||||
// @Autowired
|
||||
// private MinioClient client;
|
||||
// @Autowired
|
||||
// private MinioProp minioProp;
|
||||
//
|
||||
// /**
|
||||
// * 创建bucket
|
||||
// *
|
||||
// * @param bucketName bucket名称
|
||||
// */
|
||||
// @SneakyThrows
|
||||
// public void createBucket(String bucketName) {
|
||||
// if (!client.bucketExists(bucketName)) {
|
||||
// client.makeBucket(bucketName);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 上传文件
|
||||
// *
|
||||
// * @param file 文件
|
||||
// * @param bucketName 存储桶
|
||||
// * @return
|
||||
// */
|
||||
// public JSONObject uploadFile(MultipartFile file, String bucketName) throws Exception {
|
||||
// JSONObject res = new JSONObject();
|
||||
// res.put("code", 0);
|
||||
// // 判断上传文件是否为空
|
||||
// if (null == file || 0 == file.getSize()) {
|
||||
// res.put("msg", "上传文件不能为空");
|
||||
// return res;
|
||||
// }
|
||||
// try {
|
||||
// // 判断存储桶是否存在
|
||||
// createBucket(bucketName);
|
||||
// // 文件名
|
||||
// String originalFilename = file.getOriginalFilename();
|
||||
// // 新的文件名 = 存储桶名称_时间戳.后缀名
|
||||
// String fileName = bucketName + "_" + System.currentTimeMillis() + originalFilename.substring(originalFilename.lastIndexOf("."));
|
||||
// // 开始上传
|
||||
// client.putObject(bucketName, fileName, file.getInputStream(), file.getContentType());
|
||||
// res.put("code", 1);
|
||||
// res.put("msg", minioProp.getEndpoint() + "/" + bucketName + "/" + fileName);
|
||||
// return res;
|
||||
// } catch (Exception e) {
|
||||
// log.error("上传文件失败:{}", e.getMessage());
|
||||
// }
|
||||
// res.put("msg", "上传失败");
|
||||
// return res;
|
||||
// }
|
||||
//}
|
||||
@@ -0,0 +1,14 @@
|
||||
package digital.laboratory.platform.reagent.utils;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
public class String2DateConverter {
|
||||
|
||||
public Date convert(String s) throws ParseException {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
return (Date) sdf.parse(s);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,4 +34,9 @@ public class AcceptanceRecordFormVO extends AcceptanceRecordForm {
|
||||
@ApiModelProperty(value = "(试剂耗材对象)")
|
||||
private ReagentConsumables reagentConsumables;
|
||||
|
||||
private String type = "验收记录";
|
||||
|
||||
private String createName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package digital.laboratory.platform.reagent.vo;
|
||||
|
||||
import digital.laboratory.platform.reagent.entity.Blacklist;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BlackListVO extends Blacklist {
|
||||
|
||||
@ApiModelProperty(value="(试剂耗材名称)")
|
||||
private String reagentConsumableName;
|
||||
|
||||
@ApiModelProperty(value="(品牌)")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty(value="(类别)")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value="(规格型号)")
|
||||
private String specificationAndModel;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package digital.laboratory.platform.reagent.vo;
|
||||
|
||||
import digital.laboratory.platform.reagent.entity.CabinetForm;
|
||||
import digital.laboratory.platform.reagent.entity.LatticeForm;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class CabinetFormVO extends CabinetForm {
|
||||
|
||||
@ApiModelProperty(value="格子数组")
|
||||
private List<LatticeForm> latticeFormList;
|
||||
}
|
||||
@@ -17,4 +17,9 @@ public class CheckScheduleVO extends CheckSchedule {
|
||||
|
||||
@ApiModelProperty(value="(期间核查计划明细数组)")
|
||||
List<PeriodVerificationPlanVO> periodVerificationPlanVOS;
|
||||
|
||||
private String createName;
|
||||
|
||||
private String type = "期间核查计划";
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user