Quellcode durchsuchen

Merge branch 'workorder0509' into develop

# Conflicts:
#	tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java
tags/V1.3.2
chenlu vor 5 Monaten
Ursprung
Commit
edf860176b
2 geänderte Dateien mit 38 neuen und 1 gelöschten Zeilen
  1. +31
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AuditEnum.java
  2. +7
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java

+ 31
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AuditEnum.java Datei anzeigen

@@ -0,0 +1,31 @@
package com.tuoheng.admin.enums;

import lombok.Getter;

/**
* 工单状态类型
*
* @author chenlu
* @team tuoheng
* @date 2022-12-07
* 审核结果 0未审核 1审核通过 2审核未通过
*/
public enum AuditEnum {

ZERO(0,"未审核"),
ONE(1,"审核通过"),

TWO(2,"审核未通过");

AuditEnum(int code, String description){
this.code = code;
this.description = description;
}

@Getter
private int code;

@Getter
private String description;

}

+ 7
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java Datei anzeigen

@@ -12,6 +12,7 @@ import com.tuoheng.admin.entity.Report;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.entity.WorkOrder;
import com.tuoheng.admin.entity.WorkOrderFile;
import com.tuoheng.admin.enums.AuditEnum;
import com.tuoheng.admin.enums.DataPermissionEnum;
import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.enums.WorkOrderStatusEnum;
@@ -46,6 +47,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.transaction.annotation.Transactional;


import java.util.ArrayList;
@@ -500,6 +502,7 @@ public class InspectionFileServiceImpl implements IInspectionFileService {


@Override
@Transactional(rollbackFor = Exception.class)
public JsonResult audit(InspectionFileHandleAuditRresultRequest request) {
//获取当前用户信息
User user = CurrentUserUtil.getUserInfo();
@@ -537,7 +540,10 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
//巡检问题处理结果表
LambdaQueryWrapper<InspectionFileHandle> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(InspectionFileHandle::getInspectionFileId, inspectionFileIdList);
queryWrapper.eq(InspectionFileHandle::getAudit, 1);
List<Integer> list = new ArrayList<>();
list.add(AuditEnum.ONE.getCode());
list.add(AuditEnum.TWO.getCode());
queryWrapper.in(InspectionFileHandle::getAudit, list);
List<InspectionFileHandle> inspectionFileHandles = inspectionFileHandleMapper.selectList(queryWrapper);
if (CollectionUtil.isEmpty(inspectionFileHandles)){
return JsonResult.success();

Laden…
Abbrechen
Speichern