Commit 05375a4f authored by KeYong's avatar KeYong

修改bug

parent b4c4ad94
......@@ -179,12 +179,14 @@ public class CheckController extends AbstractBaseController {
return CommonResponseUtil.failure("无权执行该任务");
}
if (!requestParam.getIsOffline()) {
statu = planTask.getFinishStatus();
if (!requestParam.getIsOffline() && statu == PlanTaskFinishStatusEnum.OVERTIME.getValue()) {
return CommonResponseUtil.failure("任务已超时,上传失败!");
}else if( statu == PlanTaskFinishStatusEnum.FINISHED.getValue()){
return CommonResponseUtil.failure("任务已完成!");
}
}
Date checkTime = requestParam.getIsOffline()?DateUtil.getLongDate(requestParam.getCheckTime()):new Date();
Date beginTime = DateUtil.getLongDate(planTask.getBeginTime());
......@@ -196,7 +198,7 @@ public class CheckController extends AbstractBaseController {
}
}
int count = checkService.checkHasRecord(requestParam);
if (count < 1 || requestParam.getPlanTaskId() < 1) {
if (count < 1 || requestParam.getPlanTaskId() < 1 || requestParam.getIsOffline()) {
ReginParams reginParams = getSelectedOrgInfo();
// String orgCode = getOrgCode(reginParams);
String orgCode =reginParams.getPersonIdentity().getBizOrgCode();
......
......@@ -1616,4 +1616,12 @@ public class PointController extends AbstractBaseController {
return CommonResponseUtil.failure("查询巡检点信息失败");
}
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询巡检点绑定设备巡检项", notes = "查询巡检点绑定设备巡检项")
@GetMapping(value = "/equip/item/list", produces = "application/json;charset=UTF-8")
public CommonResponse getEquipItemList(@ApiParam(value = "巡检点id", required = true) @RequestParam Long routeId,
@ApiParam(value = "巡检点id", required = true) @RequestParam Long pointId){
return CommonResponseUtil.success(iPointService.queryEquipPointItemListByPointId(routeId, pointId));
}
}
......@@ -1754,6 +1754,16 @@ public class PointServiceImpl implements IPointService {
}
@Override
public List<String> queryEquipPointItemListByPointId(Long routeId, Long pointId) {
Long[] longs = new Long[]{pointId};
List<RoutePoint> list = iRoutePointDao.queryRoutePoint(routeId, longs);
String excludeItems = list.get(0).getExcludeItems();
String strings[] = excludeItems.split(",");
List<String> itemIds = Arrays.asList(strings);
return itemIds;
}
@Override
public List<PointResponse> getPointConfigDom() {
// TODO Auto-generated method stub
return pointMapper.getPointConfigDom();
......
......@@ -372,4 +372,6 @@ public interface IPointService {
void syncPointClassify(Map<String,Object> map);
List<PointInputItemVo> queryOldPointInputItemNew(Long pointId, Long id);
List<String> queryEquipPointItemListByPointId(Long routeId, Long pointId);
}
......@@ -41,7 +41,6 @@
<if test="orgCode!=null">
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if test="bizOrgCode!=null"> and a.org_Code like concat (#{bizOrgCode},"%")</if>
<if test="searchDay!=null and searchDay != '' and searchDay == 1">
and a.`check_date` = curdate()
</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