合规调查指派时问题优化

master
river 4 years ago
parent 6f6fac991b
commit 6a70efb7e6
  1. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java
  2. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgEnclosureInfoResponse.java
  3. 11
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java
  4. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java
  5. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  6. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml
  7. 4
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java
  8. 14
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java
  9. 4
      dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml
  10. 15
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java
  11. 24
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AttacheAndABUserIdPO.java

@ -7,6 +7,7 @@ import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationReq
import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse; import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation; import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider; import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -76,4 +77,6 @@ public interface DgComplianceInvestigationMapper extends BaseMapper<DgCompliance
String getAuditProcessLatestNameByBusinessId(@Param("businessId") Integer businessId); String getAuditProcessLatestNameByBusinessId(@Param("businessId") Integer businessId);
Boolean updateDgComplianceInvestigationUserIdById(@Param("id") Integer id, @Param("userId") Integer userId); Boolean updateDgComplianceInvestigationUserIdById(@Param("id") Integer id, @Param("userId") Integer userId);
AttacheAndABUserIdPO getAttacheAndABByBusinessId(Integer businessId);
} }

@ -135,4 +135,8 @@ public class DgEnclosureInfoResponse implements Serializable {
private String inspectionPhotos; private String inspectionPhotos;
/**
* 其他
*/
private String otherFile;
} }

@ -20,6 +20,7 @@ import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation; import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider; import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import com.daqing.framework.domain.guarantee.GuaranteeCode; import com.daqing.framework.domain.guarantee.GuaranteeCode;
import com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO;
import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.CommonCode; import com.daqing.framework.model.response.CommonCode;
@ -104,6 +105,16 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
if (userId == null) { if (userId == null) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_USER_NOT_NULL); ExceptionCast.cast(GuaranteeCode.COMPLIANCE_USER_NOT_NULL);
} }
// 判断当前用户是否已被指派为信息专员、资产专员、AB角
AttacheAndABUserIdPO userIdPO = this.getBaseMapper().getAttacheAndABByBusinessId(this.getComplianceInvestigation(iid).getBusinessId());
if (userIdPO != null) {
if (userId.equals(userIdPO.getAUserId())
|| userId.equals(userIdPO.getBUserId())
|| userId.equals(userIdPO.getAssetUserId())
|| userId.equals(userIdPO.getMessageUserId())) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_USER_IS_EXIST);
}
}
// 指派 // 指派
DgComplianceInvestigation complianceInvestigation = this.getComplianceInvestigation(iid); DgComplianceInvestigation complianceInvestigation = this.getComplianceInvestigation(iid);
complianceInvestigation.setUserId(userId); complianceInvestigation.setUserId(userId);

@ -106,7 +106,6 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
} }
// 根据userId获取对应的员工姓名 // 根据userId获取对应的员工姓名
ResponseResult<List<EmployeeVO>> responseResult = hrmsFeignService.listEmpNameByUserId(userIds); ResponseResult<List<EmployeeVO>> responseResult = hrmsFeignService.listEmpNameByUserId(userIds);
System.out.println(responseResult.getData());
List<DgWorkConferenceResponse> listResponse = new ArrayList<>(); List<DgWorkConferenceResponse> listResponse = new ArrayList<>();
if (responseResult.getData() != null) { if (responseResult.getData() != null) {
// 将对应的userId转换为name // 将对应的userId转换为name
@ -312,9 +311,11 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
BeanUtils.copyProperties(auditOpinion, auditOpinionResponse); BeanUtils.copyProperties(auditOpinion, auditOpinionResponse);
// 获取担保信息 // 获取担保信息
Integer guaranteeId = dgComplianceInvestigationMapper.getGuaranteeId(businessId, PromptSuccess.DB_LD_ID); Integer guaranteeId = dgComplianceInvestigationMapper.getGuaranteeId(businessId, PromptSuccess.DB_LD_ID);
if (guaranteeId != null) {
GuaranteeDetailResponse guaranteeDetailResponse = guaranteeAssignUserService.guaranteeDetail(guaranteeId); GuaranteeDetailResponse guaranteeDetailResponse = guaranteeAssignUserService.guaranteeDetail(guaranteeId);
auditOpinionResponse.setDgApplyAmountInfo(guaranteeDetailResponse.getDgApplyAmountInfo()); auditOpinionResponse.setDgApplyAmountInfo(guaranteeDetailResponse.getDgApplyAmountInfo());
auditOpinionResponse.setLinkedHashMap(guaranteeDetailResponse.getLinkedHashMap()); auditOpinionResponse.setLinkedHashMap(guaranteeDetailResponse.getLinkedHashMap());
}
return auditOpinionResponse; return auditOpinionResponse;
} }

@ -180,4 +180,17 @@
UPDATE dg_compliance_investigation SET user_id = #{userId} WHERE id = #{id} UPDATE dg_compliance_investigation SET user_id = #{userId} WHERE id = #{id}
</update> </update>
<!-- 根据业务id获取当前业务的信息专员、资产专员以及AB角的用户id -->
<select id="getAttacheAndABByBusinessId" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO">
SELECT (SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 59) AS a_user_id,
(SELECT id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 60) AS b_user_id,
a.id,m.id
FROM dg_assets_investigation AS a
LEFT JOIN dg_message_investigation AS m
ON a.business_id = m.business_id
WHERE a.role_id = 63
AND m.role_id = 66
AND a.business_id = #{businessId}
</select>
</mapper> </mapper>

@ -104,7 +104,7 @@
</insert> </insert>
<select id="query" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgWorkConferenceConsider"> <select id="query" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgWorkConferenceConsider">
SELECT opinion,join_judge FROM dg_work_conference_consider WHERE id = #{id} SELECT opinion AS remark,join_judge FROM dg_work_conference_consider WHERE id = #{id}
</select> </select>
<!-- 改变所有业务id相同的审核状态,用于拒绝或者驳回 --> <!-- 改变所有业务id相同的审核状态,用于拒绝或者驳回 -->

@ -104,9 +104,11 @@ public interface EmployeeDao extends BaseMapper<EmployeeEntity> {
boolean insertUsrRole(@Param("list") List<DgGuaranteePO> list); boolean insertUsrRole(@Param("list") List<DgGuaranteePO> list);
int saveUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId); Boolean saveUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId);
List<EmployeeVO> listEmpNameByUserId(@Param("userIds") List<Long> userIds); List<EmployeeVO> listEmpNameByUserId(@Param("userIds") List<Long> userIds);
List<UserDeptVO> getListEmployeeTrees(@Param("id")Long id, @Param("account")String account); List<UserDeptVO> getListEmployeeTrees(@Param("id")Long id, @Param("account")String account);
Integer countUserIdAndRoleId(@Param("userId") Long userId, @Param("roleId") Long roleId);
} }

@ -615,13 +615,17 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
*/ */
@Override @Override
public Boolean saveUserRole(Long userId, Long roleId) { public Boolean saveUserRole(Long userId, Long roleId) {
int i = this.getBaseMapper().saveUserRole(userId, roleId); if (userId == null || roleId == null) {
if (i > 0) { ExceptionCast.cast(CommonCode.INVALID_PARAM);
return true;
} }
return false; // 先判断该条数据是否存在
Integer count = this.getBaseMapper().countUserIdAndRoleId(userId, roleId);
if (count < 1) {
return this.getBaseMapper().saveUserRole(userId, roleId);
} }
return true;
}
/** /**
* 根据用户id获取对应的员工姓名 * 根据用户id获取对应的员工姓名

@ -625,4 +625,8 @@
</if> </if>
</select> </select>
<select id="countUserIdAndRoleId" resultType="integer">
SELECT COUNT(id) FROM hrms_employee_role WHERE user_id = #{userId} AND role_id = #{roleId}
</select>
</mapper> </mapper>

@ -16,17 +16,18 @@ import lombok.ToString;
public enum GuaranteeCode implements ResultCode { public enum GuaranteeCode implements ResultCode {
COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL(false,80001,"意见不能为空,请输入拒绝/驳回意见!"), COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL(false, 80001, "意见不能为空,请输入拒绝/驳回意见!"),
COMPLIANCE_UPLOAD_NOT_NULL(false,80002,"附件不能为空,请上传附件!"), COMPLIANCE_UPLOAD_NOT_NULL(false, 80002, "附件不能为空,请上传附件!"),
COMPLIANCE_USER_NOT_NULL(false,80003,"指派调查员不能为空,请选择指派员!"), COMPLIANCE_USER_NOT_NULL(false, 80003, "指派调查员不能为空,请选择指派员!"),
COMPLIANCE_USER_IS_EXIST(false, 80004, "当前用户在该业务中已被指派为A角、B角、信息部专员或资产部专员中的一个,请选择其他用户!"),
ROLE_IS_NOT(false,90001,"当前登录用户角色信息不存在,无法查询!"), ROLE_IS_NOT(false, 90001, "当前登录用户角色信息不存在,无法查询!"),
LOAN_MESSAGE_NOT_NULL(false,100001,"议定事项、附加事项、贷款金额、贷款期限、附件等不能为空!"), LOAN_MESSAGE_NOT_NULL(false, 100001, "议定事项、附加事项、贷款金额、贷款期限、附件等不能为空!"),
WORK_JUDGE_NOT_NULL(false,110001,"参会评委不能为空,请重新选择!"), WORK_JUDGE_NOT_NULL(false, 110001, "参会评委不能为空,请重新选择!"),
EXCEL_ID_NOT_NULL(false, 120001,"导出的数据不能为空,请选择要导出的数据!"); EXCEL_ID_NOT_NULL(false, 120001, "导出的数据不能为空,请选择要导出的数据!");
/** /**
* 操作是否成功 * 操作是否成功

@ -0,0 +1,24 @@
package com.daqing.framework.domain.guarantee.po;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* 信息专员资产专员AB角的用户id
* @auther River
* @date 2020/12/14 10:17
*/
@Data
@ToString
public class AttacheAndABUserIdPO implements Serializable {
private Integer aUserId;
private Integer bUserId;
private Integer messageUserId;
private Integer assetUserId;
}
Loading…
Cancel
Save