Browse Source

部门信息简报接口

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
f96f5a38f8
5 changed files with 230 additions and 180 deletions
  1. +10
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java
  2. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/InspectionFileServiceImpl.java
  3. +67
    -65
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/IInspectionService.java
  4. +124
    -115
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java
  5. +27
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionListService.java

+ 10
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java View File

@@ -69,4 +69,14 @@ public class InspectionController {
log.info("进入删除任务接口, id={}", id);
return iInspectionService.deleteById(id);
}

/**
* 根据机场id查询任务
* @param airportId
* @return
*/
@GetMapping("/airportInspectionList/{airportId}")
public JsonResult getList(@PathVariable("airportId") Integer airportId){
return iInspectionService.getList(airportId);
}
}

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/InspectionFileServiceImpl.java View File

@@ -94,4 +94,6 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
}).collect(Collectors.toList());
return JsonResult.success(list);
}


}

+ 67
- 65
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/IInspectionService.java View File

@@ -1,65 +1,67 @@
package com.tuoheng.admin.service.inspection;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.request.inspection.AddInspectionRequest;
import com.tuoheng.admin.request.inspection.EditInspectionRequest;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.common.core.utils.JsonResult;
/**
* 巡检任务Service接口
*
* @author wanjing
* @team tuoheng
* @date 2022-11-16
*/
public interface IInspectionService {
/**
* 查询巡检任务列表(分页)
*
* @param queryInspectionRequest 巡检任务查询实体
* @return 巡检任务集合
*/
JsonResult selectPageList(QueryInspectionPageListRequest queryInspectionRequest);
/**
* 查询巡检任务
*
* @param id 巡检任务Id
* @return 巡检任务
*/
JsonResult selectOneById(String id);
/**
* 查询巡检任务列表
*
* @param queryInspectionRequest 巡检任务查询实体
* @return 巡检任务集合
*/
JsonResult selectList(QueryInspectionPageListRequest queryInspectionRequest);
/**
* 新增巡检任务
*
* @param addInspectionRequest 新增任务请求参数
* @return 结果
*/
JsonResult insert(AddInspectionRequest addInspectionRequest);
/**
* 修改巡检任务
*
* @param editInspectionRequest 修改任务请求参数
* @return 结果
*/
JsonResult update(EditInspectionRequest editInspectionRequest);
/**
* 删除巡检任务信息
*
* @param id 巡检任务主键
* @return 结果
*/
JsonResult deleteById(String id);
}
package com.tuoheng.admin.service.inspection;

import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.request.inspection.AddInspectionRequest;
import com.tuoheng.admin.request.inspection.EditInspectionRequest;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.common.core.utils.JsonResult;

/**
* 巡检任务Service接口
*
* @author wanjing
* @team tuoheng
* @date 2022-11-16
*/
public interface IInspectionService {

/**
* 查询巡检任务列表(分页)
*
* @param queryInspectionRequest 巡检任务查询实体
* @return 巡检任务集合
*/
JsonResult selectPageList(QueryInspectionPageListRequest queryInspectionRequest);

/**
* 查询巡检任务
*
* @param id 巡检任务Id
* @return 巡检任务
*/
JsonResult selectOneById(String id);

/**
* 查询巡检任务列表
*
* @param queryInspectionRequest 巡检任务查询实体
* @return 巡检任务集合
*/
JsonResult selectList(QueryInspectionPageListRequest queryInspectionRequest);

/**
* 新增巡检任务
*
* @param addInspectionRequest 新增任务请求参数
* @return 结果
*/
JsonResult insert(AddInspectionRequest addInspectionRequest);

/**
* 修改巡检任务
*
* @param editInspectionRequest 修改任务请求参数
* @return 结果
*/
JsonResult update(EditInspectionRequest editInspectionRequest);

/**
* 删除巡检任务信息
*
* @param id 巡检任务主键
* @return 结果
*/
JsonResult deleteById(String id);

JsonResult getList(Integer airportId);
}

+ 124
- 115
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java View File

@@ -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);
}
}

+ 27
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionListService.java View File

@@ -0,0 +1,27 @@
package com.tuoheng.admin.service.inspection.query;

import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @Author ChengWang
* @Date 2022/11/29
*/
@Service
@Slf4j
public class QueryInspectionListService {

@Autowired
private InspectionMapper inspectionMapper;

@Autowired
private InspectionFileMapper inspectionFileMapper;

public JsonResult getList(Integer airportId) {
return null;
}
}

Loading…
Cancel
Save