合并
This commit is contained in:
+11
@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -30,6 +31,16 @@ public class CasePaymentController {
|
||||
public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
|
||||
return paymentService.casePay(casePayDTO);
|
||||
}
|
||||
/**
|
||||
* 确认缴费
|
||||
* @param payDTO 缴费传入参数
|
||||
* @return 统一响应结果
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
|
||||
@PostMapping("/confirmPay")
|
||||
public AjaxResult confirmPay(@Validated @RequestBody CaseConfirmPayDTO payDTO) {
|
||||
return paymentService.confirmPay(payDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 缴费确认
|
||||
|
||||
@@ -33,9 +33,14 @@ public class SysUser extends BaseEntity
|
||||
@Excel(name = "登录名称")
|
||||
private String userName;
|
||||
|
||||
|
||||
|
||||
/** 用户昵称 */
|
||||
@Excel(name = "用户名称")
|
||||
private String nickName;
|
||||
/** 用户身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
/** 用户邮箱 */
|
||||
@Excel(name = "用户邮箱")
|
||||
@@ -297,12 +302,21 @@ public class SysUser extends BaseEntity
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("userId", getUserId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("userName", getUserName())
|
||||
.append("idCard", getIdCard())
|
||||
.append("nickName", getNickName())
|
||||
.append("email", getEmail())
|
||||
.append("phonenumber", getPhonenumber())
|
||||
|
||||
@@ -2,22 +2,14 @@ package com.ruoyi.common.utils;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description
|
||||
* @description 获取微信小程序url scheme
|
||||
* @date 2023-10-13 10:16
|
||||
*/
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
/**
|
||||
* @Author: Tenk
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Component
|
||||
public class WxAppletNotifyUtils {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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("确认缴费成功");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,8 +86,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectDeptVo"/>
|
||||
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
|
||||
<select id="selectUserDeptListByRoleId" resultType="java.lang.Long">
|
||||
select u.dept_id from sys_user_role r
|
||||
join sys_user u on r.role_id=#{roleId} and r.user_id=u.user_id
|
||||
</select>
|
||||
|
||||
<insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
|
||||
insert into sys_dept(
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
|
||||
@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="idCard" column="id_card" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
<result property="sex" column="sex" />
|
||||
@@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="leader" column="leader" />
|
||||
<result property="status" column="dept_status" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="RoleResult" type="SysRole">
|
||||
@@ -49,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
@@ -57,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
@@ -86,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
@@ -103,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
@@ -142,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
||||
</select>
|
||||
<select id="selectUserListByAdRole" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u
|
||||
join sys_user_role ur on ur.user_id =u.user_id
|
||||
join sys_role r on ur.role_id = r.role_id and r.role_name='仲裁员'
|
||||
where r.del_flag = '0' and r.status='0'
|
||||
@@ -161,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
</select>
|
||||
<select id="selectUserListByIds" resultMap="SysUserResult">
|
||||
select u.user_id, u.nick_name, u.user_name, u.phonenumber, u.remark from sys_user u
|
||||
select u.user_id, u.nick_name, u.user_name,u.id_card, u.phonenumber, u.remark from sys_user u
|
||||
|
||||
<where>
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
@@ -181,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
||||
@@ -195,6 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="idCard != null and idCard != ''">#{idCard},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||
@@ -213,6 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
|
||||
<if test="email != null ">email = #{email},</if>
|
||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||
|
||||
@@ -19,13 +19,15 @@
|
||||
<result property="contactTelphoneAgent" column="contact_telphone_agent" />
|
||||
<result property="contactAddressAgent" column="contact_address_agent" />
|
||||
<result property="trackNum" column="track_num" />
|
||||
<result property="applicationOrganId" column="application_organ_id" />
|
||||
<result property="applicationOrganName" column="application_organ_name" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
|
||||
select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
|
||||
c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
|
||||
c.track_num
|
||||
c.track_num,c.application_organ_id,c.application_organ_name
|
||||
from case_affiliate c
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
@@ -36,7 +38,7 @@
|
||||
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
|
||||
select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
|
||||
c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
|
||||
c.track_num
|
||||
c.track_num,c.application_organ_id,c.application_organ_name
|
||||
from case_affiliate c
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
@@ -50,11 +52,11 @@
|
||||
|
||||
|
||||
<insert id="batchCaseAffiliate">
|
||||
insert into case_affiliate(case_appli_id, identity_type,name,identity_num,contact_telphone,
|
||||
insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
|
||||
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
|
||||
contact_address_agent ) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.caseAppliId},#{item.identityType},#{item.name},#{item.identityNum},#{item.contactTelphone},
|
||||
(#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
|
||||
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},
|
||||
#{item.contactTelphoneAgent},#{item.contactAddressAgent})
|
||||
</foreach>
|
||||
@@ -67,6 +69,8 @@
|
||||
set
|
||||
case_appli_id=#{caseAppliId},
|
||||
identity_type= #{identityType},
|
||||
application_organ_id= #{applicationOrganId},
|
||||
application_organ_name= #{applicationOrganName},
|
||||
name = #{name},
|
||||
identity_num = #{identityNum},
|
||||
contact_telphone = #{contactTelphone},
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
|
||||
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
|
||||
</insert>
|
||||
|
||||
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
from case_attach
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<result property="paymentTime" column="payment_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="payType" column="pay_type" />
|
||||
</resultMap>
|
||||
<insert id="saveRecord">
|
||||
INSERT INTO case_payment_record (case_id, order_number, payment_status , create_time)
|
||||
@@ -24,6 +25,7 @@
|
||||
<if test="paymentTime != null ">payment_time = #{paymentTime},</if>
|
||||
<if test="paymentStatus != null ">payment_status = #{paymentStatus},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="payType != null ">pay_type = #{payType},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user