diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java index e8b07d55..f570c4ae 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java @@ -51,6 +51,8 @@ public interface DgComplianceInvestigationMapper extends BaseMapper ids); String getFileUrl(String[] fileUrls); + } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java index 5d29e884..eba61dc4 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java @@ -139,16 +139,16 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl() .eq("business_id", assetsResponse.getBusinessId()).eq("type", 1)); - assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); - assetsResponse.setAmount(assetsInvestigation.getAmount()); - assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); - assetsResponse.setApplyContent(assetsInvestigation.getApplyContent()); - assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode()); - assetsResponse.setAssetsName(assetsInvestigation.getAssetsName()); - assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime()); - assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount()); - assetsResponse.setAuditCode(assetsInvestigation.getAuditCode()); - assetsResponse.setAuditName(assetsInvestigation.getAuditName()); +// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); +// assetsResponse.setAmount(assetsInvestigation.getAmount()); +// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); +// assetsResponse.setApplyContent(assetsInvestigation.getApplyContent()); +// assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode()); +// assetsResponse.setAssetsName(assetsInvestigation.getAssetsName()); +// assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime()); +// assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount()); +// assetsResponse.setAuditCode(assetsInvestigation.getAuditCode()); +// assetsResponse.setAuditName(assetsInvestigation.getAuditName()); //结束--------------------------------------------------------------------- //根据业务id查询评估价值List diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java index 39d257b7..f60cfcc3 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java @@ -74,15 +74,15 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl roleList = new ArrayList<>(); for (String roleId : roleIds) { roleList.add(Integer.parseInt(roleId)); @@ -115,8 +115,8 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl 0) { - // 工作会该条数据存在,表示是工作会驳回的数据 - result1 = this.getBaseMapper().updateWorkConferenceConsider(complianceInvestigation.getBusinessId(), PromptSuccess.GZU_ID, - StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND); + // 工作会该条数据存在,表示是工作会驳回的数据,现将当前审批状态更新为已审核 + 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 roleList = new ArrayList<>(); for (String roleId : roleIds) { roleList.add(Integer.parseInt(roleId)); @@ -121,10 +121,18 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl roleList = new ArrayList<>(); for (String roleId : roleIds) { roleList.add(Integer.parseInt(roleId)); @@ -133,11 +133,11 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl + + + + SELECT dept_name FROM dg_audit_process WHERE business_id = #{businessId} + AND create_time = (SELECT MAX(create_time) FROM dg_audit_process WHERE business_id = #{businessId}) + + diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java index 64c5c5d9..e5a217fd 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java @@ -21,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.multipart.MultipartFile; + import javax.imageio.ImageIO; import javax.servlet.http.HttpServletRequest; import java.awt.image.BufferedImage; @@ -43,12 +44,12 @@ public class UserServiceImpl extends ServiceImpl implements public EmployeeAndUserVO info() { String userId = this.getUserId(); EmployeeAndUserVO employeeAndUser = employeeDao.getEmployeeByUserId(Long.parseLong(userId)); - if (employeeAndUser == null){ + if (employeeAndUser == null) { return employeeAndUser; } - if (employeeAndUser.getWechatId() == null || employeeAndUser.getWechatId().length() == 0){ + if (employeeAndUser.getWechatId() == null || employeeAndUser.getWechatId().length() == 0) { employeeAndUser.setWechatId(PromptSuccess.QR_CODE_FAIL); - }else { + } else { employeeAndUser.setWechatId(PromptSuccess.QR_CODE_BINDING_SUCCESS); } return employeeAndUser; @@ -66,16 +67,16 @@ public class UserServiceImpl extends ServiceImpl implements employeeAndUserVO.setId(employeeId); employeeAndUserVO.setUserId(Long.parseLong(userId)); Boolean result = true; - BeanUtils.copyProperties(employeeAndUserVO,employee); + BeanUtils.copyProperties(employeeAndUserVO, employee); String phoneAccount = this.getBaseMapper().getPhoneAccount(employee.getUserId()); if ((phoneAccount == null || phoneAccount.length() == 0) && employeeAndUserVO.getPrimaryPhone() != null && employeeAndUserVO.getPrimaryPhone().length() != 0 && employeeAndUserVO.getPrimaryCode() != null - && employeeAndUserVO.getPrimaryCode().length() != 0){ + && employeeAndUserVO.getPrimaryCode().length() != 0) { // 没有绑定手机号,现在绑定 String code = RedisUtil.get(employeeAndUserVO.getPrimaryPhone()); - if (code == null || code.length() == 0 || !Objects.equals(employeeAndUserVO.getPrimaryCode(),code)){ + if (code == null || code.length() == 0 || !Objects.equals(employeeAndUserVO.getPrimaryCode(), code)) { ExceptionCast.cast(HrmsCode.USER_PHONE_CODE_MISTAKE); } RedisUtil.del(employeeAndUserVO.getPrimaryPhone()); @@ -89,20 +90,20 @@ public class UserServiceImpl extends ServiceImpl implements && employeeAndUserVO.getNewPhone().length() != 0 && employeeAndUserVO.getNewCode() != null && employeeAndUserVO.getNewCode().length() != 0 - && phoneAccount != null && phoneAccount.length() != 0){ + && phoneAccount != null && phoneAccount.length() != 0) { // 更换绑定的手机号 - if (!Objects.equals(phoneAccount,employeeAndUserVO.getPrimaryPhone())){ + if (!Objects.equals(phoneAccount, employeeAndUserVO.getPrimaryPhone())) { ExceptionCast.cast(HrmsCode.USER_PRIMARY_PHONE_MISTAKE); } String primaryCode = RedisUtil.get(employeeAndUserVO.getPrimaryPhone()); if (primaryCode == null || primaryCode.length() == 0 - || !Objects.equals(primaryCode,employeeAndUserVO.getPrimaryCode())){ + || !Objects.equals(primaryCode, employeeAndUserVO.getPrimaryCode())) { ExceptionCast.cast(HrmsCode.USER_PRIMARY_CODE_MISTAKE); } RedisUtil.del(employeeAndUserVO.getPrimaryPhone()); String newCode = RedisUtil.get(employeeAndUserVO.getNewPhone()); if (newCode == null || newCode.length() == 0 - || !Objects.equals(newCode,employeeAndUserVO.getNewCode())){ + || !Objects.equals(newCode, employeeAndUserVO.getNewCode())) { ExceptionCast.cast(HrmsCode.USER_NEW_CODE_MISTAKE); } RedisUtil.del(employeeAndUserVO.getNewPhone()); @@ -116,33 +117,33 @@ public class UserServiceImpl extends ServiceImpl implements */ @Override public String uploadFile(MultipartFile file) { - if (file == null || file.isEmpty()){ + if (file == null || file.isEmpty()) { ExceptionCast.cast(HrmsCode.USER_FILE_IS_NULL); } try { // 通过获取图片文件的宽度和高度来校验是否为图片文件 BufferedImage image = ImageIO.read(file.getInputStream()); - if (image == null || image.getHeight() <= 0 || image.getWidth() <= 0){ + if (image == null || image.getHeight() <= 0 || image.getWidth() <= 0) { ExceptionCast.cast(HrmsCode.USER_FILE_TYPE_MISTAKE); } - }catch (IOException e){ + } catch (IOException e) { ExceptionCast.cast(HrmsCode.USER_FILE_UPLOAD_FAIL); } String filename = file.getOriginalFilename(); - if (filename == null){ + if (filename == null) { ExceptionCast.cast(HrmsCode.USER_FILE_TYPE_MISTAKE); } String substring = filename.substring(filename.lastIndexOf(".")); String filePrefix = UUID.randomUUID().toString(); // 图片上传绝对路径 - String filePath = PromptSuccess.UPLOAD_FILE_PATH+filePrefix+substring; + String filePath = PromptSuccess.UPLOAD_FILE_PATH + filePrefix + substring; try { file.transferTo(new File(filePath)); } catch (IOException e) { ExceptionCast.cast(HrmsCode.USER_FILE_UPLOAD_FAIL); } // 图片访问路径 - return PromptSuccess.IMAGE_URL_PATH+filePrefix+substring; + return PromptSuccess.IMAGE_URL_PATH + filePrefix + substring; } /** @@ -153,27 +154,27 @@ public class UserServiceImpl extends ServiceImpl implements public Boolean updatePassword(String primaryPassword, String newPassword, String affirmNewPassword) { if (primaryPassword == null || primaryPassword.length() == 0 || newPassword == null || newPassword.length() == 0 - || affirmNewPassword == null || affirmNewPassword.length() == 0){ + || affirmNewPassword == null || affirmNewPassword.length() == 0) { ExceptionCast.cast(HrmsCode.USER_PASSWORD_NOT_NULL); } // 两次输入是否相同 - if (!Objects.equals(affirmNewPassword, newPassword)){ + if (!Objects.equals(affirmNewPassword, newPassword)) { ExceptionCast.cast(HrmsCode.USER_PASSWORD_NO_CONSISTENT); } // 旧密码是否正确 String userId = this.getUserId(); - if (!Objects.equals(Md5Util.md5(primaryPassword + Long.parseLong(userId)),this.getBaseMapper().getPasswordById(Long.parseLong(userId)))){ + if (!Objects.equals(Md5Util.md5(primaryPassword + Long.parseLong(userId)), this.getBaseMapper().getPasswordById(Long.parseLong(userId)))) { ExceptionCast.cast(HrmsCode.USER_PASSWORD_MISTAKE); } // 正则校验 - if (!newPassword.matches(PromptSuccess.MATCHES_STRING)){ + if (!newPassword.matches(PromptSuccess.MATCHES_STRING)) { ExceptionCast.cast(HrmsCode.USER_PASSWORD_MATCHES); } // 是否与账号相同 - if (Objects.equals(newPassword,this.getBaseMapper().getAccountById(Long.parseLong(userId)))){ + if (Objects.equals(newPassword, this.getBaseMapper().getAccountById(Long.parseLong(userId)))) { ExceptionCast.cast(HrmsCode.USER_PASSWORD_IS_NO_ACCOUNT); } - return this.getBaseMapper().updatePassword(Long.parseLong(userId),Md5Util.md5(newPassword + Long.parseLong(userId))); + return this.getBaseMapper().updatePassword(Long.parseLong(userId), Md5Util.md5(newPassword + Long.parseLong(userId))); } /** @@ -181,14 +182,14 @@ public class UserServiceImpl extends ServiceImpl implements */ @Override public Boolean getVerificationCode(String phone) { - if (phone == null || phone.length() == 0){ + if (phone == null || phone.length() == 0) { ExceptionCast.cast(HrmsCode.USER_PHONE_NOT_NULL); } - String code = (int)((Math.random() * 9 + 1) * 100000)+ ""; + String code = (int) ((Math.random() * 9 + 1) * 100000) + ""; // 发送短信 - Boolean result = SendSMS.sendCode(phone,"SMS_204155294",code); - if (result){ - RedisUtil.setEx(phone,code,PromptSuccess.OVERDUE_TIME); + Boolean result = SendSMS.sendCode(phone, "SMS_204155294", code); + if (result) { + RedisUtil.setEx(phone, code, PromptSuccess.OVERDUE_TIME); return true; } return false; @@ -200,11 +201,11 @@ public class UserServiceImpl extends ServiceImpl implements @Transactional @Override public Boolean bindingPhoneAccount(String phone, String code) { - if (phone == null || phone.length() == 0 || code == null || code.length() == 0){ + if (phone == null || phone.length() == 0 || code == null || code.length() == 0) { ExceptionCast.cast(HrmsCode.USER_PHONE_OR_CODE_NOT_NULL); } if (RedisUtil.get(phone) == null || RedisUtil.get(phone).length() == 0 - || !Objects.equals(code,RedisUtil.get(phone))){ + || !Objects.equals(code, RedisUtil.get(phone))) { ExceptionCast.cast(HrmsCode.USER_BINDING_FAIL); } RedisUtil.del(phone); @@ -218,15 +219,15 @@ public class UserServiceImpl extends ServiceImpl implements @Override public Boolean cancel() { String userId = this.getUserId(); - return this.getBaseMapper().updateWeChat(Long.parseLong(userId),null); + return this.getBaseMapper().updateWeChat(Long.parseLong(userId), null); } /** * 获取当前登录用户信息 */ - private String getUserId(){ + private String getUserId() { HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); String token = request.getHeader("token"); - return RedisUtil.get("dq:token:"+token); + return RedisUtil.get("dq:token:" + token); } } \ No newline at end of file diff --git a/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java b/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java index e3110706..805ed9e4 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java @@ -91,4 +91,6 @@ public class PromptSuccess { public static final String GZU_NAME = "工作会"; // 工作会 public static final String DSH_NAME = "贷审会"; // 贷审会 + + public static final String DB_AB_NAME = "担保部A/B角"; // 担保部A/B角 }