parent
149e66c5b8
commit
1cbbd4a8a3
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; |
||||
} |
||||
|
||||
} |
@ -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); |
||||
|
||||
} |
||||
} |
@ -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; |
||||
} |
@ -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; |
||||
} |
@ -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; |
||||
} |
@ -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); |
||||
} |
@ -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); |
||||
} |
@ -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; |
||||
} |
||||
|
||||
} |
@ -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("标准储备溶液使用记录保存失败")); |
||||
} |
||||
} |
@ -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); |
||||
} |
||||
|
||||
} |
@ -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; |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue