11.23开发
This commit is contained in:
@@ -156,4 +156,6 @@ public interface SysUserMapper
|
||||
* @return
|
||||
*/
|
||||
List<SysUser> selectByDeptIdAndRole(@Param("deptId")String applicationOrganId, @Param("roleName")String roleName);
|
||||
|
||||
List<SysUser> selectRoleUserByDeptId(@Param("deptId")Long deptId,@Param("roleId") Long roleId );
|
||||
}
|
||||
|
||||
@@ -207,4 +207,5 @@ public interface ISysUserService
|
||||
* @return 结果
|
||||
*/
|
||||
public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
|
||||
|
||||
}
|
||||
|
||||
@@ -537,4 +537,6 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,10 @@ public class DeptIdentify extends BaseEntity {
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
/** 部门id */
|
||||
private Long deptId;
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
/** 机构名称 */
|
||||
private String identifyName;
|
||||
/** 认证状态 */
|
||||
|
||||
+2
-2
@@ -12,10 +12,10 @@ import java.util.List;
|
||||
@Data
|
||||
public class CaseConfirmPayDTO {
|
||||
/**
|
||||
* 案件id
|
||||
* 案件ids
|
||||
*/
|
||||
@NotNull(message = "案件id不能为空")
|
||||
private Long caseId;
|
||||
private List<Long> caseIds;
|
||||
|
||||
/**
|
||||
* 支付方式 0线上支付,1线下支付
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealManage;
|
||||
@@ -44,4 +45,10 @@ public interface IDeptIdentifyService {
|
||||
|
||||
List<TemplateManage> getTemplateList(DeptIdentify deptIdentify);
|
||||
|
||||
|
||||
List<SysUser> selectPostUserByDeptId(DeptIdentify deptIdentify);
|
||||
|
||||
|
||||
AjaxResult bindHandler(DeptIdentify deptIdentify);
|
||||
|
||||
}
|
||||
|
||||
+37
-29
@@ -47,12 +47,13 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
, CaseApplicationMapper caseApplicationMapper
|
||||
, CasePaymentRecordMapper casePaymentRecordMapper
|
||||
, CaseAffiliateMapper caseAffiliateMapper
|
||||
) {
|
||||
) {
|
||||
this.elegentPay = elegentPay;
|
||||
this.caseApplicationMapper = caseApplicationMapper;
|
||||
this.casePaymentRecordMapper = casePaymentRecordMapper;
|
||||
this.caseAffiliateMapper = caseAffiliateMapper;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
|
||||
@@ -190,38 +191,45 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult confirmPay(CaseConfirmPayDTO payDTO) {
|
||||
if (payDTO.getCaseId() != null && payDTO.getPayType() != null) {
|
||||
List<Long> caseIds = payDTO.getCaseIds();
|
||||
if (caseIds == null || caseIds.size() == 0) {
|
||||
return AjaxResult.error("案件id参数有误");
|
||||
}
|
||||
if (payDTO.getPayType() != null) {
|
||||
// 修改支付方式
|
||||
|
||||
caseApplicationMapper.updatePayType(payDTO);
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
|
||||
for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
|
||||
caseAttach.setCaseAppliId(payDTO.getCaseId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
for (Long caseId : caseIds) {
|
||||
if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
|
||||
for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
|
||||
caseAttach.setCaseAppliId(caseId);
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// 修改节点状态
|
||||
//根据案件id查询案件信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseId);
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
//修改案件状态
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
// 修改支付状态
|
||||
CasePaymentRecord paymentRecord = new CasePaymentRecord();
|
||||
paymentRecord.setPayType(payDTO.getPayType());
|
||||
paymentRecord.setCaseId(caseId);
|
||||
paymentRecord.setPaymentStatus(1);
|
||||
casePaymentRecordMapper.saveRecord(paymentRecord);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
|
||||
|
||||
return AjaxResult.success("确认缴费成功");
|
||||
}
|
||||
}
|
||||
// 修改节点状态
|
||||
//根据案件id查询案件信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(payDTO.getCaseId());
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
//修改案件状态
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
// 修改支付状态
|
||||
CasePaymentRecord paymentRecord = new CasePaymentRecord();
|
||||
paymentRecord.setPayType(payDTO.getPayType());
|
||||
paymentRecord.setCaseId(payDTO.getCaseId());
|
||||
paymentRecord.setPaymentStatus(1);
|
||||
casePaymentRecordMapper.saveRecord(paymentRecord);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
|
||||
|
||||
return AjaxResult.success("确认缴费成功");
|
||||
}
|
||||
return AjaxResult.success("确认缴费失败");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -231,11 +239,11 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
if (caseIds == null || caseIds.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
BigDecimal totalCost = new BigDecimal(0);
|
||||
BigDecimal sum =totalCost;
|
||||
BigDecimal totalCost = new BigDecimal(0);
|
||||
BigDecimal sum = totalCost;
|
||||
CasePayListVO listVO = new CasePayListVO();
|
||||
listVO.setCaseTotal(caseIds.size());
|
||||
List<CaseApplicationPay> caseApplicationList =new ArrayList<>();
|
||||
List<CaseApplicationPay> caseApplicationList = new ArrayList<>();
|
||||
for (Long caseId : caseIds) {
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
CaseApplicationPay caseApplicationPay = new CaseApplicationPay();
|
||||
|
||||
+78
-29
@@ -14,8 +14,10 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.SealUtil;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.system.domain.SysUserPost;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.mapper.SysUserPostMapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealManage;
|
||||
@@ -56,6 +58,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
private TemplateManageMapper templateManageMapper;
|
||||
@Autowired
|
||||
private SysUserPostMapper sysUserPostMapper;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -299,45 +303,48 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
public AjaxResult insertDeptIdentify(DeptIdentify deptIdentify) {
|
||||
//参数校验
|
||||
String identifyName = deptIdentify.getIdentifyName();
|
||||
String operName = deptIdentify.getOperName();
|
||||
String operPhone = deptIdentify.getOperPhone();
|
||||
if (identifyName == null || operName == null || operPhone == null) {
|
||||
if (identifyName == null) {
|
||||
AjaxResult.error("请检查参数是否完整");
|
||||
}
|
||||
Integer identifyType = deptIdentify.getIdentifyType();
|
||||
if (identifyType == null) {
|
||||
deptIdentify.setIdentifyType(1); // 设置机构默认为仲裁机构
|
||||
}
|
||||
//先查询看数据库里有没有相同的机构经办人
|
||||
List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
|
||||
if (deptIdentifies != null && deptIdentifies.size() > 0) {
|
||||
//说明之前新增过
|
||||
return AjaxResult.error("信息重复");
|
||||
}
|
||||
deptIdentify.setIdentifyStatus(0); //设置认证状态默认为未认证
|
||||
deptIdentify.setIsUse(0); //设置机构默认为未启用
|
||||
//将机构名称保存到部门表里
|
||||
SysDept sysDept = new SysDept();
|
||||
sysDept.setDeptName(identifyName);
|
||||
sysDept.setParentId(0L);
|
||||
sysDept.setDeptType(1);
|
||||
int i1 = sysDeptMapper.insertDept(sysDept);
|
||||
if (i1 > 0) {
|
||||
/* //将经办人信息存入到用户表里
|
||||
Long deptId = sysDept.getDeptId();
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setDeptId(deptId);
|
||||
sysUser.setUserName(deptIdentify.getOperUserName());
|
||||
sysUser.setNickName(operName);
|
||||
sysUser.setPhonenumber(operPhone);
|
||||
SysUser sysUser1 = sysUserMapper.selectUserByUserName(deptIdentify.getOperUserName());
|
||||
if (sysUser1== null) {
|
||||
sysUserMapper.insertUser(sysUser);
|
||||
}
|
||||
Long userId = sysUser.getUserId();
|
||||
deptIdentify.setDeptId(deptId);
|
||||
deptIdentify.setUserId(userId);
|
||||
List<SysUserPost> sysUserPosts = new ArrayList<>();
|
||||
SysUserPost sysUserPost = new SysUserPost();
|
||||
sysUserPost.setUserId(userId);
|
||||
sysUserPost.setPostId(5L);
|
||||
sysUserPosts.add(sysUserPost);
|
||||
sysUserPostMapper.batchUserPost(sysUserPosts);*/
|
||||
Long deptId = sysDept.getDeptId();
|
||||
deptIdentify.setDeptId(deptId);
|
||||
}
|
||||
|
||||
int i = deptIdentifyMapper.insertDeptIdentify(deptIdentify);
|
||||
if (i > 0) {
|
||||
//将机构名称保存到部门表里
|
||||
SysDept sysDept = new SysDept();
|
||||
sysDept.setDeptName(identifyName);
|
||||
sysDept.setParentId(0L);
|
||||
sysDept.setDeptType(1);
|
||||
int i1 = sysDeptMapper.insertDept(sysDept);
|
||||
if (i1 > 0) {
|
||||
//将经办人信息存入到用户表里
|
||||
Long deptId = sysDept.getDeptId();
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setDeptId(deptId);
|
||||
sysUser.setUserName(deptIdentify.getOperUserName());
|
||||
sysUser.setNickName(operName);
|
||||
sysUser.setPhonenumber(operPhone);
|
||||
SysUser sysUser1 = sysUserMapper.selectUserByUserName(deptIdentify.getOperUserName());
|
||||
if (sysUser1== null) {
|
||||
sysUserMapper.insertUser(sysUser);
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success("新增成功");
|
||||
}
|
||||
return AjaxResult.error();
|
||||
@@ -350,6 +357,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
deptIdentify.setDelFlag(2);
|
||||
int i = deptIdentifyMapper.updateDeptIdentify(deptIdentify);
|
||||
if (i > 0) {
|
||||
//删除部门表数据
|
||||
sysDeptMapper.deleteDeptById(id);
|
||||
return AjaxResult.success("删除成功");
|
||||
}
|
||||
return AjaxResult.error();
|
||||
@@ -371,9 +380,15 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
}
|
||||
int i = deptIdentifyMapper.updateDeptIdentify(deptIdentify);
|
||||
if (i > 0) {
|
||||
//修改部门表数据
|
||||
SysDept sysDept = new SysDept();
|
||||
sysDept.setDeptId(deptIdentify1.getDeptId());
|
||||
sysDept.setDeptName(deptIdentify.getIdentifyName());
|
||||
sysDeptMapper.updateDept(sysDept);
|
||||
return AjaxResult.success("修改成功");
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -475,7 +490,41 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
return templateManages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUser> selectPostUserByDeptId(DeptIdentify deptIdentify) {
|
||||
List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
|
||||
if (deptIdentifies!= null && deptIdentifies.size() > 0) {
|
||||
deptIdentify = deptIdentifies.get(0);
|
||||
if (deptIdentify.getDeptId()!= null) {
|
||||
//默认查询经办人的
|
||||
Long roleId = 106L;
|
||||
List<SysUser> sysUserList = sysUserMapper.selectRoleUserByDeptId(deptIdentify.getDeptId(),roleId);
|
||||
return sysUserList;
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult bindHandler(DeptIdentify deptIdentify) {
|
||||
if (deptIdentify.getId()== null||deptIdentify.getUserId()==null) {
|
||||
return AjaxResult.error("请检查参数是否完整");
|
||||
}
|
||||
//根据userid查询用户信息
|
||||
SysUser sysUser = sysUserMapper.selectUserById(deptIdentify.getUserId());
|
||||
if (sysUser!= null) {
|
||||
deptIdentify.setOperName(sysUser.getNickName());
|
||||
deptIdentify.setOperPhone(sysUser.getPhonenumber());
|
||||
deptIdentify.setOperUserName(sysUser.getUserName());
|
||||
//更新
|
||||
int i = deptIdentifyMapper.updateDeptIdentify(deptIdentify);
|
||||
if (i > 0) {
|
||||
return AjaxResult.success("绑定成功");
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String getFileExtension(String fileName) {
|
||||
int lastDotIndex = fileName.lastIndexOf(".");
|
||||
|
||||
Reference in New Issue
Block a user