update
This commit is contained in:
@@ -24,8 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 退火过程
|
||||
@@ -49,6 +48,8 @@ public class ExperimentAnnealProcessController extends JeecgController<Experimen
|
||||
@Autowired
|
||||
private IExperimentLogService experimentLogService;
|
||||
|
||||
@Autowired
|
||||
private IExperimentSampleInfoService experimentSampleInfoService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
@@ -99,7 +100,12 @@ public class ExperimentAnnealProcessController extends JeecgController<Experimen
|
||||
experiment.setId(experimentId);
|
||||
experiment.setStatus(ExperimentStatus.PROGRESSING);
|
||||
experimentService.updateById(experiment);
|
||||
|
||||
List<ExperimentSampleInfo> sampleInfoList = experimentAnnealProcess.getSampleInfoList();
|
||||
if (sampleInfoList!= null && sampleInfoList.size() > 0) {
|
||||
for (ExperimentSampleInfo sampleInfo : sampleInfoList) {
|
||||
experimentSampleInfoService.saveOrUpdate(sampleInfo);
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("添加退火过程");
|
||||
@@ -140,6 +146,12 @@ public class ExperimentAnnealProcessController extends JeecgController<Experimen
|
||||
experiment.setStatus(ExperimentStatus.PROGRESSING);
|
||||
experimentService.updateById(experiment);
|
||||
|
||||
List<ExperimentSampleInfo> sampleInfoList = experimentAnnealProcess.getSampleInfoList();
|
||||
if (sampleInfoList!= null && sampleInfoList.size() > 0) {
|
||||
for (ExperimentSampleInfo sampleInfo : sampleInfoList) {
|
||||
experimentSampleInfoService.saveOrUpdate(sampleInfo);
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("编辑退火过程");
|
||||
|
||||
@@ -55,6 +55,15 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
@Autowired
|
||||
private IExperimentSequenceService experimentSequenceService;
|
||||
|
||||
@Autowired
|
||||
private IExperimentSampleInfoService experimentSampleInfoService;
|
||||
@Autowired
|
||||
private IExperimentDeviationConditionService experimentDeviationConditionService;
|
||||
@Autowired
|
||||
private IExperimentDeviationEquipmentService experimentDeviationEquipmentService;
|
||||
@Autowired
|
||||
private IExperimentIrradiationBoardService experimentIrradiationBoardService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
@@ -106,7 +115,38 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
userDomain.setType("OPERATOR");
|
||||
experimentUserService.save(userDomain);
|
||||
}
|
||||
|
||||
}
|
||||
List<ExperimentSampleInfo> sampleInfoList = experiment.getSampleInfoList();
|
||||
if (CollUtil.isNotEmpty(sampleInfoList)) {
|
||||
for (ExperimentSampleInfo sampleInfo : sampleInfoList) {
|
||||
sampleInfo.setId(null);
|
||||
sampleInfo.setExperimentId(experiment.getId());
|
||||
experimentSampleInfoService.save(sampleInfo);
|
||||
}
|
||||
}
|
||||
List<ExperimentDeviationCondition> deviationConditionList = experiment.getDeviationConditionList();
|
||||
if (CollUtil.isNotEmpty(deviationConditionList)) {
|
||||
for (ExperimentDeviationCondition deviationCondition : deviationConditionList) {
|
||||
deviationCondition.setId(null);
|
||||
deviationCondition.setExperimentId(experiment.getId());
|
||||
experimentDeviationConditionService.save(deviationCondition);
|
||||
}
|
||||
}
|
||||
List<ExperimentDeviationEquipment> deviationEquipmentList = experiment.getDeviationEquipmentList();
|
||||
if (CollUtil.isNotEmpty(deviationEquipmentList)) {
|
||||
for (ExperimentDeviationEquipment deviationEquipment : deviationEquipmentList) {
|
||||
deviationEquipment.setId(null);
|
||||
deviationEquipment.setExperimentId(experiment.getId());
|
||||
experimentDeviationEquipmentService.save(deviationEquipment);
|
||||
}
|
||||
}
|
||||
List<ExperimentIrradiationBoard> irradiationBoardList = experiment.getIrradiationBoardList();
|
||||
if (CollUtil.isNotEmpty(irradiationBoardList)) {
|
||||
for (ExperimentIrradiationBoard irradiationBoard : irradiationBoardList) {
|
||||
irradiationBoard.setId(null);
|
||||
irradiationBoard.setExperimentId(experiment.getId());
|
||||
experimentIrradiationBoardService.save(irradiationBoard);
|
||||
}
|
||||
}
|
||||
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
@@ -136,6 +176,9 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
@RequiresPermissions("database:experiment:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Experiment experiment, HttpServletRequest request) {
|
||||
if (StringUtils.containsAny(experiment.getStatus(), ExperimentStatus.COMPLETED, ExperimentStatus.REPORT_AUDITING)) {
|
||||
return Result.error("试验状态:[" + experiment.getStatus() + "]不能进行修改!");
|
||||
}
|
||||
String experimentUser = experiment.getExperimentUser();
|
||||
if (StringUtils.isNotBlank(experimentUser)) {
|
||||
experimentUserService.removeByExperimentId(experiment.getId());
|
||||
@@ -150,8 +193,34 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
}
|
||||
experimentUserService.saveBatch(userList);
|
||||
}
|
||||
if (StringUtils.containsAny(experiment.getStatus(), ExperimentStatus.COMPLETED, ExperimentStatus.REPORT_AUDITING)) {
|
||||
return Result.error("试验状态:[" + experiment.getStatus() + "]不能进行修改!");
|
||||
|
||||
List<ExperimentSampleInfo> sampleInfoList = experiment.getSampleInfoList();
|
||||
if (CollUtil.isNotEmpty(sampleInfoList)) {
|
||||
for (ExperimentSampleInfo sampleInfo : sampleInfoList) {
|
||||
sampleInfo.setExperimentId(experiment.getId());
|
||||
experimentSampleInfoService.saveOrUpdate(sampleInfo);
|
||||
}
|
||||
}
|
||||
List<ExperimentDeviationCondition> deviationConditionList = experiment.getDeviationConditionList();
|
||||
if (CollUtil.isNotEmpty(deviationConditionList)) {
|
||||
for (ExperimentDeviationCondition deviationCondition : deviationConditionList) {
|
||||
deviationCondition.setExperimentId(experiment.getId());
|
||||
experimentDeviationConditionService.saveOrUpdate(deviationCondition);
|
||||
}
|
||||
}
|
||||
List<ExperimentDeviationEquipment> deviationEquipmentList = experiment.getDeviationEquipmentList();
|
||||
if (CollUtil.isNotEmpty(deviationEquipmentList)) {
|
||||
for (ExperimentDeviationEquipment deviationEquipment : deviationEquipmentList) {
|
||||
deviationEquipment.setExperimentId(experiment.getId());
|
||||
experimentDeviationEquipmentService.saveOrUpdate(deviationEquipment);
|
||||
}
|
||||
}
|
||||
List<ExperimentIrradiationBoard> irradiationBoardList = experiment.getIrradiationBoardList();
|
||||
if (CollUtil.isNotEmpty(irradiationBoardList)) {
|
||||
for (ExperimentIrradiationBoard irradiationBoard : irradiationBoardList) {
|
||||
irradiationBoard.setExperimentId(experiment.getId());
|
||||
experimentIrradiationBoardService.saveOrUpdate(irradiationBoard);
|
||||
}
|
||||
}
|
||||
experimentService.updateById(experiment);
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
|
||||
@@ -25,8 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 辐照过程
|
||||
@@ -50,6 +49,9 @@ public class ExperimentRadiationProcessController extends JeecgController<Experi
|
||||
@Autowired
|
||||
private IExperimentService experimentService;
|
||||
|
||||
@Autowired
|
||||
private IExperimentSampleInfoService experimentSampleInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
@@ -102,6 +104,13 @@ public class ExperimentRadiationProcessController extends JeecgController<Experi
|
||||
experiment.setStatus(ExperimentStatus.PROGRESSING);
|
||||
experimentService.updateById(experiment);
|
||||
|
||||
List<ExperimentSampleInfo> sampleInfoList = experimentRadiationProcess.getSampleInfoList();
|
||||
if (sampleInfoList!= null && sampleInfoList.size() > 0) {
|
||||
for (ExperimentSampleInfo sampleInfo : sampleInfoList) {
|
||||
experimentSampleInfoService.saveOrUpdate(sampleInfo);
|
||||
}
|
||||
}
|
||||
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("添加辐照过程");
|
||||
@@ -141,7 +150,12 @@ public class ExperimentRadiationProcessController extends JeecgController<Experi
|
||||
experiment.setId(experimentId);
|
||||
experiment.setStatus(ExperimentStatus.PROGRESSING);
|
||||
experimentService.updateById(experiment);
|
||||
|
||||
List<ExperimentSampleInfo> sampleInfoList = experimentRadiationProcess.getSampleInfoList();
|
||||
if (sampleInfoList!= null && sampleInfoList.size() > 0) {
|
||||
for (ExperimentSampleInfo sampleInfo : sampleInfoList) {
|
||||
experimentSampleInfoService.saveOrUpdate(sampleInfo);
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("编辑辐照过程");
|
||||
|
||||
@@ -25,8 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 测试过程
|
||||
@@ -50,6 +49,9 @@ public class ExperimentTestProcessController extends JeecgController<ExperimentT
|
||||
@Autowired
|
||||
private IExperimentService experimentService;
|
||||
|
||||
@Autowired
|
||||
private IExperimentSampleInfoService experimentSampleInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
@@ -100,7 +102,12 @@ public class ExperimentTestProcessController extends JeecgController<ExperimentT
|
||||
experiment.setId(experimentId);
|
||||
experiment.setStatus(ExperimentStatus.PROGRESSING);
|
||||
experimentService.updateById(experiment);
|
||||
|
||||
List<ExperimentSampleInfo> sampleInfoList = experimentTestProcess.getSampleInfoList();
|
||||
if (sampleInfoList != null && sampleInfoList.size() > 0) {
|
||||
for (ExperimentSampleInfo sampleInfo : sampleInfoList) {
|
||||
experimentSampleInfoService.saveOrUpdate(sampleInfo);
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentTestProcess.getExperimentId());
|
||||
experimentLog.setLogContent("添加测试过程");
|
||||
@@ -142,7 +149,12 @@ public class ExperimentTestProcessController extends JeecgController<ExperimentT
|
||||
experiment.setId(experimentId);
|
||||
experiment.setStatus(ExperimentStatus.PROGRESSING);
|
||||
experimentService.updateById(experiment);
|
||||
|
||||
List<ExperimentSampleInfo> sampleInfoList = experimentTestProcess.getSampleInfoList();
|
||||
if (sampleInfoList != null && sampleInfoList.size() > 0) {
|
||||
for (ExperimentSampleInfo sampleInfo : sampleInfoList) {
|
||||
experimentSampleInfoService.saveOrUpdate(sampleInfo);
|
||||
}
|
||||
}
|
||||
ExperimentLog experimentLog = new ExperimentLog();
|
||||
experimentLog.setExperimentId(experimentId);
|
||||
experimentLog.setLogContent("编辑测试过程");
|
||||
|
||||
@@ -99,4 +99,8 @@ public class Equipment implements Serializable {
|
||||
@Excel(name = "房间号", width = 15)
|
||||
@Schema(description = "房间号")
|
||||
private String roomNo;
|
||||
|
||||
@Excel(name = "图片", width = 15)
|
||||
@Schema(description = "图片")
|
||||
private String images;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 退火过程
|
||||
@@ -139,6 +140,18 @@ public class ExperimentAnnealProcess implements Serializable {
|
||||
@Schema(description = "加偏设备(json 大字段)")
|
||||
private String biasEquipment;
|
||||
|
||||
|
||||
@Schema(description = "偏置条件")
|
||||
@TableField(exist = false)
|
||||
private List<ExperimentDeviationCondition> deviationConditionList;
|
||||
|
||||
@Schema(description = "加偏设备")
|
||||
@TableField(exist = false)
|
||||
private List<ExperimentDeviationEquipment> deviationEquipmentList;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ExperimentSampleInfo> sampleInfoList;
|
||||
|
||||
public ExperimentAnnealProcess copy(String experimentId) {
|
||||
ExperimentAnnealProcess experiment = new ExperimentAnnealProcess();
|
||||
BeanUtil.copyProperties(this, experiment);
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 辐照过程
|
||||
@@ -71,8 +72,8 @@ public class ExperimentRadiationProcess implements Serializable {
|
||||
/**
|
||||
* 计量率
|
||||
*/
|
||||
@Excel(name = "计量率", width = 15)
|
||||
@Schema(description = "计量率")
|
||||
@Excel(name = "剂量率", width = 15)
|
||||
@Schema(description = "剂量率")
|
||||
private String measurementRate;
|
||||
/**
|
||||
* 辐照标准
|
||||
@@ -128,6 +129,9 @@ public class ExperimentRadiationProcess implements Serializable {
|
||||
@Schema(description = "辐照结束时间")
|
||||
private Date radiationEndTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ExperimentSampleInfo> sampleInfoList;
|
||||
|
||||
public ExperimentRadiationProcess copy(String experimentId) {
|
||||
ExperimentRadiationProcess experiment = new ExperimentRadiationProcess();
|
||||
BeanUtil.copyProperties(this, experiment);
|
||||
|
||||
@@ -1,81 +1,106 @@
|
||||
package org.jeecg.modules.database.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 试验样品信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-04
|
||||
* @Date: 2024-12-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("experiment_sample_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description="试验样品信息")
|
||||
@Schema(description = "试验样品信息")
|
||||
public class ExperimentSampleInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
/**创建人*/
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(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")
|
||||
@Schema(description = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@Schema(description = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(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")
|
||||
@Schema(description = "更新日期")
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@Schema(description = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**试验ID*/
|
||||
@Excel(name = "试验ID", width = 15)
|
||||
/**
|
||||
* 试验ID
|
||||
*/
|
||||
@Excel(name = "试验ID", width = 15)
|
||||
@Schema(description = "试验ID")
|
||||
private String experimentId;
|
||||
/**样品类型*/
|
||||
@Excel(name = "样品类型", width = 15)
|
||||
/**
|
||||
* 样品类型
|
||||
*/
|
||||
@Excel(name = "样品类型", width = 15)
|
||||
@Schema(description = "样品类型")
|
||||
private String sampleType;
|
||||
/**样品型号*/
|
||||
@Excel(name = "样品型号", width = 15)
|
||||
/**
|
||||
* 样品型号
|
||||
*/
|
||||
@Excel(name = "样品型号", width = 15)
|
||||
@Schema(description = "样品型号")
|
||||
private String sampleModel;
|
||||
/**样品批次*/
|
||||
@Excel(name = "样品批次", width = 15)
|
||||
/**
|
||||
* 样品批次
|
||||
*/
|
||||
@Excel(name = "样品批次", width = 15)
|
||||
@Schema(description = "样品批次")
|
||||
private String sampleBatch;
|
||||
/**生产厂家*/
|
||||
@Excel(name = "生产厂家", width = 15)
|
||||
/**
|
||||
* 生产厂家
|
||||
*/
|
||||
@Excel(name = "生产厂家", width = 15)
|
||||
@Schema(description = "生产厂家")
|
||||
private String sampleManufacturer;
|
||||
/**图片*/
|
||||
@Excel(name = "图片", width = 15)
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@Excel(name = "图片", width = 15)
|
||||
@Schema(description = "图片")
|
||||
private String sampleImage;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Excel(name = "样品名称", width = 15)
|
||||
@Schema(description = "样品名称")
|
||||
private String sampleName;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 测试过程
|
||||
@@ -175,6 +176,9 @@ public class ExperimentTestProcess implements Serializable {
|
||||
@Schema(description = "测试结果")
|
||||
private String testResult;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ExperimentSampleInfo> sampleInfoList;
|
||||
|
||||
public ExperimentTestProcess copy(String experimentId) {
|
||||
ExperimentTestProcess experiment = new ExperimentTestProcess();
|
||||
BeanUtil.copyProperties(this, experiment);
|
||||
|
||||
Reference in New Issue
Block a user