Commit e347c7b1 authored by chenzhao's avatar chenzhao

代扣优化项 问题处理

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