10.9开发合并 #40
@@ -26,4 +26,6 @@ public class RegisterController {
|
||||
public AjaxResult createDocument(@Validated @RequestBody PersonRegisterVO personRegisterVO) {
|
||||
return signRegisterService.registerPerson(personRegisterVO);
|
||||
}
|
||||
// @PostMapping("/registerEnterprise")
|
||||
// public AjaxResult
|
||||
}
|
||||
|
||||
+18
-10
@@ -11,6 +11,7 @@ import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import org.apache.poi.xwpf.usermodel.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mail.MailSendException;
|
||||
@@ -44,7 +45,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
@Autowired
|
||||
private EmailOutUtil emailOutUtil;
|
||||
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
@Override
|
||||
public AjaxResult createDocument(CaseApplication caseApplication) {
|
||||
try {
|
||||
@@ -123,14 +125,18 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
datas.put("arbitratorName2", secondName);
|
||||
}
|
||||
LocalDate now = LocalDate.now();
|
||||
datas.put("year", now.getYear());
|
||||
datas.put("months", now.getMonthValue());
|
||||
datas.put("day", now.getDayOfMonth());
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
datas.put("year", year);
|
||||
datas.put("months", month);
|
||||
datas.put("day", day);
|
||||
String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
||||
//String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
||||
String saveFolderPath = "/data/arbitrate-document/formal/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" +year + "/" + month + "/" + day;
|
||||
//String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||
String saveName = "/profile/upload/"+year + "/" + month + "/" + day +"/" +fileName;
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
@@ -141,14 +147,15 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
Path destinationPath = new File(resultFilePath).toPath();
|
||||
Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
|
||||
String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
|
||||
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
//将裁决书保存到附件表里
|
||||
CaseAttach caseAttach = CaseAttach.builder()
|
||||
.caseAppliId(id)
|
||||
.annexName(fileName)
|
||||
.annexPath(docFilePath)
|
||||
.annexName(saveName)
|
||||
.annexPath(savePath)
|
||||
.annexType(3)
|
||||
.build();
|
||||
int i = caseAttachMapper.save(caseAttach);
|
||||
@@ -180,10 +187,11 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
//根据案件id查询裁决书
|
||||
try {
|
||||
List<File> fileList = new ArrayList<>();
|
||||
List<CaseAttach> caseAttachList = caseAttachMapper.queryAnnexPathByCaseId(id);
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
|
||||
List<CaseAttach> caseAttachList = caseApplication2.getCaseAttachList();
|
||||
if (caseAttachList!=null&& caseAttachList.size()>0){
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
if (caseAttach.getAnnexType() == 3) {
|
||||
if (caseAttach.getAnnexType() == 3){
|
||||
String annexPath = caseAttach.getAnnexPath();
|
||||
fileList.add(new File(annexPath));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user