|
|
@@ -1,115 +1,124 @@ |
|
|
|
package com.tuoheng.admin.service.inspection;
|
|
|
|
|
|
|
|
import com.tuoheng.admin.entity.Inspection;
|
|
|
|
import com.tuoheng.admin.mapper.InspectionMapper;
|
|
|
|
import com.tuoheng.admin.request.inspection.AddInspectionRequest;
|
|
|
|
import com.tuoheng.admin.request.inspection.EditInspectionRequest;
|
|
|
|
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
|
|
|
|
import com.tuoheng.admin.service.inspection.add.AddInspectionService;
|
|
|
|
import com.tuoheng.admin.service.inspection.delete.DeleteInspectionService;
|
|
|
|
import com.tuoheng.admin.service.inspection.query.QueryInspectionPageListService;
|
|
|
|
import com.tuoheng.admin.service.inspection.update.UpdateInspectionService;
|
|
|
|
import com.tuoheng.common.core.utils.JsonResult;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 巡检任务Service业务层处理
|
|
|
|
*
|
|
|
|
* @team tuoheng
|
|
|
|
* @author wanjing
|
|
|
|
* @date 2022-11-16
|
|
|
|
*/
|
|
|
|
@Slf4j
|
|
|
|
@Service
|
|
|
|
public class InspectionServiceImpl implements IInspectionService {
|
|
|
|
@Autowired
|
|
|
|
private InspectionMapper inspectionMapper;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private QueryInspectionPageListService queryInspectionPageListService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private AddInspectionService addinspectionService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private UpdateInspectionService updateInspectionService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private DeleteInspectionService deleteInspectionService;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询巡检任务分页分页列表
|
|
|
|
*
|
|
|
|
* @param queryInspectionRequest 巡检任务查询实体
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public JsonResult selectPageList(QueryInspectionPageListRequest queryInspectionRequest) {
|
|
|
|
return queryInspectionPageListService.getPageList(queryInspectionRequest);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询巡检任务
|
|
|
|
*
|
|
|
|
* @param id 巡检任务id
|
|
|
|
* @return 巡检任务
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public JsonResult selectOneById(String id) {
|
|
|
|
|
|
|
|
return JsonResult.success();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询巡检任务列表
|
|
|
|
*
|
|
|
|
* @param request 巡检任务查询实体
|
|
|
|
* @return 巡检任务
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public JsonResult selectList(QueryInspectionPageListRequest request) {
|
|
|
|
log.info("进入查询巡检任务列表业务");
|
|
|
|
// Page<Inspection> page = new Page<>(request.getPage(), request.getLimit());
|
|
|
|
// request.setUserId(ShiroUtils.getUserId());
|
|
|
|
// request.setTenantId(ShiroUtils.getTenantId());
|
|
|
|
|
|
|
|
// List<Inspection> list = inspectionMapper.selectList(page, request);
|
|
|
|
|
|
|
|
return JsonResult.success();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 新增巡检任务
|
|
|
|
*
|
|
|
|
* @param addInspectionRequest 新增任务请求参数
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public JsonResult insert(AddInspectionRequest addInspectionRequest) {
|
|
|
|
return addinspectionService.add(addInspectionRequest);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 修改巡检任务
|
|
|
|
*
|
|
|
|
* @param editInspectionRequest 修改任务请求参数
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public JsonResult update(EditInspectionRequest editInspectionRequest) {
|
|
|
|
return updateInspectionService.update(editInspectionRequest);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 删除巡检任务信息
|
|
|
|
*
|
|
|
|
* @param id 巡检任务主键
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public JsonResult deleteById(String id) {
|
|
|
|
return deleteInspectionService.deleteById(id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
package com.tuoheng.admin.service.inspection; |
|
|
|
|
|
|
|
import com.tuoheng.admin.entity.Inspection; |
|
|
|
import com.tuoheng.admin.mapper.InspectionMapper; |
|
|
|
import com.tuoheng.admin.request.inspection.AddInspectionRequest; |
|
|
|
import com.tuoheng.admin.request.inspection.EditInspectionRequest; |
|
|
|
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest; |
|
|
|
import com.tuoheng.admin.service.inspection.add.AddInspectionService; |
|
|
|
import com.tuoheng.admin.service.inspection.delete.DeleteInspectionService; |
|
|
|
import com.tuoheng.admin.service.inspection.query.QueryInspectionListService; |
|
|
|
import com.tuoheng.admin.service.inspection.query.QueryInspectionPageListService; |
|
|
|
import com.tuoheng.admin.service.inspection.update.UpdateInspectionService; |
|
|
|
import com.tuoheng.common.core.utils.JsonResult; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
/** |
|
|
|
* 巡检任务Service业务层处理 |
|
|
|
* |
|
|
|
* @team tuoheng |
|
|
|
* @author wanjing |
|
|
|
* @date 2022-11-16 |
|
|
|
*/ |
|
|
|
@Slf4j |
|
|
|
@Service |
|
|
|
public class InspectionServiceImpl implements IInspectionService { |
|
|
|
@Autowired |
|
|
|
private InspectionMapper inspectionMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private QueryInspectionPageListService queryInspectionPageListService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private AddInspectionService addinspectionService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private UpdateInspectionService updateInspectionService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private DeleteInspectionService deleteInspectionService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private QueryInspectionListService queryInspectionListService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询巡检任务分页分页列表 |
|
|
|
* |
|
|
|
* @param queryInspectionRequest 巡检任务查询实体 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult selectPageList(QueryInspectionPageListRequest queryInspectionRequest) { |
|
|
|
return queryInspectionPageListService.getPageList(queryInspectionRequest); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询巡检任务 |
|
|
|
* |
|
|
|
* @param id 巡检任务id |
|
|
|
* @return 巡检任务 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult selectOneById(String id) { |
|
|
|
|
|
|
|
return JsonResult.success(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询巡检任务列表 |
|
|
|
* |
|
|
|
* @param request 巡检任务查询实体 |
|
|
|
* @return 巡检任务 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult selectList(QueryInspectionPageListRequest request) { |
|
|
|
log.info("进入查询巡检任务列表业务"); |
|
|
|
// Page<Inspection> page = new Page<>(request.getPage(), request.getLimit()); |
|
|
|
// request.setUserId(ShiroUtils.getUserId()); |
|
|
|
// request.setTenantId(ShiroUtils.getTenantId()); |
|
|
|
|
|
|
|
// List<Inspection> list = inspectionMapper.selectList(page, request); |
|
|
|
|
|
|
|
return JsonResult.success(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 新增巡检任务 |
|
|
|
* |
|
|
|
* @param addInspectionRequest 新增任务请求参数 |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult insert(AddInspectionRequest addInspectionRequest) { |
|
|
|
return addinspectionService.add(addInspectionRequest); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 修改巡检任务 |
|
|
|
* |
|
|
|
* @param editInspectionRequest 修改任务请求参数 |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult update(EditInspectionRequest editInspectionRequest) { |
|
|
|
return updateInspectionService.update(editInspectionRequest); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除巡检任务信息 |
|
|
|
* |
|
|
|
* @param id 巡检任务主键 |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult deleteById(String id) { |
|
|
|
return deleteInspectionService.deleteById(id); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResult getList(Integer airportId) { |
|
|
|
return queryInspectionListService.getList(airportId); |
|
|
|
} |
|
|
|
} |