|
|
|
@ -987,7 +987,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
if (!ossFile.objectExist(retBookName)) { |
|
|
|
|
if (!ossFile.objectExist(retBookName) || entrustment.getStatus() < EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
//不存在就生成一个
|
|
|
|
|
if ((whatBook.equals("identItemBook") || whatBook.equals("identfyBook")) && this.generateIdentifyItemsBook(entrustId)) { |
|
|
|
|
return retBookName; |
|
|
|
@ -2083,8 +2083,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru |
|
|
|
|
// 转换临时目录中的 word 文档为 PDF
|
|
|
|
|
String pdfFilePath = OSSDirectoryConstants.DOCUMENT_ENTRUSTMENT_DIRECTORY + "/" + ev.getId() + "/" + entrustmentLetterFileName + ".docx"; |
|
|
|
|
try { |
|
|
|
|
//这里加一下判断条件,由于贵阳市局这里的情况是审核的时候就需要查看委托书,所以为了保证每一次提交过来的委托都是最新的,所以在审核通过以前应该每次查看都是重新生成
|
|
|
|
|
if (!ossFile.objectExist(pdfFilePath) || ev.getStatus() < EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CONFIRM.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_CONFIRM.getStatus()) { |
|
|
|
|
if (!ossFile.objectExist(downFile) || ev.getStatus() < EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_ACCEPT.getStatus()) { |
|
|
|
|
|
|
|
|
|
if (this.generateIdentifyItemsBook(ev.getId())) { |
|
|
|
|
ossFile.fileGet(downFile, httpServletResponse.getOutputStream()); |
|
|
|
|