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. 7
      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);
}
switch (applyDetail.getAuditStatus()) {
case 1:
case 1: // 已受理
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break;
case 2:
case 2: // 审核中
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break;
case 3: // 拒绝
case 3: // 拒绝
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark());
break;
case 4: // 驳回
case 4: // 驳回
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark());
break;
case 5: // 已撤销
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break;
case 6: // 草稿,正常不会出现这个状态,避免报错设置为已受理
applyDetailResponse.setStatus(1);
break;
default:
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
}

@ -639,6 +639,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId();
if (null != intList && intList.size() != 0) {
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
@ -648,8 +649,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
}
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
}
if (customer == true && company > 0) {
if (customer && company > 0) {
return true;
}
return false;
@ -696,6 +698,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyCustomerReq.getRelatedId();
if (null != intList && intList.size() != 0) {
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
@ -703,10 +706,10 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
}
}
if (relatedList.size() > 0) {
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
return true;
}
}

@ -37,8 +37,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.*;
import java.util.*;
/**
@ -144,6 +143,38 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
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 路径

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

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

@ -40,12 +40,23 @@
#{ac.collectionUser},#{ac.overduePeriods})
</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
FROM al_insurance_list AS i
INNER JOIN al_collection AS c
ON i.id = c.insurance_id
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>
<!-- 催收列表 -->

@ -195,7 +195,7 @@
<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
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
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-repayment-entry/excelExport,\
/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