Commit e0c7174e authored by fangxinjiang's avatar fangxinjiang

商险到期调整

parent f6c67073
...@@ -302,14 +302,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -302,14 +302,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/ **/
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page,
@Param("param")InsuranceSearchVo param, @Param("param")InsuranceSearchVo param,
@Param("domains")List<TSettleDomainSelectVo> domains); @Param("domains")List<String> domains);
List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo, List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<TSettleDomainSelectVo> domains); @Param("domains")List<String> idList);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo, List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<TSettleDomainSelectVo> listSelectVO); @Param("domains")List<String> idList);
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO); int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<String> idList);
void batchexpireIgnore(@Param("idList")List<String> idList); void batchexpireIgnore(@Param("idList")List<String> idList);
} }
...@@ -7642,7 +7642,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7642,7 +7642,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
condition.setInsuranceCitys(citys); condition.setInsuranceCitys(citys);
} }
IPage<TBusinessInsuranceVo> recordsPage = new Page<>(); IPage<TBusinessInsuranceVo> recordsPage = new Page<>();
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,null));
int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize(); int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize();
int limitEnd = (int)page.getSize(); int limitEnd = (int)page.getSize();
condition.setLimitStart(limitStart); condition.setLimitStart(limitStart);
...@@ -7651,9 +7650,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7651,9 +7650,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
recordsPage.setPages(page.getPages()); recordsPage.setPages(page.getPages());
recordsPage.setSize(page.getSize()); recordsPage.setSize(page.getSize());
recordsPage.setCurrent(page.getCurrent()); recordsPage.setCurrent(page.getCurrent());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())) { if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData()) && Common.isNotNull(sdRes.getData().getDeptIds())) {
recordsPage.setRecords(baseMapper.pageDiy(condition, sdRes.getData().getListSelectVO())); recordsPage.setTotal(baseMapper.noPageCountDiy(condition,sdRes.getData().getDeptIds()));
recordsPage.setRecords(baseMapper.pageDiy(condition, sdRes.getData().getDeptIds()));
}else { }else {
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,null));
recordsPage.setRecords(baseMapper.pageDiy(condition, null)); recordsPage.setRecords(baseMapper.pageDiy(condition, null));
} }
return recordsPage; return recordsPage;
...@@ -7932,18 +7933,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7932,18 +7933,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) { private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) {
List<TSettleDomainSelectVo> listSelectVO =null; List<String> domainIds = getExportCondition(searchVo);
listSelectVO = getExportCondition(searchVo, listSelectVO); return baseMapper.noPageDiy(searchVo,domainIds);
return baseMapper.noPageDiy(searchVo,listSelectVO);
} }
private int noPageCountDiy(InsuranceSearchVo searchVo) { private int noPageCountDiy(InsuranceSearchVo searchVo) {
List<TSettleDomainSelectVo> listSelectVO =null; List<String> domainIds = getExportCondition(searchVo);
listSelectVO = getExportCondition(searchVo, listSelectVO); return baseMapper.noPageCountDiy(searchVo,domainIds);
return baseMapper.noPageCountDiy(searchVo,listSelectVO);
} }
private List<TSettleDomainSelectVo> getExportCondition(InsuranceSearchVo searchVo, List<TSettleDomainSelectVo> listSelectVO) { private List<String> getExportCondition(InsuranceSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
R<TSettleDomainListVo > sdRes = archivesDaprUtil.getPermissionByUserId(user.getId()); R<TSettleDomainListVo > sdRes = archivesDaprUtil.getPermissionByUserId(user.getId());
List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda() List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda()
...@@ -7963,15 +7962,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7963,15 +7962,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
searchVo.setCreateBy(SecurityUtils.getUser().getId()); searchVo.setCreateBy(SecurityUtils.getUser().getId());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())){ if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())){
listSelectVO = sdRes.getData().getListSelectVO(); return sdRes.getData().getDeptIds();
} }
return listSelectVO; return null;
} }
@Override @Override
public R<Integer> getExpireInsuranceWarn() { public R<Integer> getExpireInsuranceWarn() {
InsuranceSearchVo searchVo = new InsuranceSearchVo(); InsuranceSearchVo searchVo = new InsuranceSearchVo();
List<TSettleDomainSelectVo> listSelectVO =null; List<String> domainIds = getExportCondition(searchVo);
listSelectVO = getExportCondition(searchVo, listSelectVO); return R.ok(baseMapper.noPageCountDiy(searchVo,domainIds));
return R.ok(baseMapper.noPageCountDiy(searchVo,listSelectVO));
} }
} }
...@@ -1786,16 +1786,14 @@ ...@@ -1786,16 +1786,14 @@
) )
</if> </if>
</if>--> </if>-->
<if test="param != null"> <!--数据权限判断-->
<!--数据权限判断--> or a.CREATE_BY = #{param.createBy}
or a.CREATE_BY = #{param.createBy} <if test="domains != null">
<if test="domains != null"> <if test="domains.size() > 0">
<if test="domains.size() > 0"> or a.DEPT_ID in
or a.SETTLEMENT_ORGAN in <foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=","> #{param}
#{param} </foreach>
</foreach>
</if>
</if> </if>
</if> </if>
) )
...@@ -1804,7 +1802,7 @@ ...@@ -1804,7 +1802,7 @@
<!--数据权限判断--> <!--数据权限判断-->
<if test="domains != null"> <if test="domains != null">
<if test="domains.size() > 0"> <if test="domains.size() > 0">
or a.SETTLEMENT_ORGAN in or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=","> <foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param} #{param}
</foreach> </foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment