ソースを参照

Merge branch 'develop' of gitadmin/tuoheng_telecomumale into release

tags/v1.0.0^2
wanjing 1年前
コミット
20fca11496
4個のファイルの変更16行の追加7行の削除
  1. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspectionfilehandle/InspectionFileProcessingCodeEnum.java
  2. +10
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/processing/InspectionFileProcessingService.java
  3. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/export/ExportInspectionHandleReportService.java
  4. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/export/ExportInspectionReportService.java

+ 2
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspectionfilehandle/InspectionFileProcessingCodeEnum.java ファイルの表示

@@ -15,7 +15,8 @@ public enum InspectionFileProcessingCodeEnum {
WORK_ORDER_ID_IS_NULL(1250101, "工单id为空"),
WORK_ORDER_IS_NOT_EXIST(1250102, "工单不存在"),
INSPECTION_FILE_ID_IS_NULL(1250103, "任务问题id为空"),
INSPECTION_FILE_IS_NOT_EXIST(1250104, "任务问题不存在");
INSPECTION_FILE_IS_NOT_EXIST(1250104, "任务问题不存在"),
INSPECTION_FILE_Handle_IS_EXIST(1250105, "该问题已处理");

/**
* 错误码

+ 10
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/processing/InspectionFileProcessingService.java ファイルの表示

@@ -1,5 +1,6 @@
package com.tuoheng.admin.service.inspectionfile.processing;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.entity.*;
import com.tuoheng.admin.enums.InspectionFileStatusEnum;
@@ -92,7 +93,7 @@ public class InspectionFileProcessingService {
WorkOrder workOrder = workOrderMapper.selectOne(new LambdaQueryWrapper<WorkOrder>()
.eq(WorkOrder::getId, request.getWorkOrderId())
.eq(WorkOrder::getMark, MarkEnum.VALID.getCode()));
if (null == workOrder) {
if (ObjectUtil.isEmpty(workOrder)) {
return JsonResult.error(InspectionFileProcessingCodeEnum.WORK_ORDER_IS_NOT_EXIST.getCode(), InspectionFileProcessingCodeEnum.WORK_ORDER_IS_NOT_EXIST.getMsg());
}
// 判断任务问题id是否为空
@@ -103,10 +104,17 @@ public class InspectionFileProcessingService {
InspectionFile inspectionFile = inspectionFileMapper.selectOne(new LambdaQueryWrapper<InspectionFile>()
.eq(InspectionFile::getId, request.getInspectionFileId())
.eq(InspectionFile::getMark, MarkEnum.VALID.getCode()));
if (null == inspectionFile) {
if (ObjectUtil.isEmpty(inspectionFile)) {
log.info("任务问题不存在,inspectionFileId:{}", request.getInspectionFileId());
return JsonResult.error(InspectionFileProcessingCodeEnum.INSPECTION_FILE_IS_NOT_EXIST.getCode(), InspectionFileProcessingCodeEnum.INSPECTION_FILE_IS_NOT_EXIST.getMsg());
}
InspectionFileHandle inspectionFileHandle = inspectionFileHandleMapper.selectOne(new LambdaQueryWrapper<InspectionFileHandle>()
.eq(InspectionFileHandle::getInspectionFileId, request.getInspectionFileId())
.eq(InspectionFileHandle::getMark, MarkEnum.VALID.getCode()));
if (ObjectUtil.isNotEmpty(inspectionFileHandle)) {
log.info("该问题已处理,不能重复提交,inspectionFileHandleId:{}", inspectionFileHandle.getId());
return JsonResult.error(InspectionFileProcessingCodeEnum.INSPECTION_FILE_Handle_IS_EXIST.getCode(), InspectionFileProcessingCodeEnum.INSPECTION_FILE_Handle_IS_EXIST.getMsg());
}
return JsonResult.success(inspectionFile);
}


+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/export/ExportInspectionHandleReportService.java ファイルの表示

@@ -88,7 +88,7 @@ public class ExportInspectionHandleReportService {

// 生成word
String areaName = this.getAreaName();
String titleName = areaName + "航道巡检处理报告";
String titleName = areaName + "城管巡检处理报告";
File f = new File(filePath);
if (!f.exists() || f.length() < 1000) {
result = generateReportWordService.buildWord(filePath, titleName, report, inspectionFileList, inspectionFileHandleList);
@@ -99,7 +99,7 @@ public class ExportInspectionHandleReportService {
}

// 下载
String fileName = this.getAreaName() + "航道巡检处理报告【" + report.getReportCode() + "】.doc";
String fileName = this.getAreaName() + "城管巡检处理报告【" + report.getReportCode() + "】.doc";
DownloadUtil.download(response, filePath, fileName);

return JsonResult.success();

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/export/ExportInspectionReportService.java ファイルの表示

@@ -81,7 +81,7 @@ public class ExportInspectionReportService {

// 生成word
String areaName = this.getAreaName();
String titleName = areaName + "航道巡检报告";
String titleName = areaName + "城管巡检报告";
File f = new File(filePath);
if (!f.exists() || f.length() < 1000) {
result = generateReportWordService.buildWord(filePath, titleName, report, inspectionFileList, null);
@@ -92,7 +92,7 @@ public class ExportInspectionReportService {
}

// 下载
String fileName = this.getAreaName() + "航道巡检报告【" + report.getReportCode() + "】.doc";
String fileName = this.getAreaName() + "城管巡检报告【" + report.getReportCode() + "】.doc";
DownloadUtil.download(response, filePath, fileName);

return JsonResult.success();

読み込み中…
キャンセル
保存