|
|
|
@ -39,7 +39,7 @@ import digital.laboratory.platform.entrustment.dto.EntrustmentDTO; |
|
|
|
|
import digital.laboratory.platform.entrustment.entity.*; |
|
|
|
|
import digital.laboratory.platform.entrustment.enums.AnalysisOptionEnums; |
|
|
|
|
import digital.laboratory.platform.entrustment.enums.EntrustAlterApplyStatus; |
|
|
|
|
import digital.laboratory.platform.entrustment.enums.EntrustmentStatusConstants; |
|
|
|
|
import digital.laboratory.platform.entrustment.enums.EntrustStatusConstants; |
|
|
|
|
import digital.laboratory.platform.entrustment.event.PushDataToLabsCareEvent; |
|
|
|
|
import digital.laboratory.platform.entrustment.handler.AppStartupRunner; |
|
|
|
|
import digital.laboratory.platform.entrustment.mapper.EntrustmentMapper; |
|
|
|
@ -332,11 +332,11 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
|
|
|
|
|
for (EntrustmentVO evo : r.getRecords()) { |
|
|
|
|
int status = evo.getStatus(); |
|
|
|
|
String statusDesc = EntrustmentStatusConstants.getStatusDescription(status); |
|
|
|
|
String statusDesc = EntrustStatusConstants.getStatusDescription(status); |
|
|
|
|
evo.setStatusDescription(statusDesc); |
|
|
|
|
|
|
|
|
|
int prevStatus = evo.getPreviousStatus(); |
|
|
|
|
String prevStatusDesc = EntrustmentStatusConstants.getStatusDescription(prevStatus); |
|
|
|
|
String prevStatusDesc = EntrustStatusConstants.getStatusDescription(prevStatus); |
|
|
|
|
evo.setPreviousStatusDescription(prevStatusDesc); |
|
|
|
|
} |
|
|
|
|
return r; |
|
|
|
@ -347,8 +347,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
List<EntrustmentVO> r = baseMapper.getEntrustmentVOList(qw); |
|
|
|
|
|
|
|
|
|
for (EntrustmentVO evo : r) { |
|
|
|
|
evo.setStatusDescription(EntrustmentStatusConstants.getStatusDescription(evo.getStatus())); |
|
|
|
|
evo.setPreviousStatusDescription(EntrustmentStatusConstants.getStatusDescription(evo.getPreviousStatus())); |
|
|
|
|
evo.setStatusDescription(EntrustStatusConstants.getStatusDescription(evo.getStatus())); |
|
|
|
|
evo.setPreviousStatusDescription(EntrustStatusConstants.getStatusDescription(evo.getPreviousStatus())); |
|
|
|
|
} |
|
|
|
|
return r; |
|
|
|
|
} |
|
|
|
@ -357,8 +357,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
public EntrustmentVO getEntrustmentVOById(String id) { |
|
|
|
|
EntrustmentVO evo = baseMapper.getEntrustmentVOById(id); |
|
|
|
|
evo.setHappenTime(LocalDateTimeUtil.format(caseEventService.getById(evo.getCaseId()).getHappenTime(), "yyyy年MM月dd日")); |
|
|
|
|
evo.setStatusDescription(EntrustmentStatusConstants.getStatusDescription(evo.getStatus())); |
|
|
|
|
evo.setPreviousStatusDescription(EntrustmentStatusConstants.getStatusDescription(evo.getPreviousStatus())); |
|
|
|
|
evo.setStatusDescription(EntrustStatusConstants.getStatusDescription(evo.getStatus())); |
|
|
|
|
evo.setPreviousStatusDescription(EntrustStatusConstants.getStatusDescription(evo.getPreviousStatus())); |
|
|
|
|
return evo; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -415,7 +415,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
public Boolean generateIdentifyItemsBook(String entrustId) { |
|
|
|
|
Entrustment entrustment = this.getOne(Wrappers.<Entrustment>query().eq("id", entrustId)); |
|
|
|
|
// 标记该委托是否已经受理
|
|
|
|
|
int isAccepted = entrustment.getStatus().compareTo(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_ACCEPTED.getStatus()); |
|
|
|
|
int isAccepted = entrustment.getStatus().compareTo(EntrustStatusConstants.ENTRUST_STATUS_ACCEPTED.getStatus()); |
|
|
|
|
List<EntrustmentIdentificationMaterial> materialList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery() |
|
|
|
|
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustId) |
|
|
|
|
.orderByAsc(isAccepted != -1, EntrustmentIdentificationMaterial::getAcceptNo) |
|
|
|
@ -946,7 +946,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
if (!ossFile.objectExist(retBookName) || entrustment.getStatus() <= EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
if (!ossFile.objectExist(retBookName) || entrustment.getStatus() <= EntrustStatusConstants.ENTRUST_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
//不存在就生成一个
|
|
|
|
|
if ((whatBook.equals("identItemBook") || whatBook.equals("identfyBook")) && this.generateIdentifyItemsBook(entrustId)) { |
|
|
|
|
return retBookName; |
|
|
|
@ -973,7 +973,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
public boolean testsFinish(String entrustId) { |
|
|
|
|
Entrustment entrustment = this.baseMapper.selectOne(Wrappers.<Entrustment>query() |
|
|
|
|
.eq("id", entrustId)); |
|
|
|
|
entrustment.setStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_TEST_FINISH.getStatus()); |
|
|
|
|
entrustment.setStatus(EntrustStatusConstants.ENTRUST_STATUS_TEST_FINISH.getStatus()); |
|
|
|
|
return this.updateById(entrustment); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1157,7 +1157,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrust.getId())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()) { |
|
|
|
|
throw new RuntimeException("委托已经提交, 不能再进行修改"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1275,7 +1275,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
throw new CheckedException(String.format("没有找到 id 为 %s 的委托", entrust.getId())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()) { |
|
|
|
|
throw new CheckedException("委托已经提交, 无须再次提交"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1307,7 +1307,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
entrustment.setSubmitter(dlpUser.getId()); |
|
|
|
|
entrustment.setSubmitTime(LocalDateTime.now()); |
|
|
|
|
entrustment.setPreviousStatus(entrustment.getStatus()); // 可能是从其他环节转过来的, 一旦提交, 保存上一个状态
|
|
|
|
|
//entrustment.setStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CHECK_CLAIM.getStatus());
|
|
|
|
|
//entrustment.setStatus(EntrustmentStatusConstants.ENTRUST_STATUS_WAITING_CHECK_CLAIM.getStatus());
|
|
|
|
|
entrustment.setStatus(ProcessFlowMapper.getNextStatus(entrustment.getStatus(), 1)); |
|
|
|
|
List<UpdateInfo> pis = entrustment.getProcessInfo(); |
|
|
|
|
if (pis == null) { |
|
|
|
@ -1376,7 +1376,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrust.getId())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CHECK_CLAIM.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_WAITING_CHECK_CLAIM.getStatus()) { |
|
|
|
|
// 已经有人认领这个审核任务了
|
|
|
|
|
throw new RuntimeException(String.format("委托不在待审核状态, 审核任务认领人: %s", entrustment.getCheckClaimUser())); |
|
|
|
|
} |
|
|
|
@ -1404,7 +1404,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
entrustment.setCheckClaimUser(dlpUser.getId()); |
|
|
|
|
entrustment.setCheckClaimTime(LocalDateTime.now()); |
|
|
|
|
entrustment.setPreviousStatus(entrustment.getStatus()); // 可能是从其他环节转过来的, 一旦提交, 保存上一个状态
|
|
|
|
|
entrustment.setStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CHECK.getStatus()); |
|
|
|
|
entrustment.setStatus(EntrustStatusConstants.ENTRUST_STATUS_WAITING_CHECK.getStatus()); |
|
|
|
|
|
|
|
|
|
//-------------------
|
|
|
|
|
// 更新数据库表数据
|
|
|
|
@ -1457,7 +1457,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
// throw new RuntimeException(String.format("委托的审核任务是由其他人认领的。认领用户是: %s", entrustment.getCheckClaimUser()));
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CHECK.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_WAITING_CHECK.getStatus()) { |
|
|
|
|
throw new RuntimeException("委托不在待审核状态"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1504,7 +1504,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
currentAcceptNo = yearStr + "-" + (StrUtil.isBlank(maxEntrustAcceptNo) ? "1" : (Integer.parseInt(maxEntrustAcceptNo) + 1)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (newStatus == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
if (newStatus == EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()) { |
|
|
|
|
EntrustmentIdentificationMaterial im = new EntrustmentIdentificationMaterial(); |
|
|
|
|
im.setCheckPassed(0); |
|
|
|
|
im.setApprovePassed(0); |
|
|
|
@ -1625,7 +1625,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrust.getId())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_APPROVE_CLAIM.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_WAITING_APPROVE_CLAIM.getStatus()) { |
|
|
|
|
// 已经有人认领这个审批任务了
|
|
|
|
|
throw new RuntimeException(String.format("委托不在待审批状态, 审批任务认领人: %s", entrustment.getApproveClaimUser())); |
|
|
|
|
} |
|
|
|
@ -1652,7 +1652,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
entrustment.setApproveClaimUser(dlpUser.getId()); |
|
|
|
|
entrustment.setApproveClaimTime(LocalDateTime.now()); |
|
|
|
|
entrustment.setPreviousStatus(entrustment.getStatus()); // 可能是从其他环节转过来的, 一旦提交, 保存上一个状态
|
|
|
|
|
entrustment.setStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_APPROVE.getStatus()); |
|
|
|
|
entrustment.setStatus(EntrustStatusConstants.ENTRUST_STATUS_WAITING_APPROVE.getStatus()); |
|
|
|
|
|
|
|
|
|
//-------------------
|
|
|
|
|
// 更新数据库表数据
|
|
|
|
@ -1702,7 +1702,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
// throw new RuntimeException(String.format("委托的审批任务是由其他人认领的。认领用户是: %s", entrustment.getCheckClaimUser()));
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_APPROVE.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_WAITING_APPROVE.getStatus()) { |
|
|
|
|
throw new RuntimeException("委托不在待审批状态"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1725,13 +1725,13 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
int newStatus; // 新的状态(环节)
|
|
|
|
|
{ |
|
|
|
|
newStatus = ProcessFlowMapper.getNextStatus(entrustment.getStatus(), opCode); |
|
|
|
|
if (newStatus == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
if (newStatus == EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()) { |
|
|
|
|
EntrustmentIdentificationMaterial im = new EntrustmentIdentificationMaterial(); |
|
|
|
|
im.setCheckPassed(0); |
|
|
|
|
im.setApprovePassed(0); |
|
|
|
|
im.setAcceptPassed(0); |
|
|
|
|
entrustmentIdentificationMaterialService.setEntrustmentIdentificationMaterialStatusByEntrustment(im, entrustment.getId()); |
|
|
|
|
} else if (newStatus == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CHECK.getStatus()) { |
|
|
|
|
} else if (newStatus == EntrustStatusConstants.ENTRUST_STATUS_WAITING_CHECK.getStatus()) { |
|
|
|
|
EntrustmentIdentificationMaterial im = new EntrustmentIdentificationMaterial(); |
|
|
|
|
im.setCheckPassed(0); |
|
|
|
|
im.setApprovePassed(0); |
|
|
|
@ -1809,7 +1809,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrust.getId())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CONFIRM.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_WAITING_CONFIRM.getStatus()) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1825,7 +1825,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
int newStatus = -1; // 新的状态(环节)
|
|
|
|
|
{ |
|
|
|
|
newStatus = ProcessFlowMapper.getNextStatus(entrustment.getStatus(), opCode); |
|
|
|
|
if (newStatus == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
if (newStatus == EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()) { |
|
|
|
|
EntrustmentIdentificationMaterial im = new EntrustmentIdentificationMaterial(); |
|
|
|
|
im.setCheckPassed(0); |
|
|
|
|
im.setApprovePassed(0); |
|
|
|
@ -1875,7 +1875,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrust.getId())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_DELIVER.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_WAITING_DELIVER.getStatus()) { |
|
|
|
|
throw new RuntimeException("委托不在待送检状态"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1961,7 +1961,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrust.getId())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_DELIVER.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_WAITING_DELIVER.getStatus()) { |
|
|
|
|
throw new RuntimeException("委托不在待送检状态"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2033,7 +2033,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
String pdfFilePath = OSSDirectoryConstants.DOCUMENT_ENTRUSTMENT_DIRECTORY + "/" + ev.getId() + "/" + entrustmentLetterFileName + ".docx"; |
|
|
|
|
try { |
|
|
|
|
//这里加一下判断条件,由于贵阳市局这里的情况是审核的时候就需要查看委托书,所以为了保证每一次提交过来的委托都是最新的,所以在受理通过以前应该每次查看都是重新生成
|
|
|
|
|
if (!ossFile.objectExist(pdfFilePath) || ev.getStatus() <= EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
if (!ossFile.objectExist(pdfFilePath) || ev.getStatus() <= EntrustStatusConstants.ENTRUST_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
GenerateEntrustmentLetterPDF(ev); |
|
|
|
|
return pdfFilePath; |
|
|
|
|
} |
|
|
|
@ -2060,7 +2060,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", id)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (ev.getStatus() < EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
if (ev.getStatus() < EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()) { |
|
|
|
|
throw new RuntimeException("委托状态必须在委托创建之后才能打印鉴定委托书"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2226,8 +2226,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
//特殊审批委托
|
|
|
|
|
public void specialApprove(Entrustment entrustment) { |
|
|
|
|
//将审批状态直接提升为待受理状态
|
|
|
|
|
entrustment.setStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()); |
|
|
|
|
entrustment.setPreviousStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CONFIRM.getStatus()); |
|
|
|
|
entrustment.setStatus(EntrustStatusConstants.ENTRUST_STATUS_WAITING_ACCEPT.getStatus()); |
|
|
|
|
entrustment.setPreviousStatus(EntrustStatusConstants.ENTRUST_STATUS_WAITING_CONFIRM.getStatus()); |
|
|
|
|
this.updateById(entrustment); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2252,7 +2252,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
// throw new RuntimeException(String.format("委托的受理任务是由其他人认领的。认领受理的用户是: %s", entrustment.getAcceptClaimUser()));
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
throw new RuntimeException("委托不在正在受理状态"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2309,7 +2309,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
// throw new RuntimeException(String.format("委托的受理任务是由其他人认领的。认领的用户是: %s", entrustment.getAcceptClaimUser()));
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
throw new RuntimeException("委托不在正在受理状态"); |
|
|
|
|
} |
|
|
|
|
if (opCode < 0) { |
|
|
|
@ -2387,7 +2387,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (newStatus == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
if (newStatus == EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()) { |
|
|
|
|
EntrustmentIdentificationMaterial im = new EntrustmentIdentificationMaterial(); |
|
|
|
|
im.setCheckPassed(0); |
|
|
|
|
im.setApprovePassed(0); |
|
|
|
@ -2565,7 +2565,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
|
|
|
|
|
// 正在受理和已受理这2个状态下可以打印
|
|
|
|
|
//这里再次修改一下,以前是待受理和已受理两个状态才能生成,由于贵阳市局这里的情况是需要在审核的时候查看确认书,所以如果状态是在委托提交以前我们才不允许生成
|
|
|
|
|
if (ev.getStatus() < EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CHECK_CLAIM.getStatus()) { |
|
|
|
|
if (ev.getStatus() < EntrustStatusConstants.ENTRUST_STATUS_WAITING_CHECK_CLAIM.getStatus()) { |
|
|
|
|
throw new RuntimeException("委托不在可以生成确认书的状态"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2588,7 +2588,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
//如果文件不存在,则生成,否则直接从OSS中获取
|
|
|
|
|
//if (!ossFile.objectExist(pdfFilePath)) {
|
|
|
|
|
//这里加一个判断,由于贵阳市局的确认书需要在审核的时候就能打印出来,为了保证每一次生成的确认书都是委托单位提交过来的最新版,所以我们在审核通过之前,每一次生成委托书都应该重新生成,审核成功以后就不用再重新生成了
|
|
|
|
|
if (!ossFile.objectExist(downFile) || ev.getStatus() <= EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
if (!ossFile.objectExist(downFile) || ev.getStatus() <= EntrustStatusConstants.ENTRUST_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
|
|
|
|
|
if (this.generateIdentifyItemsBook(ev.getId())) { |
|
|
|
|
ossFile.fileGet(downFile, httpServletResponse.getOutputStream()); |
|
|
|
@ -2724,8 +2724,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
if (cj == null) { |
|
|
|
|
throw new RuntimeException(String.format("不存在 caseId 为 % 的案件", entrustment.getCaseId())); |
|
|
|
|
} |
|
|
|
|
entrustment.setStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()); // 初始状态为待提交
|
|
|
|
|
entrustment.setPreviousStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()); // 老的状态也为待提交
|
|
|
|
|
entrustment.setStatus(EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()); // 初始状态为待提交
|
|
|
|
|
entrustment.setPreviousStatus(EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()); // 老的状态也为待提交
|
|
|
|
|
List<UpdateInfo> pis = entrustment.getProcessInfo(); |
|
|
|
|
if (pis == null) { |
|
|
|
|
pis = new ArrayList<>(); |
|
|
|
@ -2758,8 +2758,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
return R.failed("这个委托的委托单位不是你的所属单位, 你无权删除!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus() || |
|
|
|
|
entrustment.getPreviousStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() != EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus() || |
|
|
|
|
entrustment.getPreviousStatus() != EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()) { |
|
|
|
|
return R.failed("这个委托已被提交过, 不能删除!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2913,25 +2913,25 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrustmentId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrustment.getStatus() == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
if (entrustment.getStatus() == EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()) { |
|
|
|
|
// 在创建人手中: 已创建, 等待提交
|
|
|
|
|
// return R.ok(this.taskAvailableUserList_Check());
|
|
|
|
|
return R.ok(commonFeignService.remoteGetUsersByPermission(CommonConstants.ORG_TREE_ROOT_ID, CollUtil.newArrayList("EntrustmentCheck"))); |
|
|
|
|
} else if (entrustment.getStatus() == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CHECK.getStatus()) { |
|
|
|
|
} else if (entrustment.getStatus() == EntrustStatusConstants.ENTRUST_STATUS_WAITING_CHECK.getStatus()) { |
|
|
|
|
// 在审核员手中: 已提交, 待审核
|
|
|
|
|
// return R.ok(this.taskAvailableUserList_Approve());
|
|
|
|
|
return R.ok(commonFeignService.remoteGetUsersByPermission(CommonConstants.ORG_TREE_ROOT_ID, CollUtil.newArrayList("EntrustmentApprove"))); |
|
|
|
|
} else if (entrustment.getStatus() == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_APPROVE.getStatus()) { |
|
|
|
|
} else if (entrustment.getStatus() == EntrustStatusConstants.ENTRUST_STATUS_WAITING_APPROVE.getStatus()) { |
|
|
|
|
// 在审批员手中: 已审核, 待审批
|
|
|
|
|
// return R.ok(this.taskAvailableUserList_Confirm(entrustment.getClientOrgId()));
|
|
|
|
|
return R.ok(commonFeignService.remoteGetUsersByPermission(entrustment.getClientOrgId(), CollUtil.newArrayList("EntrustmentConfirm"))); |
|
|
|
|
} else if (entrustment.getStatus() == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CONFIRM.getStatus()) { |
|
|
|
|
} else if (entrustment.getStatus() == EntrustStatusConstants.ENTRUST_STATUS_WAITING_CONFIRM.getStatus()) { |
|
|
|
|
// 在确认者手中: 已审批, 待确认
|
|
|
|
|
List<SysUser> users = new ArrayList<>(); |
|
|
|
|
SysUser submitter = remoteUserService.innerGetById(entrustment.getSubmitter()).getData(); |
|
|
|
|
users.add(submitter); |
|
|
|
|
return R.ok(users); |
|
|
|
|
} else if (entrustment.getStatus() == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_DELIVER.getStatus()) { |
|
|
|
|
} else if (entrustment.getStatus() == EntrustStatusConstants.ENTRUST_STATUS_WAITING_DELIVER.getStatus()) { |
|
|
|
|
// 在送检提交员(创建者)手中: 已确认, 待送检
|
|
|
|
|
// return R.ok(this.taskAvailableUserList_Accept());
|
|
|
|
|
return R.ok(commonFeignService.remoteGetUsersByPermission(CommonConstants.ORG_TREE_ROOT_ID, CollUtil.newArrayList("EntrustmentAccept"))); |
|
|
|
@ -3029,8 +3029,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
|
|
|
|
|
caseEventService.save(caseEvent); |
|
|
|
|
|
|
|
|
|
entrustmentDTO.setStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()); // 初始状态为待提交
|
|
|
|
|
entrustmentDTO.setPreviousStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()); // 老的状态也为待提交
|
|
|
|
|
entrustmentDTO.setStatus(EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()); // 初始状态为待提交
|
|
|
|
|
entrustmentDTO.setPreviousStatus(EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus()); // 老的状态也为待提交
|
|
|
|
|
List<UpdateInfo> pis = entrustmentDTO.getProcessInfo(); |
|
|
|
|
if (pis == null) { |
|
|
|
|
pis = new ArrayList<>(); |
|
|
|
@ -3079,15 +3079,15 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
// 根据状态进行分组
|
|
|
|
|
Map<Integer, List<Entrustment>> entrustGroupByStatusMap = entrustList.stream().collect(Collectors.groupingBy(Entrustment::getStatus)); |
|
|
|
|
|
|
|
|
|
markersVOS.add(new MarkersVO("案件委托", entrustGroupByStatusMap.getOrDefault(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus(), Collections.EMPTY_LIST).size(), "待提交")); |
|
|
|
|
markersVOS.add(new MarkersVO("案件委托", entrustGroupByStatusMap.getOrDefault(EntrustStatusConstants.ENTRUST_STATUS_CREATED.getStatus(), Collections.EMPTY_LIST).size(), "待提交")); |
|
|
|
|
|
|
|
|
|
int deliverCount = entrustGroupByStatusMap.getOrDefault(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_DELIVER.getStatus(), Collections.EMPTY_LIST).size() |
|
|
|
|
+ entrustGroupByStatusMap.getOrDefault(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CONFIRM.getStatus(), Collections.EMPTY_LIST).size(); |
|
|
|
|
int deliverCount = entrustGroupByStatusMap.getOrDefault(EntrustStatusConstants.ENTRUST_STATUS_WAITING_DELIVER.getStatus(), Collections.EMPTY_LIST).size() |
|
|
|
|
+ entrustGroupByStatusMap.getOrDefault(EntrustStatusConstants.ENTRUST_STATUS_WAITING_CONFIRM.getStatus(), Collections.EMPTY_LIST).size(); |
|
|
|
|
markersVOS.add(new MarkersVO("案件委托", deliverCount, "待送检")); |
|
|
|
|
|
|
|
|
|
markersVOS.add(new MarkersVO("案件委托", entrustList.stream().filter(entrust -> entrust.getReturnOrNot() != null &&entrust.getReturnOrNot().equals(-1)).collect(Collectors.toList()).size(), "已退回")); |
|
|
|
|
|
|
|
|
|
markersVOS.add(new MarkersVO("案件委托", entrustGroupByStatusMap.getOrDefault(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_COMPLETED.getStatus(), Collections.EMPTY_LIST).size(), "已完成")); |
|
|
|
|
markersVOS.add(new MarkersVO("案件委托", entrustGroupByStatusMap.getOrDefault(EntrustStatusConstants.ENTRUST_STATUS_COMPLETED.getStatus(), Collections.EMPTY_LIST).size(), "已完成")); |
|
|
|
|
|
|
|
|
|
Integer entrustAlterApplyCount = (int) entrustAlterApplyService.count(Wrappers.<EntrustAlterApply>lambdaQuery() |
|
|
|
|
.eq(EntrustAlterApply::getStatus, EntrustAlterApplyStatus.APPLY_SUCCESS.getStatus()) |
|
|
|
@ -3273,29 +3273,29 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
|
|
|
|
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, |
|
|
|
|
entrustListMap.getOrDefault( |
|
|
|
|
StrUtil.join("_", EntrustMarkConstants.LOCAL_SYSTEM, EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()), |
|
|
|
|
StrUtil.join("_", EntrustMarkConstants.LOCAL_SYSTEM, EntrustStatusConstants.ENTRUST_STATUS_WAITING_ACCEPT.getStatus()), |
|
|
|
|
Collections.EMPTY_LIST |
|
|
|
|
).size(), |
|
|
|
|
String.format("待受理(%s)", EntrustMarkConstants.PUBLIC_SECURITY_BUREAU))); |
|
|
|
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, |
|
|
|
|
entrustListMap.getOrDefault( |
|
|
|
|
StrUtil.join("_", EntrustMarkConstants.THIRD_PARTY_SYSTEM, EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()), |
|
|
|
|
StrUtil.join("_", EntrustMarkConstants.THIRD_PARTY_SYSTEM, EntrustStatusConstants.ENTRUST_STATUS_WAITING_ACCEPT.getStatus()), |
|
|
|
|
Collections.EMPTY_LIST |
|
|
|
|
).size(), |
|
|
|
|
"待受理 (大数据平台)")); |
|
|
|
|
List<Entrustment> entrustListMapOrDefault = entrustListMap.getOrDefault( |
|
|
|
|
StrUtil.join("_", EntrustMarkConstants.LOCAL_SYSTEM, EntrustmentStatusConstants.ENTRUSTMENT_STATUS_ACCEPTED.getStatus()), Collections.EMPTY_LIST |
|
|
|
|
StrUtil.join("_", EntrustMarkConstants.LOCAL_SYSTEM, EntrustStatusConstants.ENTRUST_STATUS_ACCEPTED.getStatus()), Collections.EMPTY_LIST |
|
|
|
|
); |
|
|
|
|
// o.getAcceptTime().isAfter(LocalDateTime.of(LocalDate.now().withDayOfYear(1), LocalTime.MIN)) 筛选出当年的数据
|
|
|
|
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, |
|
|
|
|
entrustListMapOrDefault.stream().filter(o -> |
|
|
|
|
o.getAcceptTime().isAfter(LocalDateTime.of(LocalDate.now().withDayOfYear(1), LocalTime.MIN)) |
|
|
|
|
&& EntrustmentStatusConstants.geAcceptedStatus(o.getStatus()) |
|
|
|
|
&& EntrustStatusConstants.geAcceptedStatus(o.getStatus()) |
|
|
|
|
).collect(Collectors.toList()).size(), |
|
|
|
|
String.format("已受理 (%s)", EntrustMarkConstants.PUBLIC_SECURITY_BUREAU))); |
|
|
|
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, |
|
|
|
|
entrustListMap.getOrDefault( |
|
|
|
|
StrUtil.join("_", EntrustMarkConstants.THIRD_PARTY_SYSTEM, EntrustmentStatusConstants.ENTRUSTMENT_STATUS_ACCEPTED.getStatus()), Collections.EMPTY_LIST |
|
|
|
|
StrUtil.join("_", EntrustMarkConstants.THIRD_PARTY_SYSTEM, EntrustStatusConstants.ENTRUST_STATUS_ACCEPTED.getStatus()), Collections.EMPTY_LIST |
|
|
|
|
).size(), |
|
|
|
|
"已受理 (大数据平台)")); |
|
|
|
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, |
|
|
|
@ -3303,7 +3303,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
.stream() |
|
|
|
|
.filter(o -> |
|
|
|
|
o.getAcceptTime().isAfter(LocalDateTime.of(LocalDate.now().withDayOfYear(1), LocalTime.MIN)) |
|
|
|
|
&& EntrustmentStatusConstants.geAcceptedStatus(o.getStatus()) |
|
|
|
|
&& EntrustStatusConstants.geAcceptedStatus(o.getStatus()) |
|
|
|
|
) |
|
|
|
|
.collect(Collectors.toList()) |
|
|
|
|
.size(), |
|
|
|
@ -3349,7 +3349,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
public List<EntrustmentIdentificationMaterial> getAllSampleForPrint() { |
|
|
|
|
List<EntrustmentIdentificationMaterial> entrustmentIdentificationMaterials = new ArrayList<>(); |
|
|
|
|
List<Entrustment> entrustmentList = this.list(Wrappers.<Entrustment>lambdaQuery() |
|
|
|
|
.ge(Entrustment::getStatus, EntrustmentStatusConstants.ENTRUSTMENT_STATUS_ACCEPTED) |
|
|
|
|
.ge(Entrustment::getStatus, EntrustStatusConstants.ENTRUST_STATUS_ACCEPTED) |
|
|
|
|
.orderByAsc(Entrustment::getAcceptNo)); |
|
|
|
|
|
|
|
|
|
for (Entrustment entrustment : entrustmentList) { |
|
|
|
|