Commit ab08499a authored by chenzhao's avatar chenzhao

修改代码

parent fcd5eae7
......@@ -171,7 +171,9 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
IPage<MaintenanceResourceDataVo> getEquipClassifyDataPage(Page page, Long fireFightSysId, String fireFacilityName, String classifyId, Long fireFacilityId, List<Long> buildingId,List<String> bandWbCompany);
List<UserDto> getEquipSpecificLocationInfo(Long equipmentSpecificId, String[] fieldName);
Map<String,Double> getEquipLocationInfo(Long equipmentSpecificId);
Map<String, Object> getEquipSpeInfo(@Param("equipmentSpecificId") Long equipmentSpecificId);
/**
......
......@@ -169,6 +169,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
EquipmentDetailVo getAirEquipSpecificDetail(Long stockDetailId);
List<UserDto> getEquipSpecificLocationInfo(Long equipmentSpecificId, String[] fieldName);
Map<String,Double> getEquipLocationInfo(Long equipmentSpecificId);
/**
* 根据specificId删除相关数据
......
......@@ -439,23 +439,15 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
log.error("查询机场人员为空,检查机场人员是否绑定单位!");
}
confirmAlamVo.setFireLocation(ent.getLocation());
List<UserDto> infoList = equipmentSpecificSerivce.getEquipSpecificLocationInfo(ent.getEquipmentSpecificId(), FIELD_NAME.split(","));
if (CollectionUtils.isNotEmpty(infoList)) {
infoList.stream().forEach(dto -> {
// String name = dto.getPersonName();
// confirmAlamVo.setFireLocation(name);
String code = dto.getFieldCode();
String value = dto.getFieldValue();
switch (code) {
case "longitude":
confirmAlamVo.setFloorLongitude(getVal(value));
break;
case "latitude":
confirmAlamVo.setFloorLatitude(getVal(value));
break;
default:
}
});
Map<String, Double> equipLocationInfo = equipmentSpecificSerivce.getEquipLocationInfo(ent.getEquipmentSpecificId());
if (!ObjectUtils.isEmpty(equipLocationInfo)) {
if (equipLocationInfo.containsKey("longitude")){
confirmAlamVo.setFloorLongitude(equipLocationInfo.get("longitude"));
}
if (equipLocationInfo.containsKey("latitude")){
confirmAlamVo.setFloorLatitude(equipLocationInfo.get("latitude"));
}
}
try {
ruleConfirmAlamService.confirmAlam(confirmAlamVo, appKey, product, token);
......
......@@ -1197,6 +1197,10 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
return equipmentSpecificMapper.getEquipSpecificLocationInfo(equipmentSpecificId, fieldName);
}
public Map<String,Double> getEquipLocationInfo(Long equipmentSpecificId) {
return equipmentSpecificMapper.getEquipLocationInfo(equipmentSpecificId);
}
@Override
@Async("equipAsyncExecutor")
public void equipSpecificDataSync(Long equipmentId) {
......
......@@ -436,4 +436,12 @@ public class LatentDangerController extends BaseController {
}
return ResponseHelper.buildResponse(null);
}
@ApiOperation(value = "隐患跳转巡检任务页面", notes = "隐患跳转巡检任务页面")
@GetMapping(value = "/web/patrol/{id}/{bizId}")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public String updateStatusByUserIdAndPlandIdLike(@PathVariable String bizId,@PathVariable Long id) {
return iLatentDangerService.selectByIdandBizId(id,bizId);
}
}
......@@ -90,4 +90,6 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
String orgCode);
List<LatentDanger> updateStatusByUserIdAndPlandIdLike(String userId,String planId);
String selectByIdandBizId(Long id,String bizId);
}
......@@ -2717,4 +2717,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
this.savePatrol(dangerDtos,userId,userRealName,departmentId,departmentName,companyId,orgCode,role,"1");
}
public String selectByIdandBizId(Long id,String bizId){
return latentDangerMapper.selectByIdandBizId(id,bizId);
}
}
\ No newline at end of file
......@@ -203,4 +203,6 @@ public interface ILatentDangerService {
public Map<String, Integer> currentLandgerCount(String companyId,String loginOrgCode);
void updateStatusByUserIdAndPlandIdLike(String userId, String planId,ReginParams reginParams) throws Exception;
String selectByIdandBizId(Long id,String bizId) ;
}
......@@ -1297,6 +1297,20 @@
</if>
</where>
</select>
<select id="getEquipLocationInfo" resultType="map">
SELECT
wed.longitude as longitude,
wed.latitude as latitude
FROM
wl_stock_detail sd
LEFT JOIN wl_equipment_detail wed ON sd.equipment_detail_id = wed.id
<where>
<if test="equipmentSpecificId != null">
sd.equipment_specific_id = #{equipmentSpecificId}
</if>
</where>
</select>
<select id="getEquipSpeInfo" resultType="Map">
SELECT
......
......@@ -1104,4 +1104,16 @@ WHERE
AND deleted = 0
)
</select>
<select id="selectByIdandBizId" resultType="string">
SELECT
pc.plan_task_id as taskId
FROM
p_latent_danger p
LEFT JOIN p_check_input pci ON pci.id = p.biz_id
LEFT JOIN p_check pc ON pci.check_id = pc.id
WHERE
p.id = #{id} and p.biz_id = #{bizId}
</select>
</mapper>
\ No newline at end of file
......@@ -120,7 +120,7 @@
<if test="isFixed!=null">and b.is_fixed = #{isFixed}</if>
<if test="isOK!=null">and a.is_OK = #{isOK}</if>
<if test="planId!=null">and a.plan_Id = #{planId}</if>
<if test="planTaskId!=null">and a.plan_task_detail_id = #{planTaskId}</if>
<if test="planTaskId!=null">and a.plan_task_id = #{planTaskId}</if>
<if test="userId!=null">and find_in_set(#{userId}, a.user_id) > 0</if>
<if test="routeId!=null">and a.route_Id = #{routeId}</if>
<if test="catalogId!=null">and b.Catalog_Id = #{catalogId}</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment