Commit 3026b170 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.9' into MVP1.7.9

parents 33ae28a6 cee26333
......@@ -8,6 +8,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
......@@ -343,4 +344,33 @@ public class LocalDateUtil {
/*public static void main(String[] args)
System.out.println(parseLocalDate("2022-8-3"))
}*/
/**
* 日期转字符串
* @author chenyuxi
* @param date
* @return {@link String}
*/
public static String getDateSrt(LocalDate date){
// 格式化日期
return getDateSrt(date,NORM_DATE_PATTERN);
}
/**
* 日期转字符串
* @author chenyuxi
* @param date
* @param pattern
* @return {@link String}
*/
public static String getDateSrt(LocalDate date, String pattern){
if(Common.isEmpty(pattern)){
pattern = NORM_DATE_PATTERN;
}
// 定义日期格式
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
// 格式化日期
return date.format(formatter);
}
}
......@@ -156,4 +156,13 @@ public class InsuredParam extends BaseEntity implements Serializable {
*/
@Schema(description = "是否地市自购")
private String isAdress;
@Schema(description = "险种名称")
private String insuranceTypeName;
@Schema(description = "购买标准开始")
private String buyStandardMin;
@Schema(description = "购买标准结束")
private String buyStandardMax;
}
......@@ -56,6 +56,19 @@ public class TEmployeeInsurancePreController {
return new R<>(tEmployeeInsurancePreService.getTEmployeeInsurancePrePage(page,tEmployeeInsurancePre));
}
/**
* 不分页查询
* @param tEmployeeInsurancePre 商险待办任务表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/noPage")
public R<List<TEmployeeInsurancePre>> getTEmployeeInsurancePrePage(TEmployeeInsurancePreSearchVo tEmployeeInsurancePre) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tEmployeeInsurancePre);
return new R<>(tEmployeeInsurancePreService.getTEmployeeInsurancePreNoPage(tEmployeeInsurancePre));
}
/**
* 通过id查询商险待办任务表
* @param id id
......
......@@ -839,4 +839,39 @@ public class TInsuranceDetailController {
public TEmployeeInsuranceSelectVo ekpUpdateInsuranceDept(@RequestBody TEmployeeInsurancePreVo preVo) {
return tInsuranceDetailService.selectInsuranceInfo(preVo);
}
/**
* 商险自动化-被替换人的分页接口
*
* @author chenyuxi
* @param page
* @param param
* @return {@link R<IPage<InsuredListVo>>}
* @since 1.7.9
* @date 2025/4/8
*/
@Operation(summary = "商险自动化-被替换人的分页接口")
@PostMapping("/replacePageToAutoSelect")
public R<IPage<InsuredListVo>> replacePageToAutoSelect(Page<InsuredListVo> page, @RequestBody InsuredParam param,
@RequestParam(required = false) String mId) {
return R.ok(tInsuranceDetailService.replacePageToAutoSelect(page, param, mId));
}
/**
* 商险自动化-针对批增的查询保单号的分页接口
* 根据保单号去重,未过期的保单
*
* @author chenyuxi
* @param page 分页对象
* @param param 查询参数
* @return {@link R<IPage<InsuredListVo>>}
* @since 1.7.9
* @date 2025/4/8
*/
@Operation(summary = "商险自动化-针对批增的查询保单号的分页接口")
@PostMapping("/policyPageToAutoSelect" )
public R<IPage<InsuredListVo>> policyPageToAutoSelect(Page<InsuredListVo> page, @RequestBody InsuredParam param,
@RequestParam(required = false) String mId) {
return R.ok(tInsuranceDetailService.policyPageToAutoSelect(page, param, mId));
}
}
......@@ -26,6 +26,13 @@ public interface TEmployeeInsurancePreMapper extends BaseMapper<TEmployeeInsuran
*/
IPage<TEmployeeInsurancePre> getTEmployeeInsurancePrePage(Page<TEmployeeInsurancePre> page, @Param("tEmployeeInsurancePre") TEmployeeInsurancePre tEmployeeInsurancePre);
/**
* 商险待办任务表不分页查询
* @param tEmployeeInsurancePre 商险待办任务表
* @return
*/
List<TEmployeeInsurancePre> getTEmployeeInsurancePreNoPage(@Param("tEmployeeInsurancePre") TEmployeeInsurancePre tEmployeeInsurancePre);
long selectExportCount(@Param("employeeRegistration") TEmployeeInsurancePreSearchVo employeeRegistration);
List<TEmployeeInsurancePreExportVo> selectExportList(@Param("employeeRegistration") TEmployeeInsurancePreSearchVo employeeRegistration);
......
......@@ -324,4 +324,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
void updateExpireAlert(@Param("id") String id,@Param("expireFlag") String expireFlag,@Param("remark") String remark);
/**
* 商险自动化-被替换人的分页接口
*/
IPage<InsuredListVo> replacePageToAutoSelect(Page<InsuredListVo> page, @Param("param") InsuredParam param);
/**
* 商险自动化-针对批增的查询保单号的分页接口
*/
IPage<InsuredListVo> policyPageToAutoSelect(Page<InsuredListVo> page, @Param("param") InsuredParam param);
}
......@@ -28,6 +28,12 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
* @return
*/
IPage<TEmployeeInsurancePre> getTEmployeeInsurancePrePage(Page<TEmployeeInsurancePre> page, TEmployeeInsurancePreSearchVo tEmployeeInsurancePre);
/**
* 商险待办任务表不分页查询
* @param tEmployeeInsurancePre 商险待办任务表
* @return
*/
List<TEmployeeInsurancePre> getTEmployeeInsurancePreNoPage(TEmployeeInsurancePreSearchVo tEmployeeInsurancePre);
/**
* 商险待办任务表导出
......
......@@ -554,4 +554,26 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
TEmployeeInsuranceSelectVo selectInsuranceInfo(TEmployeeInsurancePreVo preVo);
/**
* 商险自动化-被替换人的分页接口
*
* @author chenyuxi
* @param page
* @param param
* @return {@link R<IPage<InsuranceListVO>>}
*/
IPage<InsuredListVo> replacePageToAutoSelect(Page<InsuredListVo> page, InsuredParam param, String mId);
/**
* 商险自动化-针对批增的查询保单号的分页接口
*
* @author chenyuxi
* @param page
* @param param
* @return {@link R<IPage<InsuranceListVO>>}
*/
IPage<InsuredListVo> policyPageToAutoSelect(Page<InsuredListVo> page, InsuredParam param, String mId);
}
......@@ -90,6 +90,16 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return baseMapper.getTEmployeeInsurancePrePage(page, tEmployeeInsurancePre);
}
@Override
public List<TEmployeeInsurancePre> getTEmployeeInsurancePreNoPage(TEmployeeInsurancePreSearchVo tEmployeeInsurancePre) {
//权限赋值
tEmployeeInsurancePre.setType(CommonConstants.ONE_STRING);
tEmployeeInsurancePre.setProcessStatus(CommonConstants.ZERO_STRING);
initSearchVo(tEmployeeInsurancePre);
return baseMapper.getTEmployeeInsurancePreNoPage(tEmployeeInsurancePre);
}
/**
* 商险待办任务表批量导出
*
......
......@@ -8267,4 +8267,67 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return selectVo;
}
/**
* 商险自动化-被替换人的分页接口
*
* @author chenyuxi
* @param page
* @param param
* @return {@link R<IPage<InsuranceListVO>>}
*/
@Override
public IPage<InsuredListVo> replacePageToAutoSelect(Page<InsuredListVo> page, InsuredParam param, String mId) {
YifuUser user = SecurityUtils.getUser();
if (Common.isNotNull(mId)) {
param.setMId(mId);
}
if(Common.isEmpty(user)){
return null;
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
IPage<InsuredListVo> insuranceList = baseMapper.replacePageToAutoSelect(page,param);
// 购买月数
// if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
// insuranceList.getRecords().forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())));
// }
return insuranceList;
}
/**
* 商险自动化-针对批增的查询保单号的分页接口
*
* @author chenyuxi
* @param page
* @param param
* @return {@link R<IPage<InsuranceListVO>>}
*/
@Override
public IPage<InsuredListVo> policyPageToAutoSelect(Page<InsuredListVo> page, InsuredParam param, String mId) {
YifuUser user = SecurityUtils.getUser();
if (Common.isNotNull(mId)) {
param.setMId(mId);
}
if(Common.isEmpty(user)){
return null;
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
// 查保单未过期的数据
String today = LocalDateUtil.getDateSrt(LocalDate.now());
param.setPolicyEnd(today);
IPage<InsuredListVo> insuranceList = baseMapper.policyPageToAutoSelect(page,param);
// 购买月数
// if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
// insuranceList.getRecords().forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())));
// }
return insuranceList;
}
}
......@@ -225,6 +225,17 @@
</where>
</select>
<!--tEmployeeInsurancePre不分页查询-->
<select id="getTEmployeeInsurancePreNoPage" resultMap="tEmployeeInsurancePreMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_insurance_pre a
<where>
1=1
<include refid="tEmployeeInsurancePre_where"/>
</where>
</select>
<!--查询list,用来对比,记录日志-->
<select id="getListByEmpPreId" resultMap="tEmployeeInsurancePreMap">
SELECT
......
......@@ -2083,4 +2083,84 @@
t_insurance_detail
WHERE ERROR_STATUS = '1'
</select>
<!--商险自动化-被替换人的分页接口-->
<select id="replacePageToAutoSelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select
a.id as id,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a.INSURANCE_CITY_NAME as insuranceCityName
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = 3 and IS_USE = 0 and IS_EFFECT = 0 and IS_OVERDUE = 0
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyStandardMin != null">
AND a.BUY_STANDARD <![CDATA[ >= ]]> #{param.buyStandardMin}
</if>
<if test="param.buyStandardMax != null">
AND a.BUY_STANDARD <![CDATA[ <= ]]> #{param.buyStandardMax}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
ORDER BY a.CREATE_TIME DESC ,a.ID ASC
</select>
<!--商险自动化-针对批增的查询保单号的分页接口-->
<select id="policyPageToAutoSelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select
a.id as id,
a.POLICY_NO as policyNo,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a.INSURANCE_CITY_NAME as insuranceCityName
from t_insurance_detail a
where a.DELETE_FLAG = 0
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyStandardMin != null">
AND a.BUY_STANDARD <![CDATA[ >= ]]> #{param.buyStandardMin}
</if>
<if test="param.buyStandardMax != null">
AND a.BUY_STANDARD <![CDATA[ <= ]]> #{param.buyStandardMax}
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != ''">
AND DATE(a.POLICY_END) <![CDATA[ >= ]]> #{param.policyEnd}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
group by a.POLICY_NO,a.INSURANCE_COMPANY_NAME,a.INSURANCE_TYPE_NAME,a.POLICY_START,a.POLICY_END,a.BUY_STANDARD
ORDER BY a.CREATE_TIME DESC ,a.ID ASC
</select>
</mapper>
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