案件列表修改,缴费确认

This commit is contained in:
18792927508
2023-10-15 15:51:41 +08:00
parent 2a40d552e3
commit 2300df715c
22 changed files with 403 additions and 87 deletions
@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.wisdomarbitrate;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication; import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService; import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO; import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -30,6 +31,16 @@ public class CasePaymentController {
public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) { public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePay(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 = "登录名称") @Excel(name = "登录名称")
private String userName; private String userName;
/** 用户昵称 */ /** 用户昵称 */
@Excel(name = "用户名称") @Excel(name = "用户名称")
private String nickName; private String nickName;
/** 用户身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 用户邮箱 */ /** 用户邮箱 */
@Excel(name = "用户邮箱") @Excel(name = "用户邮箱")
@@ -297,12 +302,21 @@ public class SysUser extends BaseEntity
this.roleId = roleId; this.roleId = roleId;
} }
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("userId", getUserId()) .append("userId", getUserId())
.append("deptId", getDeptId()) .append("deptId", getDeptId())
.append("userName", getUserName()) .append("userName", getUserName())
.append("idCard", getIdCard())
.append("nickName", getNickName()) .append("nickName", getNickName())
.append("email", getEmail()) .append("email", getEmail())
.append("phonenumber", getPhonenumber()) .append("phonenumber", getPhonenumber())
@@ -2,22 +2,14 @@ package com.ruoyi.common.utils;
/** /**
* @author wangqiong * @author wangqiong
* @description * @description 获取微信小程序url scheme
* @date 2023-10-13 10:16 * @date 2023-10-13 10:16
*/ */
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
/**
* @Author: Tenk
*/
@RequiredArgsConstructor
@Component
public class WxAppletNotifyUtils { public class WxAppletNotifyUtils {
/** /**
@@ -115,4 +115,6 @@ public interface SysDeptMapper
* @return 结果 * @return 结果
*/ */
public int deleteDeptById(Long deptId); public int deleteDeptById(Long deptId);
List<Long> selectUserDeptListByRoleId(@Param("roleId")Long roleId);
} }
@@ -15,6 +15,14 @@ public class CaseAffiliate extends BaseEntity {
/** 姓名 */ /** 姓名 */
@Excel(name = "姓名") @Excel(name = "姓名")
private String name; private String name;
/**
* 申请机构id
*/
private String applicationOrganId;
/**
* 申请机构名称
*/
private String applicationOrganName;
/** 身份证号 */ /** 身份证号 */
@Excel(name = "身份证号") @Excel(name = "身份证号")
private String identityNum; private String identityNum;
@@ -49,6 +57,22 @@ public class CaseAffiliate extends BaseEntity {
/** 快递单号 */ /** 快递单号 */
private String trackNum; 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() { public String getSendEmail() {
return sendEmail; return sendEmail;
} }
@@ -114,9 +114,45 @@ public class CaseApplication extends BaseEntity {
private Integer paymentStatus; private Integer paymentStatus;
/** 支付状态描述 */ /** 支付状态描述 */
private String paymentStatusName; private String paymentStatusName;
/**
* 支付方式code,0线上支付,1线下支付
*/
private Integer payTypeCode;
/**
* 支付方式name,0线上支付,1线下支付
*/
private String payTypeName;
/**
* 缴费凭证
*/
private List<CaseAttach> payOrderList;
// 导入校验失败信息 // 导入校验失败信息
private StringBuilder errorMsg; 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() { public StringBuilder getErrorMsg() {
return errorMsg; return errorMsg;
} }
@@ -190,6 +226,39 @@ public class CaseApplication extends BaseEntity {
private String applicantName; private String applicantName;
/** 被申请人名称 */ /** 被申请人名称 */
private String respondentName; 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() { public String getApplicantName() {
return applicantName; return applicantName;
@@ -27,7 +27,7 @@ public class CaseAttach {
*/ */
private String annexPath; private String annexPath;
/** /**
* 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5) * 附件类型,立案申请书(1)、申请人证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)、被申请人证据材料 (6)、庭审笔录(7)、缴费凭证(8)'
*/ */
private Integer annexType; private Integer annexType;
/** /**
@@ -38,4 +38,8 @@ public class CasePaymentRecord {
/** 更新时间 */ /** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/**
* 支付方式 0线上支付,1线下支付
*/
private Integer payType;
} }
@@ -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; package com.ruoyi.wisdomarbitrate.domain.dto;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* 案件缴费传入对象 * 案件缴费传入对象
*/ */
@@ -23,4 +27,12 @@ public class CasePayDTO {
* 支付方式 wxpay(微信) alipay(支付宝) * 支付方式 wxpay(微信) alipay(支付宝)
*/ */
private String platform; private String platform;
/**
* 支付方式 0线上支付,1线下支付
*/
private Integer payType;
/**
* 缴费凭证
*/
private List<CaseAttach> payOrderList;
} }
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator; import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate; import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication; import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@@ -12,6 +13,13 @@ public interface CaseApplicationMapper {
int selectCaseApplicationCount(CaseApplication caseApplication); int selectCaseApplicationCount(CaseApplication caseApplication);
/**
* 查询超级管理员案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
int insertCaseApplication(CaseApplication caseApplication); int insertCaseApplication(CaseApplication caseApplication);
@@ -39,4 +47,10 @@ public interface CaseApplicationMapper {
* @return * @return
*/ */
String selectArbitratorList(@Param("id") String id); String selectArbitratorList(@Param("id") String id);
/**
* 修改支付方式
* @param payDTO
*/
void updatePayType(CaseConfirmPayDTO payDTO);
} }
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication; import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach; import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@@ -14,4 +15,5 @@ public interface CaseAttachMapper {
int updateCaseAttach(CaseAttach caseAttach); int updateCaseAttach(CaseAttach caseAttach);
}
}
@@ -8,4 +8,6 @@ public interface CasePaymentRecordMapper {
CasePaymentRecord queryRecord(String orderNumber); CasePaymentRecord queryRecord(String orderNumber);
void update(CasePaymentRecord casePaymentRecord); 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.common.core.domain.AjaxResult;
import com.ruoyi.dto.PayRequest; import com.ruoyi.dto.PayRequest;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication; import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO; import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
public interface ICasePaymentService { public interface ICasePaymentService {
@@ -12,4 +13,11 @@ public interface ICasePaymentService {
AjaxResult casePay(CasePayDTO casePayDTO); AjaxResult casePay(CasePayDTO casePayDTO);
AjaxResult confirmPayment(CaseApplication caseApplication); AjaxResult confirmPayment(CaseApplication caseApplication);
/**
* 确认缴费
* @param payDTO
* @return
*/
AjaxResult confirmPay(CaseConfirmPayDTO payDTO);
} }
@@ -14,10 +14,9 @@ import com.google.gson.JsonObject;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.constant.CaseApplicationConstants; import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.EsignHttpResponse; import com.ruoyi.common.core.domain.entity.*;
import com.ruoyi.common.core.domain.entity.SysDept;
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.EsignDemoException;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.file.SaaSAPIFileUtils; import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
@@ -50,6 +49,7 @@ import java.util.*;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.ruoyi.common.utils.SecurityUtils.getLoginUser;
import static com.ruoyi.common.utils.SecurityUtils.getUsername; import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -62,7 +62,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
private CaseAffiliateMapper caseAffiliateMapper; private CaseAffiliateMapper caseAffiliateMapper;
@Autowired @Autowired
private ArbitratorMapper arbitratorMapper; private CasePaymentRecordMapper casePaymentRecordMapper;
@Autowired @Autowired
private ArbitrateRecordMapper arbitrateRecordMapper; private ArbitrateRecordMapper arbitrateRecordMapper;
@Autowired @Autowired
@@ -79,9 +79,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}$"); 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 @Override
public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) { 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); return caseApplicationMapper.selectCaseApplicationList(caseApplication);
} }
@@ -99,6 +135,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
// 获取自动编码 // 获取自动编码
String caseNum = generateCaseNum(); String caseNum = generateCaseNum();
caseApplication.setCaseNum(caseNum); caseApplication.setCaseNum(caseNum);
caseApplication.setCreateBy(getUsername());
int rows = caseApplicationMapper.insertCaseApplication(caseApplication); int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates(); List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
@@ -116,7 +153,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) { if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
// 将组织机构id设为申请人名称 // 将组织机构id设为申请人名称
if (deptMap.containsKey(caseAffiliate.getName())) { 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 { } else {
// 如果不存在则新增 // 如果不存在则新增
SysDept dept = new SysDept(); SysDept dept = new SysDept();
@@ -130,7 +168,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
dept.setUpdateBy(getUsername()); dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept); sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(), dept.getDeptId()); deptMap.put(dept.getDeptName(), dept.getDeptId());
caseAffiliate.setName(String.valueOf(dept.getDeptId())); caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
} }
} }
@@ -184,6 +223,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
BigDecimal feeRate = new BigDecimal(0.01); BigDecimal feeRate = new BigDecimal(0.01);
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP); BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
caseApplication.setFeePayable(feePayable); caseApplication.setFeePayable(feePayable);
caseApplication.setUpdateBy(getUsername());
int rows = caseApplicationMapper.updataCaseApplication(caseApplication); int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates(); List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
@@ -199,7 +239,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) { if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
// 将组织机构id设为申请人名称 // 将组织机构id设为申请人名称
if (deptMap.containsKey(caseAffiliate.getName())) { 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 { } else {
// 如果不存在则新增 // 如果不存在则新增
SysDept dept = new SysDept(); SysDept dept = new SysDept();
@@ -213,7 +254,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
dept.setUpdateBy(getUsername()); dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept); sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(), dept.getDeptId()); deptMap.put(dept.getDeptName(), dept.getDeptId());
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
} }
} }
@@ -400,7 +443,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
CaseApplication caseApplicationItera = caseApplicationNewList.get(k); CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
// 新增立案信息 // 新增立案信息
caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION); caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
caseApplicationItera.setCreateBy(getUsername());
int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera); int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates(); List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
if(caseAffiliates!=null&&caseAffiliates.size()>0){ if(caseAffiliates!=null&&caseAffiliates.size()>0){
@@ -879,29 +922,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseAffiliate.setCaseAppliId(caseApplication.getId()); caseAffiliate.setCaseAppliId(caseApplication.getId());
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
if(caseAffiliatListeselect!=null){ 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++){ for (int i = 0; i < caseAffiliatListeselect.size(); i++){
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i); CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
int identityType = caseAffiliateselect.getIdentityType(); int identityType = caseAffiliateselect.getIdentityType();
if(identityType==1){ 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(applicantName.toString());
caseApplicationselect.setApplicantName(caseAffiliateselect.getApplicationOrganName());
}
}
} }
caseApplication.setAnnexType(8);
// 查询缴费凭证
List<CaseAttach> payOrderList = caseAttachMapper.queryCaseAttachList(caseApplication);
caseApplicationselect.setPayOrderList(payOrderList);
return caseApplicationselect; return caseApplicationselect;
} }
@@ -1012,21 +1048,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseAffiliate.setCaseAppliId(caseApplication.getId()); caseAffiliate.setCaseAppliId(caseApplication.getId());
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
if(caseAffiliatListeselect!=null) { 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++) { for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j); CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
int identityType = caseAffiliateselect.getIdentityType(); int identityType = caseAffiliateselect.getIdentityType();
if(identityType==1){ if(identityType==1){
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){ caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
}
} }
//给申请人、被申请人发送短信通知 //给申请人、被申请人发送短信通知
@@ -1108,7 +1135,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
// 将组织机构id设为申请人名称 // 将组织机构id设为申请人名称
if(deptMap.containsKey(caseApplication.getName())){ 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 { }else {
// 如果不存在则新增 // 如果不存在则新增
SysDept dept = new SysDept(); SysDept dept = new SysDept();
@@ -1122,7 +1150,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
dept.setUpdateBy(getUsername()); dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept); sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(),dept.getDeptId()); deptMap.put(dept.getDeptName(),dept.getDeptId());
caseAffiliate.setName(String.valueOf(dept.getDeptId())); caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
caseAffiliate.setApplicationOrganName(caseApplication.getName());
} }
@@ -1,9 +1,15 @@
package com.ruoyi.wisdomarbitrate.service.impl; package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.ruoyi.ElegentPay; import com.ruoyi.ElegentPay;
import com.ruoyi.common.constant.CaseApplicationConstants; import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult; 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.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.SmsUtils; import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.dto.PayRequest; import com.ruoyi.dto.PayRequest;
@@ -29,6 +35,8 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
private final CaseApplicationMapper caseApplicationMapper; private final CaseApplicationMapper caseApplicationMapper;
private final CasePaymentRecordMapper casePaymentRecordMapper; private final CasePaymentRecordMapper casePaymentRecordMapper;
private final CaseAffiliateMapper caseAffiliateMapper; private final CaseAffiliateMapper caseAffiliateMapper;
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired @Autowired
public CasePaymentServiceImpl(ElegentPay elegentPay public CasePaymentServiceImpl(ElegentPay elegentPay
@@ -78,13 +86,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
casePaymentRecord.setPaymentTime(new Date()); casePaymentRecord.setPaymentTime(new Date());
casePaymentRecord.setUpdateTime(new Date()); casePaymentRecord.setUpdateTime(new Date());
casePaymentRecordMapper.update(casePaymentRecord); 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("支付成功"); return AjaxResult.success("支付成功");
} }
@@ -135,4 +137,28 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
} }
return AjaxResult.error("暂无需要确认的缴费清单"); 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,6 +86,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectDeptVo"/> <include refid="selectDeptVo"/>
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
</select> </select>
<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 id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
insert into sys_dept( insert into sys_dept(
@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="userName" column="user_name" /> <result property="userName" column="user_name" />
<result property="nickName" column="nick_name" /> <result property="nickName" column="nick_name" />
<result property="idCard" column="id_card" />
<result property="email" column="email" /> <result property="email" column="email" />
<result property="phonenumber" column="phonenumber" /> <result property="phonenumber" column="phonenumber" />
<result property="sex" column="sex" /> <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="orderNum" column="order_num" />
<result property="leader" column="leader" /> <result property="leader" column="leader" />
<result property="status" column="dept_status" /> <result property="status" column="dept_status" />
</resultMap> </resultMap>
<resultMap id="RoleResult" type="SysRole"> <resultMap id="RoleResult" type="SysRole">
@@ -49,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectUserVo"> <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, 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, 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 from sys_user u
left join sys_dept d on u.dept_id = d.dept_id 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 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> </sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> <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 left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0' where u.del_flag = '0'
<if test="userId != null and userId != 0"> <if test="userId != null and userId != 0">
@@ -86,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> <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 from sys_user u
left join sys_dept d on u.dept_id = d.dept_id 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 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>
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult"> <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 from sys_user u
left join sys_dept d on u.dept_id = d.dept_id 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 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 user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
</select> </select>
<select id="selectUserListByAdRole" resultMap="SysUserResult"> <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_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='仲裁员' join sys_role r on ur.role_id = r.role_id and r.role_name='仲裁员'
where r.del_flag = '0' and r.status='0' where r.del_flag = '0' and r.status='0'
@@ -161,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectUserListByIds" resultMap="SysUserResult"> <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> <where>
<if test="idList != null and idList.size() > 0"> <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="deptId != null and deptId != 0">dept_id,</if>
<if test="userName != null and userName != ''">user_name,</if> <if test="userName != null and userName != ''">user_name,</if>
<if test="nickName != null and nickName != ''">nick_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="email != null and email != ''">email,</if>
<if test="avatar != null and avatar != ''">avatar,</if> <if test="avatar != null and avatar != ''">avatar,</if>
<if test="phonenumber != null and phonenumber != ''">phonenumber,</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="deptId != null and deptId != ''">#{deptId},</if>
<if test="userName != null and userName != ''">#{userName},</if> <if test="userName != null and userName != ''">#{userName},</if>
<if test="nickName != null and nickName != ''">#{nickName},</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="email != null and email != ''">#{email},</if>
<if test="avatar != null and avatar != ''">#{avatar},</if> <if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</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="deptId != null and deptId != 0">dept_id = #{deptId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if> <if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</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="email != null ">email = #{email},</if>
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if> <if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if> <if test="sex != null and sex != ''">sex = #{sex},</if>
@@ -19,13 +19,15 @@
<result property="contactTelphoneAgent" column="contact_telphone_agent" /> <result property="contactTelphoneAgent" column="contact_telphone_agent" />
<result property="contactAddressAgent" column="contact_address_agent" /> <result property="contactAddressAgent" column="contact_address_agent" />
<result property="trackNum" column="track_num" /> <result property="trackNum" column="track_num" />
<result property="applicationOrganId" column="application_organ_id" />
<result property="applicationOrganName" column="application_organ_name" />
</resultMap> </resultMap>
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult"> <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 , 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.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 from case_affiliate c
<where> <where>
<if test="caseAppliId != null "> <if test="caseAppliId != null ">
@@ -36,7 +38,7 @@
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult"> <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 , 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.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 from case_affiliate c
<where> <where>
<if test="caseAppliId != null "> <if test="caseAppliId != null ">
@@ -50,11 +52,11 @@
<insert id="batchCaseAffiliate"> <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,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
contact_address_agent ) values contact_address_agent ) values
<foreach item="item" index="index" collection="list" separator=","> <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.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},
#{item.contactTelphoneAgent},#{item.contactAddressAgent}) #{item.contactTelphoneAgent},#{item.contactAddressAgent})
</foreach> </foreach>
@@ -67,6 +69,8 @@
set set
case_appli_id=#{caseAppliId}, case_appli_id=#{caseAppliId},
identity_type= #{identityType}, identity_type= #{identityType},
application_organ_id= #{applicationOrganId},
application_organ_name= #{applicationOrganName},
name = #{name}, name = #{name},
identity_num = #{identityNum}, identity_num = #{identityNum},
contact_telphone = #{contactTelphone}, contact_telphone = #{contactTelphone},
@@ -34,11 +34,12 @@
<result property="arbitratorName" column="arbitrator_name" /> <result property="arbitratorName" column="arbitrator_name" />
<result property="paymentStatus" column="payment_status" /> <result property="paymentStatus" column="payment_status" />
<result property="paymentStatusName" column="paymentStatusName" /> <result property="paymentStatusName" column="paymentStatusName" />
<result property="payTypeCode" column="pay_type" />
</resultMap> </resultMap>
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult"> <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
select t.* from(
<!-- 查询法律顾问案件-->
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method , select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理' CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
ELSE '无审理方式' ELSE '无审理方式'
@@ -55,10 +56,67 @@
c.hear_date ,c.arbitrat_claims , c.hear_date ,c.arbitrat_claims ,
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable , c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time , c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as applicantName,c.register_date c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.arbitrator_id,ca.identity_num , ca.identity_type
from case_application c from case_application c
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1 LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id <where>
<if test="caseStatus != null">
AND c.case_status = #{caseStatus}
</if>
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
<if test="caseStatusList != null and caseStatusList.size() > 0">
and c.case_status in
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
#{caseStatus}
</foreach>
</if>
</where>
) t <where>
<!--申请人-->
<if test="nameId != null and nameId != ''">
or ( t.application_organ_id = #{nameId} AND t.identity_type=1 )
</if>
<!--被申请人-->
<if test="idCard != null and idCard != ''">
or (t.identity_num=#{idCard} AND t.identity_type=2)
</if>
<!--仲裁员-->
<if test="userId != null and userId != ''">
or instr (t.arbitrator_id,#{userId})>0
</if>
<!--法律顾问-->
<if test="deptIds != null and deptIds.size() > 0">
or t.name
in
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
order by t.create_time desc,t.case_num desc
</select>
<select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
ELSE '无审理方式'
END arbitratMethodName,
c.case_status ,
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
ELSE '无案件状态'
END caseStatusName,
c.hear_date ,c.arbitrat_claims ,
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
from case_application c
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
<where> <where>
<if test="caseStatus != null"> <if test="caseStatus != null">
AND c.case_status = #{caseStatus} AND c.case_status = #{caseStatus}
@@ -67,7 +125,7 @@
AND c.case_num = #{caseNum} AND c.case_num = #{caseNum}
</if> </if>
<if test="nameId != null and nameId != ''"> <if test="nameId != null and nameId != ''">
AND ca.NAME=#{nameId} AND ca.identity_type=1 and ca.name=d.dept_id AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
</if> </if>
<if test="caseStatusList != null and caseStatusList.size() > 0"> <if test="caseStatusList != null and caseStatusList.size() > 0">
and c.case_status in and c.case_status in
@@ -79,6 +137,7 @@
order by c.create_time desc,c.case_num desc order by c.create_time desc,c.case_num desc
</select> </select>
<select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int"> <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
select count(1) from case_application c select count(1) from case_application c
<where> <where>
@@ -184,6 +243,9 @@
</set> </set>
where id = #{id} where id = #{id}
</update> </update>
<update id="updatePayType">
update case_application set pay_type=#{payType} where id = #{caseId}
</update>
<delete id="deletecaseApplication" parameterType="CaseApplication"> <delete id="deletecaseApplication" parameterType="CaseApplication">
delete from case_application where id = #{id} delete from case_application where id = #{id}
@@ -206,10 +268,10 @@
c.hear_date ,c.arbitrat_claims , c.hear_date ,c.arbitrat_claims ,
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable , c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time , c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,d.dept_name as applicantName c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
from case_application c from case_application c
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1 LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
<where> <where>
<if test="id != null "> <if test="id != null ">
AND c.id = #{id} AND c.id = #{id}
@@ -238,7 +300,8 @@
p.payment_status , p.payment_status ,
CASE p.payment_status when 1 then '已支付' when 0 then '未支付' CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
ELSE '无支付状态' ELSE '无支付状态'
END paymentStatusName END paymentStatusName,c.pay_type,
CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
from case_application c left join case_payment_record p on c.id = p.case_id from case_application c left join case_payment_record p on c.id = p.case_id
where c.case_status = 3 and p.payment_status = 1 where c.case_status = 3 and p.payment_status = 1
AND c.id = #{id} AND c.id = #{id}
@@ -17,6 +17,7 @@
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account) 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}) VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
</insert> </insert>
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult"> <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 select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
from case_attach from case_attach
@@ -11,6 +11,7 @@
<result property="paymentTime" column="payment_time" /> <result property="paymentTime" column="payment_time" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="payType" column="pay_type" />
</resultMap> </resultMap>
<insert id="saveRecord"> <insert id="saveRecord">
INSERT INTO case_payment_record (case_id, order_number, payment_status , create_time) 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="paymentTime != null ">payment_time = #{paymentTime},</if>
<if test="paymentStatus != null ">payment_status = #{paymentStatus},</if> <if test="paymentStatus != null ">payment_status = #{paymentStatus},</if>
<if test="updateTime != null ">update_time = #{updateTime},</if> <if test="updateTime != null ">update_time = #{updateTime},</if>
<if test="payType != null ">pay_type = #{payType},</if>
</set> </set>
where id = #{id} where id = #{id}
</update> </update>