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