二维码功能开发

This commit is contained in:
2025-06-18 17:53:09 +08:00
parent e05403bfa7
commit 4e0e50a4f8
9 changed files with 183 additions and 22 deletions

View File

@@ -3,13 +3,18 @@ package com.njcn;
import com.njcn.gather.EntranceApplication;
import com.njcn.gather.report.pojo.DevReportParam;
import com.njcn.gather.report.service.IPqReportService;
import com.njcn.http.util.RestTemplateUtil;
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.http.ResponseEntity;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import java.io.File;
import java.util.HashMap;
/**
* @author hongawen
@@ -24,14 +29,18 @@ public class BaseJunitTest {
@Autowired
private IPqReportService pqReportService;
@Autowired
private RestTemplateUtil restTemplateUtil;
@Test
public void test() {
DevReportParam devReportParam = new DevReportParam();
devReportParam.setPlanId("ad3df9e4a90b4c3c8ce7d21a84ce6f59");
devReportParam.setPlanCode("31");
devReportParam.setScriptId("810e4050e1d445e3542c998a077a263a");
devReportParam.setDevId("a46349a3b3cf4789a6b82690a6076afd");
pqReportService.generateReport(devReportParam);
File file = new File("D:\\report\\PQS_882B4\\5555.docx");
try{
ResponseEntity<String> stringResponseEntity = restTemplateUtil.uploadFile("http://localhost:18082/api/file/upload",file);
}catch (Exception runtimeException){
System.out.println(runtimeException.getMessage());
}
}
}