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
325e1916
Commit
325e1916
authored
Aug 29, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:新增订单商险列表查询"
parent
c9a7f6e2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
476 additions
and
89 deletions
+476
-89
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+10
-0
InsuranceRefundListVo.java
...oud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
+5
-0
InsuredListVo.java
.../yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
+5
-2
InsuredOrderListVo.java
.../cloud/plus/v1/yifu/insurances/vo/InsuredOrderListVo.java
+113
-0
InsuredOrderParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuredOrderParam.java
+55
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+22
-8
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+25
-3
TInsuranceDetailService.java
...insurances/service/insurance/TInsuranceDetailService.java
+12
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+92
-60
TInsuranceEkpServiceImpl.java
...nces/service/insurance/impl/TInsuranceEkpServiceImpl.java
+6
-8
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+131
-8
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
325e1916
...
...
@@ -1014,6 +1014,16 @@ public class InsurancesConstants {
*/
public
static
final
String
ORDER_NO_IS_EMPTY
=
"订单编号不能为空"
;
/**
* 购买类型为空
*/
public
static
final
String
BUY_TYPE_IS_EMPTY
=
"购买类型为空"
;
/**
* 购买类型错误
*/
public
static
final
String
BUY_TYPE_ERROR
=
"购买类型错误"
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
View file @
325e1916
...
...
@@ -170,6 +170,11 @@ public class InsuranceRefundListVo implements Serializable {
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回"
)
private
Integer
reduceHandleStatus
;
/**
* 创建人所在部门名称
*/
@Schema
(
description
=
"创建人所在部门名称"
)
private
String
createUserDeptName
;
/**
* 购买月数
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
View file @
325e1916
...
...
@@ -232,8 +232,11 @@ public class InsuredListVo implements Serializable {
@Schema
(
description
=
"购买月数"
)
private
Long
buyMonth
;
/**
* 创建人所在部门名称
*/
@Schema
(
description
=
"创建人所在部门名称"
)
private
String
createUserDeptName
;
//订单编号、姓名、身份证号、投保类型、项目、岗位、保单开始日期、保单结束日期、保险公司、险种、购买标准、医保、身故或残疾、预估保费、实际保费、保单号、发票号、保单生效日期、商险购买地、商险办理地、是否出险、是否过期、是否失效、派单日期、派单人
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredOrderListVo.java
0 → 100644
View file @
325e1916
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* @author zhaji
* @description TODO
* @date 2022-08-29 14:47:46
*/
@Data
public
class
InsuredOrderListVo
implements
Serializable
{
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema
(
description
=
" 投保类型, 1新增、3批增、4替换"
)
private
Integer
buyType
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 医疗额度
*/
@Schema
(
description
=
"医疗额度"
)
private
String
medicalQuota
;
/**
* 身故或残疾额度
*/
@Schema
(
description
=
"身故或残疾额度"
)
private
String
dieDisableQuota
;
/**
* 创建人姓名
*/
@Schema
(
description
=
"创建人(派单人)"
)
private
String
createName
;
/**
* 创建人部门名称
*/
@Schema
(
description
=
"创建人部门名称(派单人)"
)
private
String
createUserDeptName
;
/**
* 创建时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
/**
* 投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema
(
description
=
"投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员"
)
private
Integer
buyHandleStatus
;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回,4减员成功"
)
private
Integer
reduceHandleStatus
;
/**
* 减员ID
*/
@Schema
(
description
=
"减员ID"
)
private
Integer
refundId
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredOrderParam.java
0 → 100644
View file @
325e1916
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author zhaji
* @description 订单商险列表查询
* @date 2022-08-29 14:44:25
*/
@Data
@Tag
(
name
=
"订单商险列表查询"
)
public
class
InsuredOrderParam
implements
Serializable
{
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 开始日期
*/
@Schema
(
description
=
"开始日期"
)
private
String
startDate
;
/**
* 结束日期
*/
@Schema
(
description
=
"结束日期"
)
private
String
endDate
;
/**
* 项目编码列表
*/
@Schema
(
description
=
"项目编码列表"
)
private
List
<
String
>
deptNoList
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
325e1916
...
...
@@ -526,47 +526,47 @@ public class TInsuranceDetailController {
}
/**
* 商险新增
*
订单
商险新增
*
* @author zhaji
* @param paramList
* @return {@link R<List<InsuranceAddParam>>}
*/
@Operation
(
summary
=
"
投保新增"
,
description
=
"投保
新增"
)
@Operation
(
summary
=
"
订单商险新增"
,
description
=
"订单商险
新增"
)
@PostMapping
(
"/addOrderInsurance"
)
public
R
<
List
<
InsuranceAddParam
>>
addOrderInsurance
(
@RequestBody
InsuranceListOrderParam
paramList
){
return
tInsuranceDetailService
.
addOrderInsurance
(
paramList
);
}
/**
* 商险批增
*
订单
商险批增
*
* @author zhaji
* @param paramList
* @return {@link R<List<InsuranceBatchParam>>}
*/
@Operation
(
summary
=
"
投保批增"
,
description
=
"投保
批增"
)
@Operation
(
summary
=
"
订单商险批增"
,
description
=
"订单商险
批增"
)
@PostMapping
(
"/batchOrderInsurance"
)
public
R
<
List
<
InsuranceBatchParam
>>
batchOrderInsurance
(
@RequestBody
InsuranceOrderBatchParam
paramList
){
return
tInsuranceDetailService
.
batchOrderInsurance
(
paramList
);
}
/**
* 商险替换
*
订单
商险替换
*
* @author zhaji
* @param paramList
* @return {@link R<List<InsuranceReplaceParam>>}
*/
@Operation
(
summary
=
"
投保替换"
,
description
=
"投保
替换"
)
@Operation
(
summary
=
"
订单商险替换"
,
description
=
"订单商险
替换"
)
@PostMapping
(
"/replaceOrderInsurance"
)
public
R
<
List
<
InsuranceReplaceParam
>>
replaceOrderInsurance
(
@RequestBody
InsuranceOrderReplaceParam
paramList
){
return
tInsuranceDetailService
.
replaceOrderInsurance
(
paramList
);
}
/**
*
导入减员校验
* @param paramList
导入减员校验
*
订单商险减员
* @param paramList
订单商险减员
* @author zhaji
* @date 2022-07-19
* @since v1.0
...
...
@@ -576,5 +576,19 @@ public class TInsuranceDetailController {
return
tInsuranceDetailService
.
refundOrderInsurance
(
paramList
);
}
/**
* 订单商险列表查询
*
* @author zhaji
* @param page 分页参数
* @param param 查询条件
* @return {@link R<IPage<InsuredListVo>>}
*/
@Operation
(
summary
=
"订单商险列表查询"
,
description
=
"订单商险列表查询"
)
@PostMapping
(
"/getOrderInsuredListPage"
)
public
R
getOrderInsuredListPage
(
Page
<
InsuredOrderListVo
>
page
,
@RequestBody
InsuredOrderParam
param
)
{
return
tInsuranceDetailService
.
getOrderInsuredListPage
(
page
,
param
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
325e1916
...
...
@@ -204,15 +204,37 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @param empIdcardNo
* @return {@link List< TInsuranceDetail>}
*/
List
<
TInsuranceDetail
>
selectListBy
e
mpIdcardNo
(
String
empIdcardNo
);
List
<
TInsuranceDetail
>
selectListBy
E
mpIdcardNo
(
String
empIdcardNo
);
/**
* 查数据是否存在权限范围内
*
* @author zhaji
* @param regionS
QL
* @param regionS
ql
* @param id
* @return {@link TInsuranceDetail}
*/
TInsuranceDetail
selectByregionSQL
(
@Param
(
"regionSql"
)
String
regionSQL
,
@Param
(
"id"
)
String
id
);
TInsuranceDetail
selectByRegionSql
(
@Param
(
"regionSql"
)
String
regionSql
,
@Param
(
"id"
)
String
id
);
/**
* 商险订单投保列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
IPage
<
InsuredOrderListVo
>
getOrderInsuredListPage
(
Page
<
InsuredOrderListVo
>
page
,
@Param
(
"param"
)
InsuredOrderParam
param
);
/**
* 商险订单减员列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
IPage
<
InsuredOrderListVo
>
getOrderRefundInsuredListPage
(
Page
<
InsuredOrderListVo
>
page
,
@Param
(
"param"
)
InsuredOrderParam
param
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceDetailService.java
View file @
325e1916
...
...
@@ -383,4 +383,16 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
R
<
List
<
InsuranceReplaceParam
>>
replaceOrderInsurance
(
InsuranceOrderReplaceParam
paramList
);
R
refundOrderInsurance
(
InsuranceOrderRefundParam
paramList
);
/**
* 订单商险列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
R
getOrderInsuredListPage
(
Page
<
InsuredOrderListVo
>
page
,
InsuredOrderParam
param
);
SettleVo
getInsuranceDetailSettleStatus
(
String
detailId
,
String
defaultSettleId
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
325e1916
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceEkpServiceImpl.java
View file @
325e1916
...
...
@@ -56,12 +56,14 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
List
<
TInsuranceEkp
>
ekpRefundList
=
this
.
baseMapper
.
getEkpRefundList
();
List
<
TInsuranceEkp
>
failList
=
new
ArrayList
<>();
List
<
TInsuranceEkp
>
successLit
=
new
ArrayList
<>();
SettleVo
settle
=
ekpSettleService
.
getSettle
(
"12345"
);
String
actualStatus
=
settle
.
getActualStatus
();
log
.
info
(
"settle:"
+
settle
.
toString
());
log
.
info
(
"actualStatus:"
+
actualStatus
);
if
(
CollectionUtils
.
isNotEmpty
(
ekpRefundList
)){
for
(
TInsuranceEkp
tInsuranceEkp
:
ekpRefundList
)
{
//结算信息
SettleVo
settleVo
=
tInsuranceDetailService
.
getInsuranceDetailSettleStatus
(
tInsuranceEkp
.
getDetailId
(),
tInsuranceEkp
.
getDefaultSettleId
());
//实缴结算状态
String
actualStatus
=
settleVo
.
getActualStatus
();
//预缴结算状态
String
estimateStatus
=
settleVo
.
getEstimateStatus
();
Integer
pushType
=
tInsuranceEkp
.
getPushType
();
LambdaQueryWrapper
<
TInsuranceSettle
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceEkp
.
getDefaultSettleId
());
...
...
@@ -80,10 +82,6 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}
EKPInteractiveParam
ekpParam
=
new
EKPInteractiveParam
();
BeanCopyUtils
.
copyProperties
(
tInsuranceEkp
,
ekpParam
);
String
detailId
=
ekpParam
.
getDetailId
();
String
defaultSettleId
=
ekpParam
.
getDefaultSettleId
();
//查询当前结算状态
String
status
=
CommonConstants
.
ONE_STRING
;
if
(
actualStatus
.
equals
(
InsurancesConstants
.
SETTLE_ZERO
)){
String
s
=
EKPUtil
.
sendToEKP
(
ekpParam
);
//如果发送成功
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
325e1916
...
...
@@ -57,7 +57,6 @@
<result
property=
"createUserDeptId"
column=
"CREATE_USER_DEPT_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"createUserDeptName"
column=
"CREATE_USER_DEPT_NAME"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,EMP_NAME,
EMP_IDCARD_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
...
...
@@ -138,7 +137,6 @@
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保不分页查询-->
<select
id=
"getInsuranceList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
...
...
@@ -200,7 +198,6 @@
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保办理分页查询-->
<select
id=
"getInsuranceHandleListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
...
...
@@ -261,7 +258,6 @@
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<select
id=
"getInsuranceDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"
>
select
detail.id as id,
...
...
@@ -393,13 +389,11 @@
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<update
id=
"updatePolicyNoBatch"
>
<foreach
collection=
"details"
index=
"index"
item=
"item"
separator=
";"
>
update t_insurance_detail set POLICY_NO = #{item.policyNo} where ID = #{item.id}
</foreach>
</update>
<update
id=
"updateInvoiceNoBatch"
>
<foreach
collection=
"details"
index=
"index"
item=
"item"
separator=
";"
>
update t_insurance_detail set INVOICE_NO = #{item.invoiceNo} where ID = #{item.id}
...
...
@@ -425,6 +419,7 @@
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
from
t_insurance_detail detail
...
...
@@ -582,6 +577,7 @@
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.POLICY_NO as policyNo,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as refundCreateTime
from
t_insurance_detail detail,
...
...
@@ -908,7 +904,7 @@
</where>
ORDER BY CREATE_TIME desc
</select>
<select
id=
"selectListBy
e
mpIdcardNo"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
<select
id=
"selectListBy
E
mpIdcardNo"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
...
...
@@ -924,7 +920,8 @@
</where>
ORDER BY CREATE_TIME desc
</select>
<select
id=
"selectByregionSQL"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
<!--查数据是否存在权限范围内-->
<select
id=
"selectByRegionSql"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
...
...
@@ -937,4 +934,130 @@
</where>
ORDER BY CREATE_TIME desc
</select>
<!--商险订单减员列表查询-->
<select
id=
"getOrderRefundInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"
>
(
select
detail.id as id,
detail.BUY_TYPE as buyType,
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
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.ORDER_NO = #{param.orderNo}
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.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},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, '00:00:00')
</if>
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.deptNoList != null"
>
and detail.DEPT_NO in
<foreach
collection=
"param.deptNoList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
)
union all(
select
detail.id as id,
detail.BUY_TYPE as buyType,
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,
refund.CREATE_NAME as createName,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as createTime,
detail.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
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},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != ''"
>
AND refund.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, '00:00:00')
</if>
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND refund.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.deptNoList != null"
>
and detail.DEPT_NO in
<foreach
collection=
"param.deptNoList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
)order by createTime desc
</select>
<select
id=
"getOrderInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"
>
select
detail.id as id,
detail.BUY_TYPE as buyType,
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
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.ORDER_NO = #{param.orderNo}
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.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},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, '00:00:00')
</if>
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.deptNoList != null"
>
and detail.DEPT_NO in
<foreach
collection=
"param.deptNoList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</mapper>
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