全所统计
This commit is contained in:
+71
@@ -0,0 +1,71 @@
|
||||
package com.jero.home.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.project.entity.PayWorkingGroupStatistics;
|
||||
import com.jero.project.service.IPayWorkingGroupService;
|
||||
import com.jero.statistics.entity.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/24 16:08
|
||||
*/
|
||||
@Api(tags="首页前十统计")
|
||||
@RestController
|
||||
@RequestMapping("/statistics/principalPeople")
|
||||
@Slf4j
|
||||
public class FirstPageStatisticsController {
|
||||
@Autowired
|
||||
private IPayWorkingGroupService payWorkingGroupService;
|
||||
|
||||
@GetMapping(value = "/firstPage")
|
||||
@ApiOperation(value = "首页统计", notes = "首页统计")
|
||||
public Result<?> getFirstPage() {
|
||||
|
||||
List<PrincipalPeopleList> pageList = payWorkingGroupService.queryPageListForPrincipalFirstPage();
|
||||
List<PayWorkingGroupStatistics> pageList2 = payWorkingGroupService.queryPageListForStatisticsFirstPage();
|
||||
List<CompanyComeMoneyList> pageList3 = payWorkingGroupService.queryPageListForCompanyFirstPage();
|
||||
List<DepartStatistics> pageList4 = payWorkingGroupService.queryPageListForDepartFirstPage();
|
||||
ArrayList<PrincipalPeopleList> list = new ArrayList<>();
|
||||
for(PrincipalPeopleList s: pageList){
|
||||
if(!(s.getComeAllMoney()== null || s.getComeAllMoney().equals("")|| s.getComeAllMoney().equals("0") )) {
|
||||
list.add(s);
|
||||
}
|
||||
}
|
||||
ArrayList<PayWorkingGroupStatistics> list2 = new ArrayList<>();
|
||||
for(PayWorkingGroupStatistics s: pageList2){
|
||||
if(!(s.getComeAllMoney()== null || s.getComeAllMoney().equals("")|| s.getComeAllMoney().equals("0") )) {
|
||||
list2.add(s);
|
||||
}
|
||||
}
|
||||
ArrayList<CompanyComeMoneyList> list3 = new ArrayList<>();
|
||||
for(CompanyComeMoneyList s: pageList3){
|
||||
if(!(s.getComeAllMoney()== null || s.getComeAllMoney().equals("")|| s.getComeAllMoney().equals("0") ) ){
|
||||
list3.add(s);
|
||||
}
|
||||
}
|
||||
ArrayList<DepartStatistics> list4 = new ArrayList<>();
|
||||
for(DepartStatistics s: pageList4){
|
||||
if(!(s.getComeAllMoney()== null || s.getComeAllMoney().equals("")|| s.getComeAllMoney().equals("0") ) ){
|
||||
list4.add(s);
|
||||
}
|
||||
}
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("principalPeople",list);
|
||||
hashMap.put("payWorkingGroup",list2);
|
||||
hashMap.put("company",list3);
|
||||
hashMap.put("depart",list4);
|
||||
return Result.OK(hashMap);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user