@@ -150,11 +150,11 @@ public class InspectionFileController { | |||
* | |||
* 导出问题清单 | |||
* | |||
* @param idList | |||
* @param request | |||
* @return | |||
*/ | |||
@GetMapping("/export/{idList}") | |||
public void exportExcleByIdList(HttpServletRequest request, HttpServletResponse response, @PathVariable("idList") List<String> idList) { | |||
iInspectionFileService.exportExcleByIdList(response, idList); | |||
@GetMapping("/export") | |||
public void exportExcleByIdList(HttpServletResponse response, ExportInspectionFileRequest request) { | |||
iInspectionFileService.exportExcle(response, request); | |||
} | |||
} |
@@ -0,0 +1,30 @@ | |||
package com.tuoheng.admin.request.inspectionfile; | |||
import com.tuoheng.common.core.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* 导出问题清单请求实体 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2023-12-01 | |||
*/ | |||
@Data | |||
public class ExportInspectionFileRequest extends BaseQuery { | |||
/** | |||
* 任务ID | |||
*/ | |||
private String inspectionId; | |||
/** | |||
* 问题编号 | |||
*/ | |||
private String questionId; | |||
/** | |||
* 问题状态:5待确认 10已忽略 15已确认 20已生成工单 25问题已处理 | |||
*/ | |||
private Integer status; | |||
} |
@@ -9,6 +9,7 @@ import com.tuoheng.admin.enums.TaskStatusEnum; | |||
import com.tuoheng.admin.mapper.InspectionMapper; | |||
import com.tuoheng.admin.mapper.ReportMapper; | |||
import com.tuoheng.admin.request.inspection.UpdateTaskByCodeRequest; | |||
import com.tuoheng.admin.service.report.generate.GenerateReportService; | |||
import com.tuoheng.common.core.exception.ServiceException; | |||
import com.tuoheng.common.core.utils.JacksonUtil; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
@@ -44,6 +45,9 @@ public class UpdateFlyerService { | |||
@Autowired | |||
private OffLineCompleteService offLineCompleteService; | |||
@Autowired | |||
private GenerateReportService generateReportService; | |||
/** | |||
* 修改任务(修改任务状态和飞手信息) | |||
* | |||
@@ -71,6 +75,9 @@ public class UpdateFlyerService { | |||
// 飞行完成 | |||
log.info("修改任务状态和飞手信息业务接口:飞行完成"); | |||
this.updateComplete(request, inspection); | |||
// 任务完成后自动生成报告 | |||
generateReportService.generateByAuto(inspection.getId()); | |||
} | |||
// 直播 |
@@ -9,6 +9,7 @@ import com.tuoheng.admin.enums.MarkEnum; | |||
import com.tuoheng.admin.enums.code.inspection.EditInspectionStatusCodeEnum; | |||
import com.tuoheng.admin.mapper.InspectionMapper; | |||
import com.tuoheng.admin.request.inspection.MissionStatusRequest; | |||
import com.tuoheng.admin.service.report.generate.GenerateReportService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
@@ -34,6 +35,9 @@ public class UpdateInspectionStatusService { | |||
@Autowired | |||
private UpdateWaittStatusService updateWaittStatusService; | |||
@Autowired | |||
private GenerateReportService generateReportService; | |||
/** | |||
* 添加任务 | |||
* | |||
@@ -55,13 +59,16 @@ public class UpdateInspectionStatusService { | |||
} | |||
if (AirPortTaskStatusEnum.FLIGHT.getCode() == missionStatusRequest.getStatus()) { | |||
log.info("修改任务状态业务接口:修改执行中状态"); | |||
log.info("修改任务状态业务接口:执行中,inspectionId={}", inspection.getId()); | |||
status = InspectionStatusEnum.IN_FLIGHT.getCode(); | |||
updateFlightStatusService.updateFlightStatus(inspection, missionStatusRequest); | |||
} else if (AirPortTaskStatusEnum.WAIT.getCode() == missionStatusRequest.getStatus()) { | |||
log.info("修改任务状态业务接口:修改待执行状态"); | |||
log.info("修改任务状态业务接口:飞行结束"); | |||
status = InspectionStatusEnum.FLIGHT_COMPLETED.getCode(); | |||
updateWaittStatusService.updateWaittStatus(inspection); | |||
// 任务完成后自动生成报告 | |||
generateReportService.generateByAuto(inspection.getId()); | |||
} | |||
this.updateEmergencyStatus(inspection, status); |
@@ -121,9 +121,9 @@ public interface IInspectionFileService { | |||
* | |||
* 导出问题清单 | |||
* | |||
* @param idList | |||
* @param request | |||
* | |||
* @return | |||
*/ | |||
JsonResult exportExcleByIdList(HttpServletResponse response, List<String> idList); | |||
JsonResult exportExcle(HttpServletResponse response, ExportInspectionFileRequest request); | |||
} |
@@ -332,12 +332,12 @@ public class InspectionFileServiceImpl implements IInspectionFileService { | |||
/** | |||
* 导出问题清单 | |||
* | |||
* @param idList | |||
* @param request | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult exportExcleByIdList(HttpServletResponse response, List<String> idList) { | |||
return exportInspectionFileByIdListService.exportExcleByIdList(response, idList); | |||
public JsonResult exportExcle(HttpServletResponse response, ExportInspectionFileRequest request) { | |||
return exportInspectionFileByIdListService.exportExcle(response, request); | |||
} | |||
} |
@@ -13,6 +13,7 @@ import com.tuoheng.admin.enums.InspectionFileStatusEnum; | |||
import com.tuoheng.admin.enums.MarkEnum; | |||
import com.tuoheng.admin.mapper.InspectionFileMapper; | |||
import com.tuoheng.admin.mapper.InspectionMapper; | |||
import com.tuoheng.admin.request.inspectionfile.ExportInspectionFileRequest; | |||
import com.tuoheng.admin.utils.CurrentUserUtil; | |||
import com.tuoheng.admin.utils.DownloadUtil; | |||
import com.tuoheng.admin.utils.excel.CustomCellWriteWidthHandler; | |||
@@ -24,6 +25,7 @@ import com.tuoheng.common.core.exception.ServiceException; | |||
import com.tuoheng.common.core.utils.DateUtils; | |||
import com.tuoheng.common.core.utils.FileUtils; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import com.tuoheng.common.core.utils.StringUtils; | |||
import lombok.RequiredArgsConstructor; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.stereotype.Service; | |||
@@ -59,20 +61,22 @@ public class ExportInspectionFileByIdListService { | |||
* | |||
* @return | |||
*/ | |||
public JsonResult exportExcleByIdList(HttpServletResponse response, List<String> idList) { | |||
log.info("进入导出任务问题清单接口"); | |||
public JsonResult exportExcle(HttpServletResponse response, ExportInspectionFileRequest request) { | |||
log.info("进入导出任务问题清单接口, request={}", request); | |||
User user = CurrentUserUtil.getUserInfo(); | |||
JsonResult result = this.check(idList); | |||
JsonResult result = this.check(request); | |||
if (0 != result.getCode()) { | |||
log.info("导出任务问题清单:校验失败:{}", result.getMsg()); | |||
return result; | |||
} | |||
List<InspectionFile> inspectionFileList = inspectionFileMapper.selectList(Wrappers.<InspectionFile>lambdaQuery() | |||
.eq(InspectionFile::getTenantId, user.getTenantId()) | |||
.in(InspectionFile::getId, idList) | |||
.eq(InspectionFile::getInspectionId, request.getInspectionId()) | |||
.eq(StringUtils.isNotEmpty(request.getQuestionId()), InspectionFile::getQuestionId, request.getQuestionId()) | |||
.eq(ObjectUtil.isNotEmpty(request.getStatus()), InspectionFile::getStatus, request.getStatus()) | |||
.eq(InspectionFile::getMark, MarkEnum.VALID.getCode())); | |||
if (CollectionUtil.isEmpty(inspectionFileList)) { | |||
log.info("问题列表不存在, idList={}", idList); | |||
log.info("问题列表不存在, request={}", request); | |||
return JsonResult.success(); | |||
} | |||
InspectionFile inspectionFile = inspectionFileList.get(0); | |||
@@ -103,11 +107,11 @@ public class ExportInspectionFileByIdListService { | |||
/** | |||
* 检查参数 | |||
* | |||
* @param idList | |||
* @param request | |||
* @return | |||
*/ | |||
private JsonResult check(List<String> idList) { | |||
if (CollectionUtil.isEmpty(idList)) { | |||
private JsonResult check(ExportInspectionFileRequest request) { | |||
if (StringUtils.isEmpty(request.getInspectionId())) { | |||
throw new ServiceException("问题ID为空"); | |||
} | |||
return JsonResult.success(); |
@@ -3,7 +3,7 @@ package com.tuoheng.admin.service.report; | |||
import com.tuoheng.admin.request.report.QueryReportPageListRequest; | |||
import com.tuoheng.admin.service.report.export.ExportInspectionHandleReportService; | |||
import com.tuoheng.admin.service.report.export.ExportInspectionReportService; | |||
import com.tuoheng.admin.service.report.generate.GenerateReportService; | |||
import com.tuoheng.admin.service.report.generate.GenerateReportByManualService; | |||
import com.tuoheng.admin.service.report.query.QueryInspectionHandleReportService; | |||
import com.tuoheng.admin.service.report.query.QueryInspectionReportService; | |||
import com.tuoheng.admin.service.report.query.QueryReportPageListService; | |||
@@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletResponse; | |||
public class IReportServiceImpl implements IReportService{ | |||
@Autowired | |||
private GenerateReportService generateReportService; | |||
private GenerateReportByManualService generateReportService; | |||
@Autowired | |||
private QueryReportPageListService queryReportPageListService; |
@@ -0,0 +1,98 @@ | |||
package com.tuoheng.admin.service.report.generate; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.tuoheng.admin.conver.ReportConverMapper; | |||
import com.tuoheng.admin.entity.Inspection; | |||
import com.tuoheng.admin.entity.Report; | |||
import com.tuoheng.admin.enums.MarkEnum; | |||
import com.tuoheng.admin.enums.code.report.GenerateReportCodeEnum; | |||
import com.tuoheng.admin.mapper.InspectionMapper; | |||
import com.tuoheng.admin.mapper.ReportMapper; | |||
import com.tuoheng.common.core.exception.ServiceException; | |||
import com.tuoheng.common.core.utils.DateUtils; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* 任务完成自动生成报告业务层处理 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2023-11-30 | |||
*/ | |||
@Slf4j | |||
@Service | |||
public class GenerateReportByAutoService { | |||
@Autowired | |||
private ReportMapper reportMapper; | |||
@Autowired | |||
private InspectionMapper inspectionMapper; | |||
/** | |||
* 生成报告 | |||
* | |||
* @return | |||
*/ | |||
public JsonResult generate(String inspectionId) { | |||
log.info("进入任务完成自动生成报告, inspectionId={}", inspectionId); | |||
Report report = this.buildReport(inspectionId); | |||
JsonResult result = this.addReport(report); | |||
if (0 != result.getCode()) { | |||
log.info("自动生成报告业务:添加报告记录失败:{}", result.getMsg()); | |||
throw new ServiceException("自动生成报告业务:添加报告记录失败"); | |||
} | |||
return JsonResult.success(); | |||
} | |||
/** | |||
* | |||
* 生成报告实体 | |||
* | |||
* @param inspectionId | |||
*/ | |||
private Report buildReport(String inspectionId) { | |||
Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>() | |||
.eq(Inspection::getId, inspectionId) | |||
.eq(Inspection::getMark, MarkEnum.VALID.getCode())); | |||
Report report = ReportConverMapper.INSTANCE.fromInspectionToReport(inspection); | |||
// 任务编号:XJBG+日期+3位排序数字 | |||
String code = DateUtils.generateCode("XJBG"); | |||
report.setId(""); | |||
report.setReportCode(code); | |||
report.setTenantId(inspection.getTenantId()); | |||
report.setInspectionId(inspection.getId()); | |||
report.setInspectionCode(inspection.getCode()); | |||
report.setInspectionName(inspection.getName()); | |||
report.setCreateUser(""); | |||
report.setCreateTime(DateUtils.now()); | |||
return report; | |||
} | |||
/** | |||
* | |||
* 添加报告 | |||
* 每次生成报告,将上一次生成的报告给覆盖,因此直接将上次的删除,重新添加一条 | |||
* | |||
* @param report | |||
*/ | |||
private JsonResult addReport(Report report) { | |||
Report reportTmp = reportMapper.selectOne(Wrappers.<Report>lambdaQuery() | |||
.eq(Report::getInspectionId, report.getInspectionId()) | |||
.eq(Report::getMark, MarkEnum.VALID.getCode())); | |||
if (null != reportTmp) { | |||
reportMapper.deleteById(reportTmp.getId()); | |||
} | |||
Integer rowCount = reportMapper.insert(report); | |||
if (rowCount <= 0) { | |||
log.info("自动生成报告业务:添加报告记录失败"); | |||
return JsonResult.error(GenerateReportCodeEnum.GENERATE_IS_FAILED.getCode(), GenerateReportCodeEnum.GENERATE_IS_FAILED.getMsg()); | |||
} | |||
return JsonResult.success(); | |||
} | |||
} |
@@ -0,0 +1,129 @@ | |||
package com.tuoheng.admin.service.report.generate; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.tuoheng.admin.conver.ReportConverMapper; | |||
import com.tuoheng.admin.entity.*; | |||
import com.tuoheng.admin.enums.code.report.GenerateReportCodeEnum; | |||
import com.tuoheng.admin.mapper.*; | |||
import com.tuoheng.admin.utils.CurrentUserUtil; | |||
import com.tuoheng.common.core.utils.DateUtils; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import com.tuoheng.common.core.utils.StringUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* 生成报告业务层处理 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2023-11-30 | |||
*/ | |||
@Slf4j | |||
@Service | |||
public class GenerateReportByManualService { | |||
@Autowired | |||
private InspectionMapper inspectionMapper; | |||
@Autowired | |||
private InspectionFileMapper inspectionFileMapper; | |||
@Autowired | |||
private InspectionFileHandleMapper inspectionFileHandleMapper; | |||
@Autowired | |||
private ReportMapper reportMapper; | |||
/** | |||
* 生成报告 | |||
* | |||
* @return | |||
*/ | |||
public JsonResult generate(String id) { | |||
log.info("进入生成报告业务"); | |||
String userId = CurrentUserUtil.getUserId(); | |||
String tenantId = CurrentUserUtil.getTenantId(); | |||
JsonResult result = this.check(id); | |||
if (0 != result.getCode()) { | |||
log.info("生成报告业务:校验参数失败:{}", result.getMsg()); | |||
return result; | |||
} | |||
Inspection inspection = (Inspection) result.getData(); | |||
Report report = this.buildReport(userId, tenantId, inspection); | |||
result = this.addReport(report); | |||
if (0 != result.getCode()) { | |||
log.info("生成报告业务:添加报告记录失败:{}", result.getMsg()); | |||
return result; | |||
} | |||
return JsonResult.success(report); | |||
} | |||
/** | |||
* 检查 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
private JsonResult check(String id) { | |||
if (StringUtils.isEmpty(id)) { | |||
return JsonResult.error(GenerateReportCodeEnum.INSPECTION_ID_IS_NULL.getCode(), GenerateReportCodeEnum.INSPECTION_ID_IS_NULL.getMsg()); | |||
} | |||
Inspection inspection = inspectionMapper.selectOne(Wrappers.<Inspection>lambdaQuery() | |||
.eq(Inspection::getId, id) | |||
.eq(Inspection::getMark, 1)); | |||
if (null == inspection) { | |||
return JsonResult.error(GenerateReportCodeEnum.INSPECTION_IS_NOT_EXIST.getCode(), GenerateReportCodeEnum.INSPECTION_IS_NOT_EXIST.getMsg()); | |||
} | |||
return JsonResult.success(inspection); | |||
} | |||
/** | |||
* | |||
* 生成报告实体 | |||
* | |||
* @param inspection | |||
*/ | |||
private Report buildReport(String userId, String tenantId, Inspection inspection) { | |||
Report report = ReportConverMapper.INSTANCE.fromInspectionToReport(inspection); | |||
// 任务编号:XJBG+日期+3位排序数字 | |||
String code = DateUtils.generateCode("XJBG"); | |||
report.setId(""); | |||
report.setReportCode(code); | |||
report.setTenantId(tenantId); | |||
report.setInspectionId(inspection.getId()); | |||
report.setInspectionCode(inspection.getCode()); | |||
report.setInspectionName(inspection.getName()); | |||
report.setCreateUser(userId); | |||
report.setCreateTime(DateUtils.now()); | |||
return report; | |||
} | |||
/** | |||
* | |||
* 添加报告 | |||
* 每次生成报告,将上一次生成的报告给覆盖,因此直接将上次的删除,重新添加一条 | |||
* | |||
* @param report | |||
*/ | |||
private JsonResult addReport(Report report) { | |||
Report reportTmp = reportMapper.selectOne(Wrappers.<Report>lambdaQuery() | |||
.eq(Report::getInspectionId, report.getInspectionId()) | |||
.eq(Report::getMark, 1)); | |||
if (null != reportTmp) { | |||
reportMapper.deleteById(reportTmp.getId()); | |||
} | |||
Integer rowCount = reportMapper.insert(report); | |||
if (rowCount <= 0) { | |||
log.info("生成报告业务:添加报告记录失败"); | |||
return JsonResult.error(GenerateReportCodeEnum.GENERATE_IS_FAILED.getCode(), GenerateReportCodeEnum.GENERATE_IS_FAILED.getMsg()); | |||
} | |||
return JsonResult.success(); | |||
} | |||
} |
@@ -1,136 +1,27 @@ | |||
package com.tuoheng.admin.service.report.generate; | |||
import cn.hutool.core.collection.CollectionUtil; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.tuoheng.admin.conver.ReportConverMapper; | |||
import com.tuoheng.admin.entity.*; | |||
import com.tuoheng.admin.enums.InspectionFileStatusEnum; | |||
import com.tuoheng.admin.enums.code.report.GenerateReportCodeEnum; | |||
import com.tuoheng.admin.mapper.*; | |||
import com.tuoheng.admin.service.report.query.GetInspectionFileStatusList; | |||
import com.tuoheng.admin.utils.CurrentUserUtil; | |||
import com.tuoheng.common.core.utils.DateUtils; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import com.tuoheng.common.core.utils.StringUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 生成报告业务层处理 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-09 | |||
* @date 2023-11-30 | |||
*/ | |||
@Slf4j | |||
@Service | |||
public class GenerateReportService { | |||
@Autowired | |||
private InspectionMapper inspectionMapper; | |||
@Autowired | |||
private InspectionFileMapper inspectionFileMapper; | |||
@Autowired | |||
private InspectionFileHandleMapper inspectionFileHandleMapper; | |||
@Autowired | |||
private ReportMapper reportMapper; | |||
/** | |||
* 生成报告 | |||
* | |||
* @return | |||
*/ | |||
public JsonResult generate(String id) { | |||
log.info("进入生成报告业务"); | |||
String userId = CurrentUserUtil.getUserId(); | |||
String tenantId = CurrentUserUtil.getTenantId(); | |||
JsonResult result = this.check(id); | |||
if (0 != result.getCode()) { | |||
log.info("生成报告业务:校验参数失败:{}", result.getMsg()); | |||
return result; | |||
} | |||
Inspection inspection = (Inspection) result.getData(); | |||
Report report = this.buildReport(userId, tenantId, inspection); | |||
result = this.addReport(report); | |||
if (0 != result.getCode()) { | |||
log.info("生成报告业务:添加报告记录失败:{}", result.getMsg()); | |||
return result; | |||
} | |||
return JsonResult.success(report); | |||
} | |||
public interface GenerateReportService { | |||
/** | |||
* 检查 | |||
* 手动生成报告 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
private JsonResult check(String id) { | |||
if (StringUtils.isEmpty(id)) { | |||
return JsonResult.error(GenerateReportCodeEnum.INSPECTION_ID_IS_NULL.getCode(), GenerateReportCodeEnum.INSPECTION_ID_IS_NULL.getMsg()); | |||
} | |||
Inspection inspection = inspectionMapper.selectOne(Wrappers.<Inspection>lambdaQuery() | |||
.eq(Inspection::getId, id) | |||
.eq(Inspection::getMark, 1)); | |||
if (null == inspection) { | |||
return JsonResult.error(GenerateReportCodeEnum.INSPECTION_IS_NOT_EXIST.getCode(), GenerateReportCodeEnum.INSPECTION_IS_NOT_EXIST.getMsg()); | |||
} | |||
return JsonResult.success(inspection); | |||
} | |||
JsonResult generateByManual(String id); | |||
/** | |||
* | |||
* 生成报告实体 | |||
* | |||
* @param inspection | |||
*/ | |||
private Report buildReport(String userId, String tenantId, Inspection inspection) { | |||
Report report = ReportConverMapper.INSTANCE.fromInspectionToReport(inspection); | |||
// 任务编号:XJBG+日期+3位排序数字 | |||
String code = DateUtils.generateCode("XJBG"); | |||
report.setId(""); | |||
report.setReportCode(code); | |||
report.setTenantId(tenantId); | |||
report.setInspectionId(inspection.getId()); | |||
report.setInspectionCode(inspection.getCode()); | |||
report.setInspectionName(inspection.getName()); | |||
report.setCreateUser(userId); | |||
report.setCreateTime(DateUtils.now()); | |||
return report; | |||
} | |||
/** | |||
* | |||
* 添加报告 | |||
* 每次生成报告,将上一次生成的报告给覆盖,因此直接将上次的删除,重新添加一条 | |||
* | |||
* @param report | |||
* 自动生成工单 | |||
*/ | |||
private JsonResult addReport(Report report) { | |||
Report reportTmp = reportMapper.selectOne(Wrappers.<Report>lambdaQuery() | |||
.eq(Report::getInspectionId, report.getInspectionId()) | |||
.eq(Report::getMark, 1)); | |||
if (null != reportTmp) { | |||
reportMapper.deleteById(reportTmp.getId()); | |||
JsonResult generateByAuto(String id); | |||
} | |||
Integer rowCount = reportMapper.insert(report); | |||
if (rowCount <= 0) { | |||
log.info("生成报告业务:添加报告记录失败"); | |||
return JsonResult.error(GenerateReportCodeEnum.GENERATE_IS_FAILED.getCode(), GenerateReportCodeEnum.GENERATE_IS_FAILED.getMsg()); | |||
} | |||
return JsonResult.success(); | |||
} | |||
} |
@@ -0,0 +1,34 @@ | |||
package com.tuoheng.admin.service.report.generate; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* 生成报告业务层处理 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2023-11-30 | |||
*/ | |||
@Slf4j | |||
@Service | |||
public class GenerateReportServiceImpl implements GenerateReportService { | |||
@Autowired | |||
private GenerateReportByManualService generateReportByManualService; | |||
@Autowired | |||
private GenerateReportByAutoService generateReportByAutoService; | |||
@Override | |||
public JsonResult generateByManual(String id) { | |||
return generateReportByManualService.generate(id); | |||
} | |||
@Override | |||
public JsonResult generateByAuto(String id) { | |||
return generateReportByAutoService.generate(id); | |||
} | |||
} |
@@ -61,7 +61,7 @@ | |||
<appender name="grpc-log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender"> | |||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> | |||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.TraceIdMDCPatternLogbackLayout"> | |||
<Pattern>[th-waterway] %d{yyyy-MM-dd HH:mm:ss.SSS} [%X{tid}] [%thread] %-5level %logger{36} -%msg%n</Pattern> | |||
<Pattern>[th-freeway] %d{yyyy-MM-dd HH:mm:ss.SSS} [%X{tid}] [%thread] %-5level %logger{36} -%msg%n</Pattern> | |||
</layout> | |||
</encoder> | |||
</appender> |