| | |
| | | @ApiOperation(value = "新增", notes = "传入information") |
| | | public R save(@Valid @RequestBody Information information) { |
| | | Dept dept= new Dept(); |
| | | //自招保安公司 |
| | | 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); |
| | | } |
| | | if (iDeptService.submit(dept)) { |
| | | CacheUtil.clear(SYS_CACHE); |
| | | // 返回懒加载树更新节点所需字段 |
| | |
| | | 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); |