Commit 2c8dc34c authored by tianbo's avatar tianbo

修改巡检服务方法

parent 36ede852
...@@ -1636,10 +1636,11 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -1636,10 +1636,11 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
Long checkId = param.getLong("checkId"); Long checkId = param.getLong("checkId");
Long itemId = param.getLong("itemId"); Long itemId = param.getLong("itemId");
Long routePointItemId = param.getLong("routePointItemId"); Long routePointItemId = param.getLong("routePointItemId");
Long checkInputId = param.getLong("checkInputId");
Integer checkType = null; Integer checkType = null;
Check check = getCheck(checkId); Check check = getCheck(checkId);
InputCheckDto inputCheckDto = getInputCheckDto(checkId, itemId, routePointItemId); InputCheckDto inputCheckDto = getInputCheckDto(check, itemId, routePointItemId, checkInputId);
InputItem inputItem = getInputItem(itemId); InputItem inputItem = getInputItem(itemId);
String photoUrls = getPhotoUrls(inputCheckDto); String photoUrls = getPhotoUrls(inputCheckDto);
...@@ -1665,12 +1666,18 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -1665,12 +1666,18 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
return check; return check;
} }
private InputCheckDto getInputCheckDto(Long checkId, Long itemId, Long routePointItemId) { private InputCheckDto getInputCheckDto(Check check, Long itemId, Long routePointItemId, Long checkInputId) {
if (ValidationUtil.isEmpty(itemId) || ValidationUtil.isEmpty(routePointItemId)) { if (ValidationUtil.isEmpty(itemId) || ValidationUtil.isEmpty(routePointItemId)) {
return null; return null;
} }
InputCheckDto inputCheckDto = checkInputMapper.getByCheckIdAndItemIdAndRoutePointItemId(checkId, InputCheckDto inputCheckDto = checkInputMapper.getByCheckIdAndItemIdAndRoutePointItemId(check.getId(),
itemId, routePointItemId, null); itemId, routePointItemId, null);
if (CheckModeEnum.WEB_OUT.getCode().equals(check.getCheckMode())) {
// 如果是外来检查,这里itemList里面无法区分InputCheckDto...
// 在LatentDangerPatrolItemParam中增加checkInputId字段来区分
inputCheckDto = checkInputMapper.getByCheckIdAndItemIdAndRoutePointItemId(null, null,
null, checkInputId);
}
return inputCheckDto; return inputCheckDto;
} }
......
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