APP人员管理
This commit is contained in:
parent
869cceb811
commit
b0afaa6d63
|
|
@ -130,6 +130,7 @@ public interface IAppMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标段工程成本
|
* 标段工程成本
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return List<ProjectCostVo>
|
* @return List<ProjectCostVo>
|
||||||
* @description
|
* @description
|
||||||
|
|
@ -137,4 +138,16 @@ public interface IAppMapper {
|
||||||
* @date 2024/4/1 19:12
|
* @date 2024/4/1 19:12
|
||||||
*/
|
*/
|
||||||
List<ProjectCostVo> getProCost(ParamDto dto);
|
List<ProjectCostVo> getProCost(ParamDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取人员出入状态
|
||||||
|
* @param userId
|
||||||
|
* @param accessType
|
||||||
|
* @param type
|
||||||
|
* @return String
|
||||||
|
* @description
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2024/4/3 18:03
|
||||||
|
*/
|
||||||
|
String getUserAccessStatus(@Param("userId") String userId,@Param("accessType") String accessType,@Param("type")int type);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,11 @@ public class AppServiceImpl implements IAppService {
|
||||||
} else {
|
} else {
|
||||||
vo.setSex(getGenderByIdCard(vo.getIdNumber()));
|
vo.setSex(getGenderByIdCard(vo.getIdNumber()));
|
||||||
}
|
}
|
||||||
|
String data = mapper.getUserAccessStatus(vo.getUserId(), Constant.ACCESS_TYPE, 1);
|
||||||
|
if (StringUtils.isNotEmpty(data)) {
|
||||||
|
String value = mapper.getUserAccessStatus(data, Constant.ACCESS_TYPE, 2);
|
||||||
|
vo.setStatus(StringUtils.isEmpty(value) ? "离场" : value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("人员管理", e);
|
log.error("人员管理", e);
|
||||||
|
|
@ -124,8 +129,15 @@ public class AppServiceImpl implements IAppService {
|
||||||
List<VehicleVo> list = new ArrayList();
|
List<VehicleVo> list = new ArrayList();
|
||||||
try {
|
try {
|
||||||
list = mapper.getCarList(dto);
|
list = mapper.getCarList(dto);
|
||||||
|
for (VehicleVo vo : list) {
|
||||||
|
String data = mapper.getUserAccessStatus(vo.getCarNum(), Constant.ACCESS_TYPE, 1);
|
||||||
|
if (StringUtils.isNotEmpty(data)) {
|
||||||
|
String value = mapper.getUserAccessStatus(data, Constant.ACCESS_TYPE, 2);
|
||||||
|
vo.setAccessType(StringUtils.isEmpty(value) ? "离场" : value);
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("人员管理", e);
|
log.error("车辆管理", e);
|
||||||
}
|
}
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,8 @@
|
||||||
</select>
|
</select>
|
||||||
<!--人员管理-->
|
<!--人员管理-->
|
||||||
<select id="getPersonnelList" resultType="com.securitycontrol.entity.background.vo.HumanManageVo">
|
<select id="getPersonnelList" resultType="com.securitycontrol.entity.background.vo.HumanManageVo">
|
||||||
SELECT ttp.user_name AS userName,
|
SELECT ttp.user_id AS userId,
|
||||||
|
ttp.user_name AS userName,
|
||||||
ttp.phone,
|
ttp.phone,
|
||||||
ttp.id_number AS idNumber,
|
ttp.id_number AS idNumber,
|
||||||
IF(ttp.status = '1','在场','离场') AS status
|
IF(ttp.status = '1','在场','离场') AS status
|
||||||
|
|
@ -124,4 +125,19 @@
|
||||||
curry_day AS expenditureDate
|
curry_day AS expenditureDate
|
||||||
FROM tb_project_cost tpc WHERE tpc.bid_code = #{bidCode}
|
FROM tb_project_cost tpc WHERE tpc.bid_code = #{bidCode}
|
||||||
</select>
|
</select>
|
||||||
|
<!--获取人员出入状态-->
|
||||||
|
<select id="getUserAccessStatus" resultType="java.lang.String">
|
||||||
|
<if test="type == 1">
|
||||||
|
SELECT tdd.device_id
|
||||||
|
FROM tb_device_value tdv
|
||||||
|
LEFT JOIN tb_device_detail tdd ON tdv.attribute_id = tdd.id AND tdd.del_flag = 0
|
||||||
|
WHERE tdv.val = #{userId}
|
||||||
|
</if>
|
||||||
|
<if test="type == 2">
|
||||||
|
SELECT tdv.val
|
||||||
|
FROM tb_device_detail tdd
|
||||||
|
LEFT JOIN tb_device_value tdv ON tdd.id = tdv.attribute_id
|
||||||
|
WHERE tdd.device_id = #{userId} AND tdd.mode_name = #{accessType} AND tdd.del_flag = 0
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue