|
|
@@ -36,82 +36,85 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
|
36
|
36
|
|
|
37
|
37
|
@Override
|
|
38
|
38
|
@Transactional
|
|
39
|
|
- public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion) {
|
|
40
|
|
- //查询案件详细信息
|
|
41
|
|
- CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
42
|
|
- if (caseApplication1 == null) {
|
|
43
|
|
- return AjaxResult.error();
|
|
44
|
|
- }
|
|
45
|
|
- int arbitratMethod = caseApplication1.getArbitratMethod();
|
|
46
|
|
- String caseNum = caseApplication1.getCaseNum();
|
|
47
|
|
- if (opinion==0){ //拒绝
|
|
48
|
|
- if (arbitratMethod == 2){
|
|
49
|
|
- caseApplication1.setArbitratMethod(1); // 更改仲裁方式
|
|
50
|
|
- //修改案件状态为待开庭审理
|
|
51
|
|
-// caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
|
52
|
|
- //修改案件状态为待修改开庭时间
|
|
53
|
|
- caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
|
54
|
|
- // 新增日志
|
|
55
|
|
- CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
|
|
|
39
|
+ public AjaxResult examineArbitrateMethod(BatchCaseApplication batchCaseApplication, Integer opinion) {
|
|
|
40
|
+ for (CaseApplication caseApplication : batchCaseApplication.getList()) {
|
|
56
|
41
|
|
|
57
|
|
- }else {
|
|
58
|
|
- caseApplication1.setArbitratMethod(2);
|
|
59
|
|
- //修改案件状态为待书面审理
|
|
60
|
|
- caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
|
61
|
|
- // 新增日志
|
|
62
|
|
- CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
|
|
63
|
42
|
|
|
|
43
|
+ //查询案件详细信息
|
|
|
44
|
+ CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
|
45
|
+ if (caseApplication1 == null) {
|
|
|
46
|
+ return AjaxResult.error();
|
|
64
|
47
|
}
|
|
65
|
|
- }else {
|
|
66
|
|
- if (arbitratMethod == 2){
|
|
67
|
|
- //修改案件状态为待书面审理
|
|
68
|
|
- caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
|
69
|
|
- // 新增日志
|
|
70
|
|
- CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
|
|
|
48
|
+ int arbitratMethod = caseApplication1.getArbitratMethod();
|
|
|
49
|
+ String caseNum = caseApplication1.getCaseNum();
|
|
|
50
|
+ if (opinion == 0) { //拒绝
|
|
|
51
|
+ if (arbitratMethod == 2) {
|
|
|
52
|
+ caseApplication1.setArbitratMethod(1); // 更改仲裁方式
|
|
|
53
|
+ //修改案件状态为待开庭审理
|
|
|
54
|
+// caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
|
|
55
|
+ //修改案件状态为待修改开庭时间
|
|
|
56
|
+ caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
|
|
57
|
+ // 新增日志
|
|
|
58
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_OPENCOURT_HEAR, "");
|
|
|
59
|
+
|
|
|
60
|
+ } else {
|
|
|
61
|
+ caseApplication1.setArbitratMethod(2);
|
|
|
62
|
+ //修改案件状态为待书面审理
|
|
|
63
|
+ caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
|
|
64
|
+ // 新增日志
|
|
|
65
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
|
|
66
|
+
|
|
|
67
|
+ }
|
|
|
68
|
+ } else {
|
|
|
69
|
+ if (arbitratMethod == 2) {
|
|
|
70
|
+ //修改案件状态为待书面审理
|
|
|
71
|
+ caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
|
|
72
|
+ // 新增日志
|
|
|
73
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
|
71
|
74
|
|
|
72
|
|
- }else {
|
|
73
|
|
- //修改案件状态为待开庭审理
|
|
|
75
|
+ } else {
|
|
|
76
|
+ //修改案件状态为待开庭审理
|
|
74
|
77
|
// caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
|
75
|
|
- //修改案件状态为待修改开庭时间
|
|
76
|
|
- caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
|
77
|
|
- // 新增日志
|
|
78
|
|
- CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
|
|
|
78
|
+ //修改案件状态为待修改开庭时间
|
|
|
79
|
+ caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
|
|
80
|
+ // 新增日志
|
|
|
81
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_OPENCOURT_HEAR, "");
|
|
79
|
82
|
|
|
|
83
|
+ }
|
|
80
|
84
|
}
|
|
81
|
|
- }
|
|
82
|
|
- int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
|
83
|
|
- if (i > 0) {
|
|
84
|
|
- String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
|
85
|
|
- //发送短信通知
|
|
86
|
|
- SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
|
87
|
|
- request.setTemplateId("1931000");
|
|
88
|
|
- CaseAffiliate caseAffiliate = new CaseAffiliate();
|
|
89
|
|
- caseAffiliate.setCaseAppliId(caseApplication1.getId());
|
|
90
|
|
- List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
|
91
|
|
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
|
92
|
|
- for (CaseAffiliate affiliate : caseAffiliates) {
|
|
93
|
|
- //获取身份类型
|
|
94
|
|
- int identityType = affiliate.getIdentityType();
|
|
95
|
|
- if (identityType == 1) { //申请人
|
|
96
|
|
- request.setPhone(affiliate.getContactTelphone());
|
|
97
|
|
- // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
|
98
|
|
- // 1931000 普通短信 确定仲裁方式通知 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
99
|
|
- String name = affiliate.getName();
|
|
100
|
|
- request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
|
101
|
|
- SmsUtils.sendSms(request);
|
|
102
|
|
- } else { //被申请人
|
|
103
|
|
- request.setPhone(affiliate.getContactTelphone());
|
|
104
|
|
- // 模板id1928006 普通短信 案件应诉通知 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击https://phmapp.xayunmei.com选择是否应诉。
|
|
105
|
|
- String name = affiliate.getName();
|
|
106
|
|
- request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
|
107
|
|
- SmsUtils.sendSms(request);
|
|
|
85
|
+ int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
|
|
86
|
+ if (i > 0) {
|
|
|
87
|
+ String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
|
|
88
|
+ //发送短信通知
|
|
|
89
|
+ SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
|
|
90
|
+ request.setTemplateId("1931000");
|
|
|
91
|
+ CaseAffiliate caseAffiliate = new CaseAffiliate();
|
|
|
92
|
+ caseAffiliate.setCaseAppliId(caseApplication1.getId());
|
|
|
93
|
+ List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
|
|
94
|
+ if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
|
|
95
|
+ for (CaseAffiliate affiliate : caseAffiliates) {
|
|
|
96
|
+ //获取身份类型
|
|
|
97
|
+ int identityType = affiliate.getIdentityType();
|
|
|
98
|
+ if (identityType == 1) { //申请人
|
|
|
99
|
+ request.setPhone(affiliate.getContactTelphone());
|
|
|
100
|
+ // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
|
|
101
|
+ // 1931000 普通短信 确定仲裁方式通知 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
|
102
|
+ String name = affiliate.getName();
|
|
|
103
|
+ request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
|
|
104
|
+ SmsUtils.sendSms(request);
|
|
|
105
|
+ } else { //被申请人
|
|
|
106
|
+ request.setPhone(affiliate.getContactTelphone());
|
|
|
107
|
+ // 模板id1928006 普通短信 案件应诉通知 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击https://phmapp.xayunmei.com选择是否应诉。
|
|
|
108
|
+ String name = affiliate.getName();
|
|
|
109
|
+ request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
|
|
110
|
+ SmsUtils.sendSms(request);
|
|
|
111
|
+ }
|
|
108
|
112
|
}
|
|
109
|
113
|
}
|
|
110
|
|
- }
|
|
111
|
114
|
|
|
112
|
|
- return AjaxResult.success("审核成功");
|
|
|
115
|
+ }
|
|
113
|
116
|
}
|
|
114
|
|
- return AjaxResult.error();
|
|
|
117
|
+ return AjaxResult.success();
|
|
115
|
118
|
}
|
|
116
|
119
|
|
|
117
|
120
|
@Override
|