Merge remote-tracking branch 'origin/master'

master
river 4 years ago
commit 4ebb00fc14
  1. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
  3. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java
  4. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java
  5. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/LoanNoticeListResponse.java
  6. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  7. 9
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  8. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  9. 2
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  10. 6
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
  11. 3
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml
  12. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java
  13. 9
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserDetailsServiceImpl.java
  14. 5
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java
  15. 6
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml
  16. 3
      dq-financial-hrms/src/main/resources/bootstrap.properties
  17. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java
  18. 3
      dq-govern-gateway/src/main/resources/bootstrap.properties

@ -78,7 +78,7 @@ public class CrmsCompanyPersonalController {
@ApiOperation(value = "编辑个人/企业关联人") @ApiOperation(value = "编辑个人/企业关联人")
public ResponseResult updateCompanyPersonal(@RequestBody CrmsCompanyPersonal crmsCompanyPersonal){ public ResponseResult updateCompanyPersonal(@RequestBody CrmsCompanyPersonal crmsCompanyPersonal){
boolean result = crmsCompanyPersonalService.updateById(crmsCompanyPersonal); boolean result = crmsCompanyPersonalService.updateById(crmsCompanyPersonal);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL(); return result ? ResponseResult.SUCCESS(crmsCompanyPersonal) : ResponseResult.FAIL();
} }
/** /**

@ -78,7 +78,7 @@ public class DgGuaranteeLetterAssignUserController {
@RequestBody GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest) { @RequestBody GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest) {
//如果为驳回操作且无审核意见,抛出异常 //如果为驳回操作且无审核意见,抛出异常
if (StatusCode.SP_REJECT.equals(guaranteeLetterUpdateStatusRequest.getStatus()) && guaranteeLetterUpdateStatusRequest.getAuditOpinion().length()==0){ if (StatusCode.SP_REJECT.equals(guaranteeLetterUpdateStatusRequest.getStatus()) && guaranteeLetterUpdateStatusRequest.getAuditOpinion().length()==0){
ExceptionCast.cast(HrmsCode.EMPTY_OPINION); return ResponseResult.FAIL(44444,"请填写审核意见!");
} }
boolean result = guaranteeLetterAssignUserService.updateGuaranteeLetterStatus(guaranteeLetterUpdateStatusRequest); boolean result = guaranteeLetterAssignUserService.updateGuaranteeLetterStatus(guaranteeLetterUpdateStatusRequest);
return result ? ResponseResult.SUCCESS("确认成功!"):ResponseResult.FAIL(40005,"确认失败!"); return result ? ResponseResult.SUCCESS("确认成功!"):ResponseResult.FAIL(40005,"确认失败!");

@ -72,7 +72,7 @@ public class DgLoanNoticeController {
@RequestBody LoanNoticeUpdateRequest loanNoticeUpdateRequest) { @RequestBody LoanNoticeUpdateRequest loanNoticeUpdateRequest) {
//如果为驳回操作且无审核意见,抛出异常 //如果为驳回操作且无审核意见,抛出异常
if (StatusCode.SP_REJECT.equals(loanNoticeUpdateRequest.getStatus()) && loanNoticeUpdateRequest.getAuditOpinion().length()==0){ if (StatusCode.SP_REJECT.equals(loanNoticeUpdateRequest.getStatus()) && loanNoticeUpdateRequest.getAuditOpinion().length()==0){
ExceptionCast.cast(HrmsCode.EMPTY_OPINION); return ResponseResult.FAIL(44444,"请填写审核意见!");
} }
boolean result = loanNoticeService.updateLoanNotice(loanNoticeUpdateRequest); boolean result = loanNoticeService.updateLoanNotice(loanNoticeUpdateRequest);
return result ? ResponseResult.SUCCESS("更新成功!"):ResponseResult.FAIL(40005,"更新失败!"); return result ? ResponseResult.SUCCESS("更新成功!"):ResponseResult.FAIL(40005,"更新失败!");

@ -63,7 +63,7 @@ public class DgPaymentConfirmationConsiderController {
@RequestBody PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest) { @RequestBody PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest) {
//如果为驳回操作且无审核意见,抛出异常 //如果为驳回操作且无审核意见,抛出异常
if (StatusCode.SP_REJECT.equals(paymentConfirmationUpdateRequest.getStatus()) && paymentConfirmationUpdateRequest.getAuditOpinion().length()==0){ if (StatusCode.SP_REJECT.equals(paymentConfirmationUpdateRequest.getStatus()) && paymentConfirmationUpdateRequest.getAuditOpinion().length()==0){
ExceptionCast.cast(HrmsCode.EMPTY_OPINION); return ResponseResult.FAIL(44444,"请填写审核意见!");
} }
boolean result = paymentConfirmationConsiderService.updatePaymentConfirmation(paymentConfirmationUpdateRequest); boolean result = paymentConfirmationConsiderService.updatePaymentConfirmation(paymentConfirmationUpdateRequest);
return result ? ResponseResult.SUCCESS("更新成功!"):ResponseResult.FAIL(40005,"更新失败!"); return result ? ResponseResult.SUCCESS("更新成功!"):ResponseResult.FAIL(40005,"更新失败!");

@ -28,6 +28,11 @@ public class LoanNoticeListResponse {
@ApiModelProperty("唯一标识") @ApiModelProperty("唯一标识")
private Integer id; private Integer id;
@ExcelIgnore
@ApiModelProperty("贷审会同意时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date passingTime;
@ExcelIgnore @ExcelIgnore
@ApiModelProperty("业务id") @ApiModelProperty("业务id")
private Integer businessId; private Integer businessId;

@ -396,6 +396,11 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//根据业务id删除对应的附件信息 //根据业务id删除对应的附件信息
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",businessApplication.getBusinessId())); dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",businessApplication.getBusinessId()));
//同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(businessApplication.getBusinessId(),account,"担保业务员","",1,"","","");
//附件新增 //附件新增
return dgEnclosureInfoMapper.insert(dgEnclosureInfo); return dgEnclosureInfoMapper.insert(dgEnclosureInfo);
} }

@ -164,6 +164,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//根据业务id以及type为1查询资产详细 //根据业务id以及type为1查询资产详细
DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectOne(new QueryWrapper<DgAssetsInvestigation>() DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectOne(new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id", assetsResponse.getBusinessId()).eq("type", 1)); .eq("business_id", assetsResponse.getBusinessId()).eq("type", 1));
if(assetsInvestigation != null){
String assetsAmounts=assetsInvestigation.getAssetsAmount(); String assetsAmounts=assetsInvestigation.getAssetsAmount();
if(assetsAmounts != null){ if(assetsAmounts != null){
if(assetsAmounts.length()>0){ if(assetsAmounts.length()>0){
@ -179,7 +180,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
BeanUtils.copyProperties(assetsInvestigation,assetsInvestigationRes); BeanUtils.copyProperties(assetsInvestigation,assetsInvestigationRes);
BeanUtils.copyProperties(assetsInvestigationRes,assetsResponse); BeanUtils.copyProperties(assetsInvestigationRes,assetsResponse);
} }
}
//根据业务id查询评估价值List //根据业务id查询评估价值List
/* List<DgAssetsAssessmentAssetsLog> assessmentlist = dgAssetsAssessmentAssetsLogMapper.selectList( /* List<DgAssetsAssessmentAssetsLog> assessmentlist = dgAssetsAssessmentAssetsLogMapper.selectList(
new QueryWrapper<DgAssetsAssessmentAssetsLog>().eq("business_id",assetsResponse.getBusinessId())); new QueryWrapper<DgAssetsAssessmentAssetsLog>().eq("business_id",assetsResponse.getBusinessId()));
@ -423,8 +424,12 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
}else{ }else{
deptName = "资产部分管领导"; deptName = "资产部分管领导";
} }
String remark = Arrays.toString(approvalAssetsRequest.getRemark());//补充调查原因 String remark1 = Arrays.toString(approvalAssetsRequest.getRemark());//补充调查原因
String remark = remark1.replace("[","").replace("]","");
String otherRemark = approvalAssetsRequest.getOtherRemark();//其他原因 String otherRemark = approvalAssetsRequest.getOtherRemark();//其他原因
if(otherRemark == null){
otherRemark = "";
}
String reason = remark+otherRemark; String reason = remark+otherRemark;
String loanMoney = approvalAssetsRequest.getAmount().toString();//金额 String loanMoney = approvalAssetsRequest.getAmount().toString();//金额
String loanTerm = approvalAssetsRequest.getTerm();//期限 String loanTerm = approvalAssetsRequest.getTerm();//期限

@ -506,8 +506,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
} else { } else {
deptName = "担保部分管领导"; deptName = "担保部分管领导";
} }
String remark = Arrays.toString(approvalGuaranteeRequest.getRemark());//补充调查原因 String remark1 = Arrays.toString(approvalGuaranteeRequest.getRemark());//补充调查原因
String remark = remark1.replace("[","").replace("]","");
String otherRemark = approvalGuaranteeRequest.getOtherRemark();//其他原因 String otherRemark = approvalGuaranteeRequest.getOtherRemark();//其他原因
if(otherRemark == null){
otherRemark = "";
}
String reason = remark+otherRemark; String reason = remark+otherRemark;
String loanMoney = approvalGuaranteeRequest.getAmount().toString();//金额 String loanMoney = approvalGuaranteeRequest.getAmount().toString();//金额
String loanTerm = approvalGuaranteeRequest.getTerm();//期限 String loanTerm = approvalGuaranteeRequest.getTerm();//期限

@ -1,5 +1,5 @@
#服务名称 #服务名称
#spring.application.name=dq-financial-guarantee spring.application.name=dq-financial-guarantee
##配置中心地址 ##配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.140:8848 spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.namespace=58fa89c6-0e23-4530-ac13-95747e873c60 spring.cloud.nacos.config.namespace=58fa89c6-0e23-4530-ac13-95747e873c60

@ -11,10 +11,14 @@
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="status" property="status" /> <result column="status" property="status" />
<result column="audit_opinion" property="auditOpinion" /> <result column="audit_opinion" property="auditOpinion" />
<result column="reason" property="reason" />
<result column="loan_money" property="loanMoney" />
<result column="loan_tern" property="loanTern" />
</resultMap> </resultMap>
<select id="selectAuditProcessList" resultMap="BaseResultMap"> <select id="selectAuditProcessList" resultMap="BaseResultMap">
select dap.id,dap.business_id,dap.approver,dap.dept_name,dap.create_time,dap.audit_opinion,dbps.business_status as status select dap.id,dap.business_id,dap.approver,dap.dept_name,dap.create_time,dap.audit_opinion,
dbps.business_status as status,dap.reason,dap.loan_money,dap.loan_tern
from dg_audit_process dap from dg_audit_process dap
left join dg_business_process_status dbps on dbps.business_id = dap.business_id left join dg_business_process_status dbps on dbps.business_id = dap.business_id
where dap.business_id = #{businessId} where dap.business_id = #{businessId}

@ -29,11 +29,12 @@
<result column="business_status" property="businessStatus" /> <result column="business_status" property="businessStatus" />
<result column="business_id" property="businessId" /> <result column="business_id" property="businessId" />
<result column="role_id" property="roleId" /> <result column="role_id" property="roleId" />
<result column="passing_time" property="passingTime" />
</resultMap> </resultMap>
<select id="pageByCondition" resultMap="LoanNoticeListResponseMap"> <select id="pageByCondition" resultMap="LoanNoticeListResponseMap">
select ln.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_tern,lcc.loan_money,ln.role_id, select ln.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_tern,lcc.loan_money,ln.role_id,
aai.create_time,ln.status,aai.bank,ln.audit_opinion,ln.operating_status,bps.business_status,ln.business_id aai.create_time,ln.status,aai.bank,ln.audit_opinion,ln.operating_status,bps.business_status,ln.business_id,lcc.passing_time
from dg_loan_notice ln from dg_loan_notice ln
left join dg_apply_amount_info aai on ln.business_id = aai.id left join dg_apply_amount_info aai on ln.business_id = aai.id
left join crms_company_customer ccc on ln.company_id = ccc.id left join crms_company_customer ccc on ln.company_id = ccc.id

@ -31,4 +31,6 @@ public interface UserLoginDao extends BaseMapper<UserEntity> {
Boolean updateUserLogin(@Param("userId") Long userId, @Param("date") Date date); Boolean updateUserLogin(@Param("userId") Long userId, @Param("date") Date date);
Integer countWeChatId(String weChatId); Integer countWeChatId(String weChatId);
String getNameByUserId(Long userId);
} }

@ -47,6 +47,8 @@ public class UserDetailsServiceImpl implements UserDetailsService {
private AuthEmployeeRoleDao userRoleMapper; private AuthEmployeeRoleDao userRoleMapper;
@Autowired @Autowired
private HrauthFeignService hrauthFeignService; private HrauthFeignService hrauthFeignService;
@Autowired
private UserLoginDao userLoginDao;
/*** /***
* 根据账号获取用户信息 * 根据账号获取用户信息
@ -57,13 +59,20 @@ public class UserDetailsServiceImpl implements UserDetailsService {
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
// 从数据库中取出用户信息 // 从数据库中取出用户信息
List<UserEntity> userList = userMapper.selectList(new QueryWrapper<UserEntity>().eq("phone_account", username)); List<UserEntity> userList = userMapper.selectList(new QueryWrapper<UserEntity>().eq("phone_account", username));
List<UserEntity> userList2 = userMapper.selectList(new QueryWrapper<UserEntity>().eq("account", username));
UserEntity user; UserEntity user;
String name = null;
// 判断用户是否存在 // 判断用户是否存在
if (!CollectionUtils.isEmpty(userList)) { if (!CollectionUtils.isEmpty(userList)) {
user = userList.get(0); user = userList.get(0);
name = userLoginDao.getNameByUserId(userList.get(0).getId());
} else if(!CollectionUtils.isEmpty(userList2)){
user = userList2.get(0);
name = userLoginDao.getNameByUserId(userList2.get(0).getId());
} else { } else {
throw new UsernameNotFoundException("用户名不存在或已禁用!"); throw new UsernameNotFoundException("用户名不存在或已禁用!");
} }
user.setAccount(name);
// 返回UserDetails实现类 // 返回UserDetails实现类
return new SecurityUser(user, getUserRoles(user.getId().intValue())); return new SecurityUser(user, getUserRoles(user.getId().intValue()));
} }

@ -117,7 +117,10 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
public ResponseResult login(LoginRequest loginRequest) { public ResponseResult login(LoginRequest loginRequest) {
//判断用户登录方式 //判断用户登录方式
UserEntity userEntity = baseMapper.login(loginRequest); UserEntity userEntity = baseMapper.login(loginRequest);
String name = null;
if(userEntity != null){ if(userEntity != null){
//获取员工name
name = baseMapper.getNameByUserId(userEntity.getId());
//删除redis里面的userEntity //删除redis里面的userEntity
JwtUtils.removeUserEntityByUserId(userEntity.getId()); JwtUtils.removeUserEntityByUserId(userEntity.getId());
} }
@ -206,7 +209,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
//返回用户信息 //返回用户信息
LoginResponse loginResponse = new LoginResponse(); LoginResponse loginResponse = new LoginResponse();
loginResponse.setAccount(userEntity.getAccount()); loginResponse.setAccount(name);
loginResponse.setToken(token); loginResponse.setToken(token);
if(headImg != null) if(headImg != null)
loginResponse.setHeadPortaritUrl(headImg); loginResponse.setHeadPortaritUrl(headImg);

@ -28,7 +28,7 @@
select id,account,phone_account,password,login_num from hrms_user select id,account,phone_account,password,login_num from hrms_user
where del_or_not = 0 and status = 0 where del_or_not = 0 and status = 0
<if test="phone != null and phone != '' "> <if test="phone != null and phone != '' ">
and phone_account = #{phone} and (phone_account = #{phone} or account = #{phone})
</if> </if>
<if test="wechatId != null and wechatId != '' "> <if test="wechatId != null and wechatId != '' ">
and wechat_id = #{wechatId} and wechat_id = #{wechatId}
@ -63,4 +63,8 @@
SELECT COUNT(id) FROM hrms_user WHERE wechat_id = #{weChatId} SELECT COUNT(id) FROM hrms_user WHERE wechat_id = #{weChatId}
</select> </select>
<select id="getNameByUserId" parameterType="long" resultType="string">
SELECT `name` FROM hrms_employee WHERE user_id = #{userId}
</select>
</mapper> </mapper>

@ -65,3 +65,6 @@ spring.servlet.multipart.max-request-size=10MB
#spring.redis.jedis.pool.max-wait=-1 #spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8 #spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0 #spring.redis.jedis.pool.min-idle=0
#
#spring.servlet.multipart.max-file-size=10MB
#spring.servlet.multipart.max-request-size=10MB

@ -8,7 +8,7 @@ public class LoginRequest {
private int id; private int id;
@ApiModelProperty(value = "手机号码") @ApiModelProperty(value = "手机号码/账号")
private String phone; private String phone;
@ApiModelProperty(value = "登录类型(1:手机号 2:微信登录)") @ApiModelProperty(value = "登录类型(1:手机号 2:微信登录)")

@ -38,3 +38,6 @@ spring.redis.jedis.pool.min-idle=0
#spring.redis.jedis.pool.max-wait=-1 #spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8 #spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0 #spring.redis.jedis.pool.min-idle=0
#
#spring.servlet.multipart.max-file-size=10MB
#spring.servlet.multipart.max-request-size=10MB
Loading…
Cancel
Save