Commit eabba4b3 authored by 李灿灿's avatar 李灿灿

后台返回购买天数和购买月数

parent d29ab12e
......@@ -52,6 +52,18 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 购买月数
*/
@Schema(description = "购买月数")
private Long buyMonth;
/**
* 购买天数
*/
@Schema(description = "购买天数")
private Long buyDay;
/**
* 投保岗位
*/
......
......@@ -42,6 +42,12 @@ public class InsuranceListVO implements Serializable {
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 购买月数
*/
@Schema(description = "购买月数")
private Long buyMonth;
/**
* 项目名称
*/
......
......@@ -93,6 +93,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
IPage<InsuranceListVO> insuranceList = baseMapper.getInsuranceListPage(page,param);
//根据项目编码获取项目名称
setProjectNameByDeptNo(insuranceList.getRecords());
// 购买月数
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
insuranceList.getRecords().stream().forEach(e ->{
e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()));
});
}
return insuranceList;
}
......@@ -109,6 +115,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceListVO> insuranceList = baseMapper.getInsuranceList(param);
//根据项目编码获取项目名称
setProjectNameByDeptNo(insuranceList);
// 购买月数
if (CollectionUtils.isNotEmpty(insuranceList)){
insuranceList.stream().forEach(e ->{
e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()));
});
}
return insuranceList;
}
......@@ -498,6 +510,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//购买天数
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
TInsuranceDetail detail = new TInsuranceDetail();
detail.setId(record.getId());
//update状态由「待投保」置为「投保中」
......
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