|
|
@@ -331,7 +331,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
331
|
331
|
// 生成调解申请书
|
|
332
|
332
|
req.setTemplateId(String.valueOf(templateManage.getId()));
|
|
333
|
333
|
// todo 部署放开
|
|
334
|
|
- // caseApplicationService.generateApplication(req);
|
|
|
334
|
+ caseApplicationService.generateApplication(req);
|
|
335
|
335
|
|
|
336
|
336
|
}
|
|
337
|
337
|
|
|
|
@@ -523,17 +523,14 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
523
|
523
|
@Override
|
|
524
|
524
|
public AjaxResult uploadCaseZipFile(MultipartFile file, Long templateId) {
|
|
525
|
525
|
UUID uuid = UUID.randomUUID();
|
|
526
|
|
- // todo 压缩包解压路径
|
|
|
526
|
+ // 压缩包解压路径
|
|
527
|
527
|
String targetPath = "/home/ruoyi/uploadPath/upload/unzipFile/" + uuid + "/";
|
|
528
|
|
-// String targetPath = "D:/home/ruoyi/uploadPath/upload/unzipFile/"+uuid+ "/";
|
|
529
|
528
|
File zipFile = null;
|
|
530
|
529
|
InputStream ins = null;
|
|
531
|
530
|
try {
|
|
532
|
531
|
ins = file.getInputStream();
|
|
533
|
532
|
//上传的压缩包保存的路径
|
|
534
|
|
- // todo
|
|
535
|
533
|
String savePath = "/home/ruoyi/uploadPath/upload/zipFile/";
|
|
536
|
|
-// String savePath = "D:/home/ruoyi/uploadPath/upload/zipFile/";
|
|
537
|
534
|
String saveName = uuid + "_" + file.getOriginalFilename();
|
|
538
|
535
|
zipFile = new File(savePath + saveName);
|
|
539
|
536
|
inputChangeToFile(ins, zipFile);
|
|
|
@@ -813,7 +810,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
813
|
810
|
*/
|
|
814
|
811
|
@Transactional
|
|
815
|
812
|
@Override
|
|
816
|
|
- public AjaxResult accept(MsCaseApplication req) {
|
|
|
813
|
+ public AjaxResult accept(MsCaseApplicationVO req) {
|
|
817
|
814
|
if (StrUtil.isNotEmpty(req.getBatchNumber())) {
|
|
818
|
815
|
// 根据批号查询未锁定的案件
|
|
819
|
816
|
List<MsCaseApplication> applicationList = listByBatchNumber(req.getBatchNumber(), req.getCaseFlowId());
|
|
|
@@ -829,25 +826,43 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
829
|
826
|
}
|
|
830
|
827
|
Map<Long, MsCaseAffiliate> affiliateMap = affiliateList.stream().collect(Collectors.toMap(MsCaseAffiliate::getCaseAppliId, Function.identity()));
|
|
831
|
828
|
for (MsCaseApplication application : applicationList) {
|
|
832
|
|
- caseApplicationService.accept(application,req,affiliateMap);
|
|
|
829
|
+ // 不受理
|
|
|
830
|
+ if(req.getAgreeFlag().equals(YesOrNoEnum.NO.getCode())){
|
|
|
831
|
+ if(StrUtil.isEmpty(req.getRejectReason())){
|
|
|
832
|
+ throw new ServiceException("请填写拒绝原因");
|
|
|
833
|
+ }
|
|
|
834
|
+ caseApplicationService.notAccept(String.valueOf(req.getId()),req.getRejectReason());
|
|
|
835
|
+ }else {
|
|
|
836
|
+ caseApplicationService.accept(application,req,affiliateMap);
|
|
|
837
|
+ }
|
|
|
838
|
+
|
|
833
|
839
|
}
|
|
834
|
840
|
|
|
835
|
841
|
} else {
|
|
836
|
|
- // 查询案件信息
|
|
837
|
|
- MsCaseApplication application = msCaseApplicationMapper.selectByPrimaryKey(req.getId());
|
|
838
|
|
- // 根据案件id查询案件相关人
|
|
839
|
|
- MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(req.getId());
|
|
840
|
|
- if (application==null||caseAffiliate == null) {
|
|
841
|
|
- return AjaxResult.error("该案件不存在");
|
|
|
842
|
+ // 不受理
|
|
|
843
|
+ if(req.getAgreeFlag().equals(YesOrNoEnum.NO.getCode())){
|
|
|
844
|
+ if(StrUtil.isEmpty(req.getRejectReason())){
|
|
|
845
|
+ throw new ServiceException("请填写拒绝原因");
|
|
|
846
|
+ }
|
|
|
847
|
+ caseApplicationService.notAccept(String.valueOf(req.getId()),req.getRejectReason());
|
|
|
848
|
+ }else {
|
|
|
849
|
+ // 查询案件信息
|
|
|
850
|
+ MsCaseApplication application = msCaseApplicationMapper.selectByPrimaryKey(req.getId());
|
|
|
851
|
+ // 根据案件id查询案件相关人
|
|
|
852
|
+ MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(req.getId());
|
|
|
853
|
+ if (application==null||caseAffiliate == null) {
|
|
|
854
|
+ return AjaxResult.error("该案件不存在");
|
|
|
855
|
+ }
|
|
|
856
|
+ // 锁定该案件
|
|
|
857
|
+ application.setLockStatus(YesOrNoEnum.YES.getCode());
|
|
|
858
|
+ Map<Long, MsCaseAffiliate> affiliateMap=new HashMap<>();
|
|
|
859
|
+ affiliateMap.put(req.getId(),caseAffiliate);
|
|
|
860
|
+ caseApplicationService.accept(application,req,affiliateMap);
|
|
842
|
861
|
}
|
|
843
|
|
- // 锁定该案件
|
|
844
|
|
- application.setLockStatus(YesOrNoEnum.YES.getCode());
|
|
845
|
|
- Map<Long, MsCaseAffiliate> affiliateMap=new HashMap<>();
|
|
846
|
|
- affiliateMap.put(req.getId(),caseAffiliate);
|
|
847
|
|
- caseApplicationService.accept(application,req,affiliateMap);
|
|
|
862
|
+
|
|
848
|
863
|
}
|
|
849
|
864
|
|
|
850
|
|
- return AjaxResult.success("受理成功");
|
|
|
865
|
+ return AjaxResult.success();
|
|
851
|
866
|
}
|
|
852
|
867
|
/**
|
|
853
|
868
|
* 案件受理
|
|
|
@@ -856,7 +871,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
856
|
871
|
* @param affiliateMap
|
|
857
|
872
|
*/
|
|
858
|
873
|
@Transactional
|
|
859
|
|
- public void accept(MsCaseApplication application, MsCaseApplication req, Map<Long, MsCaseAffiliate> affiliateMap) {
|
|
|
874
|
+ public void accept(MsCaseApplication application, MsCaseApplicationVO req, Map<Long, MsCaseAffiliate> affiliateMap) {
|
|
|
875
|
+
|
|
|
876
|
+
|
|
860
|
877
|
application.setPaperFlag(req.getPaperFlag());
|
|
861
|
878
|
application.setArbitrateConfirm(req.getArbitrateConfirm());
|
|
862
|
879
|
application.setMediationMethod(req.getMediationMethod());
|
|
|
@@ -870,7 +887,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
870
|
887
|
MsCaseAffiliate affiliate = affiliateMap.get(application.getId());
|
|
871
|
888
|
|
|
872
|
889
|
if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
|
|
873
|
|
- String sendContent = "尊敬的" + affiliate.getNameAgent() + "用户,您的" + application.getCaseNum() + "{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信";
|
|
|
890
|
+ String sendContent = "尊敬的" + affiliate.getNameAgent() + "用户,您的" + application.getCaseNum() + "仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信";
|
|
874
|
891
|
// 给申请人发送案件受理短信 尊敬的{1}用户,您的{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信
|
|
875
|
892
|
Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2049503", affiliate.getContactTelphoneAgent(), new String[]{affiliate.getNameAgent(), application.getCaseNum()});
|
|
876
|
893
|
CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向申请人发送短信," + sendContent);
|
|
|
@@ -885,7 +902,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
885
|
902
|
}
|
|
886
|
903
|
// 给申请人被申请人发送短信
|
|
887
|
904
|
if (StrUtil.isNotEmpty(affiliate.getRespondentPhone())) {
|
|
888
|
|
- String sendContent = "尊敬的" + affiliate.getRespondentName() + "用户,您的" + application.getCaseNum() + "{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信";
|
|
|
905
|
+ String sendContent = "尊敬的" + affiliate.getRespondentName() + "用户,您的" + application.getCaseNum() + "仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信";
|
|
889
|
906
|
// 给被申请人发送案件受理短信 尊敬的{1}用户,您的{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信
|
|
890
|
907
|
Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2049503", affiliate.getRespondentPhone(), new String[]{affiliate.getRespondentName(), application.getCaseNum()});
|
|
891
|
908
|
CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向被申请人发送短信," + sendContent);
|
|
|
@@ -1167,6 +1184,64 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
1167
|
1184
|
CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(), "");
|
|
1168
|
1185
|
|
|
1169
|
1186
|
}
|
|
|
1187
|
+
|
|
|
1188
|
+ /**
|
|
|
1189
|
+ * 案件不予受理
|
|
|
1190
|
+ * @param caseId
|
|
|
1191
|
+ */
|
|
|
1192
|
+ @Transactional
|
|
|
1193
|
+ @Override
|
|
|
1194
|
+ public void notAccept(String caseId,String reason) {
|
|
|
1195
|
+ if(StrUtil.isEmpty(caseId)){
|
|
|
1196
|
+ return;
|
|
|
1197
|
+ }
|
|
|
1198
|
+ Long id = Long.valueOf(caseId);
|
|
|
1199
|
+ // 根据案件id查询案件
|
|
|
1200
|
+ MsCaseApplication application = msCaseApplicationMapper.selectByPrimaryKey(id);
|
|
|
1201
|
+ MsCaseAffiliate affiliate = msCaseAffiliateMapper.selectByPrimaryKey(id);
|
|
|
1202
|
+ if(application==null || affiliate==null){
|
|
|
1203
|
+ return;
|
|
|
1204
|
+ }
|
|
|
1205
|
+ if(application.getCaseFlowId()!=null && application.getCaseFlowId()==4){
|
|
|
1206
|
+ // 超过五日还没有受理,给申请人发送不受理通知
|
|
|
1207
|
+ String phone="";
|
|
|
1208
|
+ if(affiliate.getOrganizeFlag().equals(0)){
|
|
|
1209
|
+ // 自然人
|
|
|
1210
|
+ if(StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())){
|
|
|
1211
|
+ phone=affiliate.getContactTelphoneAgent();
|
|
|
1212
|
+ }else {
|
|
|
1213
|
+ phone=affiliate.getApplicationPhone();
|
|
|
1214
|
+ }
|
|
|
1215
|
+
|
|
|
1216
|
+ }else {
|
|
|
1217
|
+ phone=affiliate.getContactTelphoneAgent();
|
|
|
1218
|
+ }
|
|
|
1219
|
+ if(StrUtil.isNotEmpty(phone)) {
|
|
|
1220
|
+ // 发送短信 2065809 案件不予受理通知 尊敬的用户,您编号为{1}的案件由于{2}所以不予受理,请知晓,如非本人操作,请忽略本短信。
|
|
|
1221
|
+ Boolean smsFlag = SmsUtils.sendSms(id, "2065809", phone, new String[]{application.getCaseNum(),reason});
|
|
|
1222
|
+ String sendContent = "尊敬的用户,您编号为" + application.getCaseNum() + "的案件由于"+reason+"所以不予受理,请知晓,如非本人操作,请忽略本短信。";
|
|
|
1223
|
+ CaseLogUtils.insertCaseLog(application.getId(), application.getCaseFlowId(), application.getCaseStatusName(), sendContent);
|
|
|
1224
|
+
|
|
|
1225
|
+ // 新增短信记录
|
|
|
1226
|
+ SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), phone, new Date(), sendContent);
|
|
|
1227
|
+ if(smsFlag){
|
|
|
1228
|
+ smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
|
|
|
1229
|
+ }else {
|
|
|
1230
|
+ smsSendRecord.setSendStatus(YesOrNoEnum.NO.getCode());
|
|
|
1231
|
+ }
|
|
|
1232
|
+ smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
|
|
1233
|
+ }
|
|
|
1234
|
+ // 修改案件状态为17,结束
|
|
|
1235
|
+ MsCaseApplication caseApplication = new MsCaseApplication();
|
|
|
1236
|
+ caseApplication.setId(id);
|
|
|
1237
|
+ caseApplication.setCaseFlowId(17);
|
|
|
1238
|
+ caseApplication.setCaseStatusName("结束");
|
|
|
1239
|
+ msCaseApplicationMapper.updateByPrimaryKeySelective(caseApplication);
|
|
|
1240
|
+ CaseLogUtils.insertCaseLog(application.getId(), 17, "结束", null);
|
|
|
1241
|
+
|
|
|
1242
|
+ }
|
|
|
1243
|
+ }
|
|
|
1244
|
+
|
|
1170
|
1245
|
/**
|
|
1171
|
1246
|
* 查询预约信息
|
|
1172
|
1247
|
* @param id
|