合并
This commit is contained in:
@@ -115,4 +115,6 @@ public interface SysDeptMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeptById(Long deptId);
|
||||
|
||||
List<Long> selectUserDeptListByRoleId(@Param("roleId")Long roleId);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,14 @@ public class CaseAffiliate extends BaseEntity {
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 申请机构id
|
||||
*/
|
||||
private String applicationOrganId;
|
||||
/**
|
||||
* 申请机构名称
|
||||
*/
|
||||
private String applicationOrganName;
|
||||
/** 身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String identityNum;
|
||||
@@ -49,6 +57,22 @@ public class CaseAffiliate extends BaseEntity {
|
||||
/** 快递单号 */
|
||||
private String trackNum;
|
||||
|
||||
public String getApplicationOrganId() {
|
||||
return applicationOrganId;
|
||||
}
|
||||
|
||||
public void setApplicationOrganId(String applicationOrganId) {
|
||||
this.applicationOrganId = applicationOrganId;
|
||||
}
|
||||
|
||||
public String getApplicationOrganName() {
|
||||
return applicationOrganName;
|
||||
}
|
||||
|
||||
public void setApplicationOrganName(String applicationOrganName) {
|
||||
this.applicationOrganName = applicationOrganName;
|
||||
}
|
||||
|
||||
public String getSendEmail() {
|
||||
return sendEmail;
|
||||
}
|
||||
|
||||
@@ -124,9 +124,45 @@ public class CaseApplication extends BaseEntity {
|
||||
private Integer paymentStatus;
|
||||
/** 支付状态描述 */
|
||||
private String paymentStatusName;
|
||||
/**
|
||||
* 支付方式code,0线上支付,1线下支付
|
||||
*/
|
||||
private Integer payTypeCode;
|
||||
/**
|
||||
* 支付方式name,0线上支付,1线下支付
|
||||
*/
|
||||
private String payTypeName;
|
||||
/**
|
||||
* 缴费凭证
|
||||
*/
|
||||
private List<CaseAttach> payOrderList;
|
||||
// 导入校验失败信息
|
||||
private StringBuilder errorMsg;
|
||||
|
||||
public Integer getPayTypeCode() {
|
||||
return payTypeCode;
|
||||
}
|
||||
|
||||
public void setPayTypeCode(Integer payTypeCode) {
|
||||
this.payTypeCode = payTypeCode;
|
||||
}
|
||||
|
||||
public String getPayTypeName() {
|
||||
return payTypeName;
|
||||
}
|
||||
|
||||
public void setPayTypeName(String payTypeName) {
|
||||
this.payTypeName = payTypeName;
|
||||
}
|
||||
|
||||
public List<CaseAttach> getPayOrderList() {
|
||||
return payOrderList;
|
||||
}
|
||||
|
||||
public void setPayOrderList(List<CaseAttach> payOrderList) {
|
||||
this.payOrderList = payOrderList;
|
||||
}
|
||||
|
||||
public StringBuilder getErrorMsg() {
|
||||
return errorMsg;
|
||||
}
|
||||
@@ -200,6 +236,39 @@ public class CaseApplication extends BaseEntity {
|
||||
private String applicantName;
|
||||
/** 被申请人名称 */
|
||||
private String respondentName;
|
||||
/**
|
||||
* 用户身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
private List<Long> deptIds;
|
||||
|
||||
public List<Long> getDeptIds() {
|
||||
return deptIds;
|
||||
}
|
||||
|
||||
public void setDeptIds(List<Long> deptIds) {
|
||||
this.deptIds = deptIds;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getApplicantName() {
|
||||
return applicantName;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class CaseAttach {
|
||||
*/
|
||||
private String annexPath;
|
||||
/**
|
||||
* 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)
|
||||
* 附件类型,立案申请书(1)、申请人证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)、被申请人证据材料 (6)、庭审笔录(7)、缴费凭证(8)'
|
||||
*/
|
||||
private Integer annexType;
|
||||
/**
|
||||
|
||||
@@ -38,4 +38,8 @@ public class CasePaymentRecord {
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 支付方式 0线上支付,1线下支付
|
||||
*/
|
||||
private Integer payType;
|
||||
}
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.dto;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 案件确认缴费传入对象
|
||||
*/
|
||||
@Data
|
||||
public class CaseConfirmPayDTO {
|
||||
/**
|
||||
* 案件id
|
||||
*/
|
||||
@NotNull(message = "案件id不能为空")
|
||||
private Long caseId;
|
||||
|
||||
/**
|
||||
* 支付方式 0线上支付,1线下支付
|
||||
*/
|
||||
private Integer payType;
|
||||
/**
|
||||
* 缴费凭证
|
||||
*/
|
||||
private List<CaseAttach> payOrderList;
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.dto;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 案件缴费传入对象
|
||||
*/
|
||||
@@ -23,4 +27,12 @@ public class CasePayDTO {
|
||||
* 支付方式 wxpay(微信) alipay(支付宝)
|
||||
*/
|
||||
private String platform;
|
||||
/**
|
||||
* 支付方式 0线上支付,1线下支付
|
||||
*/
|
||||
private Integer payType;
|
||||
/**
|
||||
* 缴费凭证
|
||||
*/
|
||||
private List<CaseAttach> payOrderList;
|
||||
}
|
||||
+14
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -12,6 +13,13 @@ public interface CaseApplicationMapper {
|
||||
|
||||
int selectCaseApplicationCount(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 查询超级管理员案件
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
|
||||
|
||||
int insertCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
|
||||
@@ -39,4 +47,10 @@ public interface CaseApplicationMapper {
|
||||
* @return
|
||||
*/
|
||||
String selectArbitratorList(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 修改支付方式
|
||||
* @param payDTO
|
||||
*/
|
||||
void updatePayType(CaseConfirmPayDTO payDTO);
|
||||
}
|
||||
|
||||
+2
@@ -8,4 +8,6 @@ public interface CasePaymentRecordMapper {
|
||||
CasePaymentRecord queryRecord(String orderNumber);
|
||||
|
||||
void update(CasePaymentRecord casePaymentRecord);
|
||||
|
||||
CasePaymentRecord selectRecordByCaseId(Long id);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.dto.PayRequest;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
|
||||
|
||||
public interface ICasePaymentService {
|
||||
@@ -12,4 +13,11 @@ public interface ICasePaymentService {
|
||||
AjaxResult casePay(CasePayDTO casePayDTO);
|
||||
|
||||
AjaxResult confirmPayment(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 确认缴费
|
||||
* @param payDTO
|
||||
* @return
|
||||
*/
|
||||
AjaxResult confirmPay(CaseConfirmPayDTO payDTO);
|
||||
}
|
||||
|
||||
+67
-38
@@ -14,10 +14,9 @@ import com.google.gson.JsonObject;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.*;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.WordUtil;
|
||||
@@ -57,6 +56,7 @@ import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getLoginUser;
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
private CaseAffiliateMapper caseAffiliateMapper;
|
||||
|
||||
@Autowired
|
||||
private ArbitratorMapper arbitratorMapper;
|
||||
private CasePaymentRecordMapper casePaymentRecordMapper;
|
||||
@Autowired
|
||||
private ArbitrateRecordMapper arbitrateRecordMapper;
|
||||
@Autowired
|
||||
@@ -88,9 +88,45 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 数据权限:1.每个人不同的角色,而每个角色可以操作不同的案件状态
|
||||
* 2.申请人:金融机构下,可以看到改机构的所有的案件
|
||||
* 3.被申请人:可以看到自己相关的案件(案件有被申请人相关的信息)
|
||||
* 4.仲裁员:案件选定了某个仲裁员后,该仲裁员就可以查看该案件
|
||||
* 5.仲裁委(部门长):可以查看所有的案件
|
||||
* 6.法律顾问秘书:可以属于多个机构,可以查看相关机构的所有案件
|
||||
* 7.超级管理员:可以查看所有的信息和数据
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
|
||||
// 获取登录用户
|
||||
LoginUser loginUser = getLoginUser();
|
||||
SysUser user = loginUser.getUser();
|
||||
Long userId = user.getUserId();
|
||||
Long deptId = user.getDeptId();
|
||||
List<SysRole> roles = user.getRoles();
|
||||
// 查询登录人身份证号
|
||||
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||
caseApplication.setIdCard(sysUser.getIdCard());
|
||||
caseApplication.setUserId(String.valueOf(userId));
|
||||
for (SysRole role : roles) {
|
||||
// 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||
if(role.getRoleName().equals("超级管理员")
|
||||
||role.getRoleName().equals("仲裁委")
|
||||
||role.getRoleName().equals("部门长")){
|
||||
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||
}
|
||||
if(role.getRoleName().equals("法律顾问")){
|
||||
// 查询角色有关的用户部门
|
||||
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
caseApplication.setDeptIds(deptIds);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||
return caseApplicationMapper.selectCaseApplicationList(caseApplication);
|
||||
|
||||
}
|
||||
@@ -108,6 +144,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
// 获取自动编码
|
||||
String caseNum = generateCaseNum();
|
||||
caseApplication.setCaseNum(caseNum);
|
||||
caseApplication.setCreateBy(getUsername());
|
||||
|
||||
int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
|
||||
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
|
||||
@@ -125,7 +162,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
||||
// 将组织机构id设为申请人名称
|
||||
if (deptMap.containsKey(caseAffiliate.getName())) {
|
||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
||||
caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
||||
caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
|
||||
} else {
|
||||
// 如果不存在则新增
|
||||
SysDept dept = new SysDept();
|
||||
@@ -139,7 +177,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
dept.setUpdateBy(getUsername());
|
||||
sysDeptMapper.insertDept(dept);
|
||||
deptMap.put(dept.getDeptName(), dept.getDeptId());
|
||||
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
|
||||
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
||||
caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -193,6 +232,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
BigDecimal feeRate = new BigDecimal(0.01);
|
||||
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
|
||||
caseApplication.setFeePayable(feePayable);
|
||||
caseApplication.setUpdateBy(getUsername());
|
||||
|
||||
int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
|
||||
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
|
||||
@@ -208,7 +248,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
||||
// 将组织机构id设为申请人名称
|
||||
if (deptMap.containsKey(caseAffiliate.getName())) {
|
||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
||||
caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
|
||||
caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
||||
} else {
|
||||
// 如果不存在则新增
|
||||
SysDept dept = new SysDept();
|
||||
@@ -222,7 +263,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
dept.setUpdateBy(getUsername());
|
||||
sysDeptMapper.insertDept(dept);
|
||||
deptMap.put(dept.getDeptName(), dept.getDeptId());
|
||||
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
|
||||
|
||||
caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
|
||||
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -409,7 +452,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
|
||||
// 新增立案信息
|
||||
caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
|
||||
|
||||
caseApplicationItera.setCreateBy(getUsername());
|
||||
int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
|
||||
List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
|
||||
if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
||||
@@ -888,29 +931,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||
if(caseAffiliatListeselect!=null){
|
||||
// 查询组织机构
|
||||
List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
|
||||
Map<String,String> deptMap=new HashMap<>();
|
||||
if(CollectionUtil.isNotEmpty(sysDepts)){
|
||||
for (SysDept sysDept : sysDepts) {
|
||||
deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
|
||||
}
|
||||
}
|
||||
StringBuffer applicantName = new StringBuffer();
|
||||
|
||||
for (int i = 0; i < caseAffiliatListeselect.size(); i++){
|
||||
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
|
||||
int identityType = caseAffiliateselect.getIdentityType();
|
||||
if(identityType==1){
|
||||
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
||||
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
||||
}
|
||||
applicantName.append(caseAffiliateselect.getName()).append(",");;
|
||||
|
||||
caseApplicationselect.setApplicantName(caseAffiliateselect.getApplicationOrganName());
|
||||
}
|
||||
}
|
||||
caseApplicationselect.setApplicantName(applicantName.toString());
|
||||
|
||||
|
||||
}
|
||||
caseApplication.setAnnexType(8);
|
||||
// 查询缴费凭证
|
||||
List<CaseAttach> payOrderList = caseAttachMapper.queryCaseAttachList(caseApplication);
|
||||
caseApplicationselect.setPayOrderList(payOrderList);
|
||||
|
||||
return caseApplicationselect;
|
||||
}
|
||||
|
||||
@@ -1216,21 +1252,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||
if(caseAffiliatListeselect!=null) {
|
||||
// 查询组织机构
|
||||
List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
|
||||
Map<String,String> deptMap=new HashMap<>();
|
||||
if(CollectionUtil.isNotEmpty(sysDepts)){
|
||||
for (SysDept sysDept : sysDepts) {
|
||||
deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
|
||||
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
|
||||
int identityType = caseAffiliateselect.getIdentityType();
|
||||
if(identityType==1){
|
||||
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
||||
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
||||
}
|
||||
caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
|
||||
|
||||
}
|
||||
//给申请人、被申请人发送短信通知
|
||||
@@ -1312,7 +1339,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
|
||||
// 将组织机构id设为申请人名称
|
||||
if(deptMap.containsKey(caseApplication.getName())){
|
||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
|
||||
caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
|
||||
caseAffiliate.setApplicationOrganName(caseApplication.getName());
|
||||
}else {
|
||||
// 如果不存在则新增
|
||||
SysDept dept = new SysDept();
|
||||
@@ -1326,7 +1354,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
dept.setUpdateBy(getUsername());
|
||||
sysDeptMapper.insertDept(dept);
|
||||
deptMap.put(dept.getDeptName(),dept.getDeptId());
|
||||
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
|
||||
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
||||
caseAffiliate.setApplicationOrganName(caseApplication.getName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
+33
-7
@@ -1,9 +1,15 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.ElegentPay;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.dto.PayRequest;
|
||||
@@ -29,6 +35,8 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
private final CaseApplicationMapper caseApplicationMapper;
|
||||
private final CasePaymentRecordMapper casePaymentRecordMapper;
|
||||
private final CaseAffiliateMapper caseAffiliateMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
|
||||
@Autowired
|
||||
public CasePaymentServiceImpl(ElegentPay elegentPay
|
||||
@@ -78,13 +86,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
casePaymentRecord.setPaymentTime(new Date());
|
||||
casePaymentRecord.setUpdateTime(new Date());
|
||||
casePaymentRecordMapper.update(casePaymentRecord);
|
||||
//根据案件id查询案件信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseId);
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
//修改案件状态
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
|
||||
return AjaxResult.success("支付成功");
|
||||
}
|
||||
|
||||
@@ -135,4 +137,28 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
}
|
||||
return AjaxResult.error("暂无需要确认的缴费清单");
|
||||
}
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult confirmPay(CaseConfirmPayDTO payDTO) {
|
||||
if(payDTO.getCaseId()!=null&&payDTO.getPayType()!=null){
|
||||
// 修改支付方式
|
||||
|
||||
caseApplicationMapper.updatePayType(payDTO);
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(payDTO.getPayOrderList())){
|
||||
for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
|
||||
caseAttach.setCaseAppliId(payDTO.getCaseId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// 修改节点状态
|
||||
//根据案件id查询案件信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(payDTO.getCaseId());
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
//修改案件状态
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
return AjaxResult.success("确认缴费成功");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user