Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev

This commit was merged in pull request #191.
This commit is contained in:
2023-11-03 20:06:27 +08:00
committed by Gitea
5 changed files with 467 additions and 448 deletions
@@ -582,7 +582,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
for (CaseAttach caseAttach : caseAttachList) { for (CaseAttach caseAttach : caseAttachList) {
if (caseAttach.getAnnexType() == 3) { if (caseAttach.getAnnexType() == 3) {
String annexName = caseAttach.getAnnexName(); String annexName = caseAttach.getAnnexName();
String prefix = "/profile/upload"; String prefix = "/profile/upload/";
int startIndex = prefix.length(); int startIndex = prefix.length();
String path = caseAttach.getAnnexPath() + annexName.substring(startIndex); String path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
file = new File(path); file = new File(path);
@@ -116,19 +116,22 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
// 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。 // 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
String name = affiliate.getName(); String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr}); request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
if (SmsUtils.sendSms(request)) { Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录 //保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord(); SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplication.getId()); smsSendRecord.setCaseId(caseApplication.getId());
smsSendRecord.setCaseNum(caseApplication1.getCaseNum()); smsSendRecord.setCaseNum(caseApplication1.getCaseNum());
smsSendRecord.setPhone(request.getPhone()); smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date()); smsSendRecord.setSendTime(new Date());
String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。"; String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setSendContent(content); smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername()); smsSendRecord.setCreateBy(getUsername());
if (aBoolean){
smsSendRecord.setSendStatus(1); smsSendRecord.setSendStatus(1);
smsRecordMapper.saveSmsSendRecord(smsSendRecord); }else {
smsSendRecord.setSendStatus(0);
} }
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
} }
} }
@@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import static com.ruoyi.common.utils.SecurityUtils.getUsername; import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@Service @Service
@@ -33,7 +34,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
private final CasePaymentRecordMapper casePaymentRecordMapper; private final CasePaymentRecordMapper casePaymentRecordMapper;
private final CaseAffiliateMapper caseAffiliateMapper; private final CaseAffiliateMapper caseAffiliateMapper;
@Autowired @Autowired
private CaseAttachMapper caseAttachMapper; private CaseAttachMapper caseAttachMapper;
@Autowired @Autowired
private SmsRecordMapper smsRecordMapper; private SmsRecordMapper smsRecordMapper;
@@ -118,38 +119,44 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
// 模板id:1928003 普通短信 案件受理通知 // 模板id:1928003 普通短信 案件受理通知
String name = affiliate.getName(); String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseName, caseNum}); request.setTemplateParamSet(new String[]{name, caseName, caseNum});
if (SmsUtils.sendSms(request)){ Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录 //保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord(); SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplication.getId()); smsSendRecord.setCaseId(caseApplication.getId());
smsSendRecord.setCaseNum(caseNum); smsSendRecord.setCaseNum(caseNum);
smsSendRecord.setPhone(request.getPhone()); smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date()); smsSendRecord.setSendTime(new Date());
String content="尊敬的"+name+"用户,您的"+caseName+"案件"+caseNum+"已成功受理。"; String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理。";
smsSendRecord.setSendContent(content); smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername()); smsSendRecord.setCreateBy(getUsername());
if (aBoolean) {
smsSendRecord.setSendStatus(1); smsSendRecord.setSendStatus(1);
smsRecordMapper.saveSmsSendRecord(smsSendRecord); } else {
smsSendRecord.setSendStatus(0);
} }
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
} else { //被申请人 } else { //被申请人
Boolean aBoolean = SmsUtils.sendSms(request);
request.setPhone(affiliate.getContactTelphone()); request.setPhone(affiliate.getContactTelphone());
request.setTemplateId("1952840"); request.setTemplateId("1952840");
// 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信 // 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
String name = affiliate.getName(); String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseName, caseNum}); request.setTemplateParamSet(new String[]{name, caseName, caseNum});
if (SmsUtils.sendSms(request)){ //保存短信发送记录
//保存短信发送记录 SmsSendRecord smsSendRecord = new SmsSendRecord();
SmsSendRecord smsSendRecord = new SmsSendRecord(); smsSendRecord.setCaseId(caseApplication.getId());
smsSendRecord.setCaseId(caseApplication.getId()); smsSendRecord.setCaseNum(caseNum);
smsSendRecord.setCaseNum(caseNum); smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setPhone(request.getPhone()); smsSendRecord.setSendTime(new Date());
smsSendRecord.setSendTime(new Date()); String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信";
String content="尊敬的"+name+"用户,您的"+caseName+"案件"+caseNum+"已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信"; smsSendRecord.setSendContent(content);
smsSendRecord.setSendContent(content); smsSendRecord.setCreateBy(getUsername());
smsSendRecord.setCreateBy(getUsername()); if (aBoolean){
smsSendRecord.setSendStatus(1); smsSendRecord.setSendStatus(1);
smsRecordMapper.saveSmsSendRecord(smsSendRecord); }else {
smsSendRecord.setSendStatus(0);
} }
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
} }
} }
//更改记录表里的支付状态和支付时间 //更改记录表里的支付状态和支付时间
@@ -159,22 +166,23 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
casePaymentRecord.setUpdateTime(new Date()); casePaymentRecord.setUpdateTime(new Date());
casePaymentRecordMapper.update(casePaymentRecord); casePaymentRecordMapper.update(casePaymentRecord);
// 新增日志 // 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CROSSEXAMI,""); CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
return AjaxResult.success(); return AjaxResult.success();
} }
} }
return AjaxResult.error("暂无需要确认的缴费清单"); return AjaxResult.error("暂无需要确认的缴费清单");
} }
@Transactional @Transactional
@Override @Override
public AjaxResult confirmPay(CaseConfirmPayDTO payDTO) { public AjaxResult confirmPay(CaseConfirmPayDTO payDTO) {
if(payDTO.getCaseId()!=null&&payDTO.getPayType()!=null){ if (payDTO.getCaseId() != null && payDTO.getPayType() != null) {
// 修改支付方式 // 修改支付方式
caseApplicationMapper.updatePayType(payDTO); caseApplicationMapper.updatePayType(payDTO);
} }
if(CollectionUtil.isNotEmpty(payDTO.getPayOrderList())){ if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
for (CaseAttach caseAttach : payDTO.getPayOrderList()) { for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
caseAttach.setCaseAppliId(payDTO.getCaseId()); caseAttach.setCaseAppliId(payDTO.getCaseId());
caseAttachMapper.updateCaseAttach(caseAttach); caseAttachMapper.updateCaseAttach(caseAttach);
@@ -188,7 +196,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM); caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
//修改案件状态 //修改案件状态
int i = caseApplicationMapper.submitCaseApplication(caseApplication1); int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if(i>0) { if (i > 0) {
// 修改支付状态 // 修改支付状态
CasePaymentRecord paymentRecord = new CasePaymentRecord(); CasePaymentRecord paymentRecord = new CasePaymentRecord();
paymentRecord.setPayType(payDTO.getPayType()); paymentRecord.setPayType(payDTO.getPayType());
@@ -204,5 +212,4 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
} }
} }
@@ -43,7 +43,7 @@ public class FixSelectFlowDetailUtils {
Gson gson = new Gson(); Gson gson = new Gson();
SealSignRecord sealSignRecordselect = new SealSignRecord(); SealSignRecord sealSignRecordselect = new SealSignRecord();
// sealSignRecordselect.setSignFlowStatus(1); // sealSignRecordselect.setSignFlowStatus(1);
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect); List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
try { try {
@@ -118,7 +118,7 @@ public class FixSelectFlowDetailUtils {
caseApplication.setFilearbitraUrl(filearbitraUrl); caseApplication.setFilearbitraUrl(filearbitraUrl);
caseApplicationMapper.submitCaseApplication(caseApplication); caseApplicationMapper.submitCaseApplication(caseApplication);
LocalDate now = LocalDate.now(); /* LocalDate now = LocalDate.now();
String year = Integer.toString(now.getYear()); String year = Integer.toString(now.getYear());
String month = String.format("%02d", now.getMonthValue()); String month = String.format("%02d", now.getMonthValue());
String day = String.format("%02d", now.getDayOfMonth()); String day = String.format("%02d", now.getDayOfMonth());
@@ -137,7 +137,7 @@ public class FixSelectFlowDetailUtils {
caseAttach.setAnnexPath(savePath); caseAttach.setAnnexPath(savePath);
caseAttach.setAnnexName(saveName); caseAttach.setAnnexName(saveName);
caseAttachMapper.updateCaseAttachBycaseid(caseAttach); caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
} }*/
} }
} }
@@ -147,9 +147,6 @@ public class FixSelectFlowDetailUtils {
} }
} }
} catch (EsignDemoException e) { } catch (EsignDemoException e) {
e.printStackTrace(); e.printStackTrace();
} }
@@ -198,9 +195,4 @@ public class FixSelectFlowDetailUtils {
} }
} }