申请机构修改

This commit is contained in:
18792927508
2024-01-29 11:50:56 +08:00
parent 695405ac03
commit fb349f1983
12 changed files with 37 additions and 131 deletions
@@ -55,9 +55,6 @@ public interface IDeptIdentifyService {
AjaxResult saveFatchRules(TemplateManage templateManage);
List<FatchRule> selectColumnandComment();
FatchRule selectColumnbycomment(FatchRule fatchRule);
/**
* 根据模板id查询模板字段列表
@@ -586,21 +586,6 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
return AjaxResult.error();
}
@Override
public List<FatchRule> selectColumnandComment() {
List<FatchRule> fatchRules = new ArrayList<>();
FatchRule fatchRuleselect = new FatchRule();
fatchRuleselect.setDatabaseName("test_smart_arbitration");
fatchRules = fatchRuleMapper.selectColumnandComment(fatchRuleselect);
return fatchRules;
}
@Override
public FatchRule selectColumnbycomment(FatchRule fatchRule) {
fatchRule.setDatabaseName("test_smart_arbitration");
FatchRule fatchRulesel = fatchRuleMapper.selectColumnbycomment(fatchRule);
return fatchRulesel;
}
/**
* 根据模板id查询模板字段列表
@@ -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()));
}
}
@@ -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()));