Browse Source

修改excel表格返回实体类

tags/V1.0.1^2
chengwang 1 year ago
parent
commit
410e437e12
6 changed files with 8 additions and 8 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirDataController.java
  2. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/AirData.java
  3. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airData/AirDataExcelVo.java
  4. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/AirDataServiceImpl.java
  5. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/IAirDataService.java
  6. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/query/QueryAirDataListService.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirDataController.java View File

@@ -37,7 +37,7 @@ public class AirDataController {
* @return
*/
@GetMapping("/list/{id}")
public List<AirData> getList(@PathVariable("id") String id) {
public JsonResult getList(@PathVariable("id") String id) {
return airDataService.getAirDataList(id);
}


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/AirData.java View File

@@ -176,7 +176,7 @@ public class AirData extends BaseEntity {
/**
* 二氧化氮(单位ppm)
*/
private String n02;
private String no2;




+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airData/AirDataExcelVo.java View File

@@ -76,13 +76,13 @@ public class AirDataExcelVo {
* 一氧化碳(单位ppm)
*/
@ExcelProperty(value = {"CO ppm"},index = 9)
private String c0;
private String co;

/**
* 二氧化氮(单位ppm)
*/
@ExcelProperty(value = {"NO2 ppb"},index = 10)
private String n02;
private String no2;

/**
* o3+NO2

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/AirDataServiceImpl.java View File

@@ -35,7 +35,7 @@ public class AirDataServiceImpl extends BaseServiceImpl<AirDataMapper, AirData>
* @return
*/
@Override
public List<AirData> getAirDataList(String id) {
public JsonResult getAirDataList(String id) {
return queryAirDataListService.list(id);
}


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/IAirDataService.java View File

@@ -17,7 +17,7 @@ public interface IAirDataService extends IBaseService<AirData> {
* @param id
* @return
*/
List<AirData> getAirDataList(String id);
JsonResult getAirDataList(String id);

JsonResult generateTable(String id);


+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/query/QueryAirDataListService.java View File

@@ -59,12 +59,12 @@ public class QueryAirDataListService {
private AliyunOSSUtil aliyunOSSUtil;


public List<AirData> list(String id) {
public JsonResult list(String id) {
List<AirData> airDataList = airDataMapper.selectList(Wrappers.<AirData>lambdaQuery()
.eq(AirData::getMark, MarkEnum.VALID.getCode())
.eq(AirData::getInspectionId, id));

return airDataList;
return JsonResult.success(airDataList);
}

public JsonResult generateTable(String id) {

Loading…
Cancel
Save