| | |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | queryWrapper.selectAs(UnionApply::getCode,UnionChange::getApplyCode); |
| | | queryWrapper.selectAs(Solutions::getName,UnionChange::getSolutionsName) |
| | | .select(" (select c.NAME from insurance_apply i left join company c on i.COMPANY_ID = c.id where i.UNION_APPLY_ID = t.UNION_APPLY_ID limit 1 ) ",UnionApply::getCompanyName) |
| | | .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 0 )",UnionChange::getAddNum) |
| | | .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 1 )",UnionChange::getDelNum) |
| | | .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 2 )",UnionChange::getChangeNum); |
| | | queryWrapper.leftJoin(UnionApply.class,UnionApply::getId,UnionChange::getUnionApplyId); |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,UnionApply::getCompanyId); |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(Constants.equalsInteger(user.getType(),Constants.TWO)){ |
| | | queryWrapper.eq(UnionChange::getShopId, user.getCompanyId()); |