|
|
|
@ -987,7 +987,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() <= EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
//不存在就生成一个
|
|
|
|
|
if ((whatBook.equals("identItemBook") || whatBook.equals("identfyBook")) && this.generateIdentifyItemsBook(entrustId)) { |
|
|
|
|
return retBookName; |
|
|
|
@ -1546,26 +1546,26 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
// 审核任务已经提交了, 转到新的环节
|
|
|
|
|
int newStatus = -1; // 新的状态(环节)
|
|
|
|
|
String currentAcceptNo = ""; |
|
|
|
|
{ |
|
|
|
|
newStatus = ProcessFlowMapper.getNextStatus(entrustment.getStatus(), opCode); |
|
|
|
|
|
|
|
|
|
if (opCode == 1 && StrUtil.isBlank(entrustment.getAcceptNo())) { |
|
|
|
|
// 20250114 贵阳需求,审核通过后就生成受理编号
|
|
|
|
|
String yearStr = String.valueOf(LocalDateTime.now().getYear()); |
|
|
|
|
String maxEntrustAcceptNo = baseMapper.getMaxEntrustAcceptNo(yearStr); |
|
|
|
|
currentAcceptNo = yearStr + "-" + (StrUtil.isBlank(maxEntrustAcceptNo) ? "1" : (Integer.parseInt(maxEntrustAcceptNo) + 1)); |
|
|
|
|
} |
|
|
|
|
newStatus = ProcessFlowMapper.getNextStatus(entrustment.getStatus(), opCode); |
|
|
|
|
|
|
|
|
|
if (newStatus == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
EntrustmentIdentificationMaterial im = new EntrustmentIdentificationMaterial(); |
|
|
|
|
im.setCheckPassed(0); |
|
|
|
|
im.setApprovePassed(0); |
|
|
|
|
im.setAcceptPassed(0); |
|
|
|
|
im.setAcceptNo(null); |
|
|
|
|
entrustmentIdentificationMaterialService.setEntrustmentIdentificationMaterialStatusByEntrustment(im, entrustment.getId()); |
|
|
|
|
} |
|
|
|
|
if (opCode == 1 && StrUtil.isBlank(entrustment.getAcceptNo())) { |
|
|
|
|
// 20250114 贵阳需求,审核通过后就生成受理编号
|
|
|
|
|
String yearStr = String.valueOf(LocalDateTime.now().getYear()); |
|
|
|
|
String maxEntrustAcceptNo = baseMapper.getMaxEntrustAcceptNo(yearStr); |
|
|
|
|
currentAcceptNo = yearStr + "-" + (StrUtil.isBlank(maxEntrustAcceptNo) ? "1" : (Integer.parseInt(maxEntrustAcceptNo) + 1)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (newStatus == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) { |
|
|
|
|
EntrustmentIdentificationMaterial im = new EntrustmentIdentificationMaterial(); |
|
|
|
|
im.setCheckPassed(0); |
|
|
|
|
im.setApprovePassed(0); |
|
|
|
|
im.setAcceptPassed(0); |
|
|
|
|
im.setAcceptNo(null); |
|
|
|
|
entrustmentIdentificationMaterialService.setEntrustmentIdentificationMaterialStatusByEntrustment(im, entrustment.getId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//退回后需标记
|
|
|
|
|
if (opCode == -1) { |
|
|
|
|
entrustment.setReturnOrNot(-1); |
|
|
|
@ -2084,7 +2084,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() <= EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
GenerateEntrustmentLetterPDF(ev); |
|
|
|
|
return pdfFilePath; |
|
|
|
|
} |
|
|
|
@ -2620,7 +2620,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() <= EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
|
|
|
|
|
if (this.generateIdentifyItemsBook(ev.getId())) { |
|
|
|
|
ossFile.fileGet(downFile, httpServletResponse.getOutputStream()); |
|
|
|
|