This commit is contained in:
ls
2025-02-10 10:27:19 +08:00
parent 646b5b27c7
commit f755c9d0f5
4 changed files with 43 additions and 32 deletions

View File

@@ -13,6 +13,7 @@ import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.DateUtils;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.JeecgBaseConfig; import org.jeecg.config.JeecgBaseConfig;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
@@ -71,7 +72,7 @@ public class JeecgController<T, S extends IService<T>> {
mv.addObject(NormalExcelConstants.CLASS, clazz); mv.addObject(NormalExcelConstants.CLASS, clazz);
//update-begin--Author:liusq Date:20210126 for图片导出报错ImageBasePath未设置-------------------- //update-begin--Author:liusq Date:20210126 for图片导出报错ImageBasePath未设置--------------------
ExportParams exportParams = new ExportParams(title + "报表", "导出人:" + Optional.ofNullable(sysUser).map(v -> v.getRealname()) ExportParams exportParams = new ExportParams(title + "报表", "导出人:" + Optional.ofNullable(sysUser).map(v -> v.getRealname())
.orElse(""), title); .orElse("") + ",导出日期:" + DateUtils.formatDate(new Date()), title);
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload()); exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
//update-end--Author:liusq Date:20210126 for图片导出报错ImageBasePath未设置---------------------- //update-end--Author:liusq Date:20210126 for图片导出报错ImageBasePath未设置----------------------
mv.addObject(NormalExcelConstants.PARAMS, exportParams); mv.addObject(NormalExcelConstants.PARAMS, exportParams);

View File

@@ -7,6 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
@@ -62,18 +63,28 @@ public class Experiment implements Serializable {
*/ */
@Schema(description = "所属部门") @Schema(description = "所属部门")
private String sysOrgCode; private String sysOrgCode;
@Schema(description = "序号")
private Integer indexNo;
/** /**
* 试验编号 * 试验编号
*/ */
@Excel(name = "试验编号", width = 15) @Excel(name = "试验编号", width = 15)
@Schema(description = "试验编号") @Schema(description = "试验编号")
private String experimentNo; private String experimentNo;
/** /**
* 名称 * 名称
*/ */
@Excel(name = "名称", width = 15) @Excel(name = "名称", width = 15)
@Schema(description = "名称") @Schema(description = "名称")
private String name; private String name;
/**
* 委托方名称
*/
@Excel(name = "委托方名称", width = 15)
@Schema(description = "委托方名称")
private String clientName;
/** /**
* 试验类型 * 试验类型
*/ */
@@ -99,15 +110,9 @@ public class Experiment implements Serializable {
/** /**
* 辐射源类型 * 辐射源类型
*/ */
@Excel(name = "辐射源类型", width = 15) //@Excel(name = "辐射源类型", width = 15)
@Schema(description = "辐射源类型") @Schema(description = "辐射源类型")
private String radiationSourceType; private String radiationSourceType;
/**
* 委托方名称
*/
@Excel(name = "委托方名称", width = 15)
@Schema(description = "委托方名称")
private String clientName;
/** /**
* 样品型号 * 样品型号
*/ */
@@ -191,15 +196,14 @@ public class Experiment implements Serializable {
*/ */
@TableField(exist = false) @TableField(exist = false)
private List<ExperimentUser> experimentUserList; private List<ExperimentUser> experimentUserList;
@Schema(description = "排序号")
private Integer indexNo;
//
//public void addCopyCount() { //@TableField(exist = false)
// if (Objects.isNull(copyCount)) { //@ExcelCollection(name = "辐照")
// setCopyCount(1); //private List<ExperimentAnnealProcess> experimentAnnealProcessList;
// } //@TableField(exist = false)
// setCopyCount(copyCount + 1); //private List<ExperimentRadiationProcess> experimentRadiationProcessList;
//} //@TableField(exist = false)
//private List<ExperimentTestProcess> experimentTestProcessList;
} }

View File

@@ -78,43 +78,36 @@ public class ExperimentAnnealProcess implements Serializable {
/** /**
* 辐照标准 * 辐照标准
*/ */
@Excel(name = "辐照标准", width = 15)
@Schema(description = "辐照标准") @Schema(description = "辐照标准")
private String radiationStandard; private String radiationStandard;
/** /**
* 退火温度 * 退火温度
*/ */
@Excel(name = "退火温度", width = 15)
@Schema(description = "退火温度") @Schema(description = "退火温度")
private String annealTemperature; private String annealTemperature;
/** /**
* 备注 * 备注
*/ */
@Excel(name = "备注", width = 15)
@Schema(description = "备注") @Schema(description = "备注")
private String comment; private String comment;
/** /**
* 异常记录 * 异常记录
*/ */
@Excel(name = "异常记录", width = 15)
@Schema(description = "异常记录") @Schema(description = "异常记录")
private String exceptionRecord; private String exceptionRecord;
/** /**
* 辐照详情json存储 * 辐照详情json存储
*/ */
@Excel(name = "辐照详情json存储", width = 15)
@Schema(description = "辐照详情json存储") @Schema(description = "辐照详情json存储")
private String radiationDetail; private String radiationDetail;
/** /**
* 试验ID * 试验ID
*/ */
@Excel(name = "试验ID", width = 15)
@Schema(description = "试验ID") @Schema(description = "试验ID")
private String experimentId; private String experimentId;
/** /**
* 退火开始时间 * 退火开始时间
*/ */
@Excel(name = "退火开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "退火开始时间") @Schema(description = "退火开始时间")
@@ -122,7 +115,6 @@ public class ExperimentAnnealProcess implements Serializable {
/** /**
* 退火结束时间 * 退火结束时间
*/ */
@Excel(name = "退火结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "退火结束时间") @Schema(description = "退火结束时间")
@@ -130,17 +122,14 @@ public class ExperimentAnnealProcess implements Serializable {
/** /**
* 偏置条件 * 偏置条件
*/ */
@Excel(name = "偏置条件", width = 15)
@Schema(description = "偏置条件") @Schema(description = "偏置条件")
private String deviationCondition; private String deviationCondition;
/** /**
* 加偏设备 * 加偏设备
*/ */
@Excel(name = "加偏设备", width = 15)
@Schema(description = "加偏设备") @Schema(description = "加偏设备")
private String deviationEquipment; private String deviationEquipment;
@Excel(name = "样品信息", width = 15)
@Schema(description = "样品信息") @Schema(description = "样品信息")
private String sampleInfo; private String sampleInfo;

View File

@@ -44,7 +44,13 @@ public class ExperimentServiceImpl extends ServiceImpl<ExperimentMapper, Experim
private IExperimentSequenceService experimentSequenceService; private IExperimentSequenceService experimentSequenceService;
@Autowired @Autowired
private IExperimentFileService experimentFileService; private IExperimentFileService experimentFileService;
@Autowired
private IExperimentAnnealProcessService experimentAnnealProcessService;
@Autowired
private IExperimentRadiationProcessService experimentRadiationProcessService;
@Autowired
private IExperimentTestProcessService experimentTestProcessService;
@Override @Override
public List<Experiment> list(Wrapper<Experiment> queryWrapper) { public List<Experiment> list(Wrapper<Experiment> queryWrapper) {
@@ -99,7 +105,18 @@ public class ExperimentServiceImpl extends ServiceImpl<ExperimentMapper, Experim
if (CollUtil.isNotEmpty(experimentFileList)) { if (CollUtil.isNotEmpty(experimentFileList)) {
experiment.setFileList(experimentFileList); experiment.setFileList(experimentFileList);
} }
//List<ExperimentAnnealProcess> experimentAnnealProcessList = experimentAnnealProcessService.getByExperimentId(experiment.getId());
//List<ExperimentRadiationProcess> radiationProcessList = experimentRadiationProcessService.getByExperimentId(experiment.getId());
//List<ExperimentTestProcess> experimentTestProcesses = experimentTestProcessService.getByExperimentId(experiment.getId());
//if (CollUtil.isNotEmpty(experimentAnnealProcessList)) {
// experiment.setExperimentAnnealProcessList(experimentAnnealProcessList);
//}
//if (CollUtil.isNotEmpty(radiationProcessList)) {
// experiment.setExperimentRadiationProcessList(radiationProcessList);
//}
//if (CollUtil.isNotEmpty(experimentTestProcesses)) {
// experiment.setExperimentTestProcessList(experimentTestProcesses);
//}
} }
@Override @Override