Commit e347c7b1 authored by chenzhao's avatar chenzhao

代扣优化项 问题处理

parent cc112914
......@@ -39,8 +39,8 @@ public class HygfIcbcWithholdRecordExportDTO {
/**
* 手机号码
*/
@ExcelProperty(value = "批次号", index = 2)
@ApiModelProperty (value = "批次号")
@ExcelProperty(value = "扣款批次号", index = 2)
@ApiModelProperty (value = "扣款批次号")
private String batchNo;
/**
......
package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -76,6 +77,11 @@ public class IcbcWithholdDto extends BaseDto {
private String receiptFile;
@ApiModelProperty(value = "缴费开始时间")
private String paymentStartTime;
@ApiModelProperty(value = "缴费结束时间")
private String paymentEndTime;
/**
* 失败原因
*/
......
......@@ -103,6 +103,8 @@ public class IcbcWithholdRecordDto extends BaseDto {
private String amosUserId;
@ExcelIgnore
private String contentText;
@ExcelIgnore
private String show;
@ExcelIgnore
private String regionalCompaniesCode;
......
......@@ -157,10 +157,13 @@
) ph
LEFT JOIN hygf_icbc_withhold_record re ON ph.amos_user_id = re.amos_user_id
<where>
ph.is_delete = 0 AND re.withhold_status in ('成功','失败')
ph.is_delete = 0
<if test="dto.amosUserId != null and dto.amosUserId != ''">
AND re.amos_user_id = #{dto.amosUserId}
</if>
<if test="dto.show != null and dto.show != ''">
AND re.withhold_status in ('成功','失败')
</if>
<if test="dto.batchNo != null and dto.batchNo != ''">
AND re.batch_no like concat('%',#{dto.batchNo},'%')
</if>
......
......@@ -244,7 +244,7 @@ public class IcbcWithholdController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST",value = "批次明细信息下载", notes = "批次明细信息下载")
@PostMapping(value = "/export")
public void downTemplate(HttpServletResponse response, @RequestBody IcbcWithhold model ) {
public void downTemplate(HttpServletResponse response, @RequestBody IcbcWithholdDto model ) {
icbcWithholdServiceImpl.exportData(response,model);
}
......
......@@ -44,6 +44,7 @@ public class IcbcWithholdRecordServiceImpl extends BaseService<IcbcWithholdRecor
Page<IcbcWithholdRecordDto> page = new Page<>();
PageHelper.startPage(current,size);
dto.setShow("1");
List<IcbcWithholdRecordDto> dtos = icbcWithholdRecordMapper.exportData(dto);
PageInfo<IcbcWithholdRecordDto> pageInfo = new PageInfo<>(dtos);
......
......@@ -659,7 +659,9 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
page.setTotal(pageInfo.getTotal());
page.setRecords(icbcWithholdDtos);
Map<String, Object> resultMap = BeanUtil.beanToMap(page);
resultMap.put("paymentAmountAll",dto.getPaymentAmount());
if (!Objects.isNull(dto)){
resultMap.put("paymentAmountAll",null ==dto.getPaymentAmount()?0:dto.getPaymentAmount());
}
return resultMap;
}
......@@ -721,12 +723,20 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
public void exportData(HttpServletResponse response, IcbcWithhold icbcWithhold ){
public void exportData(HttpServletResponse response, IcbcWithholdDto icbcWithhold ){
String fileName = "付款记录明细";
List<HygfIcbcWithholdRecordExportDTO> datas = new ArrayList<>();
IcbcWithholdRecordDto dto = new IcbcWithholdRecordDto();
if (StringUtils.isNotEmpty(icbcWithhold.getBatchNo())){
dto.setBatchNo(icbcWithhold.getBatchNo());
fileName = icbcWithhold.getBatchNo()+"批次批扣明细记录";
}
if (StringUtils.isNotEmpty(icbcWithhold.getPaymentStartTime())){
dto.setPaymentStartTime(icbcWithhold.getPaymentStartTime());
}
if (StringUtils.isNotEmpty(icbcWithhold.getPaymentEndTime())){
dto.setPaymentEndTime(icbcWithhold.getPaymentEndTime());
}
if (StringUtils.isNotEmpty(icbcWithhold.getIcbcId())){
dto.setAmosUserId(icbcWithhold.getIcbcId());
......@@ -743,7 +753,7 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
}
}
if (CollectionUtil.isNotEmpty(datas)){
ExcelUtil.createTemplate(response,"付款记录明细","付款记录明细",datas,HygfIcbcWithholdRecordExportDTO.class,null,false);
ExcelUtil.createTemplate(response,fileName,"付款记录明细",datas,HygfIcbcWithholdRecordExportDTO.class,null,false);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment