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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public class AppServiceImpl implements IAppService {
|
||||||
ProVo proVo = new ProVo();
|
ProVo proVo = new ProVo();
|
||||||
try {
|
try {
|
||||||
proVo = mapper.getProBrief(dto);
|
proVo = mapper.getProBrief(dto);
|
||||||
if(Objects.nonNull(proVo)){
|
if (Objects.nonNull(proVo)) {
|
||||||
List<ProVo.FileData> list = new ArrayList<>();
|
List<ProVo.FileData> list = new ArrayList<>();
|
||||||
List<ResourceFileVo> resourceFileVos = mapper.getFiles(proVo.getProId());
|
List<ResourceFileVo> resourceFileVos = mapper.getFiles(proVo.getProId());
|
||||||
if (CollectionUtils.isNotEmpty(resourceFileVos)) {
|
if (CollectionUtils.isNotEmpty(resourceFileVos)) {
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
@ -213,13 +225,13 @@ public class AppServiceImpl implements IAppService {
|
||||||
item = JSON.parseObject(jsonString);
|
item = JSON.parseObject(jsonString);
|
||||||
// 施工进度
|
// 施工进度
|
||||||
proGxPlanList = mapper.getProGxPlan(dto);
|
proGxPlanList = mapper.getProGxPlan(dto);
|
||||||
if(CollectionUtils.isNotEmpty(proGxPlanList)){
|
if (CollectionUtils.isNotEmpty(proGxPlanList)) {
|
||||||
proGxPlanList.forEach(mapData->{
|
proGxPlanList.forEach(mapData -> {
|
||||||
String proType = String.valueOf(mapData.get("proType"));
|
String proType = String.valueOf(mapData.get("proType"));
|
||||||
String bidCode = String.valueOf(mapData.get("bidCode"));
|
String bidCode = String.valueOf(mapData.get("bidCode"));
|
||||||
String gxId = String.valueOf(mapData.get("gxId"));
|
String gxId = String.valueOf(mapData.get("gxId"));
|
||||||
String name = mapper.getGtOrGxName(proType, bidCode, gxId);
|
String name = mapper.getGtOrGxName(proType, bidCode, gxId);
|
||||||
mapData.put("name",name);
|
mapData.put("name", name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 标段工程成本
|
// 标段工程成本
|
||||||
|
|
@ -227,10 +239,10 @@ public class AppServiceImpl implements IAppService {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("工程管理", e);
|
log.error("工程管理", e);
|
||||||
}
|
}
|
||||||
dataMap.put("vo",vo);
|
dataMap.put("vo", vo);
|
||||||
dataMap.put("item",item);
|
dataMap.put("item", item);
|
||||||
dataMap.put("proGxPlan",proGxPlanList);
|
dataMap.put("proGxPlan", proGxPlanList);
|
||||||
dataMap.put("proCost",proCostList);
|
dataMap.put("proCost", proCostList);
|
||||||
return AjaxResult.success(dataMap);
|
return AjaxResult.success(dataMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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