Browse Source

修改任务分页列表删除权限字段

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
afb3e9b235
4 changed files with 16 additions and 5 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java
  2. +13
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/execute/ExecuteInspectionService.java
  3. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/DeleteHandle.java
  4. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionVo.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java View File

@@ -237,7 +237,7 @@ public class Inspection extends BaseEntity {
/**
* 定时任务的执行状态。1:未执行,2:已执行
*/
private Long executionStatus;
private Integer executionStatus;
/**
* 起点经度

+ 13
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/execute/ExecuteInspectionService.java View File

@@ -77,7 +77,6 @@ public class ExecuteInspectionService {
}

/**
*
* 调用机场平台
*
* @param tenantId
@@ -118,13 +117,25 @@ public class ExecuteInspectionService {
}

/**
* 修改任务执行状态
*
* @param tenantId
* @param inspection
*/
private void updateInspection(String userId, String tenantId, Inspection inspection, String msg) {
inspection.setExecutionStatus(2);
inspection.setUpdateUser(userId);
inspection.setUpdateTime(DateUtils.now());
inspectionMapper.update(inspection);
}

/**
* 更新任务中
*
* @param tenantId
* @param inspection
*/
private void insertInspectionHistory(String userId, String tenantId,Inspection inspection, String msg) {
private void insertInspectionHistory(String userId, String tenantId, Inspection inspection, String msg) {
InspectionHistory inspectionHistory = new InspectionHistory();
inspectionHistory.setTenantId(tenantId);
inspectionHistory.setInspectionId(inspection.getId());

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/DeleteHandle.java View File

@@ -35,7 +35,7 @@ public class DeleteHandle implements GenerateInspectionFieldHander {
@Override
public void handler(User user, Dept dept, InspectionVo inspectionVo) {
log.info("处理删除字段");
if (InspectionStatusEnum.IN_FLIGHT.getCode() != inspectionVo.getStatus()) {
if (InspectionStatusEnum.IN_FLIGHT.getCode() == inspectionVo.getStatus()) {
if (null != handler) {
handler.handler(user, dept, inspectionVo);
}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionVo.java View File

@@ -240,7 +240,7 @@ public class InspectionVo extends BaseEntity {
/**
* 定时任务的执行状态。1:未执行,2:已执行
*/
private Long executionStatus;
private Integer executionStatus;
/**
* 起点经度

Loading…
Cancel
Save