update
This commit is contained in:
@@ -16,6 +16,7 @@ import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.modules.database.dto.NasaDataRecordPage;
|
||||
import org.jeecg.modules.database.entity.NasaDataRecord;
|
||||
import org.jeecg.modules.database.service.INasaDataRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -50,14 +51,16 @@ public class NasaDataRecordController extends JeecgController<NasaDataRecord, IN
|
||||
//@AutoLog(value = "NASA数据管理-分页列表查询")
|
||||
@Operation(summary = "NASA数据管理-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NasaDataRecord>> queryPageList(NasaDataRecord nasaDataRecord,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NasaDataRecord> queryWrapper = QueryGenerator.initQueryWrapper(nasaDataRecord, req.getParameterMap());
|
||||
Page<NasaDataRecord> page = new Page<NasaDataRecord>(pageNo, pageSize);
|
||||
IPage<NasaDataRecord> pageList = nasaDataRecordService.page(page, queryWrapper);
|
||||
pageList.getRecords().forEach(nr -> {
|
||||
long totalCountLhs = 0;
|
||||
long totalCountXhy = 0;
|
||||
for (NasaDataRecord nr : pageList.getRecords()) {
|
||||
String fileList = nr.getFileList();
|
||||
if (StringUtils.isNotBlank(fileList)) {
|
||||
List<Map<String, String>> list = JSON.parseObject(fileList, new TypeReference<>() {});
|
||||
@@ -65,8 +68,16 @@ public class NasaDataRecordController extends JeecgController<NasaDataRecord, IN
|
||||
list.forEach(files::putAll);
|
||||
nr.setFileMap(files);
|
||||
}
|
||||
});
|
||||
return Result.OK(pageList);
|
||||
totalCountLhs += Optional.ofNullable(nr.getTotalCountLhs()).orElse(0l);
|
||||
totalCountXhy += Optional.ofNullable(nr.getTotalCountNasa()).orElse(0l);
|
||||
}
|
||||
NasaDataRecordPage result = new NasaDataRecordPage();
|
||||
result.setPageList(pageList);
|
||||
result.setLhsCount(totalCountLhs);
|
||||
result.setLhsTotal(totalCountLhs);
|
||||
result.setXhyCount(totalCountXhy);
|
||||
result.setXyhTotal(totalCountXhy);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Ant Group
|
||||
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||
*/
|
||||
package org.jeecg.modules.database.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.Data;
|
||||
import org.jeecg.modules.database.entity.NasaDataRecord;
|
||||
|
||||
/**
|
||||
* @author lise
|
||||
* @version NasaDataRecordPage.java, v 0.1 2025年02月22日 13:30 lise
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class NasaDataRecordPage {
|
||||
private IPage<NasaDataRecord> pageList;
|
||||
private long lhsCount;
|
||||
private long lhsTotal;
|
||||
private long xhyCount;
|
||||
private long xyhTotal;
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -113,12 +112,6 @@ public class Experiment implements Serializable {
|
||||
//@Excel(name = "辐射源类型", width = 15)
|
||||
@Schema(description = "辐射源类型")
|
||||
private String radiationSourceType;
|
||||
/**
|
||||
* 样品型号
|
||||
*/
|
||||
//@Excel(name = "样品型号", width = 15)
|
||||
@Schema(description = "样品型号")
|
||||
private String sampleModel;
|
||||
/**
|
||||
* 试验负责人
|
||||
*/
|
||||
@@ -197,6 +190,13 @@ public class Experiment implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private List<ExperimentUser> experimentUserList;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sampleType;
|
||||
@TableField(exist = false)
|
||||
private String sampleName;
|
||||
@TableField(exist = false)
|
||||
private String equipmentMode;
|
||||
private String sampleModel;
|
||||
|
||||
//@TableField(exist = false)
|
||||
//@ExcelCollection(name = "辐照")
|
||||
|
||||
@@ -121,13 +121,13 @@ public class NasaDataRecord implements Serializable {
|
||||
*/
|
||||
@Excel(name = "西核院统计", width = 15)
|
||||
@Schema(description = "西核院统计")
|
||||
private String totalCountNasa;
|
||||
private long totalCountNasa;
|
||||
/**
|
||||
* 理化所统计
|
||||
*/
|
||||
@Excel(name = "理化所统计", width = 15)
|
||||
@Schema(description = "理化所统计")
|
||||
private String totalCountLhs;
|
||||
private long totalCountLhs;
|
||||
/**
|
||||
* 附件IDs
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user