Commit 31f82bdf authored by chenzhao's avatar chenzhao

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

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