Merge remote-tracking branch 'origin/master'

master
chen 4 years ago
commit e3bee399e3
  1. 4
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerDao.java
  2. 27
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  3. 2
      dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml
  4. 14
      dq-financial-crms/src/main/resources/mapper/crms/CustomerDao.xml
  5. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionListResponse.java
  6. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionResponse.java
  7. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java
  8. 67
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  9. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  10. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  11. 4
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  12. 2
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/RolePermissionMapper.xml
  13. 1
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CrmsCode.java

@ -45,4 +45,8 @@ public interface CustomerDao extends BaseMapper<CustomerEntity> {
List<String> listCustomerName(Integer type);
String getNameByCustomerId(Long CustomerId);
String getSocialUnifiedCodeByCustomerId(Long customerId);
List<String> listSocialUnifiedCode();
}

@ -360,7 +360,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
}
}
}
ExcelUtil.writeExcelWithSheets(response, companyList,"客户资源信息一览表","企业类型", new CustomerCompanyVO())
ExcelUtil.writeExcelWithSheets(response, companyList, "客户资源信息一览表", "企业类型", new CustomerCompanyVO())
.finish();
} catch (Exception e) {
ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
@ -378,7 +378,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
ExcelUtil.writeExcelWithSheets(response, personalTemplates, "客户资源信息表模板", "个人类型", new PersonalTemplate())
.write(companyTemplates, "企业类型", new CompanyTemplate())
.finish();*/
ExcelUtil.writeExcelWithSheets(response, companyTemplates,"客户资源信息表模板","企业类型", new CompanyTemplate())
ExcelUtil.writeExcelWithSheets(response, companyTemplates, "客户资源信息表模板", "企业类型", new CompanyTemplate())
.finish();
} catch (Exception e) {
ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORTTEMPLATE_EXSIT);
@ -616,6 +616,15 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
}
}
}
// 客户社会统一代码判重
if (companyCustomerReq.getSocialUnifiedCode() != null && companyCustomerReq.getSocialUnifiedCode().length() != 0) {
List<String> socialUnifiedCodes = customerDao.listSocialUnifiedCode();
for (String socialUnifiedCode : socialUnifiedCodes) {
if (companyCustomerReq.getSocialUnifiedCode().equals(socialUnifiedCode)) {
ExceptionCast.cast(CrmsCode.CUSTOMER_SOCIAL_UNIFIED_CODE_REPETITION);
}
}
}
CustomerEntity customerEntity = new CustomerEntity();
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity();
BeanUtils.copyProperties(companyCustomerReq, customerEntity);
@ -674,6 +683,18 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
}
}
}
// 社会统一代码判重,注意判断是否与原来相同
if (companyCustomerReq.getSocialUnifiedCode() != null && companyCustomerReq.getSocialUnifiedCode().length() != 0) {
String newSocialUnifiedCode = customerDao.getSocialUnifiedCodeByCustomerId(companyCustomerReq.getId());
if (!companyCustomerReq.getSocialUnifiedCode().equals(newSocialUnifiedCode)) {
List<String> socialUnifiedCodes = customerDao.listSocialUnifiedCode();
for (String socialUnifiedCode : socialUnifiedCodes) {
if (companyCustomerReq.getSocialUnifiedCode().equals(socialUnifiedCode)) {
ExceptionCast.cast(CrmsCode.CUSTOMER_SOCIAL_UNIFIED_CODE_REPETITION);
}
}
}
}
CustomerEntity customerEntity = new CustomerEntity();
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity();
BeanUtils.copyProperties(companyCustomerReq, customerEntity);
@ -692,7 +713,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
companyCustomerEntity.setCustomerId(entity.getId());
//根据企业id删除关联关系
crmsCustomerRelatedMapper.delete(new QueryWrapper<CrmsCustomerRelated>().eq("customer_id",entity.getId()));//companyCustomerEntity.getId()
crmsCustomerRelatedMapper.delete(new QueryWrapper<CrmsCustomerRelated>().eq("customer_id", entity.getId()));//companyCustomerEntity.getId()
//绑定关联关系
List<CrmsCustomerRelated> relatedList = new ArrayList<>();

@ -59,7 +59,7 @@
<if test="status == 1 or status == 2 or status == 3 or status == 4 or status == 5">
AND l.status = #{status}
</if>
AND l.role_id = 58
AND l.type = 1
</select>
<!-- 获取已申请成功的额度 -->

@ -118,4 +118,18 @@
<select id="getNameByCustomerId" parameterType="long" resultType="string">
SELECT name FROM crms_customer WHERE id = #{CustomerId}
</select>
<!-- 查询所有的社会统一代码 -->
<select id="listSocialUnifiedCode" resultType="string">
SELECT social_unified_code FROM crms_company_customer AS cc
INNER JOIN crms_customer AS c
ON cc.customer_id = c.id
WHERE c.del_or_not = 0
</select>
<!-- 查询当前客户的社会统一代码 -->
<select id="getSocialUnifiedCodeByCustomerId" parameterType="long" resultType="string">
SELECT social_unified_code FROM crms_company_customer WHERE customer_id = #{customerId}
</select>
</mapper>

@ -26,8 +26,8 @@ public class AlCollectionListResponse extends BaseRowModel implements Serializab
@ApiModelProperty("id")
private Integer id;
@ExcelProperty(value = "客户编号", index = 0)
@ApiModelProperty("客户编号")
@ExcelProperty(value = "业务编号", index = 0)
@ApiModelProperty("业务编号")
private String code;
@ExcelProperty(value = "客户名称", index = 1)

@ -25,8 +25,8 @@ public class AlCollectionResponse extends BaseRowModel implements Serializable {
@ApiModelProperty("id")
private Integer id;
@ExcelProperty(value = "客户编号", index = 0)
@ApiModelProperty("客户编号")
@ExcelProperty(value = "业务编号", index = 0)
@ApiModelProperty("业务编号")
private String code;
@ExcelProperty(value = "客户名称", index = 1)

@ -177,6 +177,8 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date four = null;
Date three = null;
Date two = null;
Date now = new Date();
try {
@ -188,10 +190,23 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
//遍历list取出应还款日,计算逾期天数=当前时间-应还款日
for (AlRepaymentEntryRes res:list) {
long times2 = res.getRepaymentDate().getTime();//应还款日
try {
two = formatter2.parse(formatter.format(res.getRepaymentDate())+" 00:00:00");
} catch (ParseException e) {
e.printStackTrace();
}
long times2 = two.getTime();//应还款日
//long times2 = res.getRepaymentDate().getTime();//应还款日
long times3=0L;
if(res.getActualRepaymentDate()!=null){
times3 = res.getActualRepaymentDate().getTime();//实际还款日
try {
three = formatter2.parse(formatter.format(res.getActualRepaymentDate())+" 00:00:00");
} catch (ParseException e) {
e.printStackTrace();
}
times3 = three.getTime();//实际还款日
//times3 = res.getActualRepaymentDate().getTime();//实际还款日
}
AlRepaymentEntry entry = new AlRepaymentEntry();

@ -204,20 +204,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo();
dgEnclosureInfo.setBusinessId(dgApplyAmountInfo.getId());//业务id
dgEnclosureInfo.setCompanyId(businessApplication.getCompanyId());//企业Id
dgEnclosureInfo.setBusinessLicense(ArraysUtil.toString(businessApplication.getBusinessLicense()));//营业执照复印件
dgEnclosureInfo.setLegalCardCopy(ArraysUtil.toString(businessApplication.getLegalCardCopy()));//上传法定代表人夫妻及企业实际经营者身份证复印件
dgEnclosureInfo.setMarriageCopy(ArraysUtil.toString(businessApplication.getMarriageCopy()));//法定代表人夫妻户口本,结婚证(离婚证)复印件
dgEnclosureInfo.setLegalCopy(ArraysUtil.toString(businessApplication.getLegalCopy()));//法定代表人身份证明
dgEnclosureInfo.setCompanyConstitution(ArraysUtil.toString(businessApplication.getCompanyConstitution()));//公司章程
dgEnclosureInfo.setAccountingFirm(ArraysUtil.toString(businessApplication.getAccountingFirm()));//会计师事务所审计的上一年度及本年度审计报告
dgEnclosureInfo.setCompanyCredit(ArraysUtil.toString(businessApplication.getCompanyCredit()));//企业信用报告
dgEnclosureInfo.setCreditReport(ArraysUtil.toString(businessApplication.getCreditReport()));//企业法人夫妇信用报告,实际经营者信用报告
dgEnclosureInfo.setCertificateAuthorization(ArraysUtil.toString(businessApplication.getCertificateAuthorization()));//征信业务授权书,承诺书
dgEnclosureInfo.setTaxCertificate(ArraysUtil.toString(businessApplication.getTaxCertificate()));//增值税纳税申报表首表复印件/完税证明
dgEnclosureInfo.setMeetingMinutes(ArraysUtil.toString(businessApplication.getMeetingMinutes()));//股东会会议纪要
dgEnclosureInfo.setAssessmentReport(ArraysUtil.toString(businessApplication.getAssessmentReport()));//反担保资料和评估报告
dgEnclosureInfo.setConversationSummary(ArraysUtil.toString(businessApplication.getConversationSummary()));
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(businessApplication.getInspectionPhotos()));
getEnclosure(businessApplication,dgEnclosureInfo);
dgEnclosureInfoMapper.insert(dgEnclosureInfo);
//根据企业id查询企业详情
@ -264,6 +251,39 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
return 1;
}
public void getEnclosure(BusinessApplicationRequest businessApplication,DgEnclosureInfo dgEnclosureInfo){
//上传附件信息
// if(businessApplication.getBusinessLicense()!=null)
dgEnclosureInfo.setBusinessLicense(ArraysUtil.toString(businessApplication.getBusinessLicense()));//营业执照复印件
// if(businessApplication.getLegalCardCopy()!=null)
dgEnclosureInfo.setLegalCardCopy(ArraysUtil.toString(businessApplication.getLegalCardCopy()));//上传法定代表人夫妻及企业实际经营者身份证复印件
// if(businessApplication.getMarriageCopy()!=null)
dgEnclosureInfo.setMarriageCopy(ArraysUtil.toString(businessApplication.getMarriageCopy()));//法定代表人夫妻户口本,结婚证(离婚证)复印件
// if(businessApplication.getLegalCopy()!=null)
dgEnclosureInfo.setLegalCopy(ArraysUtil.toString(businessApplication.getLegalCopy()));//法定代表人身份证明
// if(businessApplication.getCompanyConstitution()!=null)
dgEnclosureInfo.setCompanyConstitution(ArraysUtil.toString(businessApplication.getCompanyConstitution()));//公司章程
// if(businessApplication.getAccountingFirm()!=null)
dgEnclosureInfo.setAccountingFirm(ArraysUtil.toString(businessApplication.getAccountingFirm()));//会计师事务所审计的上一年度及本年度审计报告
// if(businessApplication.getCompanyCredit()!=null)
dgEnclosureInfo.setCompanyCredit(ArraysUtil.toString(businessApplication.getCompanyCredit()));//企业信用报告
// if(businessApplication.getCreditReport()!=null)
dgEnclosureInfo.setCreditReport(ArraysUtil.toString(businessApplication.getCreditReport()));//企业法人夫妇信用报告,实际经营者信用报告
// if(businessApplication.getCertificateAuthorization()!=null)
dgEnclosureInfo.setCertificateAuthorization(ArraysUtil.toString(businessApplication.getCertificateAuthorization()));//征信业务授权书,承诺书
// if(businessApplication.getTaxCertificate()!=null)
dgEnclosureInfo.setTaxCertificate(ArraysUtil.toString(businessApplication.getTaxCertificate()));//增值税纳税申报表首表复印件/完税证明
// if(businessApplication.getMeetingMinutes()!=null)
dgEnclosureInfo.setMeetingMinutes(ArraysUtil.toString(businessApplication.getMeetingMinutes()));//股东会会议纪要
// if(businessApplication.getAssessmentReport()!=null)
dgEnclosureInfo.setAssessmentReport(ArraysUtil.toString(businessApplication.getAssessmentReport()));//反担保资料和评估报告
// if(businessApplication.getConversationSummary()!=null)
dgEnclosureInfo.setConversationSummary(ArraysUtil.toString(businessApplication.getConversationSummary()));
// if(businessApplication.getInspectionPhotos()!=null)
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(businessApplication.getInspectionPhotos()));
}
@Override
public PageUtils queryPage(Integer page, Integer size, String CustomerNumberOrName) {
//分页参数
@ -304,6 +324,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(dgApplyAmountList.getBusinessId());
List<String>list = new ArrayList<>();
System.out.println(dgEnclosureInfo.getAccountingFirm());
list.add(dgEnclosureInfo.getAccountingFirm());
list.add(dgEnclosureInfo.getAssessmentReport());
list.add(dgEnclosureInfo.getBusinessLicense());
@ -332,6 +353,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
arr1List2.add(i,null);
}
}
/* if(arr1List2.size()>0){
if(!arr1List2.get(0).toString().equals("[]"))*/
dgEnclosureInfo.setAccountingFirmList((List<String>) arr1List2.get(0));
dgEnclosureInfo.setAssessmentReportList((List<String>) arr1List2.get(1));
dgEnclosureInfo.setBusinessLicenseList((List<String>) arr1List2.get(2));
@ -346,6 +369,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgEnclosureInfo.setTaxCertificateList((List<String>) arr1List2.get(11));
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12));
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
// }
BusinessApplicationDetailResponse businessApplicationDetail= new BusinessApplicationDetailResponse();
businessApplicationDetail.setDgApplyAmountInfo(dgApplyAmountInfo);
@ -433,20 +457,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo();
dgEnclosureInfo.setBusinessId(businessApplication.getBusinessId());//业务id
dgEnclosureInfo.setCompanyId(businessApplication.getCompanyId());//企业Id
dgEnclosureInfo.setBusinessLicense(ArraysUtil.toString(businessApplication.getBusinessLicense()));//营业执照复印件
dgEnclosureInfo.setLegalCardCopy(ArraysUtil.toString(businessApplication.getLegalCardCopy()));//上传法定代表人夫妻及企业实际经营者身份证复印件
dgEnclosureInfo.setMarriageCopy(ArraysUtil.toString(businessApplication.getMarriageCopy()));//法定代表人夫妻户口本,结婚证(离婚证)复印件
dgEnclosureInfo.setLegalCopy(ArraysUtil.toString(businessApplication.getLegalCopy()));//法定代表人身份证明
dgEnclosureInfo.setCompanyConstitution(ArraysUtil.toString(businessApplication.getCompanyConstitution()));//公司章程
dgEnclosureInfo.setAccountingFirm(ArraysUtil.toString(businessApplication.getAccountingFirm()));//会计师事务所审计的上一年度及本年度审计报告
dgEnclosureInfo.setCompanyCredit(ArraysUtil.toString(businessApplication.getCompanyCredit()));//企业信用报告
dgEnclosureInfo.setCreditReport(ArraysUtil.toString(businessApplication.getCreditReport()));//企业法人夫妇信用报告,实际经营者信用报告
dgEnclosureInfo.setCertificateAuthorization(ArraysUtil.toString(businessApplication.getCertificateAuthorization()));//征信业务授权书,承诺书
dgEnclosureInfo.setTaxCertificate(ArraysUtil.toString(businessApplication.getTaxCertificate()));//增值税纳税申报表首表复印件/完税证明
dgEnclosureInfo.setMeetingMinutes(ArraysUtil.toString(businessApplication.getMeetingMinutes()));//股东会会议纪要
dgEnclosureInfo.setAssessmentReport(ArraysUtil.toString(businessApplication.getAssessmentReport()));//反担保资料和评估报告
dgEnclosureInfo.setConversationSummary(ArraysUtil.toString(businessApplication.getConversationSummary()));
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(businessApplication.getInspectionPhotos()));
getEnclosure(businessApplication,dgEnclosureInfo);
//根据业务id查询对应的附件信息
DgEnclosureInfo dgEnclosureInfo1 = dgEnclosureInfoMapper.selectOne(new QueryWrapper<DgEnclosureInfo>().eq("business_id", businessApplication.getBusinessId()));

@ -164,6 +164,8 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
arr1List2.add(i, null);
}
}
/* if(arr1List2.size()>0){
if(!arr1List2.get(0).toString().equals("[]"))*/
dgEnclosureInfo.setAccountingFirmList((List<String>) arr1List2.get(0));
dgEnclosureInfo.setAssessmentReportList((List<String>) arr1List2.get(1));
dgEnclosureInfo.setBusinessLicenseList((List<String>) arr1List2.get(2));
@ -178,6 +180,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgEnclosureInfo.setTaxCertificateList((List<String>) arr1List2.get(11));
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12));
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
// }
//查询担保部经理审核的金额和期限

@ -238,6 +238,8 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
arr1List2.add(i,null);
}
}
/* if(arr1List2.size()>0){
if(!arr1List2.get(0).toString().equals("[]"))*/
dgEnclosureInfo.setAccountingFirmList((List<String>) arr1List2.get(0));
dgEnclosureInfo.setAssessmentReportList((List<String>) arr1List2.get(1));
dgEnclosureInfo.setBusinessLicenseList((List<String>) arr1List2.get(2));
@ -252,6 +254,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
dgEnclosureInfo.setTaxCertificateList((List<String>) arr1List2.get(11));
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12));
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
// }
//查询该业务id下对应的C角
DgMessageInvestigation messageInvestigate = this.baseMapper.selectOne(new QueryWrapper<DgMessageInvestigation>()

@ -193,8 +193,8 @@
<!-- 根据业务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,
SELECT (SELECT emp_id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 59) AS a_user_id,
(SELECT emp_id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 60) AS b_user_id,
a.emp_id AS asset_user_id,m.emp_id AS message_user_id
FROM dg_assets_investigation AS a
LEFT JOIN dg_message_investigation AS m

@ -80,7 +80,7 @@
</delete>
<select id="uniqueRoleName" parameterType="string" resultType="java.lang.Integer">
select count(0) from hrms_role where `name` = #{name}
select count(0) from hrms_role where `name` = #{name} and del_or_not=0
</select>
<select id="selectRoleByUserId" parameterType="long" resultType="com.daqing.framework.domain.hrms.EmployeeRoleEntity">

@ -21,6 +21,7 @@ public enum CrmsCode implements ResultCode {
NOT_NULL(false,20004,"上传的文件不能为空"),
CUSTOMER_IS_NULL(false,20005,"导入数据失败,当前员工不存在!"),
CUSTOMER_NAME_REPETITION(false, 20006, "当前客户名称已存在!"),
CUSTOMER_SOCIAL_UNIFIED_CODE_REPETITION(false, 200010,"当前社会统一代码已存在!"),
CUSTOMER_APPLET_IS_NULL(false, 20007,"未查询到你的认证信息,请先认证你的信息!"),
CUSTOMER_APPLET_EXIST(false, 20008,"你已认证自己的信息,无需再次认证!"),
CUSTOMER_APPLET_STATUS_IS_NULL(false, 20009, "当前申请贷款信息状态异常,请刷新重试!");

Loading…
Cancel
Save