master
陈江保 4 months ago
parent f409b70e73
commit a8078ef106
  1. 12
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustAlterApplyServiceImpl.java
  2. 6
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java
  3. 13
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentServiceImpl.java

@ -159,6 +159,10 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
throw new ValidateCodeException("修改的记录id不能为空");
}
EntrustAlterApply oldInfo = super.getById(dto.getId());
DLPUser user = SecurityUtils.getUser();
if (oldInfo.getApplicant().equals(user.getId())) {
throw new ValidateCodeException("请勿修改其他人的申请信息!");
}
if (dto.getOpCode() == 1 && oldInfo.getStatus().equals(EntrustAlterApplyStatus.SUBMITTED_WAIT_APPROVE.getStatus())) {
throw new ValidateCodeException("该条记录不在可撤销的状态范围内!");
}
@ -177,7 +181,11 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
@Override
public Boolean delete(List<String> ids) {
List<EntrustAlterApplyVO> entrustAlterAppliesVOS = baseMapper.getEntrustAlterApplyVOList(Wrappers.<EntrustAlterApply>query().in("eaa.id",ids));
DLPUser user = SecurityUtils.getUser();
entrustAlterAppliesVOS.forEach(e -> {
if (e.getApplicant().equals(user.getId())) {
throw new ValidateCodeException("请勿修改其他人的申请信息!");
}
if (e.getStatus().equals(EntrustAlterApplyStatus.WAIT_SUBMIT_APPLY.getStatus())) {
throw new ValidateCodeException(String.format("案件名称为 %s 的记录不在可删除的状态,无法删除!", e.getCaseName()));
}
@ -343,6 +351,10 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
if (entrustAlterApply == null) {
throw new ValidateCodeException("申请记录不存在!");
}
DLPUser user = SecurityUtils.getUser();
if (entrustAlterApply.getApplicant().equals(user.getId())) {
throw new ValidateCodeException("请勿修改其他人的申请信息!");
}
if (!entrustAlterApply.getStatus().equals(EntrustAlterApplyStatus.APPLY_SUCCESS.getStatus())) {
throw new ValidateCodeException("状态不合法,当前申请状态不允许修改委托信息!");
}

@ -1260,6 +1260,9 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
if (!dlpUser.isStaff() && entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) {
throw new RuntimeException(String.format("你已提交过该委托,无法再添加检材信息!"));
}
// 记录当前委托的检材数量
Integer currentEntrustMaterialCount = (int) this.count(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustment.getId()));
for (EntrustmentIdentificationMaterial identificationMaterial : identificationMaterialList) {
if (StringUtils.isNotBlank(identificationMaterial.getId()) && StringUtils.isNotBlank(identificationMaterial.getSample1No())) {
identificationMaterial = this.putUpdateById(identificationMaterial, dlpUser);
@ -1393,6 +1396,9 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
//默认肯定有一个是分析样是永远存在的,添加的时候,先将这个样本生成出来,所以受理时候的分样信息有一个是存在的,同理如果送检时候的分样信息,也是默认有一个存在的,这个在分样的时候,通过接口调用产生
//这里判断委托单位是否分样
//identificationMaterial.setSample1No(sampleService.getNewSampleNo(identificationMaterial.getImNo(),1));
// 初始化委托序号
identificationMaterial.setImEntrustNumber(currentEntrustMaterialCount.toString());
currentEntrustMaterialCount++;
identificationMaterial.setCreateBy(dlpUser.getId());
identificationMaterial.setCreateTime(LocalDateTime.now());

@ -34,6 +34,7 @@ import digital.laboratory.platform.entrustment.constant.EntrustMarkConstants;
import digital.laboratory.platform.entrustment.convert.DrugLiteConvert;
import digital.laboratory.platform.entrustment.dto.EntrustmentDTO;
import digital.laboratory.platform.entrustment.entity.*;
import digital.laboratory.platform.entrustment.enums.EntrustAlterApplyStatus;
import digital.laboratory.platform.entrustment.enums.EntrustmentStatusConstants;
import digital.laboratory.platform.entrustment.handler.AppStartupRunner;
import digital.laboratory.platform.entrustment.mapper.EntrustmentMapper;
@ -102,7 +103,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
@Resource
private RemoteSewageJobService remoteSewageJobService;
@Resource
private RemoteDictionaryService remoteDictionaryService;
private EntrustAlterApplyService entrustAlterApplyService;
@Resource
private RemoteUserService remoteUserService;
@Resource
@ -3183,9 +3184,13 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
List<Entrustment> entrustmentList4 = this.list(new LambdaQueryWrapper<Entrustment>().eq(Entrustment::getClientOrgId, orgId)
.eq(Entrustment::getStatus, EntrustmentStatusConstants.ENTRUSTMENT_STATUS_COMPLETED.getStatus()));
markersVOS.add(new MarkersVO("案件委托", entrustmentList4.size(), "已完成"));
Integer entrustAlterApplyCount = (int) entrustAlterApplyService.count(Wrappers.<EntrustAlterApply>lambdaQuery()
.eq(EntrustAlterApply::getStatus, EntrustAlterApplyStatus.APPLY_SUCCESS.getStatus())
.eq(EntrustAlterApply::getApplyOrgId, orgId));
markersVOS.add(new MarkersVO("委托申请修改", entrustAlterApplyCount, "申请通过"));
try {
R<Integer> data1 = remoteHairJobService.getJobQuantity(orgId, 0);
if (data1.getCode() == 0) {
@ -3403,6 +3408,10 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
this.list(new LambdaQueryWrapper<Entrustment>()
.in(Entrustment::getStatus, integers2)
.eq(Entrustment::getDataSources, 1)).size(), "委托审批(大数据平台)"));
markersVOS.add(new MarkersVO(EntrustMarkConstants.REVIEW_OR_APPROVAL,
(int) entrustAlterApplyService.count(Wrappers.<EntrustAlterApply>lambdaQuery()
.eq(EntrustAlterApply::getStatus, EntrustAlterApplyStatus.SUBMITTED_WAIT_APPROVE.getStatus())),
"委托修改审核"));
markersVOS.add(new MarkersVO(EntrustMarkConstants.SEWAGE_JOB_ACCEPT, statisticsDiffStatusSewageJobDTO.getJobStatusCreatedNum(), "污水任务待发布"));
markersVOS.add(new MarkersVO(EntrustMarkConstants.SEWAGE_JOB_ACCEPT, statisticsDiffStatusSewageJobDTO.getJobStatusClaimNum(), "污水任务已发布"));
markersVOS.add(new MarkersVO(EntrustMarkConstants.SEWAGE_JOB_ACCEPT, statisticsDiffStatusSewageJobDTO.getJobStatusClaimNum(), "污水受理"));

Loading…
Cancel
Save