Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #25.
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
|||||||
|
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/adjudication")
|
||||||
|
public class AdjudicationController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IAdjudicationService adjudicationService;
|
||||||
|
@PostMapping("/document")
|
||||||
|
public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
|
||||||
|
return adjudicationService.createDocument(caseApplication);
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
-11
@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.wisdomarbitrate;
|
|||||||
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -15,27 +16,24 @@ public class CaseArbitrateController extends BaseController {
|
|||||||
private ICaseArbitrateService caseArbitrateService;
|
private ICaseArbitrateService caseArbitrateService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确定仲裁方式
|
* 审核仲裁方式
|
||||||
* @param caseApplication
|
* @param caseApplication
|
||||||
* @param arbitratMethod
|
* @param opinion 1同意,0拒绝
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PutMapping("/method")
|
@PutMapping("/method")
|
||||||
public AjaxResult chooseArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
|
public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
|
||||||
,Integer arbitratMethod){
|
,Integer opinion){
|
||||||
return caseArbitrateService.chooseArbitrateMethod(caseApplication,arbitratMethod);
|
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 书面审理
|
* 书面审理
|
||||||
* @param caseApplication
|
* @param arbitrateRecord
|
||||||
* @param accidentDescription
|
|
||||||
* @param arbitrationResult
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/writtenHear")
|
@PostMapping("/writtenHear")
|
||||||
public AjaxResult writtenHear(@Validated @RequestBody CaseApplication caseApplication
|
public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
|
||||||
,String accidentDescription , String arbitrationResult){
|
return caseArbitrateService.writtenHear(arbitrateRecord);
|
||||||
return caseArbitrateService.writtenHear(caseApplication,accidentDescription,arbitrationResult);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
@@ -4,6 +4,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -78,4 +79,14 @@ public class CaseEvidenceController extends BaseController {
|
|||||||
public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication){
|
public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication){
|
||||||
return caseEvidenceService.evidenceConfirmation(caseApplication);
|
return caseEvidenceService.evidenceConfirmation(caseApplication);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件质证
|
||||||
|
* @param caseEvidenceDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/crossexami")
|
||||||
|
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO){
|
||||||
|
return caseEvidenceService.caseCrossexamination(caseEvidenceDTO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,8 +143,8 @@ elegent:
|
|||||||
alipay:
|
alipay:
|
||||||
appId: 2021003141676135
|
appId: 2021003141676135
|
||||||
callback:
|
callback:
|
||||||
domain: http://121.40.189.20:9000/
|
domain: http://121.40.189.20:9001/
|
||||||
watch: false
|
watch: true
|
||||||
cycle: 10
|
cycle: 10
|
||||||
identityAuthentication:
|
identityAuthentication:
|
||||||
credentialSecretId: 123
|
credentialSecretId: 123
|
||||||
|
|||||||
@@ -145,6 +145,12 @@
|
|||||||
<version>3.1.701</version>
|
<version>3.1.701</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- poi-tl-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.deepoove</groupId>
|
||||||
|
<artifactId>poi-tl</artifactId>
|
||||||
|
<version>1.9.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -74,12 +74,4 @@ public class SmsUtils {
|
|||||||
private String[] templateParamSet;
|
private String[] templateParamSet;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SendSmsRequest sendSmsRequest = new SendSmsRequest();
|
|
||||||
sendSmsRequest.setPhone("18792613219");
|
|
||||||
sendSmsRequest.setTemplateId("1928003");
|
|
||||||
sendSmsRequest.setTemplateParamSet(new String[]{"xxx","仲裁","编号"});
|
|
||||||
SmsUtils.sendSms(sendSmsRequest);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,157 @@
|
|||||||
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
|
||||||
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
|
import com.deepoove.poi.config.Configure;
|
||||||
|
import com.deepoove.poi.data.*;
|
||||||
|
import com.deepoove.poi.data.style.ParagraphStyle;
|
||||||
|
import com.deepoove.poi.data.style.Style;
|
||||||
|
import com.deepoove.poi.util.PoitlIOUtils;
|
||||||
|
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.BufferedOutputStream;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: ymbgy
|
||||||
|
* @Date: 2022-09-21 13:26
|
||||||
|
*/
|
||||||
|
public class WordUtil {
|
||||||
|
|
||||||
|
private CellRenderData cell;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生成的word文件流
|
||||||
|
*
|
||||||
|
* @param response
|
||||||
|
* @param datas
|
||||||
|
* @param modalFilePath
|
||||||
|
* @param resultFilePath
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public static void getDocStreamFile(HttpServletResponse response, Map<String, Object> datas, String modalFilePath, String resultFilePath, String fileName) throws IOException {
|
||||||
|
//获取word模板和填充数据
|
||||||
|
XWPFTemplate template = XWPFTemplate.compile(modalFilePath).render(datas);
|
||||||
|
//设置返回类型及文件名
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename=\"" + fileName + "\"");
|
||||||
|
//获取返回输出流
|
||||||
|
OutputStream out = response.getOutputStream();
|
||||||
|
BufferedOutputStream bos = new BufferedOutputStream(out);
|
||||||
|
template.write(bos);
|
||||||
|
bos.flush();
|
||||||
|
out.flush();
|
||||||
|
PoitlIOUtils.closeQuietlyMulti(template, bos, out);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生成的word文件路径
|
||||||
|
*
|
||||||
|
* @param datas
|
||||||
|
* @param modalFilePath
|
||||||
|
* @param resultFilePath
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public static String getDocFilePath(Map<String, Object> datas, String modalFilePath, String resultFilePath) throws IOException {
|
||||||
|
//获取word模板和填充数据
|
||||||
|
XWPFTemplate template = XWPFTemplate.compile(modalFilePath).render(datas);
|
||||||
|
template.writeAndClose(new FileOutputStream(resultFilePath));
|
||||||
|
return resultFilePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造绘制表格的方法
|
||||||
|
*/
|
||||||
|
public static TableRenderData rebuildWordTableData(List<String> headerList, String headerBackgroundColor, String textColor, List<List<String>> tableContentList) {
|
||||||
|
RowRenderData header = rebuildWordTableHead(headerList, headerBackgroundColor, textColor);
|
||||||
|
List<RowRenderData> content = rebuildWordTableContent(tableContentList);
|
||||||
|
TableRenderData tableRenderData = Tables.create().addRow(header);
|
||||||
|
for (int i = 0; content != null && i < content.size(); i++) {
|
||||||
|
tableRenderData.addRow(content.get(i));
|
||||||
|
}
|
||||||
|
return tableRenderData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造表格表头
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static RowRenderData rebuildWordTableHead(List<String> headerList, String headerBackgroundColor, String textColor) {
|
||||||
|
RowRenderData header = new RowRenderData();
|
||||||
|
for (int i = 0; headerList != null && i < headerList.size(); i++) {
|
||||||
|
CellRenderData cellRenderData = new CellRenderData();
|
||||||
|
ParagraphRenderData paragraphRenderData = new ParagraphRenderData();
|
||||||
|
Style style = new Style();
|
||||||
|
style.setColor(textColor);
|
||||||
|
style.setFontSize(12.0);
|
||||||
|
ParagraphStyle paragraphStyle = ParagraphStyle.builder()
|
||||||
|
.withAlign(ParagraphAlignment.CENTER)
|
||||||
|
// .withBackgroundColor(headerBackgroundColor)
|
||||||
|
.withDefaultTextStyle(style)
|
||||||
|
.build();
|
||||||
|
paragraphRenderData.addText(headerList.get(i));
|
||||||
|
paragraphRenderData.setParagraphStyle(paragraphStyle);
|
||||||
|
cellRenderData.addParagraph(paragraphRenderData);
|
||||||
|
header.addCell(cellRenderData);
|
||||||
|
}
|
||||||
|
return header;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造表格内容
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<RowRenderData> rebuildWordTableContent(List<List<String>> tableContentList) {
|
||||||
|
List<RowRenderData> rowContentList = new ArrayList<>();
|
||||||
|
for (int i = 0; tableContentList != null && i < tableContentList.size(); i++) {
|
||||||
|
List<String> rowdataList = tableContentList.get(i);
|
||||||
|
RowRenderData rowcontent = new RowRenderData();
|
||||||
|
for (int j = 0; rowdataList != null && j < rowdataList.size(); j++) {
|
||||||
|
CellRenderData cellRenderData = new CellRenderData();
|
||||||
|
ParagraphRenderData paragraphRenderData = new ParagraphRenderData();
|
||||||
|
Style style = new Style();
|
||||||
|
style.setFontSize(12.0);
|
||||||
|
ParagraphStyle paragraphStyle = ParagraphStyle.builder()
|
||||||
|
.withAlign(ParagraphAlignment.CENTER)
|
||||||
|
.withDefaultTextStyle(style)
|
||||||
|
.build();
|
||||||
|
paragraphRenderData.addText(rowdataList.get(j));
|
||||||
|
paragraphRenderData.setParagraphStyle(paragraphStyle);
|
||||||
|
cellRenderData.addParagraph(paragraphRenderData);
|
||||||
|
rowcontent.addCell(cellRenderData);
|
||||||
|
}
|
||||||
|
rowContentList.add(rowcontent);
|
||||||
|
}
|
||||||
|
return rowContentList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建图片内容
|
||||||
|
*/
|
||||||
|
public static PictureRenderData rebuildImageContent(Integer with, Integer height, String imageUrl, String relatedPath, Byte[] imageBytes) {
|
||||||
|
PictureRenderData pictureRenderData = null;
|
||||||
|
if (!StringUtils.isBlank(imageUrl)) {
|
||||||
|
// pictureRenderData = Pictures.of(imageUrl).size(with, height).create();
|
||||||
|
//Pictures.PictureBuilder pictureBuilder = Pictures.of("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png");
|
||||||
|
}else if (!StringUtils.isBlank(relatedPath)) {
|
||||||
|
pictureRenderData = Pictures.ofLocal(relatedPath).size(with,height).create();
|
||||||
|
// Pictures.PictureBuilder pictureBuilder = Pictures.of("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png");
|
||||||
|
}
|
||||||
|
return pictureRenderData;
|
||||||
|
}
|
||||||
|
public static String getResultFilePath(Map<String, Object> datas, Configure config, String modalFilePath, String resultFilePath) throws IOException {
|
||||||
|
//获取word模板和填充数据
|
||||||
|
XWPFTemplate template = XWPFTemplate.compile(modalFilePath,config).render(datas);
|
||||||
|
template.writeAndClose(new FileOutputStream(resultFilePath));
|
||||||
|
return resultFilePath;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Adjudication {
|
||||||
|
/**
|
||||||
|
* 申请人姓名
|
||||||
|
*/
|
||||||
|
private String appName;
|
||||||
|
/**
|
||||||
|
* 申请人性别
|
||||||
|
*/
|
||||||
|
private String appSex;
|
||||||
|
/**
|
||||||
|
* 申请人身份证号码
|
||||||
|
*/
|
||||||
|
private String appIDNo;
|
||||||
|
/**
|
||||||
|
* 申请人住所
|
||||||
|
*/
|
||||||
|
private String appAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人代理人姓名
|
||||||
|
*/
|
||||||
|
private String appAgentName;
|
||||||
|
/**
|
||||||
|
* 申请人代理人身份证
|
||||||
|
*/
|
||||||
|
private String appAgentIDNo;
|
||||||
|
/**
|
||||||
|
* 被申请人姓名
|
||||||
|
*/
|
||||||
|
private String resName;
|
||||||
|
/**
|
||||||
|
* 被申请人性别
|
||||||
|
*/
|
||||||
|
private String resSex;
|
||||||
|
/**
|
||||||
|
* 被申请人身份证号码
|
||||||
|
*/
|
||||||
|
private String resIDNo;
|
||||||
|
/**
|
||||||
|
* 被申请人住所
|
||||||
|
*/
|
||||||
|
private String resAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被申请人代理人姓名
|
||||||
|
*/
|
||||||
|
private String resAgentName;
|
||||||
|
/**
|
||||||
|
* 被申请人代理人身份证
|
||||||
|
*/
|
||||||
|
private String resAgentIDNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件名称
|
||||||
|
*/
|
||||||
|
private String caseName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仲裁员名称
|
||||||
|
*/
|
||||||
|
private String arbitratorName;
|
||||||
|
/**
|
||||||
|
* 开庭年
|
||||||
|
*/
|
||||||
|
private String hearYear;
|
||||||
|
/**
|
||||||
|
* 开庭月
|
||||||
|
*/
|
||||||
|
private String hearMonths;
|
||||||
|
/**
|
||||||
|
* 开庭日
|
||||||
|
*/
|
||||||
|
private String hearDay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人具体仲裁请求
|
||||||
|
*/
|
||||||
|
private String appArbitrationClaims;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人证据名称
|
||||||
|
*/
|
||||||
|
private String appEvidenceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人拟证事实
|
||||||
|
*/
|
||||||
|
private String appProveFacts;
|
||||||
|
/**
|
||||||
|
* 被申请人对申请人答辩内容
|
||||||
|
*/
|
||||||
|
private String resDefenseContentToApp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被申请人具体仲裁请求
|
||||||
|
*/
|
||||||
|
private String resArbitrationClaims;
|
||||||
|
/**
|
||||||
|
* 被申请人证据名称
|
||||||
|
*/
|
||||||
|
private String resEvidenceName;
|
||||||
|
/**
|
||||||
|
* 被申请人拟证事实
|
||||||
|
*/
|
||||||
|
private String resProveFacts;
|
||||||
|
/**
|
||||||
|
* 申请人对被申请人答辩内容
|
||||||
|
*/
|
||||||
|
private String appDefenseContentToRes;
|
||||||
|
/**
|
||||||
|
* 第三人答辩内容
|
||||||
|
*/
|
||||||
|
private String thirdDefenseContent;
|
||||||
|
/**
|
||||||
|
* 第三人证据名称
|
||||||
|
*/
|
||||||
|
private String thirdEvidenceName;
|
||||||
|
/**
|
||||||
|
* 第三人拟证事实
|
||||||
|
*/
|
||||||
|
private String thirdProveFacts;
|
||||||
|
/**
|
||||||
|
* 申请人对第三人答辩内容
|
||||||
|
*/
|
||||||
|
private String appDefenseContentToThird;
|
||||||
|
/**
|
||||||
|
* 被申请人对第三人答辩内容
|
||||||
|
*/
|
||||||
|
private String resDefenseContentToThird;
|
||||||
|
/**
|
||||||
|
* 证据认定
|
||||||
|
*/
|
||||||
|
private String evidenDetermi;
|
||||||
|
/**
|
||||||
|
* 认定事实
|
||||||
|
*/
|
||||||
|
private String factDetermi;
|
||||||
|
/**
|
||||||
|
* 综上所述
|
||||||
|
*/
|
||||||
|
private String caseSketch;
|
||||||
|
/**
|
||||||
|
* 本庭认为
|
||||||
|
*/
|
||||||
|
private String arbitrateThink;
|
||||||
|
/**
|
||||||
|
* 裁决如下
|
||||||
|
*/
|
||||||
|
private String rulingFollows;
|
||||||
|
/**
|
||||||
|
* 法律条款
|
||||||
|
*/
|
||||||
|
private String legalProvisions;
|
||||||
|
/**
|
||||||
|
* 首席仲裁
|
||||||
|
*/
|
||||||
|
private String umpire;
|
||||||
|
/**
|
||||||
|
* 仲裁员1
|
||||||
|
*/
|
||||||
|
private String arbitratorName1;
|
||||||
|
/**
|
||||||
|
* 仲裁员2
|
||||||
|
*/
|
||||||
|
private String arbitratorName2;
|
||||||
|
/**
|
||||||
|
* 年
|
||||||
|
*/
|
||||||
|
private String year;
|
||||||
|
/**
|
||||||
|
* 月
|
||||||
|
*/
|
||||||
|
private String months;
|
||||||
|
/**
|
||||||
|
* 日
|
||||||
|
*/
|
||||||
|
private String day;
|
||||||
|
/**
|
||||||
|
* 书记员
|
||||||
|
*/
|
||||||
|
private String clerk;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -26,7 +26,7 @@ public class ArbitrateRecord extends BaseEntity {
|
|||||||
/** 审核裁决书意见 */
|
/** 审核裁决书意见 */
|
||||||
private String checkOpinion;
|
private String checkOpinion;
|
||||||
/** 裁决书附件id */
|
/** 裁决书附件id */
|
||||||
private Long annexId;
|
private Integer annexId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.domain.dto;
|
||||||
|
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件质证传入对象
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CaseEvidenceDTO {
|
||||||
|
/**
|
||||||
|
* 案件id
|
||||||
|
*/
|
||||||
|
private Long caseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有异议需要举证,1是,0否
|
||||||
|
*/
|
||||||
|
private Integer objectionAddEviden;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否需要开庭审理,1是,0否
|
||||||
|
*/
|
||||||
|
private Integer openCourtHear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否指派仲裁员,1是,2否
|
||||||
|
*/
|
||||||
|
private Integer pendingAppointArbotrar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件仲裁员
|
||||||
|
*/
|
||||||
|
private List<Arbitrator> arbitrators;
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ package com.ruoyi.wisdomarbitrate.domain.dto;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
/**
|
/**
|
||||||
* 案件缴费传入参数
|
* 案件缴费传入对象
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class CasePayDTO {
|
public class CasePayDTO {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
|
||||||
|
public interface IAdjudicationService {
|
||||||
|
AjaxResult createDocument(CaseApplication caseApplication);
|
||||||
|
}
|
||||||
+5
-2
@@ -1,10 +1,13 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service;
|
package com.ruoyi.wisdomarbitrate.service;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
|
||||||
public interface ICaseArbitrateService {
|
public interface ICaseArbitrateService {
|
||||||
AjaxResult chooseArbitrateMethod(CaseApplication caseApplication,Integer arbitratMethod);
|
|
||||||
|
|
||||||
AjaxResult writtenHear(CaseApplication caseApplication, String accidentDescription, String arbitrationResult);
|
|
||||||
|
AjaxResult writtenHear(ArbitrateRecord arbitrateRecord);
|
||||||
|
|
||||||
|
AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service;
|
|||||||
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@@ -18,4 +19,5 @@ public interface ICaseEvidenceService {
|
|||||||
|
|
||||||
AjaxResult evidenceConfirmation(CaseApplication caseApplication);
|
AjaxResult evidenceConfirmation(CaseApplication caseApplication);
|
||||||
|
|
||||||
|
AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO);
|
||||||
}
|
}
|
||||||
|
|||||||
+150
@@ -0,0 +1,150 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||||
|
|
||||||
|
import com.deepoove.poi.config.Configure;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.WordUtil;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||||
|
import com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper;
|
||||||
|
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 org.apache.poi.xwpf.usermodel.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.StandardCopyOption;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||||
|
@Autowired
|
||||||
|
private CaseApplicationMapper caseApplicationMapper;
|
||||||
|
@Autowired
|
||||||
|
private CaseAffiliateMapper caseAffiliateMapper;
|
||||||
|
@Autowired
|
||||||
|
private ArbitrateRecordMapper arbitrateRecordMapper;
|
||||||
|
@Autowired
|
||||||
|
private CaseAttachMapper caseAttachMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult createDocument(CaseApplication caseApplication) {
|
||||||
|
try {
|
||||||
|
Map<String, Object> datas = new HashMap<>();
|
||||||
|
Adjudication adjudication = new Adjudication();
|
||||||
|
Long id = caseApplication.getId();
|
||||||
|
if (id == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
//获取案件详细信息
|
||||||
|
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
|
//获取仲裁记录表里的相关信息
|
||||||
|
ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
|
||||||
|
arbitrateRecord.setCaseAppliId(id);
|
||||||
|
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||||
|
|
||||||
|
//获取案件关联人信息
|
||||||
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||||
|
caseAffiliate.setCaseAppliId(id);
|
||||||
|
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||||
|
if (caseAffiliates != null && caseAffiliates.size() > 0){
|
||||||
|
for (CaseAffiliate affiliate : caseAffiliates){
|
||||||
|
//获取身份类型
|
||||||
|
int identityType = affiliate.getIdentityType();
|
||||||
|
if (identityType == 1) { //申请人
|
||||||
|
datas.put("appName", affiliate.getName());
|
||||||
|
datas.put("appSex", null);
|
||||||
|
datas.put("appIDNo", affiliate.getIdentityNum());
|
||||||
|
datas.put("appAddress", affiliate.getContactAddress());
|
||||||
|
datas.put("appAgentName", affiliate.getNameAgent());
|
||||||
|
datas.put("appAgentIDNo",affiliate.getIdentityNumAgent());
|
||||||
|
}else if (identityType == 2){ //被申请人
|
||||||
|
datas.put("resName", affiliate.getName());
|
||||||
|
datas.put("resSex", null);
|
||||||
|
datas.put("resIDNo", affiliate.getIdentityNum());
|
||||||
|
datas.put("resAddress", affiliate.getContactAddress());
|
||||||
|
datas.put("resAgentName", affiliate.getNameAgent());
|
||||||
|
datas.put("resAgentIDNo",affiliate.getIdentityNumAgent());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String arbitratorName = caseApplication1.getArbitratorName();
|
||||||
|
datas.put("caseName",caseApplication1.getCaseName());
|
||||||
|
datas.put("arbitratorName",arbitratorName);
|
||||||
|
LocalDate localDate = caseApplication1.getHearDate()
|
||||||
|
.toInstant()
|
||||||
|
.atZone(ZoneId.systemDefault())
|
||||||
|
.toLocalDate();
|
||||||
|
datas.put("hearYear", localDate.getYear());
|
||||||
|
datas.put("hearMonths", localDate.getMonthValue());
|
||||||
|
datas.put("hearDay", localDate.getDayOfMonth());
|
||||||
|
datas.put("appArbitrationClaims", null);
|
||||||
|
datas.put("appEvidenceName", null);
|
||||||
|
datas.put("appProveFacts", null);
|
||||||
|
datas.put("resDefenseContentToApp", null);
|
||||||
|
datas.put("resArbitrationClaims", null);
|
||||||
|
datas.put("resEvidenceName", null);
|
||||||
|
datas.put("resProveFacts", null);
|
||||||
|
datas.put("appDefenseContentToRes", null);
|
||||||
|
datas.put("evidenDetermi", arbitrateRecord1.getEvidenDetermi());
|
||||||
|
datas.put("factDetermi", arbitrateRecord1.getFactDetermi());
|
||||||
|
datas.put("caseSketch", arbitrateRecord1.getCaseSketch());
|
||||||
|
datas.put("arbitrateThink", arbitrateRecord1.getArbitrateThink());
|
||||||
|
datas.put("legalProvisions", null);
|
||||||
|
datas.put("rulingFollows", arbitrateRecord1.getRulingFollows());
|
||||||
|
datas.put("umpire", null);
|
||||||
|
if (arbitratorName.contains(",")){
|
||||||
|
String[] nameArray = arbitratorName.split(",");
|
||||||
|
String firstName = nameArray[0];
|
||||||
|
String secondName = nameArray[1];
|
||||||
|
datas.put("arbitratorName1", firstName);
|
||||||
|
datas.put("arbitratorName2", secondName);
|
||||||
|
}else {
|
||||||
|
String secondName = "";
|
||||||
|
datas.put("arbitratorName1", arbitratorName);
|
||||||
|
datas.put("arbitratorName2", secondName);
|
||||||
|
}
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
datas.put("year", now.getYear());
|
||||||
|
datas.put("months", now.getMonthValue());
|
||||||
|
datas.put("day", now.getDayOfMonth());
|
||||||
|
datas.put("clerk", null);
|
||||||
|
String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
||||||
|
|
||||||
|
String currentDateStr = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||||
|
String saveFolderPath = "/data/arbitrate-document/formal/" + currentDateStr;
|
||||||
|
// 创建日期目录
|
||||||
|
File saveFolder = new File(saveFolderPath);
|
||||||
|
if (!saveFolder.exists()) {
|
||||||
|
saveFolder.mkdirs();
|
||||||
|
}
|
||||||
|
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||||
|
String resultFilePath = saveFolderPath+ fileName;
|
||||||
|
String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
|
||||||
|
//将裁决书保存到附件表里
|
||||||
|
CaseAttach caseAttach = CaseAttach.builder()
|
||||||
|
.caseAppliId(id)
|
||||||
|
.annexName(fileName)
|
||||||
|
.annexPath(docFilePath)
|
||||||
|
.annexType(3)
|
||||||
|
.build();
|
||||||
|
int i = caseAttachMapper.save(caseAttach);
|
||||||
|
if (i>0){
|
||||||
|
Integer annexId = caseAttach.getAnnexId();
|
||||||
|
//将附件id保存到仲裁记录表里面
|
||||||
|
arbitrateRecord1.setAnnexId(annexId);
|
||||||
|
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
|
||||||
|
}
|
||||||
|
return AjaxResult.success("裁决书保存路径为" + docFilePath);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -13,6 +13,7 @@ import org.springframework.stereotype.Component;
|
|||||||
public class CallBackHandleServiceImpl implements CallBackService {
|
public class CallBackHandleServiceImpl implements CallBackService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CasePaymentServiceImpl casePaymentService;
|
private CasePaymentServiceImpl casePaymentService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void successPay(String orderSn) {
|
public void successPay(String orderSn) {
|
||||||
casePaymentService.callback(orderSn);
|
casePaymentService.callback(orderSn);
|
||||||
|
|||||||
+28
-17
@@ -3,9 +3,11 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
|||||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.SmsUtils;
|
import com.ruoyi.common.utils.SmsUtils;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||||
|
import com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
|
||||||
@@ -24,24 +26,31 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
|||||||
private CaseAffiliateMapper caseAffiliateMapper;
|
private CaseAffiliateMapper caseAffiliateMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseLogRecordMapper caseLogRecordMapper;
|
private CaseLogRecordMapper caseLogRecordMapper;
|
||||||
|
@Autowired
|
||||||
|
private ArbitrateRecordMapper arbitrateRecordMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public AjaxResult chooseArbitrateMethod(CaseApplication caseApplication, Integer arbitratMethod) {
|
public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion) {
|
||||||
if (arbitratMethod != null) {
|
|
||||||
String arbitratMethodStr = arbitratMethod == 1 ? "开庭审理" : "书面审理";
|
|
||||||
//查询案件详细信息
|
//查询案件详细信息
|
||||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
if (caseApplication1 == null) {
|
if (caseApplication1 == null) {
|
||||||
return AjaxResult.error();
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
|
int arbitratMethod = caseApplication1.getArbitratMethod();
|
||||||
String caseNum = caseApplication1.getCaseNum();
|
String caseNum = caseApplication1.getCaseNum();
|
||||||
//选择仲裁方式
|
if (opinion==0){ //拒绝
|
||||||
caseApplication.setArbitratMethod(arbitratMethod);
|
if (arbitratMethod == 2){
|
||||||
|
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
|
||||||
|
}else {
|
||||||
|
caseApplication1.setArbitratMethod(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
//修改案件状态为待开庭
|
//修改案件状态为待开庭
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
|
String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
||||||
//发送短信通知
|
//发送短信通知
|
||||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||||
request.setTemplateId("1931000");
|
request.setTemplateId("1931000");
|
||||||
@@ -68,26 +77,28 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.success("选择成功");
|
return AjaxResult.success("审核成功");
|
||||||
}
|
}
|
||||||
|
return AjaxResult.error();
|
||||||
}
|
|
||||||
return AjaxResult.error("请选择开庭方式");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult writtenHear(CaseApplication caseApplication, String accidentDescription, String arbitrationResult) {
|
public AjaxResult writtenHear(ArbitrateRecord arbitrateRecord) {
|
||||||
//提交仲裁结果
|
//查询案件详情
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setId(arbitrateRecord.getCaseAppliId());
|
||||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
caseApplication1.setCaseDescribe(accidentDescription); //案情描述
|
String createBy = caseApplication1.getCreateBy();
|
||||||
caseApplication1.setCaseResult(arbitrationResult); //仲裁结果
|
if (createBy!=null){
|
||||||
int i = caseApplicationMapper.updataCaseApplication(caseApplication1);
|
arbitrateRecord.setCreateBy(createBy);
|
||||||
|
}
|
||||||
|
//提交仲裁结果
|
||||||
|
int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
|
||||||
if (i>0){
|
if (i>0){
|
||||||
//案件日志表里添加数据
|
//案件日志表里添加数据
|
||||||
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||||
caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
||||||
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
|
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
|
||||||
String createBy = caseApplication1.getCreateBy();
|
|
||||||
if (createBy!=null){
|
if (createBy!=null){
|
||||||
caseLogRecord.setCreateBy(createBy);
|
caseLogRecord.setCreateBy(createBy);
|
||||||
}
|
}
|
||||||
|
|||||||
+54
-13
@@ -4,15 +4,11 @@ import com.ruoyi.common.config.RuoYiConfig;
|
|||||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseDetailVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseDetailVO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceMapper;
|
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -21,12 +17,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||||
@@ -38,6 +31,8 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
private CaseApplicationMapper caseApplicationMapper;
|
private CaseApplicationMapper caseApplicationMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseAttachMapper caseAttachMapper;
|
private CaseAttachMapper caseAttachMapper;
|
||||||
|
@Autowired
|
||||||
|
private CaseLogRecordMapper caseLogRecordMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -52,11 +47,13 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
caseAffiliate.setCaseAppliId(id);
|
caseAffiliate.setCaseAppliId(id);
|
||||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||||
|
if (affiliate.getName() != null) {
|
||||||
String name = affiliate.getName();
|
String name = affiliate.getName();
|
||||||
//判断当前登录人和案件关联人姓名是否一致
|
//判断当前登录人和案件关联人姓名是否一致
|
||||||
if (name.equals(userName)) { //一致,将案件关联人的身份类型赋给当前登录人
|
if (name.equals(userName)) { //一致,将案件关联人的身份类型赋给当前登录人
|
||||||
caseDetailVO.setIdentityType(affiliate.getIdentityType());
|
caseDetailVO.setIdentityType(affiliate.getIdentityType());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (affiliate.getIdentityType() == 1) { //申请人
|
if (affiliate.getIdentityType() == 1) { //申请人
|
||||||
caseDetailVO.setApplicantName(affiliate.getName());
|
caseDetailVO.setApplicantName(affiliate.getName());
|
||||||
} else {
|
} else {
|
||||||
@@ -116,10 +113,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
||||||
List<Integer> caseStatusList = Arrays.asList(3, 4, 5, 9);
|
List<Integer> caseStatusList = Arrays.asList(CaseApplicationConstants.CASE_CROSSEXAMI);
|
||||||
return getCaseEvidenceVOList(identityNum, caseStatusList, null);
|
return getCaseEvidenceVOList(identityNum, caseStatusList, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,6 +129,51 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
return AjaxResult.error("暂无需要确认的证据");
|
return AjaxResult.error("暂无需要确认的证据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO) {
|
||||||
|
//查询案件详细信息
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setId(caseEvidenceDTO.getCaseId());
|
||||||
|
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
|
if (caseApplication1 != null) {
|
||||||
|
int caseStatus = caseApplication1.getCaseStatus();
|
||||||
|
caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
|
||||||
|
caseApplication1.setOpenCourtHear(caseEvidenceDTO.getOpenCourtHear());
|
||||||
|
caseApplication1.setPendingAppointArbotrar(caseEvidenceDTO.getPendingAppointArbotrar());
|
||||||
|
List<Arbitrator> arbitrators = caseEvidenceDTO.getArbitrators();
|
||||||
|
if (arbitrators != null && arbitrators.size() > 0) {
|
||||||
|
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
||||||
|
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
||||||
|
String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||||
|
String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||||
|
caseApplication1.setArbitratorId(idstr);
|
||||||
|
caseApplication1.setArbitratorName(arbitratorNamestr);
|
||||||
|
}
|
||||||
|
//修改案件状态
|
||||||
|
caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
|
||||||
|
//选择仲裁方式
|
||||||
|
if (caseEvidenceDTO.getOpenCourtHear()==1){ //开庭审理
|
||||||
|
caseApplication1.setArbitratMethod(1);
|
||||||
|
}else {
|
||||||
|
caseApplication1.setArbitratMethod(2); //书面审理
|
||||||
|
}
|
||||||
|
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||||
|
if (i > 0) {
|
||||||
|
//案件日志表里添加数据
|
||||||
|
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||||
|
caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
||||||
|
caseLogRecord.setCaseNode(caseStatus);
|
||||||
|
String createBy = caseApplication1.getCreateBy();
|
||||||
|
if (createBy != null) {
|
||||||
|
caseLogRecord.setCreateBy(createBy);
|
||||||
|
}
|
||||||
|
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||||
|
return AjaxResult.success("提交成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
|
private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
|
||||||
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
|
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
|
||||||
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
|
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<result property="userId" column="use_id" />
|
<result property="userId" column="use_id" />
|
||||||
<result property="userName" column="use_account" />
|
<result property="userName" column="use_account" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<insert id="save">
|
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
||||||
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
|
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
|
||||||
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
|
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
Reference in New Issue
Block a user