forked from integrated_whb/integrated_whb
				
			允许进入部门,允许进入人员
							parent
							
								
									6ce8b6669e
								
							
						
					
					
						commit
						752b0e1300
					
				| 
						 | 
				
			
			@ -169,6 +169,7 @@ public class MapSettingController extends BaseController {
 | 
			
		|||
        }
 | 
			
		||||
        return returnMap;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @Description: 路径规划批量删除
 | 
			
		||||
     * @Author: dearLin
 | 
			
		||||
| 
						 | 
				
			
			@ -189,4 +190,7 @@ public class MapSettingController extends BaseController {
 | 
			
		|||
        }
 | 
			
		||||
        return returnMap;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -100,7 +100,7 @@ public class PositAlarmController extends BaseController {
 | 
			
		|||
    public ReturnMap otherRegionList(Page page) throws Exception {
 | 
			
		||||
        PageData pageData = this.getPageData();
 | 
			
		||||
        ReturnMap returnMap = new ReturnMap();
 | 
			
		||||
        JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")),Integer.parseInt(pageData.getString("type")));
 | 
			
		||||
        JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), Integer.parseInt(pageData.getString("type")));
 | 
			
		||||
        if (body != null) {
 | 
			
		||||
            returnMap.putAll(body);
 | 
			
		||||
            page.setTotalResult(body.getIntValue("total"));
 | 
			
		||||
| 
						 | 
				
			
			@ -165,6 +165,7 @@ public class PositAlarmController extends BaseController {
 | 
			
		|||
        }
 | 
			
		||||
        return returnMap;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @Description: 确认选点 /region/region/redrawTheArea
 | 
			
		||||
     * @Author: dearLin
 | 
			
		||||
| 
						 | 
				
			
			@ -185,6 +186,7 @@ public class PositAlarmController extends BaseController {
 | 
			
		|||
        }
 | 
			
		||||
        return returnMap;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @Description: 确认选点 /region/region/redrawTheArea
 | 
			
		||||
     * @Author: dearLin
 | 
			
		||||
| 
						 | 
				
			
			@ -418,6 +420,7 @@ public class PositAlarmController extends BaseController {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    /* 聚集概览 */
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @Description: 聚集告警趋势统计
 | 
			
		||||
     * @Author: dearLin
 | 
			
		||||
| 
						 | 
				
			
			@ -437,6 +440,7 @@ public class PositAlarmController extends BaseController {
 | 
			
		|||
        }
 | 
			
		||||
        return returnMap;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @Description: 根据告警区域进行聚集数据统计
 | 
			
		||||
     * @Author: dearLin
 | 
			
		||||
| 
						 | 
				
			
			@ -474,4 +478,35 @@ public class PositAlarmController extends BaseController {
 | 
			
		|||
        }
 | 
			
		||||
        return returnMap;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    //串岗告警参数
 | 
			
		||||
    //允许进入人员
 | 
			
		||||
    @RequestMapping(value = "/getPsnInfo")
 | 
			
		||||
    @ResponseBody
 | 
			
		||||
    public ReturnMap getPsnInfo() throws Exception {
 | 
			
		||||
        PageData pageData = this.getPageData();
 | 
			
		||||
        ReturnMap returnMap = new ReturnMap();
 | 
			
		||||
        JSONObject body = PLSUtil.GeneralList("/deploy/psnmgt/getPsnInfo", pageData);
 | 
			
		||||
        if (body != null) {
 | 
			
		||||
            returnMap.putAll(body);
 | 
			
		||||
        }
 | 
			
		||||
        return returnMap;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // 允许进入部门
 | 
			
		||||
    ///deploy/dept/list
 | 
			
		||||
    @RequestMapping(value = "/getDeptList")
 | 
			
		||||
    @ResponseBody
 | 
			
		||||
    public ReturnMap getDeptList() throws Exception {
 | 
			
		||||
        PageData pageData = this.getPageData();
 | 
			
		||||
        pageData.put("pageNum", 1);
 | 
			
		||||
        pageData.put("pageSize", 9999);
 | 
			
		||||
        ReturnMap returnMap = new ReturnMap();
 | 
			
		||||
        JSONObject body = PLSUtil.GeneralList("/deploy/dept/list", pageData);
 | 
			
		||||
        if (body != null) {
 | 
			
		||||
            returnMap.putAll(body);
 | 
			
		||||
        }
 | 
			
		||||
        return returnMap;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,13 +7,11 @@ import com.zcloud.entity.PageData;
 | 
			
		|||
import com.zcloud.entity.system.Department;
 | 
			
		||||
import com.zcloud.logs.LogAnno;
 | 
			
		||||
import com.zcloud.service.check.ListManagerService;
 | 
			
		||||
import com.zcloud.service.corp.CorpInfoService;
 | 
			
		||||
import com.zcloud.service.system.DepartmentService;
 | 
			
		||||
import com.zcloud.service.system.SupervisionDepartmentService;
 | 
			
		||||
import com.zcloud.service.system.UsersService;
 | 
			
		||||
import com.zcloud.util.DateUtil;
 | 
			
		||||
import com.zcloud.util.Jurisdiction;
 | 
			
		||||
import com.zcloud.util.ObjectExcelView;
 | 
			
		||||
import com.zcloud.util.Tools;
 | 
			
		||||
import com.zcloud.util.*;
 | 
			
		||||
import net.sf.json.JSONArray;
 | 
			
		||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
| 
						 | 
				
			
			@ -37,6 +35,8 @@ public class DepartmentController extends BaseController {
 | 
			
		|||
	@Autowired
 | 
			
		||||
	private DepartmentService departmentService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private CorpInfoService corpInfoService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private UsersService usersService;
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private ListManagerService listManagerService;
 | 
			
		||||
| 
						 | 
				
			
			@ -56,6 +56,21 @@ public class DepartmentController extends BaseController {
 | 
			
		|||
		String errInfo = "success";
 | 
			
		||||
		PageData pd = new PageData();
 | 
			
		||||
		pd = this.getPageData();
 | 
			
		||||
		String corpinfoId = Jurisdiction.getCORPINFO_ID();
 | 
			
		||||
		PageData corpPage = new PageData();
 | 
			
		||||
		corpPage.put("CORPINFO_ID", corpinfoId);
 | 
			
		||||
		PageData corpInfo = corpInfoService.findById(corpPage);
 | 
			
		||||
//		{"deptName":"0226-wx","enterpriseId":4,"staffId":"","deptPhone":"","deptAddress":"","remark":"","deptDuty":""}
 | 
			
		||||
		PageData dept = new PageData();
 | 
			
		||||
		dept.put("deptName", pd.getString("NAME"));
 | 
			
		||||
		dept.put("enterpriseId", corpInfo.get("enterpriseId"));
 | 
			
		||||
		JSONObject body = PLSUtil.GeneralPost("/deploy/dept", dept, corpinfoId);
 | 
			
		||||
		if (body != null) {
 | 
			
		||||
			if (!"200".equals(body.getString("code"))) {
 | 
			
		||||
				return ReturnMap.error("人员定位系统中部门新增失败");
 | 
			
		||||
			}
 | 
			
		||||
			pd.put("deptId", body.getString("deptId"));
 | 
			
		||||
		}
 | 
			
		||||
		pd.put("DEPARTMENT_ID", this.get32UUID());	//主键
 | 
			
		||||
		pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());	//企业
 | 
			
		||||
		departmentService.save(pd);
 | 
			
		||||
| 
						 | 
				
			
			@ -112,6 +127,15 @@ public class DepartmentController extends BaseController {
 | 
			
		|||
			errInfo = "havelist";
 | 
			
		||||
			map.put("msg", "该部门有清单,请先删除清单");					//返回结果
 | 
			
		||||
		}else{
 | 
			
		||||
			PageData dept = new PageData();
 | 
			
		||||
			dept.put("DEPARTMENT_ID",DEPARTMENT_ID);
 | 
			
		||||
			PageData byId = departmentService.findById(dept);
 | 
			
		||||
			JSONObject body = PLSUtil.GeneralDelete("/deploy/dept/", byId.getString("deptId"),Jurisdiction.getCORPINFO_ID());
 | 
			
		||||
			if (body != null) {
 | 
			
		||||
				if (!"200".equals(body.getString("code"))) {
 | 
			
		||||
					return ReturnMap.error(body.getString("msg"));
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			departmentService.delete(pd);			//执行删除
 | 
			
		||||
		}
 | 
			
		||||
		map.put("result", errInfo);					//返回结果
 | 
			
		||||
| 
						 | 
				
			
			@ -131,6 +155,15 @@ public class DepartmentController extends BaseController {
 | 
			
		|||
		String errInfo = "success";
 | 
			
		||||
		PageData pd = new PageData();
 | 
			
		||||
		pd = this.getPageData();
 | 
			
		||||
		PageData sfDeptID = new PageData();
 | 
			
		||||
		sfDeptID.put("deptId", pd.get("deptId"));
 | 
			
		||||
		sfDeptID.put("deptName", pd.get("NAME"));
 | 
			
		||||
		JSONObject body = PLSUtil.GeneralPut("/deploy/dept", sfDeptID, Jurisdiction.getCORPINFO_ID());
 | 
			
		||||
		if (body != null) {
 | 
			
		||||
			if (!"200".equals(body.getString("code"))) {
 | 
			
		||||
				return ReturnMap.error("人员定位系统中部门新增失败");
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		departmentService.edit(pd);
 | 
			
		||||
		// 删除旧的监管单位
 | 
			
		||||
		PageData pd2 = new PageData();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,6 +35,7 @@
 | 
			
		|||
		STATE,
 | 
			
		||||
		checkedIds,
 | 
			
		||||
		FOREIGNPERSONNEL,
 | 
			
		||||
		deptId,
 | 
			
		||||
		DJBM
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -60,6 +61,7 @@
 | 
			
		|||
        #{STATE},
 | 
			
		||||
        #{checkedIds},
 | 
			
		||||
        #{FOREIGNPERSONNEL},
 | 
			
		||||
        #{deptId},
 | 
			
		||||
        #{DJBM}
 | 
			
		||||
    </sql>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -309,6 +311,7 @@
 | 
			
		|||
        f.STATE,
 | 
			
		||||
        f.checkedIds,
 | 
			
		||||
        f.DJBM,
 | 
			
		||||
        f.deptId,
 | 
			
		||||
        s.name as leName,
 | 
			
		||||
        f.DEP_ORDER
 | 
			
		||||
        from OA_DEPARTMENT f
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue