Commit 20a40491 authored by hongguangwu's avatar hongguangwu

MVP1.7.17-商险续签待办

parent e97e2cb9
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
......@@ -224,5 +228,19 @@ public class TInsuranceAlert extends BaseEntity {
@Schema(description = "距离到期剩余工作日")
private String haveWorkDay;
//@Schema(description = "本表的ID就是商险ID")
@TableField(exist = false)
@Schema(description = "状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已投保")
private String processStatus;
@TableField(exist = false)
@Schema(description = "失败原因")
private String errorInfo;
@TableField(exist = false)
@Schema(description = "失败时间")
private LocalDateTime errorTime;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
import java.util.List;
/**
......@@ -21,6 +23,15 @@ public class InsuranceSearchVo extends TBusinessInsuranceVo{
private List<String> idList;
@Schema(description = "保单结束时间起")
private LocalDate policyEndStart;
@Schema(description = "保单结束时间止")
private LocalDate policyEndEnd;
@Schema(description = "状态多个")
@TableField(exist = false)
private String[] processStatusArray;
/**
* @Author fxj
* 查询数据起
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
/**
* 商险到期提醒明细表
*
* @author hgw
* @date 2025-11-11 11:49:48
*/
@Data
public class TInsuranceAlertSearchVo extends TInsuranceAlert {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
/**
* 商险续签待办
*
* @author hgw
* @date 2025-11-11 16:33:49
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tinsuranceprerenewdetail")
@Tag(name = "商险续签待办管理")
public class TInsurancePreRenewDetailController {
private final TInsurancePreRenewDetailService tInsurancePreRenewDetailService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tInsurancePreRenewDetail 商险续签待办
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TInsurancePreRenewDetail>> getTInsurancePreRenewDetailPage(Page<TInsurancePreRenewDetail> page, TInsurancePreRenewDetail tInsurancePreRenewDetail) {
return new R<>(tInsurancePreRenewDetailService.getTInsurancePreRenewDetailPage(page, tInsurancePreRenewDetail));
}
/**
* 通过insurancesId查询商险续签待办
*
* @return R
*/
@Operation(summary = "通过insurancesId查询", description = "通过insurancesId查询")
@GetMapping("/getByInsurancesId")
public R<TInsurancePreRenewDetail> getByInsurancesId(@RequestParam String insurancesId) {
TInsurancePreRenewDetail tInsurancePreRenewDetail = tInsurancePreRenewDetailService
.getOne(Wrappers.<TInsurancePreRenewDetail>lambdaQuery()
.eq(TInsurancePreRenewDetail::getInsurancesId, insurancesId)
.last(CommonConstants.LAST_ONE_SQL));
return R.ok(tInsurancePreRenewDetail);
}
/**
* 修改商险续签待办
*
* @param tInsurancePreRenewDetail 商险续签待办
* @return R
*/
@Operation(summary = "单个确认-商险续签待办", description = "单个确认-商险续签待办")
@SysLog("单个确认-商险续签待办")
@PostMapping("/doSure")
public R<Boolean> doSure(@RequestBody TInsurancePreRenewDetail tInsurancePreRenewDetail) {
if (tInsurancePreRenewDetail != null && Common.isNotNull(tInsurancePreRenewDetail.getId())) {
TInsurancePreRenewDetail old = tInsurancePreRenewDetailService.getById(tInsurancePreRenewDetail.getId());
if (old == null || Common.isEmpty(old.getId()) || Common.isEmpty(old.getProcessStatus())) {
return R.failed("根据ID未找到续签待办信息");
}
if (!CommonConstants.ZERO_STRING.equals(old.getProcessStatus())) {
return R.failed("状态非待确认,请检查");
}
} else {
return R.failed("请传参ID");
}
tInsurancePreRenewDetail.setProcessStatus(CommonConstants.ONE_STRING);
return R.ok(tInsurancePreRenewDetailService.updateById(tInsurancePreRenewDetail));
}
/**
* 修改商险续签待办
*
* @param tInsurancePreRenewDetail 商险续签待办
* @return R
*/
@Operation(summary = "编辑商险续签待办", description = "编辑商险续签待办")
@SysLog("编辑商险续签待办")
@PutMapping
public R<Boolean> updateById(@RequestBody TInsurancePreRenewDetail tInsurancePreRenewDetail) {
if (tInsurancePreRenewDetail != null && Common.isNotNull(tInsurancePreRenewDetail.getId())) {
TInsurancePreRenewDetail old = tInsurancePreRenewDetailService.getById(tInsurancePreRenewDetail.getId());
if (old == null || Common.isEmpty(old.getId()) || Common.isEmpty(old.getProcessStatus())) {
return R.failed("根据ID未找到续签待办信息");
}
if (!(CommonConstants.ONE_STRING.equals(old.getProcessStatus())
|| CommonConstants.TWO_STRING.equals(old.getProcessStatus())
|| CommonConstants.FIVE_STRING.equals(old.getProcessStatus()))) {
return R.failed("该状态不可编辑,请刷新后重试");
}
if (Common.isNotNull(tInsurancePreRenewDetail.getProcessStatus())
&& !old.getProcessStatus().equals(tInsurancePreRenewDetail.getProcessStatus())) {
return R.failed("状态在编辑保存前发生改变,请刷新后重试");
}
} else {
return R.failed("请传参ID");
}
return R.ok(tInsurancePreRenewDetailService.updateById(tInsurancePreRenewDetail));
}
}
......@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceWarnService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.BatchIgnoreVo;
......@@ -42,6 +43,12 @@ public class TInsurancesWarnController {
@Resource
private TInsuranceWarnService insuranceWarnService;
@Operation(description = "商险待续保列表查询")
@GetMapping("/getTInsuranceAlertPage")
public R<IPage<TInsuranceAlert>> getTInsuranceAlertPage(Page<TInsuranceAlert> page, InsuranceSearchVo tInsuranceAlert) {
return R.ok(insuranceWarnService.getTInsuranceAlertPage(page, tInsuranceAlert));
}
/**
* @Author fxj
* @Description 商险到期提醒分页查询
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 商险续签待办
*
* @author hgw
* @date 2025-11-11 16:33:49
*/
@Mapper
public interface TInsurancePreRenewDetailMapper extends BaseMapper<TInsurancePreRenewDetail> {
/**
* 商险续签待办简单分页查询
* @param tInsurancePreRenewDetail 商险续签待办
* @return
*/
IPage<TInsurancePreRenewDetail> getTInsurancePreRenewDetailPage(Page<TInsurancePreRenewDetail> page
, @Param("tInsurancePreRenewDetail") TInsurancePreRenewDetail tInsurancePreRenewDetail);
}
......@@ -2,9 +2,13 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAlertWx;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -16,6 +20,8 @@ import java.util.List;
@Mapper
public interface TInsuranceWarnMapper extends BaseMapper<TInsuranceAlert> {
IPage<TInsuranceAlert> getTInsuranceAlertPage(Page<TInsuranceAlert> page, @Param("tInsuranceAlert") InsuranceSearchVo tInsuranceAlert);
/**
* 查询商险到期提醒信息
*
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail;
/**
* 商险续签待办
*
* @author hgw
* @date 2025-11-11 16:33:49
*/
public interface TInsurancePreRenewDetailService extends IService<TInsurancePreRenewDetail> {
/**
* 商险续签待办简单分页查询
*
* @param tInsurancePreRenewDetail 商险续签待办
* @return
*/
IPage<TInsurancePreRenewDetail> getTInsurancePreRenewDetailPage(Page<TInsurancePreRenewDetail> page, TInsurancePreRenewDetail tInsurancePreRenewDetail);
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo;
/**
* @author huych
......@@ -11,6 +14,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
*/
public interface TInsuranceWarnService extends IService<TInsuranceAlert> {
IPage<TInsuranceAlert> getTInsuranceAlertPage(Page<TInsuranceAlert> page, InsuranceSearchVo tInsuranceAlert);
void createInsuranceAlert();
void pushInsuranceAlertToWx();
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePreRenewDetailMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 商险续签待办
*
* @author hgw
* @date 2025-11-11 16:33:49
*/
@Log4j2
@Service
public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsurancePreRenewDetailMapper, TInsurancePreRenewDetail> implements TInsurancePreRenewDetailService {
/**
* 商险续签待办简单分页查询
*
* @param tInsurancePreRenewDetail 商险续签待办
* @return
*/
@Override
public IPage<TInsurancePreRenewDetail> getTInsurancePreRenewDetailPage(Page<TInsurancePreRenewDetail> page, TInsurancePreRenewDetail tInsurancePreRenewDetail) {
return baseMapper.getTInsurancePreRenewDetailPage(page, tInsurancePreRenewDetail);
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
......@@ -29,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.HolidayListVO;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAlertWx;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAlertWxVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
......@@ -57,6 +60,12 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
private SysConfigMapper sysConfigMapper;
@Autowired
private WxConfig wxConfig;
@Override
public IPage<TInsuranceAlert> getTInsuranceAlertPage(Page<TInsuranceAlert> page, InsuranceSearchVo tInsuranceAlert) {
return baseMapper.getTInsuranceAlertPage(page, tInsuranceAlert);
}
@Override
public void createInsuranceAlert() {
//批量删除所有未忽略的提醒数据
......@@ -136,6 +145,9 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
}
}
}
// TODO - 生成续签待办数据:
// TInsurancePreRenewDetail
} catch (Exception e) {
log.error("商险到期提醒获取工作日异常:",e);
}
......
......@@ -46,8 +46,218 @@
<result property="alerter" column="ALERTER" jdbcType="VARCHAR"/>
<result property="alertId" column="ALERT_ID" jdbcType="VARCHAR"/>
<result property="haveWorkDay" column="HAVE_WORK_DAY" jdbcType="VARCHAR"/>
<result property="processStatus" column="process_status" jdbcType="VARCHAR"/>
<result property="errorInfo" column="error_info" jdbcType="VARCHAR"/>
<result property="errorTime" column="error_time" jdbcType="DATE"/>
</resultMap>
<!-- 商险续签待办专用 -->
<sql id="Alert_Column_List">
a.ID,
a.EMP_NAME,
a.EMP_IDCARD_NO,
a.DEPT_NO,
a.POST,
a.INSURANCE_COMPANY_NAME,
a.INSURANCE_TYPE_NAME,
a.INSURANCE_CITY_NAME,
a.INSURANCE_HANDLE_CITY_NAME,
a.INSURANCE_HANDLE_PROVINCE_NAME,
a.INSURANCE_PROVINCE_NAME,
a.BUY_STANDARD,
a.UNIT_NAME,
a.UNIT_NO,
a.SETTLE_TYPE,
a.POLICY_EFFECT,
a.EXPIRE_REMARK,
a.EXPIRE_IGNORE_FLAG,
a.SETTLE_MONTH,
a.POLICY_START,
a.POLICY_END,
a.ACTUAL_PREMIUM,
a.ESTIMATE_PREMIUM,
a.INVOICE_NO,
a.MEDICAL_QUOTA,
a.DIE_DISABLE_QUOTA,
a.DEPT_NAME,
a.POLICY_NO,
a.IS_OVERDUE,
a.REMARK,
a.CREATE_BY,
a.DELETE_FLAG,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.CREATE_USER_DEPT_NAME,
a.IS_EFFECT,
a.BUY_HANDLE_STATUS,
a.ALERTER,
a.ALERT_ID,
a.HAVE_WORK_DAY,
a.INSURANCES_ID,
b.process_status,
b.error_info,
b.error_time
</sql>
<sql id="tInsuranceAlert_where">
<if test="tInsuranceAlert != null">
<if test="tInsuranceAlert.id != null and tInsuranceAlert.id.trim() != ''">
AND a.ID = #{tInsuranceAlert.id}
</if>
<if test="tInsuranceAlert.empName != null and tInsuranceAlert.empName.trim() != ''">
AND a.EMP_NAME like concat('%', #{tInsuranceAlert.empName}, '%')
</if>
<if test="tInsuranceAlert.empIdcardNo != null and tInsuranceAlert.empIdcardNo.trim() != ''">
AND a.EMP_IDCARD_NO like concat('%', #{tInsuranceAlert.empIdcardNo}, '%')
</if>
<if test="tInsuranceAlert.deptNo != null and tInsuranceAlert.deptNo.trim() != ''">
AND a.DEPT_NO like concat('%', #{tInsuranceAlert.deptNo}, '%')
</if>
<if test="tInsuranceAlert.post != null and tInsuranceAlert.post.trim() != ''">
AND a.POST = #{tInsuranceAlert.post}
</if>
<if test="tInsuranceAlert.insuranceCompanyName != null and tInsuranceAlert.insuranceCompanyName.trim() != ''">
AND a.INSURANCE_COMPANY_NAME like concat('%', #{tInsuranceAlert.insuranceCompanyName}, '%')
</if>
<if test="tInsuranceAlert.insuranceTypeName != null and tInsuranceAlert.insuranceTypeName.trim() != ''">
AND a.INSURANCE_TYPE_NAME like concat('%', #{tInsuranceAlert.insuranceTypeName}, '%')
</if>
<if test="tInsuranceAlert.insuranceCityName != null and tInsuranceAlert.insuranceCityName.trim() != ''">
AND a.INSURANCE_CITY_NAME like concat('%', #{tInsuranceAlert.insuranceCityName}, '%')
</if>
<if test="tInsuranceAlert.insuranceHandleCityName != null and tInsuranceAlert.insuranceHandleCityName.trim() != ''">
AND a.INSURANCE_HANDLE_CITY_NAME like concat('%', #{tInsuranceAlert.insuranceHandleCityName}, '%')
</if>
<if test="tInsuranceAlert.insuranceHandleProvinceName != null and tInsuranceAlert.insuranceHandleProvinceName.trim() != ''">
AND a.INSURANCE_HANDLE_PROVINCE_NAME = #{tInsuranceAlert.insuranceHandleProvinceName}
</if>
<if test="tInsuranceAlert.insuranceProvinceName != null and tInsuranceAlert.insuranceProvinceName.trim() != ''">
AND a.INSURANCE_PROVINCE_NAME = #{tInsuranceAlert.insuranceProvinceName}
</if>
<if test="tInsuranceAlert.buyStandard != null and tInsuranceAlert.buyStandard.trim() != ''">
AND a.BUY_STANDARD = #{tInsuranceAlert.buyStandard}
</if>
<if test="tInsuranceAlert.unitName != null and tInsuranceAlert.unitName.trim() != ''">
AND a.UNIT_NAME = #{tInsuranceAlert.unitName}
</if>
<if test="tInsuranceAlert.unitNo != null and tInsuranceAlert.unitNo.trim() != ''">
AND a.UNIT_NO = #{tInsuranceAlert.unitNo}
</if>
<if test="tInsuranceAlert.settleType != null">
AND a.SETTLE_TYPE = #{tInsuranceAlert.settleType}
</if>
<if test="tInsuranceAlert.policyEffect != null">
AND a.POLICY_EFFECT = #{tInsuranceAlert.policyEffect}
</if>
<if test="tInsuranceAlert.expireRemark != null and tInsuranceAlert.expireRemark.trim() != ''">
AND a.EXPIRE_REMARK = #{tInsuranceAlert.expireRemark}
</if>
<if test="tInsuranceAlert.expireIgnoreFlag != null and tInsuranceAlert.expireIgnoreFlag.trim() != ''">
AND a.EXPIRE_IGNORE_FLAG = #{tInsuranceAlert.expireIgnoreFlag}
</if>
<if test="tInsuranceAlert.settleMonth != null and tInsuranceAlert.settleMonth.trim() != ''">
AND a.SETTLE_MONTH = #{tInsuranceAlert.settleMonth}
</if>
<if test="tInsuranceAlert.policyStart != null">
AND a.POLICY_START = #{tInsuranceAlert.policyStart}
</if>
<if test="tInsuranceAlert.policyEnd != null">
AND a.POLICY_END = #{tInsuranceAlert.policyEnd}
</if>
<if test="tInsuranceAlert.policyEndStart != null">
AND a.POLICY_END >= #{tInsuranceAlert.policyEndStart}
</if>
<if test="tInsuranceAlert.policyEndEnd != null">
AND a.POLICY_END <![CDATA[<=]]> #{tInsuranceAlert.policyEndEnd}
</if>
<if test="tInsuranceAlert.actualPremium != null">
AND a.ACTUAL_PREMIUM = #{tInsuranceAlert.actualPremium}
</if>
<if test="tInsuranceAlert.estimatePremium != null">
AND a.ESTIMATE_PREMIUM = #{tInsuranceAlert.estimatePremium}
</if>
<if test="tInsuranceAlert.invoiceNo != null and tInsuranceAlert.invoiceNo.trim() != ''">
AND a.INVOICE_NO = #{tInsuranceAlert.invoiceNo}
</if>
<if test="tInsuranceAlert.medicalQuota != null and tInsuranceAlert.medicalQuota.trim() != ''">
AND a.MEDICAL_QUOTA = #{tInsuranceAlert.medicalQuota}
</if>
<if test="tInsuranceAlert.dieDisableQuota != null and tInsuranceAlert.dieDisableQuota.trim() != ''">
AND a.DIE_DISABLE_QUOTA = #{tInsuranceAlert.dieDisableQuota}
</if>
<if test="tInsuranceAlert.deptName != null and tInsuranceAlert.deptName.trim() != ''">
AND a.DEPT_NAME like concat('%', #{tInsuranceAlert.deptName}, '%')
</if>
<if test="tInsuranceAlert.policyNo != null and tInsuranceAlert.policyNo.trim() != ''">
AND a.POLICY_NO = #{tInsuranceAlert.policyNo}
</if>
<if test="tInsuranceAlert.isOverdue != null">
AND a.IS_OVERDUE = #{tInsuranceAlert.isOverdue}
</if>
<if test="tInsuranceAlert.remark != null and tInsuranceAlert.remark.trim() != ''">
AND a.REMARK = #{tInsuranceAlert.remark}
</if>
<if test="tInsuranceAlert.createBy != null and tInsuranceAlert.createBy.trim() != ''">
AND a.CREATE_BY = #{tInsuranceAlert.createBy}
</if>
<if test="tInsuranceAlert.deleteFlag != null">
AND a.DELETE_FLAG = #{tInsuranceAlert.deleteFlag}
</if>
<if test="tInsuranceAlert.createName != null and tInsuranceAlert.createName.trim() != ''">
AND a.CREATE_NAME = #{tInsuranceAlert.createName}
</if>
<if test="tInsuranceAlert.createTime != null">
AND a.CREATE_TIME = #{tInsuranceAlert.createTime}
</if>
<if test="tInsuranceAlert.updateBy != null and tInsuranceAlert.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tInsuranceAlert.updateBy}
</if>
<if test="tInsuranceAlert.updateTime != null">
AND a.UPDATE_TIME = #{tInsuranceAlert.updateTime}
</if>
<if test="tInsuranceAlert.createUserDeptName != null and tInsuranceAlert.createUserDeptName.trim() != ''">
AND a.CREATE_USER_DEPT_NAME = #{tInsuranceAlert.createUserDeptName}
</if>
<if test="tInsuranceAlert.isEffect != null">
AND a.IS_EFFECT = #{tInsuranceAlert.isEffect}
</if>
<if test="tInsuranceAlert.buyHandleStatus != null">
AND a.BUY_HANDLE_STATUS = #{tInsuranceAlert.buyHandleStatus}
</if>
<if test="tInsuranceAlert.alerter != null and tInsuranceAlert.alerter.trim() != ''">
AND a.ALERTER = #{tInsuranceAlert.alerter}
</if>
<if test="tInsuranceAlert.alertId != null and tInsuranceAlert.alertId.trim() != ''">
AND a.ALERT_ID = #{tInsuranceAlert.alertId}
</if>
<if test="tInsuranceAlert.haveWorkDay != null and tInsuranceAlert.haveWorkDay.trim() != ''">
AND a.HAVE_WORK_DAY = #{tInsuranceAlert.haveWorkDay}
</if>
</if>
</sql>
<!--tInsuranceAlert简单分页查询-->
<select id="getTInsuranceAlertPage" resultMap="BaseResultMap">
SELECT
<include refid="Alert_Column_List"/>
FROM t_insurance_alert a
LEFT JOIN t_insurance_pre_renew_detail b ON a.ID = b.INSURANCES_ID
<where>
1=1
<include refid="tInsuranceAlert_where"/>
<if test="tInsuranceAlert != null">
<if test="tInsuranceAlert.processStatusArray != null and tInsuranceAlert.processStatusArray.length > 0">
AND b.PROCESS_STATUS in
<foreach item="statusStr" index="index" collection="tInsuranceAlert.processStatusArray" open="("
separator="," close=")">
#{statusStr}
</foreach>
</if>
</if>
</where>
</select>
<select id="selectInsuranceAlert" resultMap="BaseResultMap">
SELECT
......
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