Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
660d5ac5
Commit
660d5ac5
authored
Sep 19, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
ae5e44b9
f7c92003
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
495 additions
and
499 deletions
+495
-499
TEmployeeInfoService.java
...d/plus/v1/yifu/archives/service/TEmployeeInfoService.java
+0
-1
LdapUtil.java
...om/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
+4
-4
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+5
-0
InsuranceListParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
+2
-15
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+5
-0
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+479
-479
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeInfoService.java
View file @
660d5ac5
...
...
@@ -40,7 +40,6 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
/**
* @param employeeInfo
* @param sql
* @Description: 分页查询
* @Author: hgw
* @Date: 2022/6/20 20:46
...
...
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
View file @
660d5ac5
...
...
@@ -45,10 +45,10 @@ public class LdapUtil {
**/
public
List
<
SearchResultEntry
>
getAllPersonNamesWithTraditionalWay
()
{
List
<
SearchResultEntry
>
result
=
new
ArrayList
<>();
try
{
LDAPConnection
connection
=
new
LDAPConnection
(
ldapProperties
.
getUrl
(),
ldapProperties
.
getPort
(),
ldapProperties
.
getUserName
(),
ldapProperties
.
getPassword
());
SearchRequest
searchRequest
=
new
SearchRequest
(
ldapProperties
.
getBaseDn
(),
SearchScope
.
SUB
,
"(objectclass=*)"
);
try
(
LDAPConnection
connection
=
new
LDAPConnection
(
ldapProperties
.
getUrl
(),
ldapProperties
.
getPort
(),
ldapProperties
.
getUserName
(),
ldapProperties
.
getPassword
()))
{
SearchRequest
searchRequest
=
new
SearchRequest
(
ldapProperties
.
getBaseDn
(),
SearchScope
.
SUB
,
"(objectclass=*)"
);
searchRequest
.
addControl
(
new
SubentriesRequestControl
());
SearchResult
searchResult
=
connection
.
search
(
searchRequest
);
result
.
addAll
(
searchResult
.
getSearchEntries
());
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
660d5ac5
...
...
@@ -17,6 +17,11 @@ import java.math.BigDecimal;
public
class
InsuranceAddParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 项目id
*/
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
/**
* 员工姓名
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
View file @
660d5ac5
...
...
@@ -4,9 +4,9 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author licancan
* @description 投保列表请求参数
...
...
@@ -14,8 +14,7 @@ import java.util.List;
*/
@Data
@Schema
(
description
=
"投保列表请求参数"
)
public
class
InsuranceListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4692341622141432288L
;
public
class
InsuranceListParam
extends
BaseEntity
{
/**
* 项目编码
...
...
@@ -71,24 +70,12 @@ public class InsuranceListParam extends BaseEntity implements Serializable {
@Schema
(
description
=
"项目编码列表"
)
private
List
<
String
>
deptNoList
;
/**
* 保单办理人
*/
@Schema
(
description
=
"保单办理人"
)
private
String
updateBy
;
/**
* 购买类型, 1新增、3批增、4替换
*/
@Schema
(
description
=
" 购买类型(派单类型), 1新增、3批增、4替换"
)
private
Integer
buyType
;
/**
* 创建者-姓名
*/
@Schema
(
description
=
"派单人"
)
private
String
createName
;
/**
* 派单开始时间
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
660d5ac5
...
...
@@ -193,6 +193,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
IPage
<
InsuranceListVO
>
getInsuranceListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
param
.
getMId
()))
{
param
.
setMId
(
"1547501570923819009"
);
}
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
IPage
<
InsuranceListVO
>
insuranceList
=
new
Page
<>();
...
...
@@ -1931,6 +1934,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setBpoFlag
(
projectSetInfoVo
.
getBpoFlag
());
param
.
setSettleType
(
Integer
.
parseInt
(
settleType
));
}
param
.
setBpoFlag
(
projectSetInfoVo
.
getBpoFlag
());
param
.
setDeptId
(
projectSetInfoVo
.
getId
());
}
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
660d5ac5
...
...
@@ -76,336 +76,336 @@
</sql>
<!--投保分页查询-->
<select
id=
"getInsuranceListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.DEPT_NO as deptNo,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.CREATE_BY as createBy,
detail.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType,
detail.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
where detail.DELETE_FLAG = 0
select a.id as id,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.POST as post,
a.DEPT_NO as deptNo,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.CREATE_BY as createBy,
a.CREATE_NAME as createName,
a.BUY_HANDLE_STATUS as buyHandleStatus,
a.SETTLE_TYPE as settleType,
a.CREATE_USER_DEPT_NAME as createUserDeptName,
a.SETTLE_MONTH as settleMonth
from t_insurance_detail a
<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>
where a.DELETE_FLAG = 0
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.deptNo}
and
a
.DEPT_NO = #{param.deptNo}
</if>
<if
test=
"param.orderNo != null and param.orderNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.orderNo}
and
a
.DEPT_NO = #{param.orderNo}
</if>
<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=
")"
>
#{item}
</foreach>
</if>
<if
test=
"param.buyHandleStatus != null"
>
and
detail
.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
and
a
.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<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
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
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and
detail
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
and
a
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<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
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=
")"
>
#{item}
</foreach>
</if>
<if
test=
"param.buyType != null"
>
and
detail
.BUY_TYPE = #{param.buyType}
and
a
.BUY_TYPE = #{param.buyType}
</if>
<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
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
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY
detail
.id
ORDER BY
detail.BUY_HANDLE_STATUS,detail
.CREATE_TIME DESC
GROUP BY
a
.id
ORDER BY
a.BUY_HANDLE_STATUS,a
.CREATE_TIME DESC
</select>
<!--投保不分页查询-->
<select
id=
"getInsuranceList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select
detail
.id as id,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.POST as post,
detail
.DEPT_NO as deptNo,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.CREATE_BY as createBy,
detail
.CREATE_NAME as createName,
detail
.BUY_HANDLE_STATUS as buyHandleStatus,
detail
.SETTLE_TYPE as settleType,
detail
.SETTLE_MONTH as settleMonth
from t_insurance_detail
detail
where
detail
.DELETE_FLAG = 0
select
a
.id as id,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.POST as post,
a
.DEPT_NO as deptNo,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.CREATE_BY as createBy,
a
.CREATE_NAME as createName,
a
.BUY_HANDLE_STATUS as buyHandleStatus,
a
.SETTLE_TYPE as settleType,
a
.SETTLE_MONTH as settleMonth
from t_insurance_detail
a
where
a
.DELETE_FLAG = 0
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.deptNo}
and
a
.DEPT_NO = #{param.deptNo}
</if>
<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=
")"
>
#{item}
</foreach>
</if>
<if
test=
"param.buyHandleStatus != null"
>
and
detail
.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
and
a
.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<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
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
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and
detail
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
and
a
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<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
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=
")"
>
#{item}
</foreach>
</if>
<if
test=
"param.buyType != null"
>
and
detail
.BUY_TYPE = #{param.buyType}
and
a
.BUY_TYPE = #{param.buyType}
</if>
<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
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>
ORDER BY
detail.BUY_HANDLE_STATUS,detail
.CREATE_TIME DESC
ORDER BY
a.BUY_HANDLE_STATUS,a
.CREATE_TIME DESC
</select>
<!--投保办理分页查询-->
<select
id=
"getInsuranceHandleListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select
detail
.id as id,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.POST as post,
detail
.DEPT_NO as deptNo,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.CREATE_NAME as createName,
detail
.BUY_HANDLE_STATUS as buyHandleStatus,
detail
.SETTLE_TYPE as settleType,
detail
.SETTLE_MONTH as settleMonth
from t_insurance_detail
detail
select
a
.id as id,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.POST as post,
a
.DEPT_NO as deptNo,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.CREATE_NAME as createName,
a
.BUY_HANDLE_STATUS as buyHandleStatus,
a
.SETTLE_TYPE as settleType,
a
.SETTLE_MONTH as settleMonth
from t_insurance_detail
a
<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>
where
detail
.DELETE_FLAG = 0
where
a
.DELETE_FLAG = 0
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.deptNo}
and
a
.DEPT_NO = #{param.deptNo}
</if>
<if
test=
"param.buyHandleStatus != null"
>
and
detail
.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
and
a
.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<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
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
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and
detail
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
and
a
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<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
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=
")"
>
#{item}
</foreach>
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and
detail
.HANDLED_BY = #{param.updateBy}
and
a
.HANDLED_BY = #{param.updateBy}
</if>
<if
test=
"param.buyType != null"
>
and
detail
.BUY_TYPE = #{param.buyType}
and
a
.BUY_TYPE = #{param.buyType}
</if>
<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
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
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY
detail
.id
ORDER BY
detail.BUY_HANDLE_STATUS,detail
.CREATE_TIME DESC
GROUP BY
a
.id
ORDER BY
a.BUY_HANDLE_STATUS,a
.CREATE_TIME DESC
</select>
<!--通过id查询商险信息-->
<select
id=
"getInsuranceDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"
>
select
detail
.id as id,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.DEPT_NO as deptNo,
detail
.POST as post,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.POLICY_EFFECT as policyEffect,
detail
.POLICY_NO as policyNo,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.INSURANCE_TYPE_ID as insuranceTypeId,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.SETTLE_TYPE as premiumType,
detail
.ESTIMATE_PREMIUM as estimatePremium,
detail
.ACTUAL_PREMIUM as actualPremium,
detail
.INVOICE_NO as invoiceNo,
detail
.SETTLE_TYPE as settleType,
detail
.SETTLE_MONTH as settleMonth,
detail
.BUY_HANDLE_STATUS as buyHandleStatus,
detail
.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail
.IS_USE as isUse,
detail
.IS_EFFECT as isEffect,
detail
.IS_OVERDUE as isOverdue,
detail
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail
.INSURANCE_PROVINCE as insuranceProvince,
detail
.INSURANCE_CITY_NAME as insuranceCityName,
detail
.INSURANCE_CITY as insuranceCity,
detail
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail
.INSURANCE_HANDLE_PROVINCE as insuranceHandleProvince,
detail
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail
.INSURANCE_HANDLE_CITY as insuranceHandleCity,
detail
.CREATE_NAME as createName,
detail
.CREATE_TIME as createTime,
detail
.REMARK as remark,
detail
.BILLING_TYPE as billingType,
detail
.DEFAULT_SETTLE_ID as defaultSettleId,
detail
.RATE as rate
from t_insurance_detail
detail
left join t_insurance_settle tis on
detail
.DEFAULT_SETTLE_ID = tis.ID
where
detail
.ID = #{id}
a
.id as id,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.DEPT_NO as deptNo,
a
.POST as post,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.POLICY_EFFECT as policyEffect,
a
.POLICY_NO as policyNo,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.INSURANCE_TYPE_ID as insuranceTypeId,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.SETTLE_TYPE as premiumType,
a
.ESTIMATE_PREMIUM as estimatePremium,
a
.ACTUAL_PREMIUM as actualPremium,
a
.INVOICE_NO as invoiceNo,
a
.SETTLE_TYPE as settleType,
a
.SETTLE_MONTH as settleMonth,
a
.BUY_HANDLE_STATUS as buyHandleStatus,
a
.REDUCE_HANDLE_STATUS as reduceHandleStatus,
a
.IS_USE as isUse,
a
.IS_EFFECT as isEffect,
a
.IS_OVERDUE as isOverdue,
a
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a
.INSURANCE_PROVINCE as insuranceProvince,
a
.INSURANCE_CITY_NAME as insuranceCityName,
a
.INSURANCE_CITY as insuranceCity,
a
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
a
.INSURANCE_HANDLE_PROVINCE as insuranceHandleProvince,
a
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a
.INSURANCE_HANDLE_CITY as insuranceHandleCity,
a
.CREATE_NAME as createName,
a
.CREATE_TIME as createTime,
a
.REMARK as remark,
a
.BILLING_TYPE as billingType,
a
.DEFAULT_SETTLE_ID as defaultSettleId,
a
.RATE as rate
from t_insurance_detail
a
left join t_insurance_settle tis on
a
.DEFAULT_SETTLE_ID = tis.ID
where
a
.ID = #{id}
</select>
<!--导出办理勾选查询结果-->
<select
id=
"getInsuranceExportListBySelect"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"
>
select
detail
.id as id,
detail
.DEPT_NO as deptNo,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.BUY_HANDLE_STATUS as buyHandleStatus,
detail
.POST as post,
detail
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail
.INSURANCE_CITY_NAME as insuranceCityName,
detail
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
detail
.SETTLE_MONTH as settleMonth,
detail
.SETTLE_TYPE as settleType,
detail
.CREATE_NAME as createName,
detail
.POLICY_NO as policyNo,
detail
.REMARK as remark
from t_insurance_detail
detail
where
detail.DELETE_FLAG = 0 and detail
.id in
select
a
.id as id,
a
.DEPT_NO as deptNo,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.BUY_HANDLE_STATUS as buyHandleStatus,
a
.POST as post,
a
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a
.INSURANCE_CITY_NAME as insuranceCityName,
a
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
a
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.SETTLE_MONTH as settleMonth,
a
.SETTLE_TYPE as settleType,
a
.CREATE_NAME as createName,
a
.POLICY_NO as policyNo,
a
.REMARK as remark
from t_insurance_detail
a
where
a.DELETE_FLAG = 0 and a
.id in
<foreach
collection=
"idList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
ORDER BY
detail
.CREATE_TIME DESC
ORDER BY
a
.CREATE_TIME DESC
</select>
<!--出办理非勾选查询结果-->
<select
id=
"getInsuranceExportList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"
>
select
detail
.id as id,
detail
.DEPT_NO as deptNo,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.POST as post,
detail
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail
.INSURANCE_CITY_NAME as insuranceCityName,
detail
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
detail
.SETTLE_MONTH as settleMonth,
detail
.SETTLE_TYPE as settleType,
detail
.CREATE_NAME as createName,
detail
.POLICY_NO as policyNo,
detail
.REMARK as remark
from t_insurance_detail
detail
select
a
.id as id,
a
.DEPT_NO as deptNo,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.POST as post,
a
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a
.INSURANCE_CITY_NAME as insuranceCityName,
a
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
a
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.SETTLE_MONTH as settleMonth,
a
.SETTLE_TYPE as settleType,
a
.CREATE_NAME as createName,
a
.POLICY_NO as policyNo,
a
.REMARK as remark
from t_insurance_detail
a
<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>
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() != ''"
>
and
detail
.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
and
a
.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<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
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
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
test=
"param.buyType != null"
>
and
detail
.BUY_TYPE = #{param.buyType}
and
a
.BUY_TYPE = #{param.buyType}
</if>
<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
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
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY
detail
.id
ORDER BY
detail
.CREATE_TIME DESC
GROUP BY
a
.id
ORDER BY
a
.CREATE_TIME DESC
</select>
<!--批量更新保单号-->
<update
id=
"updatePolicyNoBatch"
>
...
...
@@ -424,302 +424,302 @@
<!-- 已投保列表分页查询-->
<select
id=
"getInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
select
detail
.id as id,
detail
.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.DEPT_NO as deptNo,
detail
.POST as post,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.POLICY_EFFECT as policyEffect,
detail
.IS_USE as isUse,
detail
.IS_EFFECT as isEffect,
detail
.IS_OVERDUE as isOverdue,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.CREATE_USER_DEPT_NAME as createUserDeptName,
detail
.BUY_STANDARD as buyStandard
a
.id as id,
a
.REDUCE_HANDLE_STATUS as reduceHandleStatus,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.DEPT_NO as deptNo,
a
.POST as post,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.POLICY_EFFECT as policyEffect,
a
.IS_USE as isUse,
a
.IS_EFFECT as isEffect,
a
.IS_OVERDUE as isOverdue,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.CREATE_USER_DEPT_NAME as createUserDeptName,
a
.BUY_STANDARD as buyStandard
from
t_insurance_detail
detail
t_insurance_detail
a
<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>
where
detail
.DELETE_FLAG = 0
a
.DELETE_FLAG = 0
and
detail
.BUY_HANDLE_STATUS = 3
a
.BUY_HANDLE_STATUS = 3
<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
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
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.deptNo}
and
a
.DEPT_NO = #{param.deptNo}
</if>
<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=
")"
>
#{item}
</foreach>
</if>
<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
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
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
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
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
and (
(
detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail
.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
(
detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail
.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
(
a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a
.POLICY_END
<![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
(
a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a
.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
<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
test=
"param.isUse != null"
>
and
detail
.IS_USE = #{param.isUse}
and
a
.IS_USE = #{param.isUse}
</if>
<if
test=
"param.isOverdue != null"
>
and
detail
.IS_OVERDUE = #{param.isOverdue}
and
a
.IS_OVERDUE = #{param.isOverdue}
</if>
<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
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
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY
detail
.id
ORDER BY
detail.CREATE_TIME DESC ,detail
.ID ASC
GROUP BY
a
.id
ORDER BY
a.CREATE_TIME DESC ,a
.ID ASC
</select>
<!-- 已投保列表不分页查询-->
<select
id=
"getInsuredList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
select
detail
.id as id,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.DEPT_NO as deptNo,
detail
.POST as post,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
detail
.ESTIMATE_PREMIUM as estimatePremium,
detail
.ACTUAL_PREMIUM as actualPremium,
detail
.POLICY_NO as policyNo,
detail
.INVOICE_NO as invoiceNo,
detail
.POLICY_EFFECT as policyEffect,
detail
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail
.INSURANCE_CITY_NAME as insuranceCityName,
detail
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail
.IS_USE as isUse,
detail
.IS_EFFECT as isEffect,
detail
.IS_OVERDUE as isOverdue,
detail
.CREATE_TIME as createTime,
detail
.CREATE_NAME as createName
a
.id as id,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.DEPT_NO as deptNo,
a
.POST as post,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.ESTIMATE_PREMIUM as estimatePremium,
a
.ACTUAL_PREMIUM as actualPremium,
a
.POLICY_NO as policyNo,
a
.INVOICE_NO as invoiceNo,
a
.POLICY_EFFECT as policyEffect,
a
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a
.INSURANCE_CITY_NAME as insuranceCityName,
a
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
a
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a
.IS_USE as isUse,
a
.IS_EFFECT as isEffect,
a
.IS_OVERDUE as isOverdue,
a
.CREATE_TIME as createTime,
a
.CREATE_NAME as createName
from
t_insurance_detail
detail
t_insurance_detail
a
where
detail
.DELETE_FLAG = 0
a
.DELETE_FLAG = 0
and
detail
.BUY_HANDLE_STATUS = 3
a
.BUY_HANDLE_STATUS = 3
<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
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
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.deptNo}
and
a
.DEPT_NO = #{param.deptNo}
</if>
<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=
")"
>
#{item}
</foreach>
</if>
<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
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
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
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
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
and (
(
detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail
.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
(
detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail
.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
(
a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a
.POLICY_END
<![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
(
a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a
.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
<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
test=
"param.isUse != null"
>
and
detail
.IS_USE = #{param.isUse}
and
a
.IS_USE = #{param.isUse}
</if>
<if
test=
"param.isOverdue != null "
>
and
detail
.IS_OVERDUE = #{param.isOverdue}
and
a
.IS_OVERDUE = #{param.isOverdue}
</if>
<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
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>
ORDER BY
detail
.CREATE_TIME DESC
ORDER BY
a
.CREATE_TIME DESC
</select>
<!-- 已减员列表分页查询-->
<select
id=
"getInsuranceRefundPageList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"
>
select
detail
.id as id,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.POST as post,
detail
.DEPT_NO as deptNo,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.POLICY_NO as policyNo,
a
.id as id,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.POST as post,
a
.DEPT_NO as deptNo,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.POLICY_NO as policyNo,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as refundCreateTime
from
t_insurance_detail
detail
,
t_insurance_detail
a
,
t_insurance_refund refund
<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>
where
detail
.DELETE_FLAG = 0
a
.DELETE_FLAG = 0
and
detail
.REFUND_ID = refund.ID
a
.REFUND_ID = refund.ID
and
detail
.REDUCE_HANDLE_STATUS = 4
a
.REDUCE_HANDLE_STATUS = 4
<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
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
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.deptNo}
and
a
.DEPT_NO = #{param.deptNo}
</if>
<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=
")"
>
#{item}
</foreach>
</if>
<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
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
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
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
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
and (
(
detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail
.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
(
detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail
.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
(
a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a
.POLICY_END
<![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
(
a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a
.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY
detail
.id
ORDER BY refund.CREATE_TIME DESC,
detail
.ID ASC
GROUP BY
a
.id
ORDER BY refund.CREATE_TIME DESC,
a
.ID ASC
</select>
<!-- 已减员列表不分页查询-->
<select
id=
"getInsuranceRefundList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"
>
select
detail
.id as id,
detail
.DEPT_NO as deptNo,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.POST as post,
detail
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail
.INSURANCE_CITY_NAME as insuranceCityName,
detail
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.id as id,
a
.DEPT_NO as deptNo,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.POST as post,
a
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a
.INSURANCE_CITY_NAME as insuranceCityName,
a
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
a
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
refund.CREATE_TIME as refundCreateTime
from
t_insurance_detail
detail
,
t_insurance_detail
a
,
t_insurance_refund refund
where
detail
.REFUND_ID = refund.ID
a
.REFUND_ID = refund.ID
and
detail
.DELETE_FLAG = 0
a
.DELETE_FLAG = 0
and
detail
.REDUCE_HANDLE_STATUS = 4
a
.REDUCE_HANDLE_STATUS = 4
<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
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
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.deptNo}
and
a
.DEPT_NO = #{param.deptNo}
</if>
<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=
")"
>
#{item}
</foreach>
</if>
<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
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
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
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
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
and (
(
detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail
.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
(
detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail
.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
(
a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a
.POLICY_END
<![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
(
a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a
.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
ORDER BY refund.CREATE_TIME DESC
...
...
@@ -728,50 +728,50 @@
<select
id=
"getInsuranceRefundHandlingPageList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"
>
select
DISTINCT
detail
.id as id,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.DEPT_NO as deptNo,
detail
.POST as post,
detail
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail
.INSURANCE_CITY_NAME as insuranceCityName,
detail
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.id as id,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.DEPT_NO as deptNo,
a
.POST as post,
a
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a
.INSURANCE_CITY_NAME as insuranceCityName,
a
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
a
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
refund.CREATE_NAME as createName,
detail
.REDUCE_HANDLE_STATUS as reduceHandleStatus
a
.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail
detail
,
t_insurance_detail
a
,
t_insurance_refund refund
<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>
where
detail
.REFUND_ID = refund.ID
a
.REFUND_ID = refund.ID
<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
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
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.deptNo}
and
a
.DEPT_NO = #{param.deptNo}
</if>
<if
test=
"param.reduceHandleStatus != null"
>
and
detail
.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
and
a
.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<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
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and
detail
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
and
a
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.updateBy}
...
...
@@ -788,8 +788,8 @@
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY
detail
.id
ORDER BY refund.CREATE_TIME DESC,
detail
.ID ASC
GROUP BY
a
.id
ORDER BY refund.CREATE_TIME DESC,
a
.ID ASC
</select>
<!-- 查询保单列表-->
<select
id=
"selectDetailListByIds"
...
...
@@ -807,129 +807,129 @@
<!-- 查询保单减员退费信息-->
<select
id=
"selectRefundDetail"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceRefundDetail"
>
select
detail
.DEPT_NO as deptNo,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
a
.DEPT_NO as deptNo,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
refund.ID as id,
refund.INS_DETAIL_ID as insDetailId,
refund.REFUND_MONEY as refundMoney
from
t_insurance_detail
detail
,
t_insurance_detail
a
,
t_insurance_refund refund
where
detail
.DELETE_FLAG = 0
a
.DELETE_FLAG = 0
and
detail
.REFUND_ID = refund.ID
a
.REFUND_ID = refund.ID
and
detail
.BUY_HANDLE_STATUS = 5
a
.BUY_HANDLE_STATUS = 5
and
detail
.REDUCE_HANDLE_STATUS = 4
a
.REDUCE_HANDLE_STATUS = 4
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and
detail
.EMP_NAME = #{param.empName}
and
a
.EMP_NAME = #{param.empName}
</if>
<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
test=
"param.policyNo!= null and param.policyNo.trim() != ''"
>
and
detail
.POLICY_NO = #{param.policyNo}
and
a
.POLICY_NO = #{param.policyNo}
</if>
</select>
<!-- 根据ID导出减员办理列表-->
<select
id=
"getRefundExportListBySelect"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"
>
select
detail
.id as id,
detail
.DEPT_NO as deptNo,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.POST as post,
detail
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail
.INSURANCE_CITY_NAME as insuranceCityName,
detail
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
detail
.SETTLE_MONTH as settleMonth,
detail
.SETTLE_TYPE as settleType,
detail
.CREATE_NAME as createName,
detail
.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail
.REMARK as remark
a
.id as id,
a
.DEPT_NO as deptNo,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.POST as post,
a
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a
.INSURANCE_CITY_NAME as insuranceCityName,
a
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
a
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.SETTLE_MONTH as settleMonth,
a
.SETTLE_TYPE as settleType,
a
.CREATE_NAME as createName,
a
.REDUCE_HANDLE_STATUS as reduceHandleStatus,
a
.REMARK as remark
from
t_insurance_detail
detail
t_insurance_detail
a
where
detail
.id in
a
.id in
<foreach
collection=
"idList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
ORDER BY
detail
.CREATE_TIME DESC
ORDER BY
a
.CREATE_TIME DESC
</select>
<!-- 根据查询参数导出减员办理列表-->
<select
id=
"getRefundExportList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"
>
select
detail
.id as id,
detail
.DEPT_NO as deptNo,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.BUY_TYPE as buyType,
detail
.POST as post,
detail
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail
.INSURANCE_CITY_NAME as insuranceCityName,
detail
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail
.POLICY_START as policyStart,
detail
.POLICY_END as policyEnd,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
detail
.SETTLE_MONTH as settleMonth,
detail
.SETTLE_TYPE as settleType,
detail
.CREATE_NAME as createName,
detail
.REMARK as remark
a
.id as id,
a
.DEPT_NO as deptNo,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.BUY_TYPE as buyType,
a
.POST as post,
a
.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a
.INSURANCE_CITY_NAME as insuranceCityName,
a
.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
a
.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a
.POLICY_START as policyStart,
a
.POLICY_END as policyEnd,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.SETTLE_MONTH as settleMonth,
a
.SETTLE_TYPE as settleType,
a
.CREATE_NAME as createName,
a
.REMARK as remark
from
t_insurance_detail
detail
t_insurance_detail
a
<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>
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() != ''"
>
and
detail
.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
and
a
.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<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
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and
detail
.DEPT_NO = #{param.deptNo}
and
a
.DEPT_NO = #{param.deptNo}
</if>
<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
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and
detail
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
and
a
.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY
detail
.id
ORDER BY
detail
.CREATE_TIME DESC
GROUP BY
a
.id
ORDER BY
a
.CREATE_TIME DESC
</select>
<!-- 减员办理-->
<update
id=
"updateInsuranceRefund"
>
update
t_insurance_detail
detail
t_insurance_detail
a
set
UPDATE_BY = #{param.updateBy},
REDUCE_HANDLE_STATUS = #{param.refundType},
UPDATE_TIME = #{param.refundCreateTime}
where
detail
.ID in
a
.ID in
<foreach
collection=
"param.idList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
...
...
@@ -967,78 +967,78 @@
<select
id=
"getOrderInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"
>
(
select
detail
.id as id,
detail
.id as onlyId,
detail
.BUY_TYPE as buyType,
detail
.CREATE_BY as createBy,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
detail
.CREATE_NAME as createName,
detail
.CREATE_USER_DEPT_NAME as createUserDeptName,
detail
.CREATE_TIME as createTime,
detail
.BUY_HANDLE_STATUS as buyHandleStatus,
detail
.REDUCE_HANDLE_STATUS as reduceHandleStatus
a
.id as id,
a
.id as onlyId,
a
.BUY_TYPE as buyType,
a
.CREATE_BY as createBy,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.CREATE_NAME as createName,
a
.CREATE_USER_DEPT_NAME as createUserDeptName,
a
.CREATE_TIME as createTime,
a
.BUY_HANDLE_STATUS as buyHandleStatus,
a
.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail
where
detail
.DELETE_FLAG = 0
a
.DELETE_FLAG = 0
and
detail
.ORDER_NO = #{param.orderNo}
a
.ORDER_NO = #{param.orderNo}
<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
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
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
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
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=
")"
>
#{item}
</foreach>
</if>
)
union all(
select
detail
.id as id,
a
.id as id,
refund.id as onlyId,
refund.BUY_TYPE as buyType,
refund.CREATE_BY as createBy,
detail
.EMP_NAME as empName,
detail
.EMP_IDCARD_NO as empIdcardNo,
detail
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail
.INSURANCE_TYPE_NAME as insuranceTypeName,
detail
.BUY_STANDARD as buyStandard,
detail
.MEDICAL_QUOTA as medicalQuota,
detail
.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.EMP_NAME as empName,
a
.EMP_IDCARD_NO as empIdcardNo,
a
.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a
.INSURANCE_TYPE_NAME as insuranceTypeName,
a
.BUY_STANDARD as buyStandard,
a
.MEDICAL_QUOTA as medicalQuota,
a
.DIE_DISABLE_QUOTA as dieDisableQuota,
refund.CREATE_NAME as createName,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as createTime,
detail
.BUY_HANDLE_STATUS as buyHandleStatus,
a
.BUY_HANDLE_STATUS as buyHandleStatus,
refund.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail,
t_insurance_refund refund
where
detail
.DELETE_FLAG = 0
a
.DELETE_FLAG = 0
and
detail
.ID = refund.INS_DETAIL_ID
a
.ID = refund.INS_DETAIL_ID
and
refund.ORDER_NO = #{param.orderNo}
<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
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
test=
"param.startDate != null"
>
AND refund.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00')
...
...
@@ -1047,7 +1047,7 @@
AND refund.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<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=
")"
>
#{item}
</foreach>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment