允许进入部门,允许进入人员

pull/4/head^2
dearlin 2024-02-26 11:37:49 +08:00
parent 6ce8b6669e
commit 752b0e1300
4 changed files with 80 additions and 5 deletions

View File

@ -169,6 +169,7 @@ public class MapSettingController extends BaseController {
} }
return returnMap; return returnMap;
} }
/** /**
* @Description: * @Description:
* @Author: dearLin * @Author: dearLin
@ -189,4 +190,7 @@ public class MapSettingController extends BaseController {
} }
return returnMap; return returnMap;
} }
} }

View File

@ -165,6 +165,7 @@ public class PositAlarmController extends BaseController {
} }
return returnMap; return returnMap;
} }
/** /**
* @Description: /region/region/redrawTheArea * @Description: /region/region/redrawTheArea
* @Author: dearLin * @Author: dearLin
@ -185,6 +186,7 @@ public class PositAlarmController extends BaseController {
} }
return returnMap; return returnMap;
} }
/** /**
* @Description: /region/region/redrawTheArea * @Description: /region/region/redrawTheArea
* @Author: dearLin * @Author: dearLin
@ -418,6 +420,7 @@ public class PositAlarmController extends BaseController {
} }
/* 聚集概览 */ /* 聚集概览 */
/** /**
* @Description: * @Description:
* @Author: dearLin * @Author: dearLin
@ -437,6 +440,7 @@ public class PositAlarmController extends BaseController {
} }
return returnMap; return returnMap;
} }
/** /**
* @Description: * @Description:
* @Author: dearLin * @Author: dearLin
@ -474,4 +478,35 @@ public class PositAlarmController extends BaseController {
} }
return returnMap; 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;
}
} }

View File

@ -7,13 +7,11 @@ import com.zcloud.entity.PageData;
import com.zcloud.entity.system.Department; import com.zcloud.entity.system.Department;
import com.zcloud.logs.LogAnno; import com.zcloud.logs.LogAnno;
import com.zcloud.service.check.ListManagerService; import com.zcloud.service.check.ListManagerService;
import com.zcloud.service.corp.CorpInfoService;
import com.zcloud.service.system.DepartmentService; import com.zcloud.service.system.DepartmentService;
import com.zcloud.service.system.SupervisionDepartmentService; import com.zcloud.service.system.SupervisionDepartmentService;
import com.zcloud.service.system.UsersService; import com.zcloud.service.system.UsersService;
import com.zcloud.util.DateUtil; import com.zcloud.util.*;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -37,6 +35,8 @@ public class DepartmentController extends BaseController {
@Autowired @Autowired
private DepartmentService departmentService; private DepartmentService departmentService;
@Autowired @Autowired
private CorpInfoService corpInfoService;
@Autowired
private UsersService usersService; private UsersService usersService;
@Autowired @Autowired
private ListManagerService listManagerService; private ListManagerService listManagerService;
@ -56,6 +56,21 @@ public class DepartmentController extends BaseController {
String errInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); 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("DEPARTMENT_ID", this.get32UUID()); //主键
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
departmentService.save(pd); departmentService.save(pd);
@ -112,6 +127,15 @@ public class DepartmentController extends BaseController {
errInfo = "havelist"; errInfo = "havelist";
map.put("msg", "该部门有清单,请先删除清单"); //返回结果 map.put("msg", "该部门有清单,请先删除清单"); //返回结果
}else{ }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); //执行删除 departmentService.delete(pd); //执行删除
} }
map.put("result", errInfo); //返回结果 map.put("result", errInfo); //返回结果
@ -131,6 +155,15 @@ public class DepartmentController extends BaseController {
String errInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); 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); departmentService.edit(pd);
// 删除旧的监管单位 // 删除旧的监管单位
PageData pd2 = new PageData(); PageData pd2 = new PageData();

View File

@ -35,6 +35,7 @@
STATE, STATE,
checkedIds, checkedIds,
FOREIGNPERSONNEL, FOREIGNPERSONNEL,
deptId,
DJBM DJBM
</sql> </sql>
@ -60,6 +61,7 @@
#{STATE}, #{STATE},
#{checkedIds}, #{checkedIds},
#{FOREIGNPERSONNEL}, #{FOREIGNPERSONNEL},
#{deptId},
#{DJBM} #{DJBM}
</sql> </sql>
@ -309,6 +311,7 @@
f.STATE, f.STATE,
f.checkedIds, f.checkedIds,
f.DJBM, f.DJBM,
f.deptId,
s.name as leName, s.name as leName,
f.DEP_ORDER f.DEP_ORDER
from OA_DEPARTMENT f from OA_DEPARTMENT f