This commit is contained in:
qitz
2023-11-03 16:39:06 +08:00
11 changed files with 104 additions and 391 deletions
@@ -16,6 +16,9 @@ public class CaseApplication extends BaseEntity {
/** ID */
private Long id;
/** 案件名称 */
@Excel(name = "案件名称")
private String caseName;
/** 案件编号 */
// @Excel(name = "案件编号")
private String caseNum;
@@ -127,8 +130,7 @@ public class CaseApplication extends BaseEntity {
/** 仲裁员名称 */
private String arbitratorName;
/** 案件名称 */
private String caseName;
/** 案件描述 */
private String caseDescribe;
@@ -37,4 +37,9 @@ public class SmsSendRecord extends BaseEntity {
* 发送内容
*/
private String sendContent;
/**
* 发送状态
*/
private Integer sendStatus;
}
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.deepoove.poi.data.PictureRenderData;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
@@ -36,6 +37,7 @@ import java.nio.file.StandardCopyOption;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*;
import java.util.regex.Pattern;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -254,10 +256,34 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
}
datas.put("claims", caseApplication1.getArbitratClaims());
datas.put("request", caseApplication1.getRequestRule());
//申请人证据材料
datas.put("appEvidenceMaterial", null);
//被申请人证据材料
datas.put("resEvidenceMaterial","(详见附件列表)");
CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
List<CaseAttach> caseAttachList1 = caseApplication2.getCaseAttachList();
if (caseAttachList1 != null && caseAttachList1.size() > 0) {
for (CaseAttach caseAttach : caseAttachList1) {
if (caseAttach.getAnnexType() == 6) { //被申请人证据材料
String annexName = caseAttach.getAnnexName();
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
if (isImageFile) {
String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
System.out.println("路径是===========" + annexPath);
PictureRenderData pictureRenderData = WordUtil
.rebuildImageContent(100, 100, null, annexPath);
datas.put("resEvidenceMaterial", pictureRenderData);
}
} else if (caseAttach.getAnnexType() == 2) { //申请人证据材料
String annexName = caseAttach.getAnnexName();
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
if (isImageFile) {
String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
System.out.println("路径是===========" + annexPath);
PictureRenderData pictureRenderData = WordUtil
.rebuildImageContent(100, 100, null, annexPath);
//申请人证据材料
datas.put("appEvidenceMaterial", pictureRenderData);
}
}
}
}
datas.put("applicaCrossOpin", caseApplication1.getApplicaCrossOpin());
if (arbitrateRecord1 != null) {
datas.put("factDetermi", arbitrateRecord1.getFactDetermi());
@@ -804,10 +830,34 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
}
datas.put("claims", caseApplication1.getArbitratClaims());
datas.put("request", caseApplication1.getRequestRule());
//申请人证据材料
datas.put("appEvidenceMaterial", null);
//被申请人证据材料
datas.put("resEvidenceMaterial","(详见附件列表)");
CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
List<CaseAttach> caseAttachList1 = caseApplication2.getCaseAttachList();
if (caseAttachList1 != null && caseAttachList1.size() > 0) {
for (CaseAttach caseAttach : caseAttachList1) {
if (caseAttach.getAnnexType() == 6) { //被申请人证据材料
String annexName = caseAttach.getAnnexName();
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
if (isImageFile) {
String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
System.out.println("路径是===========" + annexPath);
PictureRenderData pictureRenderData = WordUtil
.rebuildImageContent(100, 100, null, annexPath);
datas.put("resEvidenceMaterial", pictureRenderData);
}
} else if (caseAttach.getAnnexType() == 2) { //申请人证据材料
String annexName = caseAttach.getAnnexName();
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
if (isImageFile) {
String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
System.out.println("路径是===========" + annexPath);
PictureRenderData pictureRenderData = WordUtil
.rebuildImageContent(100, 100, null, annexPath);
//申请人证据材料
datas.put("appEvidenceMaterial", pictureRenderData);
}
}
}
}
datas.put("applicaCrossOpin", caseApplication1.getApplicaCrossOpin());
if (arbitrateRecord1 != null) {
datas.put("factDetermi", arbitrateRecord1.getFactDetermi());
@@ -1024,6 +1024,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
String content="尊敬的"+agentUser.getNickName()+",您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
smsSendRecord.setSendStatus(1);
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
@@ -1472,6 +1473,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
* @param failureMsg
*/
private void validBaseColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
if( StrUtil.isEmpty(caseApplication.getCaseName())){
failureMsg.append("【案件名称】字段不能为空;");
}else if(caseApplication.getCaseName().length()>50){
failureMsg.append("【案件名称】字段超出指定长度,最大长度为50;");
}
BigDecimal caseSubjectAmount = caseApplication.getCaseSubjectAmount();
if(null== caseSubjectAmount){
failureMsg.append("【案件标的】字段不合法;");
@@ -1855,6 +1861,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
smsSendRecord.setSendTime(new Date());
String content="尊敬的"+caseAffiliate.getName()+"用户,您的"+ caseApplicationselect.getCaseNum()+"仲裁案件,开庭审理房间号为"+ messageVO.getRoomNo()+",请在微信内打开https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setSendContent(content);
smsSendRecord.setSendStatus(1);
String userName;
try {
userName= getUsername();
@@ -2197,6 +2204,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,开庭日期已改为" + hearDatestr + ",请知晓,如非本人操作,请忽略本短信。";
}
smsSendRecord.setSendContent(content);
smsSendRecord.setSendStatus(1);
smsSendRecord.setCreateBy(getUsername());
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
@@ -2233,6 +2241,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
String content="尊敬的"+name+"用户,您的"+caseNum+"仲裁案件,开庭日期已确定为"+hearDatestr+",请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
smsSendRecord.setSendStatus(1);
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
@@ -2391,6 +2400,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
private void copyCaseApplication(CaseApplication caseApplicationinsertDiffer, CaseApplication caseApplicationNew) {
caseApplicationNew.setArbitratClaims(caseApplicationinsertDiffer.getArbitratClaims());
caseApplicationNew.setCaseNum(caseApplicationinsertDiffer.getCaseNum());
caseApplicationNew.setCaseName(caseApplicationinsertDiffer.getCaseName());
caseApplicationNew.setCaseSubjectAmount(caseApplicationinsertDiffer.getCaseSubjectAmount());
caseApplicationNew.setLoanStartDate(caseApplicationinsertDiffer.getLoanStartDate());
caseApplicationNew.setLoanEndDate(caseApplicationinsertDiffer.getLoanEndDate());
@@ -126,6 +126,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
smsSendRecord.setSendStatus(1);
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
@@ -119,12 +119,12 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
caseApplication.setCaseStatus(4);
caseApplicationMapper.submitCaseApplication(caseApplication);
}
}
CaseAttach caseAttachselect = new CaseAttach();
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
caseAttachselect.setAnnexName(caseAttach.getAnnexName());
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
return AjaxResult.success("上传成功", caseAttachselect);
}
} catch (IOException e) {
e.printStackTrace();
}
@@ -128,6 +128,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
String content="尊敬的"+name+"用户,您的"+caseName+"案件"+caseNum+"已成功受理。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
smsSendRecord.setSendStatus(1);
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
} else { //被申请人
@@ -146,6 +147,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
String content="尊敬的"+name+"用户,您的"+caseName+"案件"+caseNum+"已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
smsSendRecord.setSendStatus(1);
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
@@ -185,11 +187,20 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
//修改案件状态
caseApplicationMapper.submitCaseApplication(caseApplication1);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_PAYMENT_CONFIRM,"");
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if(i>0) {
// 修改支付状态
CasePaymentRecord paymentRecord = new CasePaymentRecord();
paymentRecord.setPayType(payDTO.getPayType());
paymentRecord.setCaseId(payDTO.getCaseId());
paymentRecord.setPaymentStatus(1);
casePaymentRecordMapper.saveRecord(paymentRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
return AjaxResult.success("确认缴费成功");
return AjaxResult.success("确认缴费成功");
}
return AjaxResult.success("确认缴费失败");
}
@@ -7,6 +7,7 @@
<resultMap type="CaseApplication" id="CaseApplicationResult">
<id property="id" column="id" />
<result property="caseNum" column="case_num" />
<result property="caseName" column="case_name" />
<result property="caseSubjectAmount" column="case_subject_amount" />
<result property="registerDate" column="register_date" />
<result property="arbitratMethod" column="arbitrat_method" />
@@ -372,7 +373,7 @@
<insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
insert into case_application(
<if test="caseName != null and caseName != ''">case_name ,</if>
<if test="caseNum != null and caseNum != ''">case_num,</if>
<if test="caseSubjectAmount != null">case_subject_amount,</if>
register_date,
@@ -400,6 +401,7 @@
<if test="importFlag != null ">import_flag,</if>
create_time
)values(
<if test="caseName != null and caseName != ''">#{caseName},</if>
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
sysdate(),
@@ -515,6 +517,7 @@
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
ELSE '无审理方式'
END arbitratMethodName,
c.case_name,
c.case_status ,
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
@@ -595,7 +598,7 @@ order by c.create_time desc limit 1
CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
from case_application c left join case_payment_record p on c.id = p.case_id
where c.case_status = 3
AND c.id = #{id} and p.payment_status=1
AND c.id = #{id} and p.payment_status=1 limit 1
</select>
<select id="selectCaseNumLike" resultType="java.lang.Integer">
@@ -15,6 +15,7 @@
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="sendStatus" column="send_status" />
</resultMap>
<insert id="saveSmsSendRecord" parameterType="SmsSendRecord" useGeneratedKeys="true" keyProperty="id">
@@ -25,6 +26,7 @@
<if test="sendTime != null ">send_time,</if>
<if test="sendContent != null ">send_content,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="sendStatus != null ">send_status,</if>
create_time
)values(
<if test="caseId != null ">#{caseId},</if>
@@ -33,13 +35,14 @@
<if test="sendTime != null ">#{sendTime},</if>
<if test="sendContent != null ">#{sendContent},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="sendStatus != null ">#{sendStatus},</if>
sysdate()
)
</insert>
<select id="getSmsSendRecord" parameterType="SmsSendRecord" resultMap="SmsSendRecordResult">
select id ,case_appli_id ,case_num ,phone ,send_time ,send_content
select id ,case_appli_id ,case_num ,phone ,send_time ,send_content,send_status
from sms_send_record
<where>
<if test="caseNum != null and caseNum != ''">