大数据统计接口

This commit is contained in:
ly19960718 2021-08-27 11:54:20 +08:00
parent 5eab3f9e33
commit 93892c3157
3 changed files with 25 additions and 2 deletions

View File

@ -122,8 +122,15 @@ public class EnterpriseCountController extends AbstractController {
for (UserResourceBO userResourceBO : userList) { for (UserResourceBO userResourceBO : userList) {
userId.add(userResourceBO.getUserId()); userId.add(userResourceBO.getUserId());
} }
List<String> enterpriseIds = eoosService.listEnterpriseIdOfUserIds(userId); if(userId.size() > 0){
params.put("enterpriseIds",enterpriseIds); List<String> enterpriseIds = eoosService.listEnterpriseIdOfUserIds(userId);
params.put("enterpriseIds",enterpriseIds);
}else{
List<String> enterpriseIdNull = new ArrayList<>();
enterpriseIdNull.add("11");
params.put("enterpriseIds",enterpriseIdNull);
}
} }
page.setParams(params); page.setParams(params);

View File

@ -39,6 +39,8 @@ public class enterpriseofgridoperatorCountController extends AbstractController
private IEnterpriseOfGridOperatorService ieoService; private IEnterpriseOfGridOperatorService ieoService;
@Autowired @Autowired
private IGridPersonnelService gridPersonnelService; private IGridPersonnelService gridPersonnelService;
@Autowired
private IEnterpriseOfGridOperatorService eoosService;
@ -90,6 +92,14 @@ public class enterpriseofgridoperatorCountController extends AbstractController
@GetMapping("listpage") @GetMapping("listpage")
public SuccessResultList<List<GridPersonnelDTO>> listPage(ListPage page) throws SearchException, UnsupportedEncodingException { public SuccessResultList<List<GridPersonnelDTO>> listPage(ListPage page) throws SearchException, UnsupportedEncodingException {
Map<String, Object> params = requestParams(); Map<String, Object> params = requestParams();
if(params.get("groupId") != null){
List<String> userId = new ArrayList<>();
List<UserResourceBO> userList = groupService.listUser(params.get("groupId").toString());
for (UserResourceBO userResourceBO : userList) {
userId.add(userResourceBO.getUserId());
}
params.put("groupUserIds",userId);
}
page.setParams(params); page.setParams(params);
return gridPersonnelService.listPage(page); return gridPersonnelService.listPage(page);
} }

View File

@ -264,6 +264,12 @@
t1.user_id = #{userIds[${index}]} t1.user_id = #{userIds[${index}]}
</foreach> </foreach>
</if> </if>
<if test="groupUserIds != null and groupUserIds.size > 0">
AND
<foreach collection="groupUserIds" index="index" open="(" separator="OR" close=")">
t1.user_id = #{groupUserIds[${index}]}
</foreach>
</if>
<if test="level != null"> <if test="level != null">
AND AND
t1.level = #{level} t1.level = #{level}