Merge remote-tracking branch 'origin/master'

master
chen 4 years ago
commit fd6fbb270b
  1. 14
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java
  2. 35
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  3. 35
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  4. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java
  5. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java
  6. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionMapper.xml
  7. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  8. 3
      dq-govern-gateway/src/main/resources/jwt.properties

@ -426,20 +426,26 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL); ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
} }
switch (applyDetail.getAuditStatus()) { switch (applyDetail.getAuditStatus()) {
case 1: case 1: // 已受理
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break; break;
case 2: case 2: // 审核中
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break; break;
case 3: // 拒绝 case 3: // 拒绝
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark()); applyDetailResponse.setRemark(applyDetail.getRemark());
break; break;
case 4: // 驳回 case 4: // 驳回
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark()); applyDetailResponse.setRemark(applyDetail.getRemark());
break; break;
case 5: // 已撤销
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break;
case 6: // 草稿,正常不会出现这个状态,避免报错设置为已受理
applyDetailResponse.setStatus(1);
break;
default: default:
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL); ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
} }

@ -639,17 +639,19 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CrmsCustomerRelated> relatedList = new ArrayList<>(); List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId(); List<Integer> intList = companyCustomerReq.getRelatedId();
for (int i = 0; i < intList.size(); i++) { if (null != intList && intList.size() != 0) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); for (int i = 0; i < intList.size(); i++) {
Integer integer = intList.get(i); CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id Integer integer = intList.get(i);
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id
relatedList.add(crmsCustomerRelated); crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
}
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
} }
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
} }
if (customer == true && company > 0) { if (customer && company > 0) {
return true; return true;
} }
return false; return false;
@ -696,17 +698,18 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CrmsCustomerRelated> relatedList = new ArrayList<>(); List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId(); List<Integer> intList = companyCustomerReq.getRelatedId();
for (int i = 0; i < intList.size(); i++) { if (null != intList && intList.size() != 0) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); for (int i = 0; i < intList.size(); i++) {
Integer integer = intList.get(i); CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getCustomerId().intValue());//企业id companyCustomerEntity.getId().intValue() Integer integer = intList.get(i);
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id crmsCustomerRelated.setCustomerId(companyCustomerEntity.getCustomerId().intValue());//企业id companyCustomerEntity.getId().intValue()
relatedList.add(crmsCustomerRelated); crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
}
} }
if (relatedList.size() > 0) { if (relatedList.size() > 0) {
crmsCustomerRelatedService.insertCustomerRelated(relatedList); crmsCustomerRelatedService.insertCustomerRelated(relatedList);
} }
return true; return true;
} }
} }

@ -37,8 +37,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.*;
import java.io.IOException;
import java.util.*; import java.util.*;
/** /**
@ -144,6 +143,38 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
return ResponseResult.SUCCESS(list); return ResponseResult.SUCCESS(list);
} }
/**
* 下载单个文件
*
* @param response
* @param fileName
* @return
*/
@RequestMapping("/download")
public String download(HttpServletResponse response, @RequestParam("fileName") String fileName) {
File file = new File(PromptSuccess.FILE_URL_PATH + fileName);
if (file.exists()) {
response.setContentType("application/force-download;charset=UTF-8");
response.setCharacterEncoding("UTF-8");
response.setHeader("Content-Disposition", "attachment;fileName =" + fileName);
byte[] buffer = new byte[1024];
try (FileInputStream inputStream = new FileInputStream(file);
OutputStream outStream = response.getOutputStream();
BufferedInputStream buffStream = new BufferedInputStream(inputStream);) {
int i = 0;
while ((i = buffStream.read(buffer)) != -1) {
outStream.write(buffer);
outStream.write(buffer, 0, i);
}
return "download success";
} catch (Exception e) {
log.error("download error {}", e.getMessage());
}
}
return null;
}
/** /**
* 删除服务上的文件 * 删除服务上的文件
* @param filePath 路径 * @param filePath 路径

@ -34,6 +34,8 @@ public interface AlCollectionMapper extends BaseMapper<AlCollection> {
OverdueDetailResponse getOverdueDetailByInsuranceId(Integer insuranceId); OverdueDetailResponse getOverdueDetailByInsuranceId(Integer insuranceId);
Integer getCollectionCountByInsuranceId(Integer insuranceId);
MoreOverdueDetailResponse moreOverdueDetail(Integer id); MoreOverdueDetailResponse moreOverdueDetail(Integer id);
Integer getInsuranceIdById(Integer id); Integer getInsuranceIdById(Integer id);

@ -143,6 +143,11 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
} }
OverdueDetailResponse overdueDetailResponse = this.getBaseMapper().getOverdueDetailByInsuranceId(insuranceId); OverdueDetailResponse overdueDetailResponse = this.getBaseMapper().getOverdueDetailByInsuranceId(insuranceId);
if (null != overdueDetailResponse) { if (null != overdueDetailResponse) {
// 催收次数
Integer numberOfCollection = this.getBaseMapper().getCollectionCountByInsuranceId(insuranceId);
if (null != numberOfCollection) {
overdueDetailResponse.setNumberOfCollection(numberOfCollection);
}
// 逾期金额、逾期利息、其他费用、逾期次数 // 逾期金额、逾期利息、其他费用、逾期次数
Map<String, Object> map = this.getOverdueConditionByInsuranceId(insuranceId); Map<String, Object> map = this.getOverdueConditionByInsuranceId(insuranceId);
if (null != map) { if (null != map) {
@ -346,6 +351,8 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
BigDecimal overdueInterest = new BigDecimal(0.00); BigDecimal overdueInterest = new BigDecimal(0.00);
// 其他费用 // 其他费用
BigDecimal otherExpenses = new BigDecimal(0.00); BigDecimal otherExpenses = new BigDecimal(0.00);
// 返回数据集合
Map<String, Object> map = new HashMap<>();
List<AlRepaymentEntry> alRepaymentList = alRepaymentEntryMapper.listAlRepaymentByInsuranceId(insuranceId); List<AlRepaymentEntry> alRepaymentList = alRepaymentEntryMapper.listAlRepaymentByInsuranceId(insuranceId);
if (alRepaymentList != null && alRepaymentList.size() != 0) { if (alRepaymentList != null && alRepaymentList.size() != 0) {
for (AlRepaymentEntry alRepayment : alRepaymentList) { for (AlRepaymentEntry alRepayment : alRepaymentList) {
@ -353,9 +360,10 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
overdueInterest = overdueInterest.add(alRepayment.getInterest() == null ? new BigDecimal(0.00) : alRepayment.getInterest()); overdueInterest = overdueInterest.add(alRepayment.getInterest() == null ? new BigDecimal(0.00) : alRepayment.getInterest());
otherExpenses = otherExpenses.add(alRepayment.getOtherExpenses() == null ? new BigDecimal(0.00) : alRepayment.getOtherExpenses()); otherExpenses = otherExpenses.add(alRepayment.getOtherExpenses() == null ? new BigDecimal(0.00) : alRepayment.getOtherExpenses());
} }
map.put("overduePeriods", alRepaymentList.size());
} else {
map.put("overduePeriods", 0);
} }
Map<String, Object> map = new HashMap<>();
map.put("overduePeriods", alRepaymentList.size());
map.put("overdueAmount", overdueAmount); map.put("overdueAmount", overdueAmount);
map.put("overdueInterest", overdueInterest); map.put("overdueInterest", overdueInterest);
map.put("otherExpenses", otherExpenses); map.put("otherExpenses", otherExpenses);

@ -40,12 +40,23 @@
#{ac.collectionUser},#{ac.overduePeriods}) #{ac.collectionUser},#{ac.overduePeriods})
</insert> </insert>
<select id="getOverdueDetailByInsuranceId" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.OverdueDetailResponse"> <!--<select id="getOverdueDetailByInsuranceId" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.OverdueDetailResponse">
SELECT i.customer_name AS name,i.business_type AS type,i.business_code AS code,COUNT(c.id) AS number_of_collection SELECT i.customer_name AS name,i.business_type AS type,i.business_code AS code,COUNT(c.id) AS number_of_collection
FROM al_insurance_list AS i FROM al_insurance_list AS i
INNER JOIN al_collection AS c INNER JOIN al_collection AS c
ON i.id = c.insurance_id ON i.id = c.insurance_id
WHERE i.id = #{insuranceId} WHERE i.id = #{insuranceId}
</select>-->
<!-- 催收时贷款记录 -->
<select id="getOverdueDetailByInsuranceId" parameterType="integer" resultType="com.daqing.financial.guarantee.model.response.OverdueDetailResponse">
SELECT customer_name AS name,business_type AS type,business_code AS code
FROM al_insurance_list WHERE id = #{insuranceId}
</select>
<!-- 根据保后id查询催收的次数 -->
<select id="getCollectionCountByInsuranceId" parameterType="integer" resultType="integer">
SELECT COUNT(id) FROM al_collection WHERE insurance_id = #{insuranceId}
</select> </select>
<!-- 催收列表 --> <!-- 催收列表 -->

@ -195,7 +195,7 @@
<select id="getAttacheAndABByBusinessId" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.po.AttacheAndABUserIdPO"> <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 (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 id FROM dg_guarantee_assign_user WHERE business_id = #{businessId} AND role_id = 60) AS b_user_id,
a.id,m.id a.emp_id AS asset_user_id,m.emp_id AS message_user_id
FROM dg_assets_investigation AS a FROM dg_assets_investigation AS a
LEFT JOIN dg_message_investigation AS m LEFT JOIN dg_message_investigation AS m
ON a.business_id = m.business_id ON a.business_id = m.business_id

@ -34,7 +34,8 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/api-guarantee/al-insurance-list/excelExport,\ /api-guarantee/al-insurance-list/excelExport,\
/api-guarantee/al-repayment-entry/excelExport,\ /api-guarantee/al-repayment-entry/excelExport,\
/api-guarantee/al-collection/list/export/excel,\ /api-guarantee/al-collection/list/export/excel,\
/api-guarantee/al-collection/collection/list/export/excel /api-guarantee/al-collection/collection/list/export/excel,\
/api-guarantee/dg-apply-amount-info/download

Loading…
Cancel
Save