人员定位
parent
6fef2c1407
commit
3fe3d5e010
|
@ -333,8 +333,9 @@ public class MapController extends BaseController {
|
||||||
@RequestMapping(value = "/getAlarmData")
|
@RequestMapping(value = "/getAlarmData")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getAlarmData() {
|
public Object getAlarmData() {
|
||||||
return HttpRequestUtil.getPeopleApi("/statistics/alarmStatistics/todayAlarm","");
|
return HttpRequestUtil.getPeopleApi("/statistics/alarmStatistics/todayAlarm", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 定位基础信息
|
* @Description: 定位基础信息
|
||||||
* @Author: dearLin
|
* @Author: dearLin
|
||||||
|
@ -345,9 +346,34 @@ public class MapController extends BaseController {
|
||||||
@RequestMapping(value = "/getCzksBasicLocationInfoData")
|
@RequestMapping(value = "/getCzksBasicLocationInfoData")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getCzksBasicLocationInfoData() {
|
public Object getCzksBasicLocationInfoData() {
|
||||||
return HttpRequestUtil.getPeopleApi("/statistics/personStatistics/todayPerson","");
|
return HttpRequestUtil.getPeopleApi("/statistics/personStatistics/todayPerson", "");
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @Description: 人员定位信息
|
||||||
|
* @Author: dearLin
|
||||||
|
* @Date: 2024/1/6/006 17:33
|
||||||
|
* @Param: [] []
|
||||||
|
* @Return: java.lang.Object
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/czks/person/allPerson/listPage")
|
||||||
|
@ResponseBody
|
||||||
|
public Object getCzksOnlinePersion() throws Exception {
|
||||||
|
PageData pageData = this.getPageData();
|
||||||
|
JSONObject request = new JSONObject();
|
||||||
|
request.put("pageNum", 1);
|
||||||
|
request.put("pageSize", 10);
|
||||||
|
request.put("online", "true");
|
||||||
|
// 人员定位在线
|
||||||
|
ReturnMap online = HttpRequestUtil.getPeopleApi("/person/allPerson/listPage", request.toString());
|
||||||
|
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
|
// 系统人员数
|
||||||
|
int userCount = usersService.getUserCount(pageData);
|
||||||
|
// 系统部门数
|
||||||
|
int departCount = departmentService.getDepartmentCount(pageData);
|
||||||
|
online.put("userCount",userCount);
|
||||||
|
online.put("departCount",departCount);
|
||||||
|
return online;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 标签卡状态
|
* @Description: 标签卡状态
|
||||||
* @Author: dearLin
|
* @Author: dearLin
|
||||||
|
@ -363,11 +389,11 @@ public class MapController extends BaseController {
|
||||||
request.put("pageNum", pageData.getString("pageNum"));
|
request.put("pageNum", pageData.getString("pageNum"));
|
||||||
request.put("pageSize", pageData.getString("pageSize"));
|
request.put("pageSize", pageData.getString("pageSize"));
|
||||||
// 普通员工
|
// 普通员工
|
||||||
if ("0".equals(pageData.getString("type"))) {
|
if ("1".equals(pageData.getString("type"))) {
|
||||||
return HttpRequestUtil.getPeopleApi("/person/staff/listPage",request.toString());
|
return HttpRequestUtil.getPeopleApi("/person/staff/listPage", request.toString());
|
||||||
} else {
|
} else {
|
||||||
// 相关方 员工
|
// 相关方 员工
|
||||||
return HttpRequestUtil.getPeopleApi("/person/allPerson/listPage",request.toString());
|
return HttpRequestUtil.getPeopleApi("/person/allPerson/listPage", request.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -181,5 +181,7 @@ public interface DepartmentMapper{
|
||||||
List<Department> listSubCorpDepartmentByParentId(String parentId);
|
List<Department> listSubCorpDepartmentByParentId(String parentId);
|
||||||
|
|
||||||
PageData findByCorpDepartmentId(PageData condition);
|
PageData findByCorpDepartmentId(PageData condition);
|
||||||
|
|
||||||
|
int getDepartmentCount(PageData pageData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,5 +231,7 @@ public interface DepartmentService{
|
||||||
List<Department> listAllCorpDepartment(String number) throws Exception;
|
List<Department> listAllCorpDepartment(String number) throws Exception;
|
||||||
|
|
||||||
PageData getCorpDepartment(PageData condition) throws Exception;
|
PageData getCorpDepartment(PageData condition) throws Exception;
|
||||||
|
|
||||||
|
int getDepartmentCount(PageData pageData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -441,6 +441,11 @@ public class DepartmentServiceImpl implements DepartmentService{
|
||||||
return departmentMapper.findByCorpDepartmentId(condition);
|
return departmentMapper.findByCorpDepartmentId(condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDepartmentCount(PageData pageData) {
|
||||||
|
return departmentMapper.getDepartmentCount(pageData);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ID获取其子级列表
|
* 通过ID获取其子级列表
|
||||||
* @param parentId
|
* @param parentId
|
||||||
|
|
|
@ -155,7 +155,85 @@ public class Smb {
|
||||||
* IMGFILES_ID,FOREIGN_KEY,TYPE
|
* IMGFILES_ID,FOREIGN_KEY,TYPE
|
||||||
* 这三个值必须要传,所以用到Smb.sshSftp
|
* 这三个值必须要传,所以用到Smb.sshSftp
|
||||||
* */
|
* */
|
||||||
public static void sshSftp(MultipartFile file, String fileName, String path, String IMGFILES_ID, String FOREIGN_KEY, String TYPE) throws Exception {
|
public static void sshSftp(MultipartFile file, String fileName, String path,
|
||||||
|
String IMGFILES_ID, String FOREIGN_KEY, String TYPE) throws Exception {
|
||||||
|
Session session = null;
|
||||||
|
Channel channel = null;
|
||||||
|
JSch jsch = new JSch();
|
||||||
|
if (port <= 0) {
|
||||||
|
// 连接服务器,采用默认端口
|
||||||
|
session = jsch.getSession(user, host);
|
||||||
|
} else {
|
||||||
|
// 采用指定的端口连接服务器
|
||||||
|
session = jsch.getSession(user, host, port);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果服务器连接不上,则抛出异常
|
||||||
|
if (session == null) {
|
||||||
|
throw new Exception("session is null");
|
||||||
|
}
|
||||||
|
// 设置登陆主机的密码
|
||||||
|
session.setPassword(password);
|
||||||
|
// 设置第一次登陆的时候提示,可选值:(ask | yes | no)
|
||||||
|
session.setConfig("StrictHostKeyChecking", "no");
|
||||||
|
// 设置登陆超时时间
|
||||||
|
session.connect(30000);
|
||||||
|
OutputStream outstream = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 创建sftp通信通道
|
||||||
|
channel = (Channel) session.openChannel("sftp");
|
||||||
|
channel.connect(1000);
|
||||||
|
ChannelSftp sftp = (ChannelSftp) channel;
|
||||||
|
// 进入服务器指定的文件夹
|
||||||
|
// File dir = new File(basePath+"/"+path);
|
||||||
|
// dir.setWritable(true, false);
|
||||||
|
// if(!dir.exists()){
|
||||||
|
// dir.mkdirs();
|
||||||
|
// }
|
||||||
|
createDir(basePath + path, sftp);
|
||||||
|
sftp.cd(basePath + path);
|
||||||
|
// 列出服务器指定的文件列表
|
||||||
|
// Vector v = sftp.ls("*");
|
||||||
|
// for(int i=0;i<v.size();i++){
|
||||||
|
// System.out.println(v.get(i));
|
||||||
|
// }
|
||||||
|
// 以下代码实现从本地上传一个文件到服务器,如果要实现下载,对换以下流就可以了
|
||||||
|
DockSendMessageService sendMessageService = SpringUtil.getBean(DockSendMessageService.class);
|
||||||
|
sftp.put(file.getInputStream(), fileName);
|
||||||
|
PageData pageData = new PageData();
|
||||||
|
pageData.put("IMGFILES_ID", IMGFILES_ID);
|
||||||
|
pageData.put("FOREIGN_KEY", FOREIGN_KEY);
|
||||||
|
pageData.put("TYPE", TYPE);
|
||||||
|
pageData.put("BASEIMGPATH", baseimgpath);
|
||||||
|
pageData.put("FILEPATH", path);
|
||||||
|
pageData.put("FILENAME", fileName);
|
||||||
|
TenCorpDto tenCorpDto = new TenCorpDto();
|
||||||
|
|
||||||
|
tenCorpDto.setMessage("图片消息");
|
||||||
|
tenCorpDto.setData(pageData);
|
||||||
|
tenCorpDto.setId(UuidUtil.get32UUID());
|
||||||
|
tenCorpDto.setTopic("dockingPicture");
|
||||||
|
tenCorpDto.setProducer_name("qa-prevention-czks");
|
||||||
|
sendMessageService.sendMessagePicture(tenCorpDto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
// 关流操作
|
||||||
|
if (outstream != null) {
|
||||||
|
outstream.flush();
|
||||||
|
outstream.close();
|
||||||
|
}
|
||||||
|
if (session != null) {
|
||||||
|
session.disconnect();
|
||||||
|
}
|
||||||
|
if (channel != null) {
|
||||||
|
channel.disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void sshSftp(MultipartFile file, String fileName, String path,String FILE_NAME,
|
||||||
|
String IMGFILES_ID, String FOREIGN_KEY, String TYPE) throws Exception {
|
||||||
Session session = null;
|
Session session = null;
|
||||||
Channel channel = null;
|
Channel channel = null;
|
||||||
JSch jsch = new JSch();
|
JSch jsch = new JSch();
|
||||||
|
|
|
@ -592,4 +592,7 @@
|
||||||
where DEPARTMENT_ID = #{DEPARTMENT_ID}
|
where DEPARTMENT_ID = #{DEPARTMENT_ID}
|
||||||
order by DEP_ORDER asc, NAME
|
order by DEP_ORDER asc, NAME
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getDepartmentCount" resultType="java.lang.Integer">
|
||||||
|
SELECT COUNT(1) cont FROM `oa_department` WHERE CORPINFO_ID = #{CORPINFO_ID}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -1050,7 +1050,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
FROM
|
FROM
|
||||||
sys_user
|
sys_user
|
||||||
WHERE
|
WHERE
|
||||||
CORPINFO_ID = #{CORPINFO_ID}
|
CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询公司检查过清单的员工总数 -->
|
<!-- 查询公司检查过清单的员工总数 -->
|
||||||
|
|
Loading…
Reference in New Issue