Commit 488294d7 authored by chenzhao's avatar chenzhao

增加接口

parent 5053cc9e
......@@ -259,6 +259,21 @@ public class PointController extends AbstractBaseController {
}
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "新增巡查对象", notes = "新增巡查对象")
@GetMapping(value = "/xcdxIsExits", produces = "application/json;charset=UTF-8")
public CommonResponse xcdxIsExits(Long pointId,String equipMentId){
List<PointClassify> pointClassifies = iPointClassifyDao.queryByPointIdAndEquipmentId(pointId,equipMentId);
if (pointClassifies.size() > 0){
throw new RuntimeException(pointClassifies.get(0).getName() + "已存在,不可添加");
}
return CommonResponseUtil.success(true);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "新增巡查对象", notes = "新增巡查对象")
@PostMapping(value = "/addPointXcdxList", produces = "application/json;charset=UTF-8")
......@@ -269,11 +284,6 @@ public class PointController extends AbstractBaseController {
List<RoutePoint> routePointList = iRoutePointDao.queryByPointId(pointClassifys.get(0).getPointId());
for (PointInputItemNewVo pointClassify : pointClassifys) {
List<PointClassify> pointClassifies = iPointClassifyDao.queryByPointIdAndEquipmentId(pointClassify.getPointId(), pointClassify.getEquipmentId());
if (pointClassifies.size() > 0){
throw new RuntimeException(pointClassify.getName()+"已存在,不可添加");
}
PointClassify newPointClassify = new PointClassify();
newPointClassify.setEquipmentId(pointClassify.getEquipmentId());
newPointClassify.setName(pointClassify.getName());
......
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