소스 검색

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into develop

tags/v1.0.0^2
chengwang 1 년 전
부모
커밋
64576a081f
10개의 변경된 파일19개의 추가작업 그리고 23개의 파일을 삭제
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/callback/AirPortCallbackController.java
  2. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/user/AddUserCodeEnum.java
  3. +6
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/add/AddDeptService.java
  4. +4
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/update/UpdateDeptService.java
  5. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/flightdata/query/QueryFlightDataTrackService.java
  6. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/IInspectionService.java
  7. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java
  8. +0
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemCountHandle.java
  9. +0
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemDetailsHandle.java
  10. +0
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemVerifyHandle.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/callback/AirPortCallbackController.java 파일 보기

@@ -50,7 +50,7 @@ public class AirPortCallbackController {
* 被硬件调用,存飞行轨迹
*/
@PostMapping("/track")
public OperationEnum track(@RequestBody @Valid InspectionRequest inspectionRequest) {
public JsonResult track(@RequestBody @Valid InspectionRequest inspectionRequest) {
log.info("被硬件调用,存飞行轨迹:{}", JSONObject.toJSONString(inspectionRequest));
return iInspectionService.track(inspectionRequest);
}

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/user/AddUserCodeEnum.java 파일 보기

@@ -13,15 +13,15 @@ public enum AddUserCodeEnum {

ADD_IS_FAILED(1100100, "添加失败"),
CODE_IS_NULL(1100101, "编号不能为空"),
USERNAME_IS_NULL(1100102, "账号不能为空"),
REALNAME_IS_NULL(1100103, "姓名不能为空"),
USERNAME_IS_NULL(1100102, "员工账号不能为空"),
REALNAME_IS_NULL(1100103, "员工姓名不能为空"),
ROLE_ID_IS_NULL(1100104, "角色不能为空"),
DEPT_ID_IS_NULL(1100105, "部门不能为空"),
CLIENT_ID_IS_NULL(1100106, "ClientID不能为空"),
TYPE_ID_IS_NULL(1100107, "用户类型不能为空"),
TYPE_ID_IS_NOT_EXISTS(1100108, "用户类型不存在"),
PHONE_NOT_IMATCH(1100109, "手机号不匹配"),
USERNAME_ALREADY_EXISTS(1100110, "系统中已经存在该用户名"),
USERNAME_ALREADY_EXISTS(1100110, "系统中已经存在该账号"),
ROLE_IS_NOT_EXISTS(1100111, "该角色不存在");

/**

+ 6
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/add/AddDeptService.java 파일 보기

@@ -19,10 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;

/**
@@ -172,8 +169,13 @@ public class AddDeptService {
}

// 添加部门和公路数据
// 去重,防止前端提交了重复的数据
roadInformationList = roadInformationList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(RoadInformation::getId))), ArrayList::new));
this.addRoadToDept(tenantId, deptId, roadInformationList);

// 添加部门和路段数据
// 去重,防止前端提交了重复的数据
sectionList = sectionList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(Section::getId))), ArrayList::new));
this.addSectionToDept(tenantId, deptId, sectionList);
}


+ 4
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/update/UpdateDeptService.java 파일 보기

@@ -201,6 +201,8 @@ public class UpdateDeptService {
// 差集:新增公路
Collection<String> addRoadIdList = org.apache.commons.collections4.CollectionUtils.subtract(newRoadIdList, oldRoadIdList);
if (!CollectionUtils.isEmpty(addRoadIdList)) {
// 去重,防止前端提交了重复的数据
addRoadIdList= addRoadIdList.stream().distinct().collect(Collectors.toList());
this.addRoadToDept(tenantId, newEditDeptRequest.getId(), addRoadIdList);
}

@@ -301,6 +303,8 @@ public class UpdateDeptService {
Collection<String> addSectionIdList = org.apache.commons.collections4.CollectionUtils.subtract(newSectionIdList, oldSectionIdList);

if (!CollectionUtils.isEmpty(addSectionIdList)) {
// 去重,防止前端提交了重复的数据
addSectionIdList= addSectionIdList.stream().distinct().collect(Collectors.toList());
// 添加路段和部门数据
this.addSectionToDept(tenantId, newEditDeptRequest.getId(), addSectionIdList);
}

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/flightdata/query/QueryFlightDataTrackService.java 파일 보기

@@ -9,6 +9,7 @@ import com.tuoheng.admin.request.inspection.InspectionRequest;
import com.tuoheng.common.core.common.OperationEnum;
import com.tuoheng.common.core.enums.ServiceExceptionEnum;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.RedisUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
@@ -32,12 +33,11 @@ public class QueryFlightDataTrackService {
@Autowired
private InspectionMapper inspectionMapper;

public OperationEnum track(InspectionRequest inspectionRequest) {
public JsonResult track(InspectionRequest inspectionRequest) {
Inspection inspection = inspectionMapper.selectById(inspectionRequest.getRequestId());
if (ObjectUtil.isEmpty(inspection)) {
throw new ServiceException(ServiceExceptionEnum.TASK_DOES_NOT_EXIST);
}

FlightData flightData = new FlightData();
BeanUtils.copyProperties(inspectionRequest, flightData);
flightData.setTenantId(inspection.getTenantId());
@@ -49,6 +49,6 @@ public class QueryFlightDataTrackService {
//将最新一条数据放入缓存,并设置过期时间
redisUtils.set(String.valueOf(inspection.getId()), flightData, 10);
flightDataMapper.insert(flightData);
return OperationEnum.OPERATION_SUCCESS;
return JsonResult.success(OperationEnum.OPERATION_SUCCESS.getMessage());
}
}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/IInspectionService.java 파일 보기

@@ -128,7 +128,7 @@ public interface IInspectionService {
* @param inspectionRequest
* @return
*/
OperationEnum track(InspectionRequest inspectionRequest);
JsonResult track(InspectionRequest inspectionRequest);

/**
* 上传离线视频

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java 파일 보기

@@ -263,7 +263,7 @@ public class InspectionServiceImpl implements IInspectionService {
* @return
*/
@Override
public OperationEnum track(InspectionRequest inspectionRequest) {
public JsonResult track(InspectionRequest inspectionRequest) {
return queryFlightDataTrackService.track(inspectionRequest);
}


+ 0
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemCountHandle.java 파일 보기

@@ -32,10 +32,6 @@ public class ProblemCountHandle implements GenerateInspectionFieldHander {
@Override
public void handler(User user, Dept dept, InspectionVo inspectionVo) {
// log.info("处理问题数字段");
if (InspectionStatusEnum.WAIT_FLIGHT.getCode() == inspectionVo.getStatus()) {
inspectionVo.setExecute(true);
}

List<InspectionFile> inspectionFileList = inspectionFileMapper.selectList(new LambdaQueryWrapper<InspectionFile>()
.eq(InspectionFile::getInspectionId, inspectionVo.getId())
.eq(InspectionFile::getMark, 1));

+ 0
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemDetailsHandle.java 파일 보기

@@ -21,9 +21,6 @@ public class ProblemDetailsHandle implements GenerateInspectionFieldHander {
@Override
public void handler(User user, Dept dept, InspectionVo inspectionVo) {
// log.info("处理问题详情字段");
if (InspectionStatusEnum.WAIT_FLIGHT.getCode() == inspectionVo.getStatus()) {
inspectionVo.setExecute(true);
}
if (!user.getDeptId().equals(inspectionVo.getDeptId())) {
inspectionVo.setProblemVerify(true);
}

+ 0
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemVerifyHandle.java 파일 보기

@@ -21,9 +21,6 @@ public class ProblemVerifyHandle implements GenerateInspectionFieldHander {
@Override
public void handler(User user, Dept dept, InspectionVo inspectionVo) {
// log.info("处理问题核实字段");
if (InspectionStatusEnum.WAIT_FLIGHT.getCode() == inspectionVo.getStatus()) {
inspectionVo.setExecute(true);
}
if (user.getDeptId().equals(inspectionVo.getDeptId())) {
inspectionVo.setProblemVerify(true);
}

Loading…
취소
저장