Commit 660d5ac5 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents ae5e44b9 f7c92003
...@@ -40,7 +40,6 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -40,7 +40,6 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
/** /**
* @param employeeInfo * @param employeeInfo
* @param sql
* @Description: 分页查询 * @Description: 分页查询
* @Author: hgw * @Author: hgw
* @Date: 2022/6/20 20:46 * @Date: 2022/6/20 20:46
......
...@@ -45,10 +45,10 @@ public class LdapUtil { ...@@ -45,10 +45,10 @@ public class LdapUtil {
**/ **/
public List<SearchResultEntry> getAllPersonNamesWithTraditionalWay() { public List<SearchResultEntry> getAllPersonNamesWithTraditionalWay() {
List<SearchResultEntry> result = new ArrayList<>(); List<SearchResultEntry> result = new ArrayList<>();
try { try (LDAPConnection connection = new LDAPConnection(ldapProperties.getUrl(), ldapProperties.getPort(),
LDAPConnection connection = new LDAPConnection(ldapProperties.getUrl(), ldapProperties.getPort(), ldapProperties.getUserName(), ldapProperties.getPassword())) {
ldapProperties.getUserName(), ldapProperties.getPassword()); SearchRequest searchRequest = new SearchRequest(ldapProperties.getBaseDn(), SearchScope.SUB,
SearchRequest searchRequest = new SearchRequest(ldapProperties.getBaseDn(), SearchScope.SUB, "(objectclass=*)"); "(objectclass=*)");
searchRequest.addControl(new SubentriesRequestControl()); searchRequest.addControl(new SubentriesRequestControl());
SearchResult searchResult = connection.search(searchRequest); SearchResult searchResult = connection.search(searchRequest);
result.addAll(searchResult.getSearchEntries()); result.addAll(searchResult.getSearchEntries());
......
...@@ -17,6 +17,11 @@ import java.math.BigDecimal; ...@@ -17,6 +17,11 @@ import java.math.BigDecimal;
public class InsuranceAddParam implements Serializable { public class InsuranceAddParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L; private static final long serialVersionUID = -2689686777914935788L;
/**
* 项目id
*/
@Schema(description = "项目id")
private String deptId;
/** /**
* 员工姓名 * 员工姓名
*/ */
......
...@@ -4,9 +4,9 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; ...@@ -4,9 +4,9 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
* @author licancan * @author licancan
* @description 投保列表请求参数 * @description 投保列表请求参数
...@@ -14,8 +14,7 @@ import java.util.List; ...@@ -14,8 +14,7 @@ import java.util.List;
*/ */
@Data @Data
@Schema(description = "投保列表请求参数") @Schema(description = "投保列表请求参数")
public class InsuranceListParam extends BaseEntity implements Serializable { public class InsuranceListParam extends BaseEntity {
private static final long serialVersionUID = -4692341622141432288L;
/** /**
* 项目编码 * 项目编码
...@@ -71,24 +70,12 @@ public class InsuranceListParam extends BaseEntity implements Serializable { ...@@ -71,24 +70,12 @@ public class InsuranceListParam extends BaseEntity implements Serializable {
@Schema(description = "项目编码列表") @Schema(description = "项目编码列表")
private List<String> deptNoList; private List<String> deptNoList;
/**
* 保单办理人
*/
@Schema(description = "保单办理人")
private String updateBy;
/** /**
* 购买类型, 1新增、3批增、4替换 * 购买类型, 1新增、3批增、4替换
*/ */
@Schema(description = " 购买类型(派单类型), 1新增、3批增、4替换") @Schema(description = " 购买类型(派单类型), 1新增、3批增、4替换")
private Integer buyType; private Integer buyType;
/**
* 创建者-姓名
*/
@Schema(description = "派单人")
private String createName;
/** /**
* 派单开始时间 * 派单开始时间
*/ */
......
...@@ -193,6 +193,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -193,6 +193,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
public IPage<InsuranceListVO> getInsuranceListPage(Page<InsuranceListVO> page, InsuranceListParam param) { public IPage<InsuranceListVO> getInsuranceListPage(Page<InsuranceListVO> page, InsuranceListParam param) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(param.getMId())) {
param.setMId("1547501570923819009");
}
menuUtil.setAuthSql(user, param); menuUtil.setAuthSql(user, param);
List<String> deptNoList = getDeptNoList(user); List<String> deptNoList = getDeptNoList(user);
IPage<InsuranceListVO> insuranceList = new Page<>(); IPage<InsuranceListVO> insuranceList = new Page<>();
...@@ -1931,6 +1934,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1931,6 +1934,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setBpoFlag(projectSetInfoVo.getBpoFlag()); param.setBpoFlag(projectSetInfoVo.getBpoFlag());
param.setSettleType(Integer.parseInt(settleType)); param.setSettleType(Integer.parseInt(settleType));
} }
param.setBpoFlag(projectSetInfoVo.getBpoFlag());
param.setDeptId(projectSetInfoVo.getId());
} }
} }
} }
......
...@@ -76,336 +76,336 @@ ...@@ -76,336 +76,336 @@
</sql> </sql>
<!--投保分页查询--> <!--投保分页查询-->
<select id="getInsuranceListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"> <select id="getInsuranceListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id, select a.id as id,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.POST as post, a.POST as post,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.CREATE_BY as createBy, a.CREATE_BY as createBy,
detail.CREATE_NAME as createName, a.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
detail.CREATE_USER_DEPT_NAME as createUserDeptName, a.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.SETTLE_MONTH as settleMonth a.SETTLE_MONTH as settleMonth
from t_insurance_detail detail from t_insurance_detail a
where detail.DELETE_FLAG = 0
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID left join t_insurance_area_res p on a.CREATE_BY=p.USER_ID
</if> </if>
where a.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.orderNo != null and param.orderNo.trim() != ''"> <if test="param.orderNo != null and param.orderNo.trim() != ''">
and detail.DEPT_NO = #{param.orderNo} and a.DEPT_NO = #{param.orderNo}
</if> </if>
<if test="param.deptNo == null or param.deptNo.trim() == ''"> <if test="param.deptNo == null or param.deptNo.trim() == ''">
and detail.DEPT_NO in and a.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.buyHandleStatus != null"> <if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus} and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if> </if>
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"> <if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and detail.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%') and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.buyHandleStatusList != null and param.buyHandleStatusList.size > 0"> <if test="param.buyHandleStatusList != null and param.buyHandleStatusList.size > 0">
and detail.BUY_HANDLE_STATUS in and a.BUY_HANDLE_STATUS in
<foreach collection="param.buyHandleStatusList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.buyHandleStatusList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.buyType != null"> <if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType} and a.BUY_TYPE = #{param.buyType}
</if> </if>
<if test="param.createName != null and param.createName.trim() != ''"> <if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%') and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"> <if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59') and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if> </if>
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql} ${param.authSql}
</if> </if>
GROUP BY detail.id GROUP BY a.id
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY a.BUY_HANDLE_STATUS,a.CREATE_TIME DESC
</select> </select>
<!--投保不分页查询--> <!--投保不分页查询-->
<select id="getInsuranceList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"> <select id="getInsuranceList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id, select a.id as id,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.POST as post, a.POST as post,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.CREATE_BY as createBy, a.CREATE_BY as createBy,
detail.CREATE_NAME as createName, a.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth a.SETTLE_MONTH as settleMonth
from t_insurance_detail detail from t_insurance_detail a
where detail.DELETE_FLAG = 0 where a.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.deptNo == null or param.deptNo.trim() == ''"> <if test="param.deptNo == null or param.deptNo.trim() == ''">
and detail.DEPT_NO in and a.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.buyHandleStatus != null"> <if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus} and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if> </if>
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"> <if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and detail.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%') and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.buyHandleStatusList != null and param.buyHandleStatusList.size > 0"> <if test="param.buyHandleStatusList != null and param.buyHandleStatusList.size > 0">
and detail.BUY_HANDLE_STATUS in and a.BUY_HANDLE_STATUS in
<foreach collection="param.buyHandleStatusList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.buyHandleStatusList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.buyType != null"> <if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType} and a.BUY_TYPE = #{param.buyType}
</if> </if>
<if test="param.createName != null and param.createName.trim() != ''"> <if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%') and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"> <if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59') and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if> </if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY a.BUY_HANDLE_STATUS,a.CREATE_TIME DESC
</select> </select>
<!--投保办理分页查询--> <!--投保办理分页查询-->
<select id="getInsuranceHandleListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"> <select id="getInsuranceHandleListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id, select a.id as id,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.POST as post, a.POST as post,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.CREATE_NAME as createName, a.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth a.SETTLE_MONTH as settleMonth
from t_insurance_detail detail from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID left join t_insurance_area_res p on a.CREATE_BY=p.USER_ID
</if> </if>
where detail.DELETE_FLAG = 0 where a.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.buyHandleStatus != null"> <if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus} and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if> </if>
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"> <if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and detail.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%') and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.buyHandleStatusList != null and param.buyHandleStatusList.size > 0"> <if test="param.buyHandleStatusList != null and param.buyHandleStatusList.size > 0">
and detail.BUY_HANDLE_STATUS in and a.BUY_HANDLE_STATUS in
<foreach collection="param.buyHandleStatusList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.buyHandleStatusList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.updateBy != null and param.updateBy.trim() != ''"> <if test="param.updateBy != null and param.updateBy.trim() != ''">
and detail.HANDLED_BY = #{param.updateBy} and a.HANDLED_BY = #{param.updateBy}
</if> </if>
<if test="param.buyType != null"> <if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType} and a.BUY_TYPE = #{param.buyType}
</if> </if>
<if test="param.createName != null and param.createName.trim() != ''"> <if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%') and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"> <if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59') and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if> </if>
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql} ${param.authSql}
</if> </if>
GROUP BY detail.id GROUP BY a.id
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY a.BUY_HANDLE_STATUS,a.CREATE_TIME DESC
</select> </select>
<!--通过id查询商险信息--> <!--通过id查询商险信息-->
<select id="getInsuranceDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"> <select id="getInsuranceDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO">
select select
detail.id as id, a.id as id,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.POST as post, a.POST as post,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.POLICY_EFFECT as policyEffect, a.POLICY_EFFECT as policyEffect,
detail.POLICY_NO as policyNo, a.POLICY_NO as policyNo,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.INSURANCE_TYPE_ID as insuranceTypeId, a.INSURANCE_TYPE_ID as insuranceTypeId,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.SETTLE_TYPE as premiumType, a.SETTLE_TYPE as premiumType,
detail.ESTIMATE_PREMIUM as estimatePremium, a.ESTIMATE_PREMIUM as estimatePremium,
detail.ACTUAL_PREMIUM as actualPremium, a.ACTUAL_PREMIUM as actualPremium,
detail.INVOICE_NO as invoiceNo, a.INVOICE_NO as invoiceNo,
detail.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth, a.SETTLE_MONTH as settleMonth,
detail.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus, a.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail.IS_USE as isUse, a.IS_USE as isUse,
detail.IS_EFFECT as isEffect, a.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue, a.IS_OVERDUE as isOverdue,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName, a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_PROVINCE as insuranceProvince, a.INSURANCE_PROVINCE as insuranceProvince,
detail.INSURANCE_CITY_NAME as insuranceCityName, a.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_CITY as insuranceCity, a.INSURANCE_CITY as insuranceCity,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName, a.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_PROVINCE as insuranceHandleProvince, a.INSURANCE_HANDLE_PROVINCE as insuranceHandleProvince,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName, a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.INSURANCE_HANDLE_CITY as insuranceHandleCity, a.INSURANCE_HANDLE_CITY as insuranceHandleCity,
detail.CREATE_NAME as createName, a.CREATE_NAME as createName,
detail.CREATE_TIME as createTime, a.CREATE_TIME as createTime,
detail.REMARK as remark, a.REMARK as remark,
detail.BILLING_TYPE as billingType, a.BILLING_TYPE as billingType,
detail.DEFAULT_SETTLE_ID as defaultSettleId, a.DEFAULT_SETTLE_ID as defaultSettleId,
detail.RATE as rate a.RATE as rate
from t_insurance_detail detail from t_insurance_detail a
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID left join t_insurance_settle tis on a.DEFAULT_SETTLE_ID = tis.ID
where detail.ID = #{id} where a.ID = #{id}
</select> </select>
<!--导出办理勾选查询结果--> <!--导出办理勾选查询结果-->
<select id="getInsuranceExportListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"> <select id="getInsuranceExportListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO">
select detail.id as id, select a.id as id,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
detail.POST as post, a.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName, a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName, a.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName, a.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName, a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.SETTLE_MONTH as settleMonth, a.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName, a.CREATE_NAME as createName,
detail.POLICY_NO as policyNo, a.POLICY_NO as policyNo,
detail.REMARK as remark a.REMARK as remark
from t_insurance_detail detail from t_insurance_detail a
where detail.DELETE_FLAG = 0 and detail.id in where a.DELETE_FLAG = 0 and a.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
ORDER BY detail.CREATE_TIME DESC ORDER BY a.CREATE_TIME DESC
</select> </select>
<!--出办理非勾选查询结果--> <!--出办理非勾选查询结果-->
<select id="getInsuranceExportList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"> <select id="getInsuranceExportList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO">
select detail.id as id, select a.id as id,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.POST as post, a.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName, a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName, a.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName, a.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName, a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.SETTLE_MONTH as settleMonth, a.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName, a.CREATE_NAME as createName,
detail.POLICY_NO as policyNo, a.POLICY_NO as policyNo,
detail.REMARK as remark a.REMARK as remark
from t_insurance_detail detail from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID left join t_insurance_area_res p on a.CREATE_BY=p.USER_ID
</if> </if>
where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1 where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = 1
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%') and a.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%') and a.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.buyType != null"> <if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType} and a.BUY_TYPE = #{param.buyType}
</if> </if>
<if test="param.createName != null and param.createName.trim() != ''"> <if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%') and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"> <if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59') and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if> </if>
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql} ${param.authSql}
</if> </if>
GROUP BY detail.id GROUP BY a.id
ORDER BY detail.CREATE_TIME DESC ORDER BY a.CREATE_TIME DESC
</select> </select>
<!--批量更新保单号--> <!--批量更新保单号-->
<update id="updatePolicyNoBatch"> <update id="updatePolicyNoBatch">
...@@ -424,302 +424,302 @@ ...@@ -424,302 +424,302 @@
<!-- 已投保列表分页查询--> <!-- 已投保列表分页查询-->
<select id="getInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"> <select id="getInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select select
detail.id as id, a.id as id,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus, a.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.POST as post, a.POST as post,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.POLICY_EFFECT as policyEffect, a.POLICY_EFFECT as policyEffect,
detail.IS_USE as isUse, a.IS_USE as isUse,
detail.IS_EFFECT as isEffect, a.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue, a.IS_OVERDUE as isOverdue,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.CREATE_USER_DEPT_NAME as createUserDeptName, a.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.BUY_STANDARD as buyStandard a.BUY_STANDARD as buyStandard
from from
t_insurance_detail detail t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID left join t_insurance_area_res p on a.CREATE_BY=p.USER_ID
</if> </if>
where where
detail.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and and
detail.BUY_HANDLE_STATUS = 3 a.BUY_HANDLE_STATUS = 3
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.deptNo == null or param.deptNo.trim() == ''"> <if test="param.deptNo == null or param.deptNo.trim() == ''">
and detail.DEPT_NO in and a.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.policyNo != null and param.policyNo.trim() != ''"> <if test="param.policyNo != null and param.policyNo.trim() != ''">
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%') and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''"> <if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''">
AND detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') AND a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00')
</if> </if>
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''"> <if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''">
AND detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59') AND a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if> </if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"> <if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and ( and (
(detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR (a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_START <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR (a.POLICY_START <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) (a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59'))
) )
</if> </if>
<if test="param.invoiceNo != null and param.invoiceNo.trim() != ''"> <if test="param.invoiceNo != null and param.invoiceNo.trim() != ''">
and detail.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%') and a.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.isUse != null"> <if test="param.isUse != null">
and detail.IS_USE = #{param.isUse} and a.IS_USE = #{param.isUse}
</if> </if>
<if test="param.isOverdue != null"> <if test="param.isOverdue != null">
and detail.IS_OVERDUE = #{param.isOverdue} and a.IS_OVERDUE = #{param.isOverdue}
</if> </if>
<if test="param.createStartTime != null and param.createStartTime.trim() != ''"> <if test="param.createStartTime != null and param.createStartTime.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.createStartTime}, ' 00:00:00') AND a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.createStartTime}, ' 00:00:00')
</if> </if>
<if test="param.createEndTime != null and param.createEndTime.trim() != ''"> <if test="param.createEndTime != null and param.createEndTime.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.createEndTime}, ' 23:59:59') AND a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.createEndTime}, ' 23:59:59')
</if> </if>
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql} ${param.authSql}
</if> </if>
GROUP BY detail.id GROUP BY a.id
ORDER BY detail.CREATE_TIME DESC ,detail.ID ASC ORDER BY a.CREATE_TIME DESC ,a.ID ASC
</select> </select>
<!-- 已投保列表不分页查询--> <!-- 已投保列表不分页查询-->
<select id="getInsuredList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"> <select id="getInsuredList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select select
detail.id as id, a.id as id,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.POST as post, a.POST as post,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.ESTIMATE_PREMIUM as estimatePremium, a.ESTIMATE_PREMIUM as estimatePremium,
detail.ACTUAL_PREMIUM as actualPremium, a.ACTUAL_PREMIUM as actualPremium,
detail.POLICY_NO as policyNo, a.POLICY_NO as policyNo,
detail.INVOICE_NO as invoiceNo, a.INVOICE_NO as invoiceNo,
detail.POLICY_EFFECT as policyEffect, a.POLICY_EFFECT as policyEffect,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName, a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName, a.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName, a.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName, a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.IS_USE as isUse, a.IS_USE as isUse,
detail.IS_EFFECT as isEffect, a.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue, a.IS_OVERDUE as isOverdue,
detail.CREATE_TIME as createTime, a.CREATE_TIME as createTime,
detail.CREATE_NAME as createName a.CREATE_NAME as createName
from from
t_insurance_detail detail t_insurance_detail a
where where
detail.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and and
detail.BUY_HANDLE_STATUS = 3 a.BUY_HANDLE_STATUS = 3
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.deptNo == null or param.deptNo.trim() == ''"> <if test="param.deptNo == null or param.deptNo.trim() == ''">
and detail.DEPT_NO in and a.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.policyNo != null and param.policyNo.trim() != ''"> <if test="param.policyNo != null and param.policyNo.trim() != ''">
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%') and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''"> <if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''">
AND detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') AND a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00')
</if> </if>
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''"> <if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''">
AND detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59') AND a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if> </if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"> <if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and ( and (
(detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR (a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_START <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR (a.POLICY_START <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) (a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59'))
) )
</if> </if>
<if test="param.invoiceNo != null and param.invoiceNo.trim() != ''"> <if test="param.invoiceNo != null and param.invoiceNo.trim() != ''">
and detail.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%') and a.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.isUse != null"> <if test="param.isUse != null">
and detail.IS_USE = #{param.isUse} and a.IS_USE = #{param.isUse}
</if> </if>
<if test="param.isOverdue != null "> <if test="param.isOverdue != null ">
and detail.IS_OVERDUE = #{param.isOverdue} and a.IS_OVERDUE = #{param.isOverdue}
</if> </if>
<if test="param.createStartTime != null and param.createStartTime.trim() != ''"> <if test="param.createStartTime != null and param.createStartTime.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.createStartTime}, ' 00:00:00') AND a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.createStartTime}, ' 00:00:00')
</if> </if>
<if test="param.createEndTime != null and param.createEndTime.trim() != ''"> <if test="param.createEndTime != null and param.createEndTime.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.createEndTime}, ' 23:59:59') AND a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.createEndTime}, ' 23:59:59')
</if> </if>
ORDER BY detail.CREATE_TIME DESC ORDER BY a.CREATE_TIME DESC
</select> </select>
<!-- 已减员列表分页查询--> <!-- 已减员列表分页查询-->
<select id="getInsuranceRefundPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"> <select id="getInsuranceRefundPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo">
select select
detail.id as id, a.id as id,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.POST as post, a.POST as post,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.POLICY_NO as policyNo, a.POLICY_NO as policyNo,
refund.CREATE_USER_DEPT_NAME as createUserDeptName, refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as refundCreateTime refund.CREATE_TIME as refundCreateTime
from from
t_insurance_detail detail, t_insurance_detail a,
t_insurance_refund refund t_insurance_refund refund
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID left join t_insurance_area_res p on a.CREATE_BY=p.USER_ID
</if> </if>
where where
detail.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and and
detail.REFUND_ID = refund.ID a.REFUND_ID = refund.ID
and and
detail.REDUCE_HANDLE_STATUS = 4 a.REDUCE_HANDLE_STATUS = 4
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.deptNo == null or param.deptNo.trim() == ''"> <if test="param.deptNo == null or param.deptNo.trim() == ''">
and detail.DEPT_NO in and a.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.policyNo != null and param.policyNo.trim() != ''"> <if test="param.policyNo != null and param.policyNo.trim() != ''">
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%') and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''"> <if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''">
AND detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') AND a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00')
</if> </if>
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''"> <if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''">
AND detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59') AND a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if> </if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"> <if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and ( and (
(detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR (a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_START <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR (a.POLICY_START <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) (a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59'))
) )
</if> </if>
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql} ${param.authSql}
</if> </if>
GROUP BY detail.id GROUP BY a.id
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC ORDER BY refund.CREATE_TIME DESC,a.ID ASC
</select> </select>
<!-- 已减员列表不分页查询--> <!-- 已减员列表不分页查询-->
<select id="getInsuranceRefundList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"> <select id="getInsuranceRefundList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo">
select select
detail.id as id, a.id as id,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.POST as post, a.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName, a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName, a.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName, a.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName, a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
refund.CREATE_TIME as refundCreateTime refund.CREATE_TIME as refundCreateTime
from from
t_insurance_detail detail, t_insurance_detail a,
t_insurance_refund refund t_insurance_refund refund
where where
detail.REFUND_ID = refund.ID a.REFUND_ID = refund.ID
and and
detail.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and and
detail.REDUCE_HANDLE_STATUS = 4 a.REDUCE_HANDLE_STATUS = 4
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.deptNo == null or param.deptNo.trim() == ''"> <if test="param.deptNo == null or param.deptNo.trim() == ''">
and detail.DEPT_NO in and a.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.policyNo != null and param.policyNo.trim() != ''"> <if test="param.policyNo != null and param.policyNo.trim() != ''">
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%') and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''"> <if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''">
AND detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') AND a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00')
</if> </if>
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''"> <if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''">
AND detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59') AND a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if> </if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"> <if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and ( and (
(detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR (a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_START <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR (a.POLICY_START <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) (a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59'))
) )
</if> </if>
ORDER BY refund.CREATE_TIME DESC ORDER BY refund.CREATE_TIME DESC
...@@ -728,50 +728,50 @@ ...@@ -728,50 +728,50 @@
<select id="getInsuranceRefundHandlingPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"> <select id="getInsuranceRefundHandlingPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo">
select select
DISTINCT DISTINCT
detail.id as id, a.id as id,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.POST as post, a.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName, a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName, a.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName, a.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName, a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
refund.CREATE_NAME as createName, refund.CREATE_NAME as createName,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus a.REDUCE_HANDLE_STATUS as reduceHandleStatus
from from
t_insurance_detail detail, t_insurance_detail a,
t_insurance_refund refund t_insurance_refund refund
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID left join t_insurance_area_res p on a.CREATE_BY=p.USER_ID
</if> </if>
where where
detail.REFUND_ID = refund.ID a.REFUND_ID = refund.ID
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.reduceHandleStatus != null"> <if test="param.reduceHandleStatus != null">
and detail.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus} and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if> </if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"> <if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and detail.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%') and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.updateBy != null and param.updateBy.trim() != ''"> <if test="param.updateBy != null and param.updateBy.trim() != ''">
and refund.UPDATE_BY = #{param.updateBy} and refund.UPDATE_BY = #{param.updateBy}
...@@ -788,8 +788,8 @@ ...@@ -788,8 +788,8 @@
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql} ${param.authSql}
</if> </if>
GROUP BY detail.id GROUP BY a.id
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC ORDER BY refund.CREATE_TIME DESC,a.ID ASC
</select> </select>
<!-- 查询保单列表--> <!-- 查询保单列表-->
<select id="selectDetailListByIds" <select id="selectDetailListByIds"
...@@ -807,129 +807,129 @@ ...@@ -807,129 +807,129 @@
<!-- 查询保单减员退费信息--> <!-- 查询保单减员退费信息-->
<select id="selectRefundDetail" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceRefundDetail"> <select id="selectRefundDetail" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceRefundDetail">
select select
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
refund.ID as id, refund.ID as id,
refund.INS_DETAIL_ID as insDetailId, refund.INS_DETAIL_ID as insDetailId,
refund.REFUND_MONEY as refundMoney refund.REFUND_MONEY as refundMoney
from from
t_insurance_detail detail, t_insurance_detail a,
t_insurance_refund refund t_insurance_refund refund
where where
detail.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and and
detail.REFUND_ID = refund.ID a.REFUND_ID = refund.ID
and and
detail.BUY_HANDLE_STATUS = 5 a.BUY_HANDLE_STATUS = 5
and and
detail.REDUCE_HANDLE_STATUS = 4 a.REDUCE_HANDLE_STATUS = 4
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME = #{param.empName} and a.EMP_NAME = #{param.empName}
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO = #{param.empIdcardNo} and a.EMP_IDCARD_NO = #{param.empIdcardNo}
</if> </if>
<if test="param.policyNo!= null and param.policyNo.trim() != ''"> <if test="param.policyNo!= null and param.policyNo.trim() != ''">
and detail.POLICY_NO = #{param.policyNo} and a.POLICY_NO = #{param.policyNo}
</if> </if>
</select> </select>
<!-- 根据ID导出减员办理列表--> <!-- 根据ID导出减员办理列表-->
<select id="getRefundExportListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"> <select id="getRefundExportListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo">
select select
detail.id as id, a.id as id,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.POST as post, a.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName, a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName, a.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName, a.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName, a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.SETTLE_MONTH as settleMonth, a.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName, a.CREATE_NAME as createName,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus, a.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail.REMARK as remark a.REMARK as remark
from from
t_insurance_detail detail t_insurance_detail a
where where
detail.id in a.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
ORDER BY detail.CREATE_TIME DESC ORDER BY a.CREATE_TIME DESC
</select> </select>
<!-- 根据查询参数导出减员办理列表--> <!-- 根据查询参数导出减员办理列表-->
<select id="getRefundExportList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"> <select id="getRefundExportList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo">
select select
detail.id as id, a.id as id,
detail.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.POST as post, a.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName, a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName, a.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName, a.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName, a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart, a.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, a.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.SETTLE_MONTH as settleMonth, a.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName, a.CREATE_NAME as createName,
detail.REMARK as remark a.REMARK as remark
from from
t_insurance_detail detail t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID left join t_insurance_area_res p on a.CREATE_BY=p.USER_ID
</if> </if>
where where
detail.DELETE_FLAG = 0 and detail.REDUCE_HANDLE_STATUS = 1 a.DELETE_FLAG = 0 and a.REDUCE_HANDLE_STATUS = 1
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"> <if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and detail.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%') and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql} ${param.authSql}
</if> </if>
GROUP BY detail.id GROUP BY a.id
ORDER BY detail.CREATE_TIME DESC ORDER BY a.CREATE_TIME DESC
</select> </select>
<!-- 减员办理--> <!-- 减员办理-->
<update id="updateInsuranceRefund"> <update id="updateInsuranceRefund">
update update
t_insurance_detail detail t_insurance_detail a
set set
UPDATE_BY = #{param.updateBy}, UPDATE_BY = #{param.updateBy},
REDUCE_HANDLE_STATUS = #{param.refundType}, REDUCE_HANDLE_STATUS = #{param.refundType},
UPDATE_TIME = #{param.refundCreateTime} UPDATE_TIME = #{param.refundCreateTime}
where where
detail.ID in a.ID in
<foreach collection="param.idList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.idList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
...@@ -967,78 +967,78 @@ ...@@ -967,78 +967,78 @@
<select id="getOrderInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"> <select id="getOrderInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo">
( (
select select
detail.id as id, a.id as id,
detail.id as onlyId, a.id as onlyId,
detail.BUY_TYPE as buyType, a.BUY_TYPE as buyType,
detail.CREATE_BY as createBy, a.CREATE_BY as createBy,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.CREATE_NAME as createName, a.CREATE_NAME as createName,
detail.CREATE_USER_DEPT_NAME as createUserDeptName, a.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.CREATE_TIME as createTime, a.CREATE_TIME as createTime,
detail.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus a.REDUCE_HANDLE_STATUS as reduceHandleStatus
from from
t_insurance_detail detail t_insurance_detail detail
where where
detail.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and and
detail.ORDER_NO = #{param.orderNo} a.ORDER_NO = #{param.orderNo}
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.startDate != null "> <if test="param.startDate != null ">
AND detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') AND a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00')
</if> </if>
<if test="param.endDate != null "> <if test="param.endDate != null ">
AND detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59') AND a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if> </if>
<if test="param.deptNoList != null"> <if test="param.deptNoList != null">
and detail.DEPT_NO in and a.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if>) </if>)
union all( union all(
select select
detail.id as id, a.id as id,
refund.id as onlyId, refund.id as onlyId,
refund.BUY_TYPE as buyType, refund.BUY_TYPE as buyType,
refund.CREATE_BY as createBy, refund.CREATE_BY as createBy,
detail.EMP_NAME as empName, a.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, a.EMP_IDCARD_NO as empIdcardNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, a.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, a.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota, a.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
refund.CREATE_NAME as createName, refund.CREATE_NAME as createName,
refund.CREATE_USER_DEPT_NAME as createUserDeptName, refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as createTime, refund.CREATE_TIME as createTime,
detail.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
refund.REDUCE_HANDLE_STATUS as reduceHandleStatus refund.REDUCE_HANDLE_STATUS as reduceHandleStatus
from from
t_insurance_detail detail, t_insurance_detail detail,
t_insurance_refund refund t_insurance_refund refund
where where
detail.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and and
detail.ID = refund.INS_DETAIL_ID a.ID = refund.INS_DETAIL_ID
and and
refund.ORDER_NO = #{param.orderNo} refund.ORDER_NO = #{param.orderNo}
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.startDate != null"> <if test="param.startDate != null">
AND refund.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') AND refund.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00')
...@@ -1047,7 +1047,7 @@ ...@@ -1047,7 +1047,7 @@
AND refund.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59') AND refund.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if> </if>
<if test="param.deptNoList != null"> <if test="param.deptNoList != null">
and detail.DEPT_NO in and a.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
......
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