Commit e0c7174e authored by fangxinjiang's avatar fangxinjiang

商险到期调整

parent f6c67073
......@@ -302,14 +302,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page,
@Param("param")InsuranceSearchVo param,
@Param("domains")List<TSettleDomainSelectVo> domains);
@Param("domains")List<String> domains);
List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<TSettleDomainSelectVo> domains);
@Param("domains")List<String> idList);
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);
}
......@@ -7642,7 +7642,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
condition.setInsuranceCitys(citys);
}
IPage<TBusinessInsuranceVo> recordsPage = new Page<>();
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,null));
int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize();
int limitEnd = (int)page.getSize();
condition.setLimitStart(limitStart);
......@@ -7651,9 +7650,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
recordsPage.setPages(page.getPages());
recordsPage.setSize(page.getSize());
recordsPage.setCurrent(page.getCurrent());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())) {
recordsPage.setRecords(baseMapper.pageDiy(condition, sdRes.getData().getListSelectVO()));
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData()) && Common.isNotNull(sdRes.getData().getDeptIds())) {
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,sdRes.getData().getDeptIds()));
recordsPage.setRecords(baseMapper.pageDiy(condition, sdRes.getData().getDeptIds()));
}else {
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,null));
recordsPage.setRecords(baseMapper.pageDiy(condition, null));
}
return recordsPage;
......@@ -7932,18 +7933,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) {
List<TSettleDomainSelectVo> listSelectVO =null;
listSelectVO = getExportCondition(searchVo, listSelectVO);
return baseMapper.noPageDiy(searchVo,listSelectVO);
List<String> domainIds = getExportCondition(searchVo);
return baseMapper.noPageDiy(searchVo,domainIds);
}
private int noPageCountDiy(InsuranceSearchVo searchVo) {
List<TSettleDomainSelectVo> listSelectVO =null;
listSelectVO = getExportCondition(searchVo, listSelectVO);
return baseMapper.noPageCountDiy(searchVo,listSelectVO);
List<String> domainIds = getExportCondition(searchVo);
return baseMapper.noPageCountDiy(searchVo,domainIds);
}
private List<TSettleDomainSelectVo> getExportCondition(InsuranceSearchVo searchVo, List<TSettleDomainSelectVo> listSelectVO) {
private List<String> getExportCondition(InsuranceSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
R<TSettleDomainListVo > sdRes = archivesDaprUtil.getPermissionByUserId(user.getId());
List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda()
......@@ -7963,15 +7962,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
searchVo.setCreateBy(SecurityUtils.getUser().getId());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())){
listSelectVO = sdRes.getData().getListSelectVO();
return sdRes.getData().getDeptIds();
}
return listSelectVO;
return null;
}
@Override
public R<Integer> getExpireInsuranceWarn() {
InsuranceSearchVo searchVo = new InsuranceSearchVo();
List<TSettleDomainSelectVo> listSelectVO =null;
listSelectVO = getExportCondition(searchVo, listSelectVO);
return R.ok(baseMapper.noPageCountDiy(searchVo,listSelectVO));
List<String> domainIds = getExportCondition(searchVo);
return R.ok(baseMapper.noPageCountDiy(searchVo,domainIds));
}
}
......@@ -1786,25 +1786,23 @@
)
</if>
</if>-->
<if test="param != null">
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<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=",">
#{param}
</foreach>
</if>
</if>
</if>
)
</if>
<if test="param == null">
<!--数据权限判断-->
<if test="domains != null">
<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=",">
#{param}
</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