This commit is contained in:
parent
d3d677e57a
commit
93d683a9a9
|
|
@ -84,6 +84,8 @@ public class Constant {
|
||||||
public final static String ACCESS_TYPE_IN = "入";
|
public final static String ACCESS_TYPE_IN = "入";
|
||||||
public final static String ACCESS_TYPE_OUT = "出";
|
public final static String ACCESS_TYPE_OUT = "出";
|
||||||
public final static String TYPE = "1";
|
public final static String TYPE = "1";
|
||||||
|
/**安全帽*/
|
||||||
|
public final static String AQM = "1804";
|
||||||
|
|
||||||
public final static String[] BUILD_ARR = {"12A0,合肥","12B0,马鞍山","12C0,芜湖","12D0,安庆","12F0,淮南",
|
public final static String[] BUILD_ARR = {"12A0,合肥","12B0,马鞍山","12C0,芜湖","12D0,安庆","12F0,淮南",
|
||||||
"12G0,宣城","12H0,阜阳","12J0,铜陵","12L0,蚌埠","12M0,滁州","12N0,六安","12P0,淮北","12Q0,宿州","12R0,池州",
|
"12G0,宣城","12H0,阜阳","12J0,铜陵","12L0,蚌埠","12M0,滁州","12N0,六安","12P0,淮北","12Q0,宿州","12R0,池州",
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,8 @@ public class HumanManageVo {
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员绑定安全帽名称")
|
||||||
|
private String bingDeviceName;
|
||||||
|
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
private List<HumanManageVo.FileData> fileData;
|
private List<HumanManageVo.FileData> fileData;
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
username: nacos
|
username: nacos
|
||||||
password: Jjsp@nacos2023
|
password: nacos
|
||||||
namespace: jjzhgd
|
namespace: jjzhgd
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
# server-addr: 10.138.225.186:28848
|
# server-addr: 10.138.225.186:28848
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
|
|
@ -32,7 +32,7 @@ spring:
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- vsc-dev.yml
|
- vsc-dev.yml
|
||||||
username: nacos
|
username: nacos
|
||||||
password: Jjsp@nacos2023
|
password: nacos
|
||||||
namespace: jjzhgd
|
namespace: jjzhgd
|
||||||
# server-addr: 10.138.132.188:18848
|
# server-addr: 10.138.132.188:18848
|
||||||
management:
|
management:
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,7 @@ public interface HumanManageMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取人员入场 离场状态
|
* 获取人员入场 离场状态
|
||||||
|
*
|
||||||
* @param userId
|
* @param userId
|
||||||
* @param accessType
|
* @param accessType
|
||||||
* @param type
|
* @param type
|
||||||
|
|
@ -188,4 +189,15 @@ public interface HumanManageMapper {
|
||||||
* @date 2024/4/18 10:13
|
* @date 2024/4/18 10:13
|
||||||
*/
|
*/
|
||||||
String getUserAccessStatus(@Param("userId") String userId, @Param("accessType") String accessType, @Param("type") int type);
|
String getUserAccessStatus(@Param("userId") String userId, @Param("accessType") String accessType, @Param("type") int type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员绑定安全帽
|
||||||
|
* @param vo
|
||||||
|
* @param typeCode
|
||||||
|
* @return String
|
||||||
|
* @description
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2024/4/19 16:01
|
||||||
|
*/
|
||||||
|
String getUserBingCup(@Param("params") HumanManageVo vo,@Param("typeCode")String typeCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ public class HumanServiceImpl implements HumanService {
|
||||||
try {
|
try {
|
||||||
list = mapper.getHumanLists(dto);
|
list = mapper.getHumanLists(dto);
|
||||||
for (HumanManageVo vo : list) {
|
for (HumanManageVo vo : list) {
|
||||||
|
String bingDeviceName = mapper.getUserBingCup(vo,Constant.AQM);
|
||||||
|
vo.setBingDeviceName(bingDeviceName);
|
||||||
String data = mapper.getUserAccessStatus(vo.getUserId(), Constant.ACCESS_TYPE, 1);
|
String data = mapper.getUserAccessStatus(vo.getUserId(), Constant.ACCESS_TYPE, 1);
|
||||||
if (StringUtils.isNotEmpty(data)) {
|
if (StringUtils.isNotEmpty(data)) {
|
||||||
String value = mapper.getUserAccessStatus(data, Constant.ACCESS_TYPE, 2);
|
String value = mapper.getUserAccessStatus(data, Constant.ACCESS_TYPE, 2);
|
||||||
|
|
@ -305,10 +307,10 @@ public class HumanServiceImpl implements HumanService {
|
||||||
public AjaxResult bindDev(ParamDto dto) {
|
public AjaxResult bindDev(ParamDto dto) {
|
||||||
try{
|
try{
|
||||||
if (StringHelper.isEmpty(dto.getUserId())) {
|
if (StringHelper.isEmpty(dto.getUserId())) {
|
||||||
AjaxResult.error("未选择人员");
|
return AjaxResult.error("未选择人员");
|
||||||
}
|
}
|
||||||
if (StringHelper.isEmpty(dto.getDevId())) {
|
if (StringHelper.isEmpty(dto.getDevId())) {
|
||||||
AjaxResult.error("未选择安全帽");
|
return AjaxResult.error("未选择安全帽");
|
||||||
}
|
}
|
||||||
if(StringHelper.isEmpty(dto.getId())){
|
if(StringHelper.isEmpty(dto.getId())){
|
||||||
int bidNum=mapper.getBindHis(dto);
|
int bidNum=mapper.getBindHis(dto);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
</delete>
|
</delete>
|
||||||
<!--删除人员-->
|
<!--删除人员-->
|
||||||
<delete id="delPersonnelById">
|
<delete id="delPersonnelById">
|
||||||
DELETE FROM t_team_people WHERE user_id = #{id}
|
UPDATE t_team_people SET del_falge = '1' WHERE user_id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
<update id="delBind">
|
<update id="delBind">
|
||||||
update tb_user_bind_cap set bind_status=0 where people_id=#{userId}
|
update tb_user_bind_cap set bind_status=0 where people_id=#{userId}
|
||||||
|
|
@ -110,15 +110,16 @@
|
||||||
ttp.dept_name AS deptName
|
ttp.dept_name AS deptName
|
||||||
FROM t_team_people ttp
|
FROM t_team_people ttp
|
||||||
LEFT JOIN tb_work_team twt on ttp.team_id = twt.team_id
|
LEFT JOIN tb_work_team twt on ttp.team_id = twt.team_id
|
||||||
LEFT JOIN sys_dict sd ON ttp.user_type = sd.dict_code
|
LEFT JOIN sys_dict sd ON ttp.user_type = sd.dict_code AND sd.del_flag = 0
|
||||||
LEFT JOIN tb_project tp ON twt.bid_code = tp.bid_code
|
LEFT JOIN tb_project tp ON twt.bid_code = tp.bid_code AND tp.del_flag = 0
|
||||||
<where>
|
<where>
|
||||||
<if test="bidCode!=null and bidCode !=''">
|
<if test="bidCode!=null and bidCode !=''">
|
||||||
AND twt.bid_code = #{bidCode}
|
twt.bid_code = #{bidCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="userName!=null and userName !=''">
|
<if test="userName!=null and userName !=''">
|
||||||
AND INSTR(ttp.user_name,#{userName}) > 0
|
AND INSTR(ttp.user_name,#{userName}) > 0
|
||||||
</if>
|
</if>
|
||||||
|
AND ttp.del_falge = '0'
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<!--人员是否存在-->
|
<!--人员是否存在-->
|
||||||
|
|
@ -201,4 +202,11 @@
|
||||||
WHERE tdd.device_id = #{userId} AND tdd.mode_name = #{accessType} AND tdd.del_flag = 0
|
WHERE tdd.device_id = #{userId} AND tdd.mode_name = #{accessType} AND tdd.del_flag = 0
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<!--人员绑定安全帽-->
|
||||||
|
<select id="getUserBingCup" resultType="java.lang.String">
|
||||||
|
SELECT td.device_name AS deviceName
|
||||||
|
FROM tb_user_bind_cap tubc
|
||||||
|
LEFT JOIN tb_device td ON tubc.device_id = td.device_id AND td.device_type = #{typeCode}
|
||||||
|
WHERE tubc.people_id = #{params.userId} AND tubc.bind_status = '1'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.securitycontrol.screen.service.impl;
|
package com.securitycontrol.screen.service.impl;
|
||||||
|
|
||||||
|
import com.securitycontrol.common.core.constant.Constant;
|
||||||
import com.securitycontrol.common.core.utils.uuid.IdUtils;
|
import com.securitycontrol.common.core.utils.uuid.IdUtils;
|
||||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||||
import com.securitycontrol.entity.screen.dto.PersonnelControlDto;
|
import com.securitycontrol.entity.screen.dto.PersonnelControlDto;
|
||||||
|
|
@ -35,6 +36,7 @@ public class PersonnelControlImpl implements PersonnelControlService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<PersonnelControlVo> getWearEquipmentList(PersonnelControlDto dto) {
|
public List<PersonnelControlVo> getWearEquipmentList(PersonnelControlDto dto) {
|
||||||
|
dto.setTypeCode(Integer.parseInt(Constant.AQM));
|
||||||
return mapper.getWearEquipmentList(dto);
|
return mapper.getWearEquipmentList(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,18 +27,16 @@
|
||||||
|
|
||||||
<!--人员管控-穿戴装备-->
|
<!--人员管控-穿戴装备-->
|
||||||
<select id="getWearEquipmentList" resultType="com.securitycontrol.entity.screen.vo.PersonnelControlVo">
|
<select id="getWearEquipmentList" resultType="com.securitycontrol.entity.screen.vo.PersonnelControlVo">
|
||||||
SELECT
|
SELECT td.device_name AS deviceName,
|
||||||
tbd.device_type AS deviceType,
|
ttp.user_name AS userName,
|
||||||
su.user_name AS userName,
|
sd.dict_name AS deviceType,
|
||||||
tbd.device_name AS deviceName,
|
td.on_line AS status
|
||||||
trd.status AS status
|
FROM tb_user_bind_cap tubc
|
||||||
FROM t_team_people ttp
|
LEFT JOIN tb_device td ON tubc.device_id = td.device_id AND td.device_type = #{typeCode}
|
||||||
JOIN sys_user su ON ttp.user_id = su.user_id
|
LEFT JOIN t_team_people ttp ON tubc.people_id = ttp.user_id AND ttp.del_falge = '0'
|
||||||
JOIN tb_work_team twt ON ttp.team_id = twt.team_id
|
LEFT JOIN sys_dict sd ON td.device_type = sd.dict_code AND sd.del_flag = 0
|
||||||
JOIN tb_user_bind_cap tuc ON ttp.user_id = tuc.people_id
|
INNER JOIN tb_work_team twt ON ttp.team_id = twt.team_id AND twt.bid_code = #{bidCode}
|
||||||
JOIN tb_device tbd ON tuc.device_id = tbd.device_id
|
WHERE tubc.bind_status = '1'
|
||||||
JOIN tb_rel_device trd ON tbd.device_id = trd.device_id
|
|
||||||
WHERE twt.bid_code = #{bidCode}
|
|
||||||
</select>
|
</select>
|
||||||
<!--人员管控-人员列表-->
|
<!--人员管控-人员列表-->
|
||||||
<select id="getPersonnelList" resultType="com.securitycontrol.entity.screen.vo.PersonnelControlVo">
|
<select id="getPersonnelList" resultType="com.securitycontrol.entity.screen.vo.PersonnelControlVo">
|
||||||
|
|
@ -74,7 +72,7 @@
|
||||||
FROM
|
FROM
|
||||||
tb_warn tw
|
tb_warn tw
|
||||||
WHERE
|
WHERE
|
||||||
tw.warn_type = 1806
|
tw.warn_type = 9995
|
||||||
AND tw.bid_code = #{bidCode}
|
AND tw.bid_code = #{bidCode}
|
||||||
AND DATE(tw.warn_time) = CURDATE();
|
AND DATE(tw.warn_time) = CURDATE();
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
(SELECT '0' AS id,'球机' AS title, '-1' AS parentId,'0' AS onLine,'1' AS level)
|
(SELECT '0' AS id,'球机' AS title, '-1' AS parentId,'0' AS onLine,'1' AS level)
|
||||||
UNION ALL
|
UNION ALL
|
||||||
(
|
(
|
||||||
SELECT CONCAT('QJ',tcm.puid) AS id,
|
SELECT CONCAT('QJ',tcm.puid,'-',IFNULL(on_line,0)) AS id,
|
||||||
tcm.pro_name AS title,
|
tcm.pro_name AS title,
|
||||||
'0' AS parentId,
|
'0' AS parentId,
|
||||||
IFNULL(on_line,0) AS onLine,
|
IFNULL(on_line,0) AS onLine,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue