Commit 942ceb1d authored by chenzhao's avatar chenzhao

代扣优化项 代扣金额

parent c43f4c33
......@@ -180,7 +180,7 @@ public class HygfIcbcRecordDTO {
private String realScale;
}
@ApiModelProperty (value = "代扣金额")
private double paymentAmount;
private Double paymentAmount;
@ApiModelProperty (value = "代扣时间")
......
......@@ -77,7 +77,7 @@ public class HygfIcbcRecordExportDTO {
/**
* 协议状态, 0-未生效,1-已生效,2-过期,3-作废,4-待短信确认
*/
@ExcelProperty(value = "扣款总金额", index = 7)
@ExcelProperty(value = "扣款总金额(元)", index = 7)
@ApiModelProperty (value = "扣款总金额")
private double paymentAmount;
......
......@@ -5,6 +5,8 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* <p>
* ProjectName: amos-boot-zx-biz
......@@ -44,4 +46,6 @@ public class HygfIcbcRecordQueryDTO {
private Integer limit;
private Integer offset;
private List<String> ids;
}
......@@ -269,6 +269,12 @@
<if test="param.addressName != null and param.addressName != ''">
AND ph.project_address LIKE CONCAT('%', #{param.addressName}, '%')
</if>
<if test="param.ids != null and param.ids.size() > 0">
AND re.amos_user_id in
<foreach collection="param.ids" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param != null">
<if test="param.openAccountStatus != null and param.openAccountStatus != ''">
<if test="param.openAccountStatus != '00'">
......
......@@ -113,7 +113,7 @@ public class IcbcWithholdController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = " 聚富通代扣信息表分页查询", notes = " 聚富通代扣信息表分页查询")
public ResponseModel<Page<IcbcWithholdDto>> queryForPage(@RequestParam(value = "current") int current,
public ResponseModel<Map<String, Object>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam(value = "uploader",required = false) String uploader,
@RequestParam(value = "uploadStartTime",required = false) String uploadStartTime,
......
......@@ -458,7 +458,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
public Map<String, Object> queryForPage(int current, int size, HygfIcbcRecordQueryDTO hygfIcbcRecordQueryDTO) {
PageHelper.startPage(current, size);
List<HygfIcbcRecordDTO> list = hygfIcbcRecordMapper.pageList(hygfIcbcRecordQueryDTO);
double sum = list.stream().mapToDouble(HygfIcbcRecordDTO::getPaymentAmount).sum();
double sum = list.stream().filter(e->null != e.getPaymentAmount()).mapToDouble(HygfIcbcRecordDTO::getPaymentAmount).sum();
PageInfo<HygfIcbcRecordDTO> page = new PageInfo(list);
......@@ -467,7 +467,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
pagenew.setTotal(page.getTotal());
pagenew.setSize(size);
pagenew.setRecords(toModels(page.getList()));
Map<String, Object> resultMap = Bean.BeantoMap(pagenew);
Map<String, Object> resultMap = BeanUtil.beanToMap(pagenew);
resultMap.put("paymentAmountAll",sum);
return resultMap;
......
......@@ -648,17 +648,25 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
}
public Page<IcbcWithholdDto> queryForIcbcWithholdPage(int current, int size, String uploader, String uploadStartTime, String uploadEndTime, String uploadStatus, String confirmator, String confirmationStartTime, String confirmationEndTime,String desc,String withholdStatus) {
public Map<String, Object> queryForIcbcWithholdPage(int current, int size, String uploader, String uploadStartTime, String uploadEndTime, String uploadStatus, String confirmator, String confirmationStartTime, String confirmationEndTime,String desc,String withholdStatus) {
Page<IcbcWithholdDto> page = new Page<>();
PageHelper.startPage(current,size);
List<IcbcWithholdDto> icbcWithholdDtos = this.getBaseMapper().queryForIcbcWithholdPage(uploader,uploadStartTime,uploadEndTime,uploadStatus,confirmator,confirmationStartTime,confirmationEndTime,desc,withholdStatus);
PageInfo<IcbcWithholdDto> pageInfo = new PageInfo<>(icbcWithholdDtos);
double sum = icbcWithholdDtos.stream()
.filter(e -> null != e.getPaymentAmount())
.map(e -> Double.parseDouble(e.getPaymentAmount()))
.mapToDouble(Double::doubleValue)
.sum();
page.setSize(pageInfo.getSize());
page.setCurrent(pageInfo.getPageNum());
page.setTotal(pageInfo.getTotal());
page.setRecords(icbcWithholdDtos);
return page;
Map<String, Object> resultMap = BeanUtil.beanToMap(page);
resultMap.put("paymentAmountAll",sum);
return resultMap;
}
public void upIcbcWithholdRecordWithholdStatus() {
......@@ -733,8 +741,8 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
for (IcbcWithholdRecordDto icbcWithholdRecordDto : dtos) {
HygfIcbcWithholdRecordExportDTO exportDTO = new HygfIcbcWithholdRecordExportDTO();
BeanUtil.copyProperties(icbcWithholdRecordDto,exportDTO);
exportDTO.setDesc(icbcWithhold.getDesc());
exportDTO.setUploader(icbcWithhold.getConfirmator());
exportDTO.setDesc(icbcWithholdRecordDto.getContentText());
exportDTO.setUploader(icbcWithholdRecordDto.getRecUserName());
datas.add(exportDTO);
}
......
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