Commit 31f82bdf authored by chenzhao's avatar chenzhao

代扣优化项 批量生成 批量上传 采集问题处理

parent e6427156
......@@ -79,7 +79,13 @@ public class HygfIcbcRecordExportDTO {
*/
@ExcelProperty(value = "扣款总金额(元)", index = 7)
@ApiModelProperty (value = "扣款总金额")
private double paymentAmount;
private Double paymentAmount;
/**
* 协议状态, 0-未生效,1-已生效,2-过期,3-作废,4-待短信确认
*/
@ExcelProperty(value = "最后扣款成功时间", index = 8)
@ApiModelProperty (value = "最后扣款成功时间")
private String paymentTime;
}
\ No newline at end of file
......@@ -300,14 +300,16 @@
ELSE '未开户'
END
) AS openAccountStatus,
pa.paymentAmount AS paymentAmount
pa.paymentAmount AS paymentAmount,
MAX(pa.payTime) paymentTime
FROM
`hygf_peasant_household` ph
LEFT JOIN
hygf_icbc_record re ON re.amos_user_id = ph.amos_user_id
LEFT JOIN( SELECT
iw.amos_user_id,
SUM(iw.payment_amount) AS paymentAmount
SUM(iw.payment_amount) AS paymentAmount,
MAX(payment_time) as payTime
FROM
hygf_icbc_withhold_record iw
WHERE
......@@ -349,6 +351,6 @@
</if>
</where>
GROUP BY
ph.amos_user_id, pa.paymentAmount;
ph.amos_user_id, pa.paymentAmount
</select>
</mapper>
\ No newline at end of file
......@@ -157,7 +157,7 @@
) ph
LEFT JOIN hygf_icbc_withhold_record re ON ph.amos_user_id = re.amos_user_id
<where>
ph.is_delete = 0
ph.is_delete = 0 AND re.withhold_status in ('成功','失败')
<if test="dto.amosUserId != null and dto.amosUserId != ''">
AND re.amos_user_id = #{dto.amosUserId}
</if>
......
......@@ -172,10 +172,8 @@ public class IcbcWithholdController extends BaseController {
@ApiOperation(httpMethod = "POST",value = " 聚富通代扣信息文件生成", notes = " 聚富通代扣信息文件生成")
@PostMapping(value = "/fileGeneration")
@Transactional
public ResponseModel fileGeneration(@RequestBody List<IcbcWithhold> models ) throws Exception {
for (IcbcWithhold model : models) {
public ResponseModel fileGeneration(@RequestBody IcbcWithhold model) throws Exception {
icbcWithholdServiceImpl.fileGeneration(model);
}
return CommonResponseNewUtil.success();
}
......
......@@ -732,15 +732,16 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
dto.setAmosUserId(icbcWithhold.getIcbcId());
}
List<IcbcWithholdRecordDto> dtos = icbcWithholdRecordMapper.exportData(dto);
for (IcbcWithholdRecordDto icbcWithholdRecordDto : dtos) {
HygfIcbcWithholdRecordExportDTO exportDTO = new HygfIcbcWithholdRecordExportDTO();
BeanUtil.copyProperties(icbcWithholdRecordDto,exportDTO);
exportDTO.setDesc(icbcWithholdRecordDto.getContentText());
exportDTO.setUploader(icbcWithholdRecordDto.getRecUserName());
datas.add(exportDTO);
if (CollectionUtil.isNotEmpty(dtos)) {
for (IcbcWithholdRecordDto icbcWithholdRecordDto : dtos) {
HygfIcbcWithholdRecordExportDTO exportDTO = new HygfIcbcWithholdRecordExportDTO();
BeanUtil.copyProperties(icbcWithholdRecordDto, exportDTO);
exportDTO.setDesc(icbcWithholdRecordDto.getContentText());
exportDTO.setUploader(icbcWithholdRecordDto.getRecUserName());
datas.add(exportDTO);
}
}
if (CollectionUtil.isNotEmpty(datas)){
ExcelUtil.createTemplate(response,"付款记录明细","付款记录明细",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