|
|
|
@ -74,15 +74,15 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
page = 1; |
|
|
|
|
size = 10; |
|
|
|
|
} |
|
|
|
|
/*String userId = this.getUserId(); |
|
|
|
|
String userId = this.getUserId(); |
|
|
|
|
// 获取当前登录用户的角色id
|
|
|
|
|
String roleIdString = RedisUtil.get("dq:userRole:" + userId); |
|
|
|
|
if (roleIdString == null || roleIdString.length() == 0) { |
|
|
|
|
ExceptionCast.cast(GuaranteeCode.ROLE_IS_NOT); |
|
|
|
|
} |
|
|
|
|
String[] roleIds = roleIdString.split(",");*/ |
|
|
|
|
String userId = "1"; |
|
|
|
|
String[] roleIds = {"70"}; |
|
|
|
|
String[] roleIds = roleIdString.split(","); |
|
|
|
|
/*String userId = "1"; |
|
|
|
|
String[] roleIds = {"70"};*/ |
|
|
|
|
List<Integer> roleList = new ArrayList<>(); |
|
|
|
|
for (String roleId : roleIds) { |
|
|
|
|
roleList.add(Integer.parseInt(roleId)); |
|
|
|
@ -115,8 +115,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
Boolean result = this.getBaseMapper().assign(complianceInvestigation); |
|
|
|
|
if (result) { |
|
|
|
|
// 绑定该条数据的指派操作人(表示指派完成);
|
|
|
|
|
// String id = this.getUserId();
|
|
|
|
|
String id = "1"; |
|
|
|
|
String id = this.getUserId(); |
|
|
|
|
/*String id = "1";*/ |
|
|
|
|
Boolean result1 = this.getBaseMapper().updateAssign(iid, Integer.parseInt(id), StatusCode.SP_IN_REVIEW, StatusCode.CZ_PROCESSED); |
|
|
|
|
if (result1) { |
|
|
|
|
// 在角色表中插入一条数据,与当前被指派的员工(用户)关联
|
|
|
|
@ -141,8 +141,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
if (iid == null || status == null) { |
|
|
|
|
ExceptionCast.cast(CommonCode.INVALID_PARAM); |
|
|
|
|
} |
|
|
|
|
//String userId = this.getUserId();
|
|
|
|
|
String userId = "1"; |
|
|
|
|
String userId = this.getUserId(); |
|
|
|
|
// String userId = "1";
|
|
|
|
|
// 同意
|
|
|
|
|
if (status == 1) { |
|
|
|
|
if (fileUrl == null || fileUrl.length() == 0) { |
|
|
|
@ -209,16 +209,16 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
if (iid == null || status == null) { |
|
|
|
|
ExceptionCast.cast(CommonCode.INVALID_PARAM); |
|
|
|
|
} |
|
|
|
|
// String userId = this.getUserId();
|
|
|
|
|
String userId = "1"; |
|
|
|
|
String userId = this.getUserId(); |
|
|
|
|
// String userId = "1";
|
|
|
|
|
Integer operationStatus = this.getBaseMapper().getOperationStatusByBusinessId( |
|
|
|
|
this.getComplianceInvestigation(iid).getBusinessId(), PromptSuccess.FG_JL_ID); |
|
|
|
|
// 1.待处理,表示业务进行到法规经理审核
|
|
|
|
|
if (Objects.equals(operationStatus, StatusCode.CZ_ON_HAND)) { |
|
|
|
|
// 查询业务流程表,找出该业务id的最新操作记录的角色id
|
|
|
|
|
Integer roleId = 69; |
|
|
|
|
if (roleId.equals(PromptSuccess.DB_A_ID) || roleId.equals(PromptSuccess.DB_B_ID)) { |
|
|
|
|
// 1.1.若为A/B角,表示为驳回数据
|
|
|
|
|
// 查询业务流程表,找出该业务id的最新操作记录的角色名称
|
|
|
|
|
String roleName = this.getBaseMapper().getAuditProcessLatestNameByBusinessId(this.getComplianceInvestigation(iid).getBusinessId()); |
|
|
|
|
if (PromptSuccess.DB_AB_NAME.equals(roleName)) { |
|
|
|
|
// 1.1.若最新操作人为A/B角,表示为驳回给AB角之后直接返回的数据
|
|
|
|
|
// 同意
|
|
|
|
|
if (status == 1) { |
|
|
|
|
// 改变自己的状态为已处理
|
|
|
|
@ -281,13 +281,27 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// 1.2.若为C角,表示为非驳回数据
|
|
|
|
|
// 1.2.若最新操作人为C角或法规部领导,表示C角调查通过后发送过来的数据或者法规部领导驳回的数据
|
|
|
|
|
// 同意
|
|
|
|
|
if (status == 1) { |
|
|
|
|
Boolean result = this.getBaseMapper().check(iid, opinion, new Date(), |
|
|
|
|
StatusCode.SP_IN_REVIEW, StatusCode.CZ_PROCESSED, Integer.parseInt(userId)); |
|
|
|
|
if (result) { |
|
|
|
|
// 法规经理完成审核,新增一条法规领导审核数据(借用插入一条调查数据的接口)
|
|
|
|
|
Integer auditStatus = this.getBaseMapper().getAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId()); |
|
|
|
|
Boolean result1; |
|
|
|
|
if (StatusCode.SP_REJECT.equals(auditStatus)){ |
|
|
|
|
// 表示为法规部领导驳回的数据,先更新审批状态为审核中
|
|
|
|
|
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(), |
|
|
|
|
StatusCode.SP_IN_REVIEW); |
|
|
|
|
if (result2) { |
|
|
|
|
// 再更新法规部领导的操作状态为待处理
|
|
|
|
|
result1 = this.getBaseMapper().updateToAudit(this.getComplianceInvestigation(iid).getBusinessId(), StatusCode.CZ_ON_HAND, |
|
|
|
|
PromptSuccess.FG_LD_ID); |
|
|
|
|
} else { |
|
|
|
|
result1 = false; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// 表示为C角调查通过后发送过来的数据,法规经理完成审核,新增一条法规领导审核数据(借用插入一条调查数据的接口)
|
|
|
|
|
DgComplianceInvestigation complianceInvestigation = this.getComplianceInvestigation(iid); |
|
|
|
|
complianceInvestigation.setUserId(null); |
|
|
|
|
complianceInvestigation.setRoleId(PromptSuccess.FG_LD_ID); |
|
|
|
@ -295,7 +309,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
complianceInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW); |
|
|
|
|
complianceInvestigation.setCreateTime(new Date()); |
|
|
|
|
complianceInvestigation.setUpdateTime(new Date()); |
|
|
|
|
Boolean result1 = this.getBaseMapper().assign(complianceInvestigation); |
|
|
|
|
result1 = this.getBaseMapper().assign(complianceInvestigation); |
|
|
|
|
} |
|
|
|
|
if (result1) { |
|
|
|
|
// 在业务流程表中插入一条法规经理审核成功的数据
|
|
|
|
|
return AuditProcessUtil.save(this.getComplianceInvestigation(iid).getBusinessId(), DgApplyAmountInfoController.getAccount(), |
|
|
|
@ -362,9 +377,15 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
Integer count = this.getBaseMapper().countWorkConferenceConsider(complianceInvestigation.getBusinessId(), PromptSuccess.GZU_ID); |
|
|
|
|
Boolean result1; |
|
|
|
|
if (count > 0) { |
|
|
|
|
// 工作会该条数据存在,表示是工作会驳回的数据
|
|
|
|
|
// 工作会该条数据存在,表示是工作会驳回的数据,现将当前审批状态更新为已审核
|
|
|
|
|
Boolean result2 = this.getBaseMapper().updateAuditStatusByBusinessId(complianceInvestigation.getBusinessId(), StatusCode.SP_REVIEWED); |
|
|
|
|
if (result2) { |
|
|
|
|
// 再更新工作会的数据为待处理
|
|
|
|
|
result1 = this.getBaseMapper().updateWorkConferenceConsider(complianceInvestigation.getBusinessId(), PromptSuccess.GZU_ID, |
|
|
|
|
StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND); |
|
|
|
|
} else { |
|
|
|
|
result1 = false; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// 工作会该条数据不存在,表示不是工作会驳回数据,需要新增一条
|
|
|
|
|
DgWorkConferenceConsider workConferenceConsider = new DgWorkConferenceConsider(); |
|
|
|
@ -506,7 +527,6 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian |
|
|
|
|
return fileUrl.toString(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取当前登录用户信息 |
|
|
|
|
*/ |
|
|
|
|