Commit d3b83d40 authored by huyuchen's avatar huyuchen

商险优化

parent 5c17b101
......@@ -200,4 +200,10 @@ public class RefundExportListVo implements Serializable {
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
}
......@@ -198,6 +198,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
IPage<InsuranceListVO> insuranceList;
insuranceList = baseMapper.getInsuranceListPage(page,param);
// 购买月数
......@@ -224,6 +227,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<InsuranceListVO> insuranceList;
insuranceList = baseMapper.getInsuranceList(param);
// 购买月数
......@@ -266,6 +272,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
Integer buyHandleStatus = param.getBuyHandleStatus();
if(buyHandleStatus == CommonConstants.TWO_INT || buyHandleStatus == CommonConstants.THREE_INT){
param.setUpdateBy(user.getId());
......@@ -895,6 +904,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<InsuranceExportListVO> insuranceExportList;
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){
......@@ -3369,6 +3381,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
IPage<InsuredListVo> insuranceList;
insuranceList = this.baseMapper.getInsuredListPage(page, param);
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
......@@ -3393,6 +3408,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
YifuUser user = SecurityUtils.getUser();
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<InsuredListVo> insuredList;
insuredList = this.baseMapper.getInsuredList(param);
if (CollectionUtils.isNotEmpty(insuredList)){
......@@ -3441,6 +3459,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
IPage<InsuranceRefundListVo> insuranceRefundPageList = this.baseMapper.getInsuranceRefundPageList(page, param);
if (CollectionUtils.isNotEmpty(insuranceRefundPageList.getRecords())){
//根据项目编码获取项目名称
......@@ -3468,6 +3489,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
YifuUser user = SecurityUtils.getUser();
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<InsuranceRefundListVo> insuranceRefundList = this.baseMapper.getInsuranceRefundList(param);
if (CollectionUtils.isNotEmpty(insuranceRefundList)){
if(insuranceRefundList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
......@@ -3510,6 +3534,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
String id = user.getId();
Integer reduceHandleStatus = param.getReduceHandleStatus();
if(null != reduceHandleStatus && reduceHandleStatus != CommonConstants.ONE_INT){
......@@ -3543,6 +3570,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<RefundExportListVo> refundExportList;
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){
......
......@@ -103,9 +103,6 @@
a.REDUCE_HANDLE_STATUS as reduceHandleStatus,
a.CREATE_TIME as createTime
from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
</if>
where a.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO = #{param.deptNo}
......@@ -149,7 +146,6 @@
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY a.BUY_HANDLE_STATUS,a.CREATE_TIME DESC
</select>
<!--投保不分页查询-->
......@@ -175,9 +171,6 @@
if(a.BUY_HANDLE_STATUS=4,a.BACK_REMARK,'') as backRemark,
a.CREATE_TIME as createTime
from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
</if>
where a.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO = #{param.deptNo}
......@@ -218,7 +211,6 @@
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY a.BUY_HANDLE_STATUS,a.CREATE_TIME DESC
</select>
<!--投保办理分页查询-->
......@@ -240,9 +232,6 @@
a.SETTLE_MONTH as settleMonth,
a.DEPT_NAME as projectName
from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
</if>
where a.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO = #{param.deptNo}
......@@ -283,7 +272,6 @@
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY a.BUY_HANDLE_STATUS,a.CREATE_TIME DESC
</select>
<!--通过id查询商险信息-->
......@@ -394,9 +382,6 @@
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 p.USER_ID = #{param.createBy}
</if>
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = 1
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
......@@ -422,7 +407,6 @@
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY a.CREATE_TIME DESC
</select>
<!--批量更新保单号-->
......@@ -464,9 +448,6 @@
a.CREATE_NAME as createName
from
t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
</if>
where
a.DELETE_FLAG = 0
and
......@@ -561,9 +542,6 @@
a.CREATE_NAME as createName
from
t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
</if>
where
a.DELETE_FLAG = 0
and
......@@ -623,7 +601,6 @@
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY a.CREATE_TIME DESC
</select>
<!-- 已减员列表分页查询-->
......@@ -644,11 +621,8 @@
refund.CREATE_TIME as refundCreateTime,
a.CREATE_TIME as createTime
from
(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 p.USER_ID = #{param.createBy}
</if>
t_insurance_detail a,
t_insurance_refund refund
where
a.DELETE_FLAG = 0
and
......@@ -695,7 +669,6 @@
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY refund.CREATE_TIME DESC,a.ID ASC
</select>
<!-- 已减员列表不分页查询-->
......@@ -722,11 +695,8 @@
a.CREATE_NAME as createName,
refund.CREATE_TIME as refundCreateTime
from
(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 p.USER_ID = #{param.createBy}
</if>
t_insurance_detail a,
t_insurance_refund refund
where
a.REFUND_ID = refund.ID
and
......@@ -773,7 +743,6 @@
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY refund.CREATE_TIME DESC
</select>
<!-- 减员办理列表分页查询-->
......@@ -803,9 +772,6 @@
from
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 p.USER_ID = #{param.createBy}
</if>
where
a.REFUND_ID = refund.ID
<if test="param.empName != null and param.empName.trim() != ''">
......@@ -841,7 +807,6 @@
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY refund.CREATE_TIME DESC,a.ID ASC
</select>
<!-- 查询保单列表-->
......@@ -910,12 +875,15 @@
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,
refund.CREATE_NAME as createName,
a.REDUCE_HANDLE_STATUS as reduceHandleStatus,
a.REMARK as remark
refund.REMARK as remark
from
t_insurance_detail a
t_insurance_detail a,
t_insurance_refund refund
where
a.REFUND_ID = refund.ID AND
a.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
......@@ -945,14 +913,14 @@
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
refund.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
refund.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 p.USER_ID = #{param.createBy}
</if>
t_insurance_detail a,
t_insurance_refund refund
where
a.REFUND_ID = refund.ID and
a.DELETE_FLAG = 0 and a.REDUCE_HANDLE_STATUS = 1
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
......@@ -972,7 +940,6 @@
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY a.CREATE_TIME DESC
</select>
<!-- 减员办理-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment