| | |
| | | import io.swagger.annotations.*; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-07 |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入information") |
| | | public R<IPage<Information>> list(@ApiIgnore @RequestParam Map<String, Object> information , Query query) { |
| | | public R<IPage<Information>> list(@ApiIgnore @RequestParam Map<String, Object> information, Query query) { |
| | | IPage<Information> pages = informationService.page(Condition.getPage(query), Condition.getQueryWrapper(information, Information.class)); |
| | | return R.data(pages); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 首页保安公司统计接口 |
| | | * |
| | | * @return |
| | | */ |
| | | @PostMapping("/SelectCount") |
| | | public R SelectCount() { |
| | | String name="分局"; |
| | | List<Map<Object, String>> list = iDeptService.selectCount(name); |
| | | List<Map<Object, String>> list = iDeptService.selectCount(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | for (int i=0;i<list.size();i++){ |
| | | for (int i = 0; i < list.size(); i++) { |
| | | String title = list.get(i).get("title");//部门名称 |
| | | String departmentid = String.valueOf(list.get(i).get("jurisdiction"));//部门id |
| | | String departmentid = String.valueOf(list.get(i).get("jurisdiction"));//部门id |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Map maps = informationService.selectCount(departmentid); |
| | | map.put("name",title); |
| | | map.put("server",maps); |
| | | map.put("name", title); |
| | | map.put("server", maps); |
| | | lists.add(map); |
| | | } |
| | | return R.data(lists); |
| | |
| | | |
| | | /** |
| | | * 首页保安持证统计接口 |
| | | * |
| | | * @return |
| | | */ |
| | | @PostMapping("/SelectCounthold") |
| | | public R SelectCounthold() { |
| | | String name="分局"; |
| | | List<Map<Object, String>> list = iDeptService.selectCount(name); |
| | | List<Map<Object, String>> list = iDeptService.selectCount(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | for (int i=0;i<list.size();i++){ |
| | | int cznumber=0;//总的持证数量 |
| | | int wcznumber=0;//总的未持证数量 |
| | | for (int i = 0; i < list.size(); i++) { |
| | | int cznumber = 0;//总的持证数量 |
| | | int wcznumber = 0;//总的未持证数量 |
| | | String title = list.get(i).get("title");//部门名称 |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Map<Object, Integer> objectStringMap = iDeptService.selectHold(String.valueOf(list.get(i).get("jurisdiction"))); |
| | | cznumber=objectStringMap.get("cz");; |
| | | wcznumber=objectStringMap.get("wcz");; |
| | | map.put("name",title); |
| | | map.put("cz",cznumber); |
| | | map.put("wcz",wcznumber); |
| | | lists.add(map); |
| | | if (objectStringMap==null) { |
| | | map.put("name", title); |
| | | map.put("cz", cznumber); |
| | | map.put("wcz", wcznumber); |
| | | lists.add(map); |
| | | } |
| | | else { |
| | | cznumber = objectStringMap.get("cz"); |
| | | wcznumber = objectStringMap.get("wcz"); |
| | | map.put("name", title); |
| | | map.put("cz", cznumber); |
| | | map.put("wcz", wcznumber); |
| | | lists.add(map); |
| | | } |
| | | } |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | /** |
| | | *统计保安公司未持证的保安的公司数量 |
| | | * 统计保安公司未持证的保安的公司数量 |
| | | */ |
| | | @PostMapping("/selectInCount") |
| | | public R selectInCount() { |
| | |
| | | |
| | | |
| | | /** |
| | | *管辖区域下拉 |
| | | * 管辖区域下拉 |
| | | */ |
| | | @PostMapping("/selecttree") |
| | | public R selecttree() { |
| | | String name="分局"; |
| | | List<Map<Object, String>> maps = iDeptService.selectCount(name); |
| | | List<Map<Object, String>> maps = iDeptService.selectCount(); |
| | | return R.data(maps); |
| | | } |
| | | |