This commit is contained in:
qitz
2023-10-16 15:12:12 +08:00
25 changed files with 508 additions and 103 deletions
@@ -259,7 +259,7 @@ public class CaseApplicationController extends BaseController {
* @return
*/
@PostMapping("/creatTrialRecord")
@PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
public AjaxResult creatTrialRecord(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
return caseApplicationService.creatTrialRecord(arbitrateRecord);
}
@@ -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())
@@ -11,12 +11,19 @@ import org.springframework.mail.javamail.JavaMailSenderImpl;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.stereotype.Component;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import javax.activation.DataHandler;
import javax.mail.*;
import javax.mail.internet.*;
import javax.mail.util.ByteArrayDataSource;
import javax.validation.constraints.NotNull;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.Security;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -40,15 +47,15 @@ public class EmailOutUtil {
// @Value("${spring.mail-out-network.from}")
// private static String fromOut;
@Value("${spring.mail.host}")
private String hostOut;
private String hostOut;
@Value("${spring.mail.username}")
private String usernameOut;
private String usernameOut;
@Value("${spring.mail.password}")
private String passwordOut;
private String passwordOut;
@Value("${spring.mail.port}")
private Integer portOut;
private Integer portOut;
public JavaMailSender rebuildMailSender() {
public JavaMailSender rebuildMailSender() {
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
mailSender.setHost(hostOut);
mailSender.setUsername(usernameOut);
@@ -66,7 +73,7 @@ public class EmailOutUtil {
* @param subject 邮件主题
* @param content 邮件内容(发送内容)
*/
public void sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
public void sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
// 创建一个邮件对象
SimpleMailMessage msg = new SimpleMailMessage();
msg.setFrom(from);
@@ -80,15 +87,88 @@ public class EmailOutUtil {
////System.out.println("发送成功:" + from + ":to:" + to);
}
/**
* @param to 收件人
* @param message 邮件内容
* @param subject 邮件主题
* @param fileList 邮件附件
*/
public void sendEmil(String to, String message, String subject, List<File> fileList, File file) {
try {
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
//设置邮件会话参数
Properties props = new Properties();
//邮箱的发送服务器地址
props.setProperty("mail.smtp.host", "smtp.163.com");
props.setProperty("mail.smtp.socketFactory.class", SSL_FACTORY);
props.setProperty("mail.smtp.socketFactory.fallback", "false");
//邮箱发送服务器端口,这里设置为465端口
props.setProperty("mail.smtp.port", "465");
props.setProperty("mail.smtp.socketFactory.port", "465");
props.put("mail.smtp.auth", "true");
//获取到邮箱会话,利用匿名内部类的方式,将发送者邮箱用户名和密码授权给jvm
Session session = Session.getDefaultInstance(props, new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(usernameOut, passwordOut);
}
});
//通过会话,得到一个邮件,用于发送
Message msg = new MimeMessage(session);
//设置发件人
msg.setFrom(new InternetAddress(usernameOut));
//设置收件人,to为收件人,cc为抄送,bcc为密送
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
msg.setRecipients(Message.RecipientType.CC, InternetAddress.parse(to, false));
msg.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(to, false));
//设置邮件消息
msg.setSubject(subject);
msg.setText(message);
//设置发送的日期
msg.setSentDate(new Date());
// 创建邮件正文
MimeMultipart multipart = new MimeMultipart();
// MimeBodyPart bodyPart = new MimeBodyPart();
// bodyPart.setContent("This is the body of the email", "text/html");
// multipart.addBodyPart(bodyPart);
// 添加附件
if (file != null) {
MimeBodyPart attachmentPart = new MimeBodyPart();
attachmentPart.attachFile(file);
attachmentPart.setFileName(MimeUtility.encodeText(file.getName()));
multipart.addBodyPart(attachmentPart);
//将multipart对象放入邮件
msg.setContent(multipart);
} else if (fileList != null && fileList.size() > 0) {
// 添加附件(多个)
if (fileList != null && fileList.size() > 0) {
for (File tempfile : fileList) {
MimeBodyPart attachmentPart = new MimeBodyPart();
attachmentPart.attachFile(tempfile);
attachmentPart.setFileName(MimeUtility.encodeText(tempfile.getName()));
multipart.addBodyPart(attachmentPart);
}
msg.setContent(multipart);
}
}
//调用Transport的send方法去发送邮件
Transport.send(msg);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 发送带附件的邮件信息
*
* @param to 接收方
* @param subject 邮件主题
* @param content 邮件内容(发送内容)
* @param fileList 文件集合 // 可发送多个附件
* @param to 接收方
* @param subject 邮件主题
* @param content 邮件内容(发送内容)
* @param fileList 文件集合 // 可发送多个附件
*/
public void sendMessageCarryFiles(String to, String subject, String content, List<File> fileList, String from, @NotNull JavaMailSender mailSender) {
public void sendMessageCarryFiles(String to, String subject, String content, List<File> fileList, String from, @NotNull JavaMailSender mailSender) {
MimeMessage mimeMessage = mailSender.createMimeMessage();
try {
MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);
@@ -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;
}
@@ -198,9 +198,45 @@ public class CaseApplication extends BaseEntity {
/** 支付状态描述 */
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;
}
@@ -274,6 +310,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;
}
@@ -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;
}
@@ -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);
}
@@ -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);
}
@@ -371,19 +371,16 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
if (caseAttach.getAnnexType() == 3) {
String annexPath = caseAttach.getAnnexPath();
String path = "/home/ruoyi/" + annexPath;
// String path = "/home/ruoyi/uploadPath/upload/2023/10/12/裁决书测试20231012test.docx";
// String path = "E:/WorkDoc/SH/裁决书测试20231012test.docx";
file = new File(path);
fileList.add(file);
System.out.println("文件长度:" + file.length());
System.out.println("文件长度==================:" + file.length());
}
}
}
if (file != null) {
JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
try {
// emailOutUtil.sendMessageCarryFile(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", file, "hjbjava@163.com", javaMailSender);
emailOutUtil.sendMessageCarryFiles(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", fileList, "lmj1549843951@163.com", javaMailSender);
emailOutUtil.sendEmil(appEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
emailOutUtil.sendEmil(resEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
} catch (Exception e) {
System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
System.out.println(e.toString());
@@ -14,13 +14,12 @@ 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;
import com.ruoyi.common.utils.*;
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
@@ -30,9 +29,6 @@ import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.wisdomarbitrate.domain.*;
@@ -57,6 +53,8 @@ import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static com.ruoyi.common.utils.PageUtils.startPage;
import static com.ruoyi.common.utils.SecurityUtils.getLoginUser;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -69,7 +67,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
private CaseAffiliateMapper caseAffiliateMapper;
@Autowired
private ArbitratorMapper arbitratorMapper;
private CasePaymentRecordMapper casePaymentRecordMapper;
@Autowired
private ArbitrateRecordMapper arbitrateRecordMapper;
@Autowired
@@ -88,13 +86,58 @@ 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));
// startPage();
// 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);
// }
// if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
// // 查询角色有关的用户部门
// caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
// }
// }
//
//
// // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
// return caseApplicationMapper.selectCaseApplicationList(caseApplication);
//
// }
@Override
public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
return caseApplicationMapper.selectCaseApplicationList(caseApplication);
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
}
@Override
@Transactional
public int insertcaseApplication(CaseApplication caseApplication) {
@@ -108,6 +151,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 +169,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 +184,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 +239,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 +255,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 +270,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 +459,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 +938,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 +1259,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 +1346,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 +1361,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());
}
@@ -101,7 +101,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
.userName(userName)
.build();
int count = caseAttachMapper.save(caseAttach);
if (count > 0) {
if (count > 0 && annexType!=null && annexType!=8) {
if(id!=null){
//修改案件状态
CaseApplication caseApplication = new CaseApplication();
@@ -121,6 +121,8 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
return AjaxResult.error("上传失败");
}
@Autowired
IdentityAuthenticationMapper identityAuthenticationMapper;
@@ -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},
@@ -37,9 +37,9 @@
<result property="filearbitraUrl" column="filearbitra_url" />
</resultMap>
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
select t1.* from(
select t.* from(
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 '无审理方式'
@@ -56,10 +56,74 @@
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,d.dept_name as applicantName,c.register_date,c.filearbitra_url
c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as applicantName,
c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
from case_application c
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>
<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="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>
) t1
<where>
<!--申请人-->
<if test="nameId != null and nameId != ''">
and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1 )
</if>
</where>
order by t1.create_time desc,t1.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,c.filearbitra_url
from case_application c
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
<where>
<if test="caseStatus != null">
AND c.case_status = #{caseStatus}
@@ -68,7 +132,7 @@
AND c.case_num = #{caseNum}
</if>
<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 test="caseStatusList != null and caseStatusList.size() > 0">
and c.case_status in
@@ -186,6 +250,9 @@
</set>
where id = #{id}
</update>
<update id="updatePayType">
update case_application set pay_type=#{payType} where id = #{caseId}
</update>
<delete id="deletecaseApplication" parameterType="CaseApplication">
delete from case_application where id = #{id}
@@ -208,10 +275,10 @@
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_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
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>
<if test="id != null ">
AND c.id = #{id}
@@ -240,7 +307,8 @@
p.payment_status ,
CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
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
where c.case_status = 3 and p.payment_status = 1
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)
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>