Commit d3b83d40 authored by huyuchen's avatar huyuchen

商险优化

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