Browse Source

修改根据巡检机场查询巡检任务列表

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
ccc87ca496
4 changed files with 15 additions and 6 deletions
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java
  2. +9
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionListService.java
  3. +0
    -4
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/controller/WorkOrderController.java
  4. +1
    -0
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java View File

@@ -156,6 +156,11 @@ public class InspectionServiceImpl implements IInspectionService {
return deleteInspectionService.deleteById(id);
}

/**
* 根据机场id获取当前登录人部门的巡检任务列表
* @param dto
* @return
*/
@Override
public JsonResult getListByAirportId(InspectionDto dto) {
return queryInspectionListService.getListByAirportId(dto);

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

@@ -11,6 +11,7 @@ import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.UserMapper;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.SecurityUserUtils;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -36,11 +37,17 @@ public class QueryInspectionListService {
private UserMapper userMapper;

public JsonResult getListByAirportId(InspectionDto dto) {
if(null == dto.getAirportId() && StringUtils.isEmpty(dto.getUserId())){
// if(null == dto.getAirportId() && StringUtils.isEmpty(dto.getUserId())){
// return JsonResult.error(QueryInspectionListServiceEnum.QUERY_IS_FAILED.getCode(),QueryInspectionListServiceEnum.QUERY_IS_FAILED.getMsg());
// }
//String username = SecurityUserUtils.username();
String username = "admin";
if(StringUtils.isEmpty(username)){
return JsonResult.error(QueryInspectionListServiceEnum.QUERY_IS_FAILED.getCode(),QueryInspectionListServiceEnum.QUERY_IS_FAILED.getMsg());
}
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery()
.eq(User::getMark, 1).eq(User::getId, dto.getUserId()));
.eq(User::getMark, 1).eq(User::getUsername,username));

if(ObjectUtil.isNull(user)){
return JsonResult.error(QueryInspectionListServiceEnum.USER_IS_NOT_EXIST.getCode(),QueryInspectionListServiceEnum.USER_IS_NOT_EXIST.getMsg());
}

+ 0
- 4
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/controller/WorkOrderController.java View File

@@ -80,8 +80,4 @@ public class WorkOrderController extends BaseController {
}






}

+ 1
- 0
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java View File

@@ -253,6 +253,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
WorkOrder workOrder = workOrderMapper.selectById(workOrderInfoVo.getId());
if(ObjectUtil.isNotNull(workOrder)){
workOrder.setStatus(15);
workOrder.setUpdateTime(DateUtils.now());
super.update(workOrder);
}
}

Loading…
Cancel
Save