9.18开发提交
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
|||||||
|
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/arbitrate")
|
||||||
|
public class CaseArbitrateController {
|
||||||
|
@Autowired
|
||||||
|
private ICaseArbitrateService caseArbitrateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确定仲裁方式
|
||||||
|
* @param caseApplication
|
||||||
|
* @param arbitratMethod
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/method")
|
||||||
|
public AjaxResult chooseArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication,Integer arbitratMethod){
|
||||||
|
return caseArbitrateService.chooseArbitrateMethod(caseApplication,arbitratMethod);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/writtenHear")
|
||||||
|
public AjaxResult writtenHear(@Validated @RequestBody CaseApplication caseApplication,String accidentDescription , String arbitrationResult){
|
||||||
|
return caseArbitrateService.writtenHear(caseApplication,accidentDescription,arbitrationResult);
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -15,7 +15,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案件证据上传
|
* 案件证据
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/evidence")
|
@RequestMapping("/evidence")
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class CaseApplication extends BaseEntity {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date registerDate;
|
private Date registerDate;
|
||||||
/** 仲裁方式 */
|
/** 仲裁方式 */
|
||||||
private String arbitratMethod;
|
private int arbitratMethod;
|
||||||
/** 案件状态 */
|
/** 案件状态 */
|
||||||
private int caseStatus;
|
private int caseStatus;
|
||||||
/** 开庭日期 */
|
/** 开庭日期 */
|
||||||
@@ -278,11 +278,11 @@ public class CaseApplication extends BaseEntity {
|
|||||||
this.registerDate = registerDate;
|
this.registerDate = registerDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getArbitratMethod() {
|
public int getArbitratMethod() {
|
||||||
return arbitratMethod;
|
return arbitratMethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setArbitratMethod(String arbitratMethod) {
|
public void setArbitratMethod(int arbitratMethod) {
|
||||||
this.arbitratMethod = 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.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
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;
|
||||||
@@ -36,12 +37,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
private CaseApplicationMapper caseApplicationMapper;
|
private CaseApplicationMapper caseApplicationMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseAttachMapper caseAttachMapper;
|
private CaseAttachMapper caseAttachMapper;
|
||||||
/* @Override
|
|
||||||
public List<CaseEvidenceVO> getCaseListByRespondent(String identityNum) {
|
|
||||||
return getCaseEvidenceVOList(identityNum,3, 2);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public AjaxResult getCaseDetailsById(Long id,String userName) {
|
public AjaxResult getCaseDetailsById(Long id,String userName) {
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
caseApplication.setId(id);
|
caseApplication.setId(id);
|
||||||
@@ -73,6 +71,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id, String userName, Long userId) {
|
public AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id, String userName, Long userId) {
|
||||||
|
|
||||||
if (file.isEmpty()) {
|
if (file.isEmpty()) {
|
||||||
@@ -105,10 +104,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
return AjaxResult.error("上传失败");
|
return AjaxResult.error("上传失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @Override
|
|
||||||
public List<CaseEvidenceVO> getCaseListByApplicant(String identityNum) {
|
|
||||||
return getCaseEvidenceVOList(identityNum,4, 1);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
||||||
|
|||||||
+8
-4
@@ -1,7 +1,6 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.ruoyi.ElegentPay;
|
import com.ruoyi.ElegentPay;
|
||||||
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;
|
||||||
@@ -18,6 +17,7 @@ import com.ruoyi.wisdomarbitrate.mapper.CasePaymentRecordMapper;
|
|||||||
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
|
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -42,6 +42,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public AjaxResult casePay(CasePayDTO casePayDTO) {
|
public AjaxResult casePay(CasePayDTO casePayDTO) {
|
||||||
PayRequest payRequest = new PayRequest();
|
PayRequest payRequest = new PayRequest();
|
||||||
payRequest.setBody("案件缴费");
|
payRequest.setBody("案件缴费");
|
||||||
@@ -64,7 +65,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
|||||||
return AjaxResult.success(response);
|
return AjaxResult.success(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
public AjaxResult callback(String orderNumber) {
|
public AjaxResult callback(String orderNumber) {
|
||||||
//查询记录
|
//查询记录
|
||||||
CasePaymentRecord casePaymentRecord = casePaymentRecordMapper.queryRecord(orderNumber);
|
CasePaymentRecord casePaymentRecord = casePaymentRecordMapper.queryRecord(orderNumber);
|
||||||
@@ -86,7 +87,9 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
|||||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public AjaxResult confirmPayment(CaseApplication caseApplication) {
|
public AjaxResult confirmPayment(CaseApplication caseApplication) {
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_RESPOND);
|
caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_RESPOND);
|
||||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
@@ -114,15 +117,16 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
|||||||
// 模板id:1928003 普通短信 案件受理通知 尊敬的{1}用户,您的{2}案件{3}已成功受理。
|
// 模板id:1928003 普通短信 案件受理通知 尊敬的{1}用户,您的{2}案件{3}已成功受理。
|
||||||
String name = affiliate.getName();
|
String name = affiliate.getName();
|
||||||
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
|
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
|
||||||
|
SmsUtils.sendSms(request);
|
||||||
} else { //被申请人
|
} else { //被申请人
|
||||||
request.setPhone(affiliate.getContactTelphone());
|
request.setPhone(affiliate.getContactTelphone());
|
||||||
request.setTemplateId("1928006");
|
request.setTemplateId("1928006");
|
||||||
// 模板id1928006 普通短信 案件应诉通知 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击https://phmapp.xayunmei.com选择是否应诉。
|
// 模板id1928006 普通短信 案件应诉通知 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击https://phmapp.xayunmei.com选择是否应诉。
|
||||||
String name = affiliate.getName();
|
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();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,7 @@
|
|||||||
<if test="arbitratorId != null and arbitratorId != ''">arbitrator_id = #{arbitratorId},</if>
|
<if test="arbitratorId != null and arbitratorId != ''">arbitrator_id = #{arbitratorId},</if>
|
||||||
<if test="arbitratorName != null and arbitratorName != ''">arbitrator_name = #{arbitratorName},</if>
|
<if test="arbitratorName != null and arbitratorName != ''">arbitrator_name = #{arbitratorName},</if>
|
||||||
<if test="pendingAppointArbotrar != null ">pending_appoint_arbotrar = #{pendingAppointArbotrar},</if>
|
<if test="pendingAppointArbotrar != null ">pending_appoint_arbotrar = #{pendingAppointArbotrar},</if>
|
||||||
|
<if test="arbitratMethod != null ">arbitrat_method = #{arbitratMethod},</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Reference in New Issue
Block a user