Bläddra i källkod

代码提交

tags/V1.3.2
chenlu 4 månader sedan
förälder
incheckning
97fc246a24
2 ändrade filer med 38 tillägg och 1 borttagningar
  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 Visa fil

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 Visa fil

import com.tuoheng.admin.entity.User; import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.entity.WorkOrder; import com.tuoheng.admin.entity.WorkOrder;
import com.tuoheng.admin.entity.WorkOrderFile; import com.tuoheng.admin.entity.WorkOrderFile;
import com.tuoheng.admin.enums.AuditEnum;
import com.tuoheng.admin.enums.DataPermissionEnum; import com.tuoheng.admin.enums.DataPermissionEnum;
import com.tuoheng.admin.enums.MarkEnum; import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.enums.WorkOrderStatusEnum; import com.tuoheng.admin.enums.WorkOrderStatusEnum;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;




import java.util.ArrayList; import java.util.ArrayList;




@Override @Override
@Transactional(rollbackFor = Exception.class)
public JsonResult audit(InspectionFileHandleAuditRresultRequest request) { public JsonResult audit(InspectionFileHandleAuditRresultRequest request) {
//获取当前用户信息 //获取当前用户信息
User user = CurrentUserUtil.getUserInfo(); User user = CurrentUserUtil.getUserInfo();
//巡检问题处理结果表 //巡检问题处理结果表
LambdaQueryWrapper<InspectionFileHandle> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<InspectionFileHandle> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(InspectionFileHandle::getInspectionFileId, inspectionFileIdList); 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); List<InspectionFileHandle> inspectionFileHandles = inspectionFileHandleMapper.selectList(queryWrapper);
if (CollectionUtil.isEmpty(inspectionFileHandles)){ if (CollectionUtil.isEmpty(inspectionFileHandles)){
return JsonResult.success(); return JsonResult.success();

Laddar…
Avbryt
Spara