Bläddra i källkod

Merge branch 'develop' of gitadmin/tuoheng_telecomumale into release

tags/v1.0.0^2
wanjing 1 år sedan
förälder
incheckning
26d0fb1853
3 ändrade filer med 49 tillägg och 1 borttagningar
  1. +7
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/UpdateFlyerService.java
  2. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/generate/GenerateReportByAutoService.java
  3. +41
    -0
      tuoheng-service/tuoheng-admin/src/test/java/com/tuoheng/admin/service/GenerateReportServiceTest.java

+ 7
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/UpdateFlyerService.java Visa fil

@@ -11,6 +11,7 @@ import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.LiveChannelMapper;
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;
@@ -52,6 +53,9 @@ public class UpdateFlyerService {
@Autowired
private DeliverStreamingService deliverStreamingService;

@Autowired
private GenerateReportService generateReportService;

/**
* 修改任务(修改任务状态和飞手信息)
*
@@ -79,6 +83,9 @@ public class UpdateFlyerService {
// 飞行完成
log.info("修改任务状态和飞手信息业务接口:飞行完成");
this.updateComplete(request, inspection);

// 任务完成后自动生成报告
generateReportService.generateByAuto(inspection);
}

// 直播

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/generate/GenerateReportByAutoService.java Visa fil

@@ -40,7 +40,7 @@ public class GenerateReportByAutoService {
* @return
*/
public JsonResult generate(Inspection inspection) {
log.info("进入任务完成自动生成报告");
log.info("进入任务完成自动生成报告, inspectionId={}", inspection.getId());
Report report = this.buildReport(inspection);

JsonResult result = this.addReport(report);

+ 41
- 0
tuoheng-service/tuoheng-admin/src/test/java/com/tuoheng/admin/service/GenerateReportServiceTest.java Visa fil

@@ -0,0 +1,41 @@
package com.tuoheng.admin.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.request.third.DspCallbackRequest;
import com.tuoheng.admin.service.report.generate.GenerateReportService;
import com.tuoheng.admin.service.third.dsp.IDspCallbackService;
import com.tuoheng.admin.vo.inspection.InspectionCardVo;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class GenerateReportServiceTest {

@Autowired
private InspectionMapper inspectionMapper;

@Autowired
private GenerateReportService generateReportService;

@Test
public void testGetOneById() {
Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>()
.eq(Inspection::getId, "1c40b2b421c4d1108ac21aa49451be8d"));

//
// Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>()
// .eq(Inspection::getId, "1c40b2b421c4d1108ac21aa49451be8d")
// .eq(Inspection::getMark, MarkEnum.VALID.getCode()));
generateReportService.generateByAuto(inspection);
}

}

Laddar…
Avbryt
Spara