9.18开发提交
This commit is contained in:
@@ -25,7 +25,7 @@ public class CaseApplication extends BaseEntity {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date registerDate;
|
||||
/** 仲裁方式 */
|
||||
private String arbitratMethod;
|
||||
private int arbitratMethod;
|
||||
/** 案件状态 */
|
||||
private int caseStatus;
|
||||
/** 开庭日期 */
|
||||
@@ -278,11 +278,11 @@ public class CaseApplication extends BaseEntity {
|
||||
this.registerDate = registerDate;
|
||||
}
|
||||
|
||||
public String getArbitratMethod() {
|
||||
public int getArbitratMethod() {
|
||||
return arbitratMethod;
|
||||
}
|
||||
|
||||
public void setArbitratMethod(String arbitratMethod) {
|
||||
public void setArbitratMethod(int arbitratMethod) {
|
||||
this.arbitratMethod = arbitratMethod;
|
||||
}
|
||||
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
|
||||
public interface ICaseArbitrateService {
|
||||
AjaxResult chooseArbitrateMethod(CaseApplication caseApplication,Integer arbitratMethod);
|
||||
|
||||
AjaxResult writtenHear(CaseApplication caseApplication, String accidentDescription, String arbitrationResult);
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
@Autowired
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
@Autowired
|
||||
private CaseAffiliateMapper caseAffiliateMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult chooseArbitrateMethod(CaseApplication caseApplication, Integer arbitratMethod) {
|
||||
if (arbitratMethod != null) {
|
||||
String arbitratMethodStr = arbitratMethod == 1 ? "开庭审理" : "书面审理";
|
||||
//查询案件详细信息
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 == null) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
String caseNum = caseApplication1.getCaseNum();
|
||||
//选择仲裁方式
|
||||
caseApplication.setArbitratMethod(arbitratMethod);
|
||||
//修改案件状态为待开庭
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT);
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
if (i > 0) {
|
||||
//发送短信通知
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
request.setTemplateId("1931000");
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(caseApplication1.getId());
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
//获取身份类型
|
||||
int identityType = affiliate.getIdentityType();
|
||||
if (identityType == 1) { //申请人
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
||||
// 1931000 普通短信 确定仲裁方式通知 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
||||
SmsUtils.sendSms(request);
|
||||
} else { //被申请人
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
// 模板id1928006 普通短信 案件应诉通知 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击https://phmapp.xayunmei.com选择是否应诉。
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
||||
SmsUtils.sendSms(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success("选择成功");
|
||||
}
|
||||
|
||||
}
|
||||
return AjaxResult.error("请选择开庭方式");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult writtenHear(CaseApplication caseApplication, String accidentDescription, String arbitrationResult) {
|
||||
//提交仲裁结果
|
||||
// caseApplication.set(accidentDescription); //案情描述
|
||||
// caseApplication.set(arbitrationResult); //仲裁结果
|
||||
int i = caseApplicationMapper.updataCaseApplication(caseApplication);
|
||||
if (i>0){
|
||||
return AjaxResult.success("提交成功");
|
||||
}
|
||||
return AjaxResult.error("暂无需要提交仲裁结果的案件");
|
||||
}
|
||||
}
|
||||
+4
-8
@@ -17,6 +17,7 @@ import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -36,12 +37,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
/* @Override
|
||||
public List<CaseEvidenceVO> getCaseListByRespondent(String identityNum) {
|
||||
return getCaseEvidenceVOList(identityNum,3, 2);
|
||||
}*/
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult getCaseDetailsById(Long id,String userName) {
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
@@ -73,6 +71,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id, String userName, Long userId) {
|
||||
|
||||
if (file.isEmpty()) {
|
||||
@@ -105,10 +104,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
return AjaxResult.error("上传失败");
|
||||
}
|
||||
|
||||
/* @Override
|
||||
public List<CaseEvidenceVO> getCaseListByApplicant(String identityNum) {
|
||||
return getCaseEvidenceVOList(identityNum,4, 1);
|
||||
}*/
|
||||
|
||||
|
||||
@Override
|
||||
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
||||
|
||||
+10
-6
@@ -1,7 +1,6 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
|
||||
|
||||
import com.ruoyi.ElegentPay;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@@ -18,6 +17,7 @@ import com.ruoyi.wisdomarbitrate.mapper.CasePaymentRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
@@ -42,6 +42,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult casePay(CasePayDTO casePayDTO) {
|
||||
PayRequest payRequest = new PayRequest();
|
||||
payRequest.setBody("案件缴费");
|
||||
@@ -64,7 +65,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
return AjaxResult.success(response);
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public AjaxResult callback(String orderNumber) {
|
||||
//查询记录
|
||||
CasePaymentRecord casePaymentRecord = casePaymentRecordMapper.queryRecord(orderNumber);
|
||||
@@ -86,7 +87,9 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult confirmPayment(CaseApplication caseApplication) {
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_RESPOND);
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
@@ -102,7 +105,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
int identityType = affiliate.getIdentityType();
|
||||
//查询案件详细信息
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 == null){
|
||||
if (caseApplication1 == null) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
|
||||
@@ -113,16 +116,17 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
||||
// 模板id:1928003 普通短信 案件受理通知 尊敬的{1}用户,您的{2}案件{3}已成功受理。
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name,caseName,caseNum});
|
||||
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
|
||||
SmsUtils.sendSms(request);
|
||||
} else { //被申请人
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
request.setTemplateId("1928006");
|
||||
// 模板id1928006 普通短信 案件应诉通知 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击https://phmapp.xayunmei.com选择是否应诉。
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name,caseName,caseNum});
|
||||
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
|
||||
SmsUtils.sendSms(request);
|
||||
}
|
||||
}
|
||||
SmsUtils.sendSms(request);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
<if test="arbitratorId != null and arbitratorId != ''">arbitrator_id = #{arbitratorId},</if>
|
||||
<if test="arbitratorName != null and arbitratorName != ''">arbitrator_name = #{arbitratorName},</if>
|
||||
<if test="pendingAppointArbotrar != null ">pending_appoint_arbotrar = #{pendingAppointArbotrar},</if>
|
||||
<if test="arbitratMethod != null ">arbitrat_method = #{arbitratMethod},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user