仲裁问题修复
This commit is contained in:
+2
-2
@@ -197,9 +197,9 @@ public interface ICaseApplicationService {
|
|||||||
* @param updateFlag 是否修改案件
|
* @param updateFlag 是否修改案件
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public void insertAfficateUser(CaseAffiliateEntity affiliate, List<Long> roleIdList,boolean updateFlag);
|
public void insertAfficateUser(CaseAffiliateEntity affiliate, List<Long> roleIdList,boolean updateFlag,List<CaseAffiliateEntity> affiliateEntities);
|
||||||
|
|
||||||
void insertCaseAfflicate(CaseAffiliateVO caseAffiliateVO, List<CaseAffiliateEntity> affliates,CaseApplicationDTO caseApplication);
|
void insertCaseAfflicate(CaseAffiliateVO caseAffiliateVO, List<CaseAffiliateEntity> affliates,CaseApplicationDTO caseApplicationm,boolean updateFlag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据案件id查询相关人员
|
* 根据案件id查询相关人员
|
||||||
|
|||||||
+1
-1
@@ -873,7 +873,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList,caseNum);
|
boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList,caseNum);
|
||||||
|
|
||||||
// 被申请人发送邮件
|
// 被申请人发送邮件
|
||||||
boolean resEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList,caseNum);
|
boolean resEmailFlag = sendCaseEmail(caseApplication1, resEmail, caseAttachList,caseNum);
|
||||||
if (!appEmailFlag && !resEmailFlag) {
|
if (!appEmailFlag && !resEmailFlag) {
|
||||||
throw new ServiceException("裁决书发送失败");
|
throw new ServiceException("裁决书发送失败");
|
||||||
}
|
}
|
||||||
|
|||||||
+61
-57
@@ -1200,49 +1200,49 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
// 必填校验
|
// 必填校验
|
||||||
CaseApplication caseApplication = applicationMap.get(id);
|
CaseApplication caseApplication = applicationMap.get(id);
|
||||||
// 基本字段校验
|
// 基本字段校验
|
||||||
if (caseApplication != null) {
|
// if (caseApplication != null) {
|
||||||
for (String baseColumn : baseColumns) {
|
// for (String baseColumn : baseColumns) {
|
||||||
if (StrUtil.isEmpty(ObjectFieldUtils.getValue(caseApplication, baseColumn))) {
|
// if (StrUtil.isEmpty(ObjectFieldUtils.getValue(caseApplication, baseColumn))) {
|
||||||
errorMsg.append(baseColumn).append("不能为空,");
|
// errorMsg.append(baseColumn).append("不能为空,");
|
||||||
throw new ServiceException("必填字段未填写,请完善案件信息!");
|
// throw new ServiceException("必填字段未填写,请完善案件信息!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// 校验人员
|
// // 校验人员
|
||||||
if (CollectionUtil.isNotEmpty(caseAffiliates)) {
|
// if (CollectionUtil.isNotEmpty(caseAffiliates)) {
|
||||||
List<CaseAffiliateEntity> affiliateList = caseAffiliateMap.get(id);
|
// List<CaseAffiliateEntity> affiliateList = caseAffiliateMap.get(id);
|
||||||
if (CollectionUtil.isNotEmpty(affiliateList)) {
|
// if (CollectionUtil.isNotEmpty(affiliateList)) {
|
||||||
int appCount = 0;
|
// int appCount = 0;
|
||||||
int resCount = 0;
|
// int resCount = 0;
|
||||||
for (CaseAffiliateEntity caseAffiliate : affiliateList) {
|
// for (CaseAffiliateEntity caseAffiliate : affiliateList) {
|
||||||
if (caseAffiliate.getOperatorFlag() != null && caseAffiliate.getOperatorFlag().equals(1) && caseAffiliate.getRoleType() != null && (caseAffiliate.getRoleType().equals(1) || caseAffiliate.getRoleType().equals(2))) {
|
// if (caseAffiliate.getOperatorFlag() != null && caseAffiliate.getOperatorFlag().equals(1) && caseAffiliate.getRoleType() != null && (caseAffiliate.getRoleType().equals(1) || caseAffiliate.getRoleType().equals(2))) {
|
||||||
appCount++;
|
// appCount++;
|
||||||
// 校验申请人
|
// // 校验申请人
|
||||||
for (String applicAffiliateColumn : applicAffiliateColumns) {
|
// for (String applicAffiliateColumn : applicAffiliateColumns) {
|
||||||
if (StrUtil.isEmpty(ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))) {
|
// if (StrUtil.isEmpty(ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))) {
|
||||||
errorMsg.append(applicAffiliateColumn).append("不能为空,");
|
// errorMsg.append(applicAffiliateColumn).append("不能为空,");
|
||||||
throw new ServiceException("必填字段未填写,请完善案件信息!");
|
// throw new ServiceException("必填字段未填写,请完善案件信息!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else if (caseAffiliate.getOperatorFlag() != null && caseAffiliate.getOperatorFlag().equals(1) && caseAffiliate.getRoleType() != null && (caseAffiliate.getRoleType().equals(3) || caseAffiliate.getRoleType().equals(4))) {
|
// } else if (caseAffiliate.getOperatorFlag() != null && caseAffiliate.getOperatorFlag().equals(1) && caseAffiliate.getRoleType() != null && (caseAffiliate.getRoleType().equals(3) || caseAffiliate.getRoleType().equals(4))) {
|
||||||
resCount++;
|
// resCount++;
|
||||||
// 校验被申请人
|
// // 校验被申请人
|
||||||
// 校验申请人
|
// // 校验申请人
|
||||||
for (String applicAffiliateColumn : dectborAffiliateColumns) {
|
// for (String applicAffiliateColumn : dectborAffiliateColumns) {
|
||||||
if (StrUtil.isEmpty(ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))) {
|
// if (StrUtil.isEmpty(ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))) {
|
||||||
errorMsg.append(applicAffiliateColumn).append("不能为空,");
|
// errorMsg.append(applicAffiliateColumn).append("不能为空,");
|
||||||
throw new ServiceException("必填字段未填写,请完善案件信息!");
|
// throw new ServiceException("必填字段未填写,请完善案件信息!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (appCount == 0 || resCount == 0) {
|
// if (appCount == 0 || resCount == 0) {
|
||||||
throw new ServiceException("必填字段未填写,请完善案件信息!");
|
// throw new ServiceException("必填字段未填写,请完善案件信息!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
throw new ServiceException("必填字段未填写,请完善案件信息!");
|
// throw new ServiceException("必填字段未填写,请完善案件信息!");
|
||||||
}
|
// }
|
||||||
|
|
||||||
CaseApplication application = new CaseApplication();
|
CaseApplication application = new CaseApplication();
|
||||||
application.setId(id);
|
application.setId(id);
|
||||||
@@ -3276,7 +3276,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
}
|
}
|
||||||
List<CaseAffiliateEntity> affliates = new ArrayList<>();
|
List<CaseAffiliateEntity> affliates = new ArrayList<>();
|
||||||
// 新增案件相关人员
|
// 新增案件相关人员
|
||||||
caseApplicationService.insertCaseAfflicate(caseAffiliateVO, affliates, caseApplication);
|
caseApplicationService.insertCaseAfflicate(caseAffiliateVO, affliates, caseApplication,false);
|
||||||
|
|
||||||
|
|
||||||
// 保存附件
|
// 保存附件
|
||||||
@@ -3414,7 +3414,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
}
|
}
|
||||||
// 如果是申请人,则和用户表关联
|
// 如果是申请人,则和用户表关联
|
||||||
if (affiliate.getOrganizeFlag() == 0) {
|
if (affiliate.getOrganizeFlag() == 0) {
|
||||||
caseApplicationService.insertAfficateUser(affiliate, roleIdList, updateFlag);
|
caseApplicationService.insertAfficateUser(affiliate, roleIdList, updateFlag,affliates);
|
||||||
} else {
|
} else {
|
||||||
// 申请机构
|
// 申请机构
|
||||||
if (affiliate.getRoleType() == 1 || affiliate.getRoleType() == 3) {
|
if (affiliate.getRoleType() == 1 || affiliate.getRoleType() == 3) {
|
||||||
@@ -3451,6 +3451,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
sysDeptMapper.insertDept(dept);
|
sysDeptMapper.insertDept(dept);
|
||||||
} else {
|
} else {
|
||||||
// 更新部门
|
// 更新部门
|
||||||
|
dept.setDeptName(affiliate.getName());
|
||||||
dept.setCode(affiliate.getCode());
|
dept.setCode(affiliate.getCode());
|
||||||
dept.setCompLegalPerson(affiliate.getCompLegalPerson());
|
dept.setCompLegalPerson(affiliate.getCompLegalPerson());
|
||||||
dept.setUpdateBy(getUsername());
|
dept.setUpdateBy(getUsername());
|
||||||
@@ -3461,13 +3462,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
sysDeptMapper.updateDept(dept);
|
sysDeptMapper.updateDept(dept);
|
||||||
}
|
}
|
||||||
affiliate.setApplicantDeptId(dept.getDeptId());
|
affiliate.setApplicantDeptId(dept.getDeptId());
|
||||||
} else {
|
|
||||||
caseApplicationService.insertAfficateUser(affiliate, roleIdList, updateFlag);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
affliates.add(affiliate);
|
affliates.add(affiliate);
|
||||||
// 保存人员
|
|
||||||
caseAffiliateMapper.insert(affiliate);
|
caseAffiliateMapper.insert(affiliate);
|
||||||
|
} else {
|
||||||
|
caseApplicationService.insertAfficateUser(affiliate, roleIdList, updateFlag,affliates);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (affiliate.getOperatorFlag() != null && affiliate.getOperatorFlag() == 1) {
|
if (affiliate.getOperatorFlag() != null && affiliate.getOperatorFlag() == 1) {
|
||||||
operatorCount++;
|
operatorCount++;
|
||||||
}
|
}
|
||||||
@@ -3482,7 +3483,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
* @param updateFlag 是否修改案件
|
* @param updateFlag 是否修改案件
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public void insertAfficateUser(CaseAffiliateEntity affiliate, List<Long> roleIdList, boolean updateFlag) {
|
public void insertAfficateUser(CaseAffiliateEntity affiliate, List<Long> roleIdList, boolean updateFlag,List<CaseAffiliateEntity> affiliateEntities) {
|
||||||
|
|
||||||
if (StrUtil.isEmpty(affiliate.getEmail()) && StrUtil.isEmpty(affiliate.getPhone())) {
|
if (StrUtil.isEmpty(affiliate.getEmail()) && StrUtil.isEmpty(affiliate.getPhone())) {
|
||||||
return;
|
return;
|
||||||
@@ -3566,11 +3567,14 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
affiliateEntities.add(affiliate);
|
||||||
|
// 保存人员
|
||||||
|
caseAffiliateMapper.insert(affiliate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public void insertCaseAfflicate(CaseAffiliateVO caseAffiliateVO, List<CaseAffiliateEntity> affliates, CaseApplicationDTO caseApplication) {
|
public void insertCaseAfflicate(CaseAffiliateVO caseAffiliateVO, List<CaseAffiliateEntity> affliates, CaseApplicationDTO caseApplication,boolean updateFlag) {
|
||||||
// 组装案件相关人员
|
// 组装案件相关人员
|
||||||
int appOperatorCount = 0;
|
int appOperatorCount = 0;
|
||||||
int resOperatorCount = 0;
|
int resOperatorCount = 0;
|
||||||
@@ -3581,17 +3585,17 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
if (CollectionUtil.isNotEmpty(applicant)) {
|
if (CollectionUtil.isNotEmpty(applicant)) {
|
||||||
for (int i = 0; i < applicant.size(); i++) {
|
for (int i = 0; i < applicant.size(); i++) {
|
||||||
// 申请人
|
// 申请人
|
||||||
appOperatorCount = setCaseAfflicate(affliates, caseApplication, applicant.get(i).getApplicant(), i, appOperatorCount, false);
|
appOperatorCount = setCaseAfflicate(affliates, caseApplication, applicant.get(i).getApplicant(), i, appOperatorCount, updateFlag);
|
||||||
// 申请人代理人
|
// 申请人代理人
|
||||||
appOperatorCount = setCaseAfflicate(affliates, caseApplication, applicant.get(i).getApplicantAgent(), i, appOperatorCount, false);
|
appOperatorCount = setCaseAfflicate(affliates, caseApplication, applicant.get(i).getApplicantAgent(), i, appOperatorCount, updateFlag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(res)) {
|
if (CollectionUtil.isNotEmpty(res)) {
|
||||||
for (int i = 0; i < res.size(); i++) {
|
for (int i = 0; i < res.size(); i++) {
|
||||||
// 被申请人
|
// 被申请人
|
||||||
resOperatorCount = setCaseAfflicate(affliates, caseApplication, res.get(i).getRes(), i, resOperatorCount, false);
|
resOperatorCount = setCaseAfflicate(affliates, caseApplication, res.get(i).getRes(), i, resOperatorCount, updateFlag);
|
||||||
// 被申请人代理人
|
// 被申请人代理人
|
||||||
resOperatorCount = setCaseAfflicate(affliates, caseApplication, res.get(i).getResAgent(), i, resOperatorCount, false);
|
resOperatorCount = setCaseAfflicate(affliates, caseApplication, res.get(i).getResAgent(), i, resOperatorCount, updateFlag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (appOperatorCount < 1 && resOperatorCount < 1) {
|
if (appOperatorCount < 1 && resOperatorCount < 1) {
|
||||||
@@ -3696,7 +3700,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
// 删除已存在的人员
|
// 删除已存在的人员
|
||||||
caseAffiliateMapper.deleteByCaseId(caseApplication.getId());
|
caseAffiliateMapper.deleteByCaseId(caseApplication.getId());
|
||||||
// 新增案件相关人员
|
// 新增案件相关人员
|
||||||
caseApplicationService.insertCaseAfflicate(caseAffiliateVO, affliates, caseApplication);
|
caseApplicationService.insertCaseAfflicate(caseAffiliateVO, affliates, caseApplication,true);
|
||||||
// 保存附件
|
// 保存附件
|
||||||
if (CollectionUtil.isNotEmpty(caseApplication.getCaseAttachList())) {
|
if (CollectionUtil.isNotEmpty(caseApplication.getCaseAttachList())) {
|
||||||
for (CaseAttach caseAttach : caseApplication.getCaseAttachList()) {
|
for (CaseAttach caseAttach : caseApplication.getCaseAttachList()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user