申请机构修改
This commit is contained in:
+10
-10
@@ -272,7 +272,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
// 保存案件相关人员
|
||||
if (affiliate != null) {
|
||||
// 设置申请人
|
||||
if (StrUtil.isNotEmpty(affiliate.getApplicationOrganName())) {
|
||||
if (StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==1) {
|
||||
// 组装申请机构
|
||||
insertDept(affiliate);
|
||||
// 新增申请机构代理人
|
||||
@@ -411,7 +411,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if (affiliate != null) {
|
||||
affiliate.setCaseAppliId(caseApplication.getId());
|
||||
// 设置申请人
|
||||
if (StrUtil.isNotEmpty(affiliate.getApplicationOrganName())) {
|
||||
if (StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==1) {
|
||||
// 组装申请机构
|
||||
insertDept(affiliate);
|
||||
// 新增申请机构代理人
|
||||
@@ -2124,20 +2124,20 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
agentUser.setNickName(affiliate.getNameAgent());
|
||||
agentUser.setPhonenumber(affiliate.getContactTelphoneAgent());
|
||||
agentUser.setPassword(SecurityUtils.encryptPassword("abc123456"));
|
||||
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationOrganId()));
|
||||
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|
||||
userMapper.insertUser(agentUser);
|
||||
userRoleMapper.insertUserRole(agentUser.getUserId(), roleId);
|
||||
} else if (null == agentUser.getDeptId() ) {
|
||||
// todo 未关联部门,关联部门
|
||||
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationOrganId()));
|
||||
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|
||||
userMapper.updateUser(agentUser);
|
||||
}else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationOrganId())) {
|
||||
}else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationId())) {
|
||||
if (null != agentUser.getDept() && StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
|
||||
throw new ServiceException("该申请代理人已在【" + agentUser.getDept().getDeptName() + "】申请机构下存在,请检查填写信息是否正确");
|
||||
} else {
|
||||
throw new ServiceException("该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确");
|
||||
}
|
||||
} else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationOrganId())) {
|
||||
} else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationId())) {
|
||||
// 同步用户表和案件关联人表的手机号和名称
|
||||
affiliate.setContactTelphoneAgent(StrUtil.isNotEmpty(agentUser.getPhonenumber()) ? agentUser.getPhonenumber() : affiliate.getContactTelphoneAgent());
|
||||
affiliate.setNameAgent(agentUser.getNickName());
|
||||
@@ -2171,13 +2171,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
Map<String, Long> deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId, (oldV, newV) -> newV));
|
||||
|
||||
// 将组织机构id设为申请人名称
|
||||
if (deptMap.containsKey(affiliate.getApplicationOrganName())) {
|
||||
affiliate.setApplicationOrganId(String.valueOf(deptMap.get(affiliate.getApplicationOrganName())));
|
||||
if (deptMap.containsKey(affiliate.getApplicationName())) {
|
||||
affiliate.setApplicationId(String.valueOf(deptMap.get(affiliate.getApplicationName())));
|
||||
} else {
|
||||
// 如果不存在则新增
|
||||
SysDept dept = new SysDept();
|
||||
dept.setParentId(0L);
|
||||
dept.setDeptName(affiliate.getApplicationOrganName());
|
||||
dept.setDeptName(affiliate.getApplicationName());
|
||||
dept.setAncestors("0");
|
||||
dept.setOrderNum(1);
|
||||
dept.setStatus("0");
|
||||
@@ -2186,7 +2186,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
dept.setUpdateBy(getUsername());
|
||||
sysDeptMapper.insertDept(dept);
|
||||
deptMap.put(dept.getDeptName(), dept.getDeptId());
|
||||
affiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
||||
affiliate.setApplicationId(String.valueOf(dept.getDeptId()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -218,7 +218,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
|
||||
}
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set("totalFee", totalFee);
|
||||
jsonObject.set("applicationOrganName", affiliate.getApplicationOrganName());
|
||||
jsonObject.set("applicationOrganName", affiliate.getApplicationName());
|
||||
return AjaxResult.success(jsonObject);
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
|
||||
result.setCaseStatusName(application.getCaseStatusName());
|
||||
MsCaseAffiliate affiliate = caseAffiliateMapper.selectByPrimaryKey(application.getId());
|
||||
if(affiliate != null) {
|
||||
result.setApplicationOrganName(affiliate.getApplicationOrganName());
|
||||
result.setApplicationOrganName(affiliate.getApplicationName());
|
||||
}
|
||||
// 查询缴费单
|
||||
result.setCaseAttachList(caseAttachMapper.listCaseAttachByCaseIdAndType(id, AnnexTypeEnum.PAYMENT_RECEIPT.getCode()));
|
||||
|
||||
Reference in New Issue
Block a user