Commit da3cd2bf authored by xinglei's avatar xinglei

*)查询隐患信息

parent 6a44ae04
...@@ -309,4 +309,11 @@ public class LatentDangerController extends AbstractBaseController { ...@@ -309,4 +309,11 @@ public class LatentDangerController extends AbstractBaseController {
public CommonResponse getPatrolDangerCheck(@RequestBody(required = false) JSONObject param) { public CommonResponse getPatrolDangerCheck(@RequestBody(required = false) JSONObject param) {
return CommonResponseUtil.success(iLatentDangerService.getPatrolDangerCheck(param)); return CommonResponseUtil.success(iLatentDangerService.getPatrolDangerCheck(param));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询隐患信息", notes = "查询隐患信息")
@GetMapping(value = "/{latentDangerId}")
public CommonResponse getLatentDanger(@PathVariable(required = true) Long latentDangerId) {
return CommonResponseUtil.success(iLatentDangerService.getLatentDanger(latentDangerId));
}
} }
...@@ -67,4 +67,6 @@ public interface LatentDangerMapper extends BaseMapper { ...@@ -67,4 +67,6 @@ public interface LatentDangerMapper extends BaseMapper {
void updateCheckInputDangerState(@Param("id") Long id, @Param("code") int code); void updateCheckInputDangerState(@Param("id") Long id, @Param("code") int code);
LatentDangerBo getbyBusinessKey(@Param("businessKey") String businessKey); LatentDangerBo getbyBusinessKey(@Param("businessKey") String businessKey);
Map<String, Object> getLatentDangerByLatentDangerId(@Param("latentDangerId") Long latentDangerId);
} }
...@@ -1669,7 +1669,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -1669,7 +1669,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
checkInputMapper.updateCheckInput(checkInputDto); checkInputMapper.updateCheckInput(checkInputDto);
return null; return null;
} }
@Override
public Map<String, Object> getLatentDanger(Long latentDangerId) {
return latentDangerMapper.getLatentDangerByLatentDangerId(latentDangerId);
}
private Check getCheck(Long checkId) { private Check getCheck(Long checkId) {
Assert.notNull(checkId, "巡检ID不能为空!"); Assert.notNull(checkId, "巡检ID不能为空!");
Check check = iCheckDao.getById(Long.valueOf(checkId)); Check check = iCheckDao.getById(Long.valueOf(checkId));
......
package com.yeejoin.amos.supervision.business.service.intfc; package com.yeejoin.amos.supervision.business.service.intfc;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yeejoin.amos.supervision.business.vo.DangerTimeAxisVo; import com.yeejoin.amos.supervision.business.vo.DangerTimeAxisVo;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
...@@ -97,4 +98,10 @@ public interface ILatentDangerService { ...@@ -97,4 +98,10 @@ public interface ILatentDangerService {
* @return * @return
*/ */
JSONObject getPatrolDangerCheck(JSONObject param); JSONObject getPatrolDangerCheck(JSONObject param);
/**
* 查询隐患信息
* @return
*/
Map<String, Object> getLatentDanger(Long latentDangerId);
} }
...@@ -943,4 +943,23 @@ ...@@ -943,4 +943,23 @@
WHERE WHERE
pld.business_key = #{businessKey} pld.business_key = #{businessKey}
</select> </select>
<select id="getLatentDangerByLatentDangerId" resultType="Map">
SELECT
phd.latent_danger_id latentDangerId,
phd.point_id pointId,
phd.plan_id planId,
phd.check_input_id checkInputId,
pci.input_id inputId,
ppt.name pointName,
ppn.name planName,
pii.name inputItemName
FROM
p_hidden_danger phd
LEFT JOIN p_point ppt ON phd.point_id = ppt.id
LEFT JOIN p_plan ppn ON phd.plan_id = ppn.id
LEFT JOIN p_check_input pci on phd.check_input_id = pci.id
LEFT JOIN p_input_item pii on pci.input_id = pii.id
where phd.latent_danger_id = #{latentDangerId}
</select>
</mapper> </mapper>
\ No newline at end of file
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