| | |
| | | @ApiOperation(value = "新增", notes = "传入information") |
| | | public R save(@Valid @RequestBody Information information) { |
| | | Dept dept= new Dept(); |
| | | Long i = 1413470343230877697L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | | dept.setDeptName(information.getEnterprisename()); |
| | | dept.setAncestors("0,1413470343230877697"); |
| | | dept.setDeptCategory(1); |
| | | String departmentid = information.getDepartmentid(); |
| | | Long l=Long.parseLong(departmentid); |
| | | //自招保安公司 |
| | | if(information.getStats().equals("0")){ |
| | | Long i = 1420222768149966850L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | | dept.setDeptName(information.getEnterprisename()); |
| | | dept.setAncestors("0,1420222768149966850"); |
| | | dept.setDeptCategory(1); |
| | | } |
| | | //保安培训公司 |
| | | if(information.getStats().equals("1")){ |
| | | Long i = 1418458374477549569L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | | dept.setDeptName(information.getEnterprisename()); |
| | | dept.setAncestors("0,1418458374477549569"); |
| | | dept.setDeptCategory(1); |
| | | |
| | | } |
| | | //保安服务公司 |
| | | if(information.getStats().equals("2")){ |
| | | Long i = 1413470343230877697L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | | dept.setDeptName(information.getEnterprisename()); |
| | | dept.setAncestors("0,1413470343230877697"); |
| | | dept.setDeptCategory(1); |
| | | } |
| | | //武装守押公司 |
| | | if(information.getStats().equals("3")){ |
| | | Long i = 1420222961377357825L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | | dept.setDeptName(information.getEnterprisename()); |
| | | dept.setAncestors("0,1420222961377357825"); |
| | | dept.setDeptCategory(1); |
| | | } |
| | | dept.setId(l); |
| | | if (iDeptService.submit(dept)) { |
| | | CacheUtil.clear(SYS_CACHE); |
| | | // 返回懒加载树更新节点所需字段 |
| | |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(String creditcode) { |
| | | informationService.deleteIn(creditcode); |
| | | informationService.deleteSh(creditcode); |
| | | informationService.deleteMe(creditcode); |
| | | public R remove(String ids) { |
| | | informationService.deleteIn(ids); |
| | | informationService.deleteSh(ids); |
| | | informationService.deleteMe(ids); |
| | | return R.success("删除成功"); |
| | | } |
| | | |
| | |
| | | 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"))); |
| | | Map<Object, Object> objectStringMap = iDeptService.selectHold(String.valueOf(list.get(i).get("jurisdiction"))); |
| | | if (objectStringMap==null) { |
| | | map.put("name", title); |
| | | map.put("cz", cznumber); |
| | |
| | | lists.add(map); |
| | | } |
| | | else { |
| | | cznumber = objectStringMap.get("cz"); |
| | | wcznumber = objectStringMap.get("wcz"); |
| | | String cz = objectStringMap.get("cz").toString(); |
| | | cznumber = Integer.valueOf(cz); |
| | | String wcz = objectStringMap.get("wcz").toString(); |
| | | wcznumber = Integer.valueOf(wcz); |
| | | map.put("name", title); |
| | | map.put("cz", cznumber); |
| | | map.put("wcz", wcznumber); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询本年所有月份社保金额 |
| | | * 查询本年所有月份社保金额(公司经济运营趋势) |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryYearAn") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 统计保安员资格异常的数量 |
| | | * @param jurisdiction |
| | | * @param deptid |
| | | * @param type 1:当天 2:当月 3:全部 |
| | | * @return |
| | | */ |
| | | @PostMapping("/selectExtype") |
| | | public R selectExtype(String jurisdiction,String deptid) { |
| | | public R selectExtype(String jurisdiction,String deptid,String type) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Integer count=0; |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | List<Map<Object, Object>> maps = informationService.selectExtype(jurisdiction, deptid); |
| | | List<Map<Object, Object>> maps = informationService.selectExtype(jurisdiction, deptid,type); |
| | | for (int i=0;i<maps.size();i++){ |
| | | String num = maps.get(i).get("num").toString(); |
| | | count+= Integer.valueOf(num); |
| | |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 统计保安员表现差的数量 |
| | | * @param jurisdiction |
| | | * @param deptid |
| | | * @param type 1:当天 2:当月 3:全部 |
| | | * @return |
| | | */ |
| | | @PostMapping("/selectBx") |
| | | public R selectBx(String jurisdiction,String deptid) { |
| | | public R selectBx(String jurisdiction,String deptid,String type) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Integer count=0; |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | List<Map<Object, Object>> maps = informationService.selectBx(jurisdiction, deptid); |
| | | List<Map<Object, Object>> maps = informationService.selectBx(jurisdiction, deptid,type); |
| | | for (int i=0;i<maps.size();i++){ |
| | | String num = maps.get(i).get("num").toString(); |
| | | count+= Integer.valueOf(num); |
| | |
| | | //辖区名称 |
| | | String jurname = list.get(i).get("dept_name").toString(); |
| | | //保安员表现差预警数量 |
| | | List<Map<Object, Object>> mapbx = informationService.selectBx(jurisdiction, ""); |
| | | List<Map<Object, Object>> mapbx = informationService.selectBx(jurisdiction, "",""); |
| | | for (int ibx=0;ibx<mapbx.size();ibx++){ |
| | | String num = mapbx.get(ibx).get("num").toString(); |
| | | count+= Integer.valueOf(num); |
| | | } |
| | | //保安员资格异常的数量 |
| | | List<Map<Object, Object>> mapEx = informationService.selectExtype(jurisdiction, ""); |
| | | List<Map<Object, Object>> mapEx = informationService.selectExtype(jurisdiction, "",""); |
| | | for (int iex=0;iex<mapEx.size();iex++){ |
| | | String num = mapEx.get(iex).get("num").toString(); |
| | | count+= Integer.valueOf(num); |
| | |
| | | List<Map<Object, Object>> maps = informationService.selectIn(jurisdiction); |
| | | return R.data(maps); |
| | | } |
| | | |
| | | /** |
| | | * 单位删除 |
| | | */ |
| | | @PostMapping("/deleteDept") |
| | | public R deleteDept(String ids) { |
| | | informationService.deleteDept(ids); |
| | | return R.success("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 保安员统计 |
| | | */ |
| | | @PostMapping("/selectLi") |
| | | public R selectLi(String jurisdiction,String deptid) { |
| | | List<Map<Object, Object>> list = informationService.selectLi(jurisdiction, deptid); |
| | | return R.data(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 单位类型统计 |
| | | */ |
| | | @PostMapping("/seCountI") |
| | | public R seCountI(String jurisdiction,String deptid) { |
| | | List<Map<Object, Object>> list = informationService.seCountI(jurisdiction, deptid); |
| | | return R.data(list); |
| | | } |
| | | |
| | | /** |
| | | * 保安在职男女数量 |
| | | */ |
| | | @PostMapping("/seCountUg") |
| | | public R seCountUg(String jurisdiction,String deptid) { |
| | | String mnum = informationService.seCountUm(jurisdiction, deptid); |
| | | String gnum = informationService.seCountUg(jurisdiction, deptid); |
| | | Map map = new HashMap(); |
| | | map.put("mnum",mnum); |
| | | map.put("gnum",gnum); |
| | | List list = new ArrayList(); |
| | | list.add(map); |
| | | return R.data(list); |
| | | } |
| | | |
| | | } |