From f758211a0327855c117f4d3a1b0c3c0fef4f636f Mon Sep 17 00:00:00 2001 From: ls Date: Wed, 9 Jul 2025 15:32:20 +0800 Subject: [PATCH] Experiment edit --- README.md | 20 +++ ...xperimentDeviationConditionController.java | 9 ++ ...xperimentDeviationEquipmentController.java | 19 ++- .../ExperimentIrradiationBoardController.java | 7 + .../ExperimentSampleInfoController.java | 3 + .../ExperimentSequenceController.java | 17 ++- .../modules/database/dto/ExperimentNoDTO.java | 11 ++ .../entity/ExperimentDeviationCondition.java | 49 ++++++- .../entity/ExperimentDeviationEquipment.java | 124 +++++++++++++----- .../entity/ExperimentIrradiationBoard.java | 104 ++++++++++----- .../database/entity/ExperimentSampleInfo.java | 8 +- .../database/mapper/xml/ExperimentMapper.xml | 1 + .../IExperimentDeviationConditionService.java | 6 + .../IExperimentDeviationEquipmentService.java | 6 + .../IExperimentIrradiationBoardService.java | 6 + ...perimentDeviationConditionServiceImpl.java | 39 ++++++ ...perimentDeviationEquipmentServiceImpl.java | 54 ++++++-- .../impl/ExperimentDocServiceImpl.java | 26 ++-- ...ExperimentIrradiationBoardServiceImpl.java | 43 +++++- .../impl/ExperimentSampleInfoServiceImpl.java | 43 +++++- .../service/impl/ExperimentServiceImpl.java | 56 ++++---- 21 files changed, 533 insertions(+), 118 deletions(-) create mode 100644 physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/dto/ExperimentNoDTO.java diff --git a/README.md b/README.md index 1c2c44c..27afbbb 100644 --- a/README.md +++ b/README.md @@ -69,3 +69,23 @@ ALTER TABLE `local_database` ADD COLUMN `sample_model` varchar(2048) NULL COMMENT '样品型号' ; ``` +# 20250709 +```sql +ALTER TABLE `experiment_irradiation_board` +ADD COLUMN `sample_id` varchar(36) NULL COMMENT '样品ID' AFTER `experiment_id`; + +ALTER TABLE `experiment_irradiation_board` +ADD COLUMN `irradiation_board_image` text NULL COMMENT '辐照板图片' AFTER `experiment_id`; + +ALTER TABLE `experiment_deviation_equipment` +ADD COLUMN `sample_id` varchar(36) NULL COMMENT '样品ID' AFTER `experiment_id`; + +ALTER TABLE `experiment_deviation_equipment` +ADD COLUMN `equipment_id` varchar(36) NULL COMMENT '设备ID' AFTER `experiment_id`; + +ALTER TABLE `experiment_deviation_equipment` +ADD COLUMN `equipment_image` text NULL COMMENT '设备图片' AFTER `experiment_id`; + +ALTER TABLE `experiment_deviation_condition` +ADD COLUMN `sample_id` varchar(36) NULL COMMENT '样品ID' AFTER `experiment_id`; +``` diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentDeviationConditionController.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentDeviationConditionController.java index fbe15b7..f9cc8a9 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentDeviationConditionController.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentDeviationConditionController.java @@ -16,6 +16,7 @@ import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.modules.database.entity.ExperimentDeviationCondition; import org.jeecg.modules.database.service.IExperimentDeviationConditionService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.Assert; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -56,6 +57,7 @@ public class ExperimentDeviationConditionController req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = experimentDeviationConditionService.page(page, queryWrapper); + pageList.getRecords().forEach(v -> experimentDeviationConditionService.assembleDetails(v)); return Result.OK(pageList); } @@ -70,6 +72,9 @@ public class ExperimentDeviationConditionController @RequiresPermissions("database:experiment:add") @PostMapping(value = "/add") public Result add(@RequestBody ExperimentDeviationCondition experimentDeviationCondition) { + Assert.hasText(experimentDeviationCondition.getExperimentId(), "实验ID不能为空!"); + Assert.hasText(experimentDeviationCondition.getSampleId(), "样品ID不能为空!"); + experimentDeviationConditionService.save(experimentDeviationCondition); return Result.OK("添加成功!"); } @@ -85,6 +90,8 @@ public class ExperimentDeviationConditionController @RequiresPermissions("database:experiment:edit") @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) public Result edit(@RequestBody ExperimentDeviationCondition experimentDeviationCondition) { + Assert.hasText(experimentDeviationCondition.getExperimentId(), "实验ID不能为空!"); + Assert.hasText(experimentDeviationCondition.getSampleId(), "样品ID不能为空!"); experimentDeviationConditionService.updateById(experimentDeviationCondition); return Result.OK("编辑成功!"); } @@ -133,6 +140,8 @@ public class ExperimentDeviationConditionController if (experimentDeviationCondition == null) { return Result.error("未找到对应数据"); } + experimentDeviationConditionService.assembleDetails(experimentDeviationCondition); + return Result.OK(experimentDeviationCondition); } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentDeviationEquipmentController.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentDeviationEquipmentController.java index 1f25af4..c250101 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentDeviationEquipmentController.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentDeviationEquipmentController.java @@ -19,6 +19,7 @@ import org.jeecg.modules.database.entity.ExperimentDeviationEquipment; import org.jeecg.modules.database.service.IEquipmentService; import org.jeecg.modules.database.service.IExperimentDeviationEquipmentService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.Assert; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -61,6 +62,8 @@ public class ExperimentDeviationEquipmentController req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = experimentDeviationEquipmentService.page(page, queryWrapper); + pageList.getRecords().forEach(v -> experimentDeviationEquipmentService.assembleDetails(v)); + return Result.OK(pageList); } @@ -75,9 +78,13 @@ public class ExperimentDeviationEquipmentController @RequiresPermissions("database:experiment:add") @PostMapping(value = "/add") public Result add(@RequestBody ExperimentDeviationEquipment experimentDeviationEquipment) { - String equipmentNo = experimentDeviationEquipment.getEquipmentNo(); + Assert.hasText(experimentDeviationEquipment.getExperimentId(), "实验ID不能为空!"); + Assert.hasText(experimentDeviationEquipment.getSampleId(), "样品ID不能为空!"); + + String equipmentNo = experimentDeviationEquipment.getManagementNo(); if (StringUtils.isNotBlank(equipmentNo) && StringUtils.isBlank(experimentDeviationEquipment.getMeasurementValidity())) { Equipment equipment = equipmentService.getByManagementNo(equipmentNo); + experimentDeviationEquipment.setEquipmentId(equipment.getId()); experimentDeviationEquipment.setMeasurementValidity(equipment.getExpireDate()); } experimentDeviationEquipmentService.save(experimentDeviationEquipment); @@ -95,6 +102,14 @@ public class ExperimentDeviationEquipmentController @RequiresPermissions("database:experiment:edit") @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) public Result edit(@RequestBody ExperimentDeviationEquipment experimentDeviationEquipment) { + Assert.hasText(experimentDeviationEquipment.getExperimentId(), "实验ID不能为空!"); + Assert.hasText(experimentDeviationEquipment.getSampleId(), "样品ID不能为空!"); + String equipmentNo = experimentDeviationEquipment.getManagementNo(); + if (StringUtils.isNotBlank(equipmentNo) && StringUtils.isBlank(experimentDeviationEquipment.getMeasurementValidity())) { + Equipment equipment = equipmentService.getByManagementNo(equipmentNo); + experimentDeviationEquipment.setEquipmentId(equipment.getId()); + experimentDeviationEquipment.setMeasurementValidity(equipment.getExpireDate()); + } experimentDeviationEquipmentService.updateById(experimentDeviationEquipment); return Result.OK("编辑成功!"); } @@ -143,6 +158,8 @@ public class ExperimentDeviationEquipmentController if (experimentDeviationEquipment == null) { return Result.error("未找到对应数据"); } + experimentDeviationEquipmentService.assembleDetails(experimentDeviationEquipment); + return Result.OK(experimentDeviationEquipment); } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentIrradiationBoardController.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentIrradiationBoardController.java index 7fde01c..d3592ea 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentIrradiationBoardController.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentIrradiationBoardController.java @@ -16,6 +16,7 @@ import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.modules.database.entity.ExperimentIrradiationBoard; import org.jeecg.modules.database.service.IExperimentIrradiationBoardService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.Assert; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -55,6 +56,7 @@ public class ExperimentIrradiationBoardController extends JeecgController page = new Page(pageNo, pageSize); IPage pageList = experimentIrradiationBoardService.page(page, queryWrapper); + pageList.getRecords().forEach(v -> experimentIrradiationBoardService.assembleDetails(v)); return Result.OK(pageList); } @@ -69,6 +71,8 @@ public class ExperimentIrradiationBoardController extends JeecgController add(@RequestBody ExperimentIrradiationBoard experimentIrradiationBoard) { + Assert.hasText(experimentIrradiationBoard.getExperimentId(), "实验ID不能为空!"); + Assert.hasText(experimentIrradiationBoard.getSampleId(), "样品ID不能为空!"); experimentIrradiationBoardService.save(experimentIrradiationBoard); return Result.OK("添加成功!"); } @@ -84,6 +88,8 @@ public class ExperimentIrradiationBoardController extends JeecgController edit(@RequestBody ExperimentIrradiationBoard experimentIrradiationBoard) { + Assert.hasText(experimentIrradiationBoard.getExperimentId(), "实验ID不能为空!"); + Assert.hasText(experimentIrradiationBoard.getSampleId(), "样品ID不能为空!"); experimentIrradiationBoardService.updateById(experimentIrradiationBoard); return Result.OK("编辑成功!"); } @@ -132,6 +138,7 @@ public class ExperimentIrradiationBoardController extends JeecgController add(@RequestBody ExperimentSampleInfo experimentSampleInfo) { + Assert.hasText(experimentSampleInfo.getExperimentId(), "实验ID不能为空!"); experimentSampleInfoService.save(experimentSampleInfo); return Result.OK("添加成功!"); } @@ -119,6 +121,7 @@ public class ExperimentSampleInfoController extends JeecgController edit(@RequestBody ExperimentSampleInfo experimentSampleInfo) { + Assert.hasText(experimentSampleInfo.getExperimentId(), "实验ID不能为空!"); experimentSampleInfoService.updateById(experimentSampleInfo); return Result.OK("编辑成功!"); } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentSequenceController.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentSequenceController.java index 18b3aa1..4fe7b7c 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentSequenceController.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/controller/ExperimentSequenceController.java @@ -5,8 +5,11 @@ import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.modules.database.dto.ExperimentNoDTO; +import org.jeecg.modules.database.entity.Experiment; import org.jeecg.modules.database.entity.ExperimentSequence; import org.jeecg.modules.database.service.IExperimentSequenceService; +import org.jeecg.modules.database.service.IExperimentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -23,6 +26,8 @@ import org.springframework.web.bind.annotation.*; public class ExperimentSequenceController extends JeecgController { @Autowired private IExperimentSequenceService experimentSequenceService; + @Autowired + private IExperimentService experimentService; /** * 获取序号 @@ -32,9 +37,15 @@ public class ExperimentSequenceController extends JeecgController next() { - - return Result.OK(experimentSequenceService.next()); + public Result next() { + String experimentNo = experimentSequenceService.next(); + Experiment experiment = new Experiment(); + experiment.setExperimentNo(experimentNo); + experimentService.save(experiment); + ExperimentNoDTO experimentNoDTO = new ExperimentNoDTO(); + experimentNoDTO.setExperimentId(experiment.getId()); + experimentNoDTO.setExperimentNo(experimentNo); + return Result.OK(experimentNoDTO); } // diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/dto/ExperimentNoDTO.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/dto/ExperimentNoDTO.java new file mode 100644 index 0000000..11b4334 --- /dev/null +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/dto/ExperimentNoDTO.java @@ -0,0 +1,11 @@ +package org.jeecg.modules.database.dto; + +import lombok.Data; +import lombok.ToString; + +@Data +@ToString +public class ExperimentNoDTO { + private String experimentId; + private String experimentNo; +} diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentDeviationCondition.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentDeviationCondition.java index 6a2bbb1..522e26b 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentDeviationCondition.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentDeviationCondition.java @@ -66,24 +66,67 @@ public class ExperimentDeviationCondition implements Serializable { @Excel(name = "试验ID", width = 15) @Schema(description = "试验ID") private java.lang.String experimentId; + + /** + * 样品ID + */ + @Excel(name = "样品ID", width = 15) + @Schema(description = "样品ID") + private java.lang.String sampleId; + + /** + * 样品信息 + */ + @TableField(exist = false) + private ExperimentSampleInfo sampleInfo; + /** + * 名称 + */ + @Excel(name = "样品名称", width = 15) + @Schema(description = "样品名称") + @TableField(exist = false) + private String sampleName; /** * 样品类型 */ @Excel(name = "样品类型", width = 15) @Schema(description = "样品类型") - private java.lang.String sampleType; + @TableField(exist = false) + private java.lang.String sampleType; /** * 样品型号 */ @Excel(name = "样品型号", width = 15) @Schema(description = "样品型号") - private java.lang.String sampleModel; + @TableField(exist = false) + private java.lang.String sampleModel; /** * 批次 */ @Excel(name = "批次", width = 15) @Schema(description = "批次") - private java.lang.String sampleBatch; + @TableField(exist = false) + private java.lang.String sampleBatch; + /** + * 型号批次 + */ + @Schema(description = "型号批次") + @TableField(exist = false) + private String modelBatch; + /** + * 生产厂家 + */ + @Excel(name = "生产厂家", width = 15) + @Schema(description = "生产厂家") + @TableField(exist = false) + private String sampleManufacturer; + /** + * 图片 + */ + @Excel(name = "图片", width = 15) + @Schema(description = "图片") + @TableField(exist = false) + private java.lang.String sampleImage; /** * 样品编号 */ diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentDeviationEquipment.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentDeviationEquipment.java index 39a7e92..4099378 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentDeviationEquipment.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentDeviationEquipment.java @@ -30,100 +30,162 @@ public class ExperimentDeviationEquipment implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") - private java.lang.String id; + private java.lang.String id; /** * 创建人 */ @Schema(description = "创建人") - private java.lang.String createBy; + private java.lang.String createBy; /** * 创建日期 */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") @Schema(description = "创建日期") - private java.util.Date createTime; + private java.util.Date createTime; /** * 更新人 */ @Schema(description = "更新人") - private java.lang.String updateBy; + private java.lang.String updateBy; /** * 更新日期 */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") @Schema(description = "更新日期") - private java.util.Date updateTime; + private java.util.Date updateTime; /** * 所属部门 */ @Schema(description = "所属部门") - private java.lang.String sysOrgCode; + private java.lang.String sysOrgCode; /** * 试验ID */ @Excel(name = "试验ID", width = 15) @Schema(description = "试验ID") - private java.lang.String experimentId; + private java.lang.String experimentId; + /** + * 样品ID + */ + @Excel(name = "样品ID", width = 15) + @Schema(description = "样品ID") + private java.lang.String sampleId; + /** + * 样品信息 + */ + @TableField(exist = false) + private ExperimentSampleInfo sampleInfo; + /** + * 名称 + */ + @Excel(name = "样品名称", width = 15) + @Schema(description = "样品名称") + @TableField(exist = false) + private String sampleName; /** * 样品类型 */ @Excel(name = "样品类型", width = 15) @Schema(description = "样品类型") - private java.lang.String sampleType; + @TableField(exist = false) + private java.lang.String sampleType; /** * 样品型号 */ @Excel(name = "样品型号", width = 15) @Schema(description = "样品型号") - private java.lang.String sampleModel; + @TableField(exist = false) + private java.lang.String sampleModel; /** * 批次 */ @Excel(name = "批次", width = 15) @Schema(description = "批次") - private java.lang.String sampleBatch; + @TableField(exist = false) + private java.lang.String sampleBatch; /** - * 设备型号 + * 型号批次 */ - @Excel(name = "设备型号", width = 15) - @Schema(description = "设备型号") - private java.lang.String equipmentModel; + @Schema(description = "型号批次") + @TableField(exist = false) + private String modelBatch; /** - * 设备名称 + * 生产厂家 */ - @Excel(name = "设备名称", width = 15) - @Schema(description = "设备名称") - private java.lang.String equipmentName; - /** - * 设备类型 - */ - @Excel(name = "设备类型", width = 15) - @Schema(description = "设备类型") - private java.lang.String equipmentType; + @Excel(name = "生产厂家", width = 15) + @Schema(description = "生产厂家") + @TableField(exist = false) + private String sampleManufacturer; /** * 图片 */ @Excel(name = "图片", width = 15) @Schema(description = "图片") - private java.lang.String sampleImage; + @TableField(exist = false) + private java.lang.String sampleImage; + /** + * 设备型号 + */ + @Excel(name = "设备型号", width = 15) + @Schema(description = "设备型号") + @TableField(exist = false) + private java.lang.String equipmentModel; + /** + * 设备名称 + */ + @Excel(name = "设备名称", width = 15) + @Schema(description = "设备名称") + private java.lang.String equipmentId; + /** + * 设备名称 + */ + @Excel(name = "设备名称", width = 15) + @Schema(description = "设备名称") + @TableField(exist = false) + private java.lang.String equipmentName; + @TableField(exist = false) + private Equipment equipment; + /** + * 设备类型 + */ + @Excel(name = "设备类型", width = 15) + @Schema(description = "设备类型") + @TableField(exist = false) + private java.lang.String equipmentType; + /** + * 图片 + */ + @Excel(name = "设备图片", width = 15) + @Schema(description = "设备图片") + private java.lang.String equipmentImage; /** * 计量有效期 */ @Excel(name = "计量有效期", width = 15) @Schema(description = "计量有效期") - private java.lang.String measurementValidity; + @TableField(exist = false) + private java.lang.String measurementValidity; /** * 房间号 */ @Excel(name = "房间号", width = 15) @Schema(description = "房间号") - private java.lang.String roomNo; + @TableField(exist = false) + private java.lang.String roomNo; /** - * 设备编号 + * 出厂编号 */ - @Excel(name = "设备编号", width = 15) - @Schema(description = "设备编号") - private java.lang.String equipmentNo; + @Excel(name = "出厂编号", width = 15) + @Schema(description = "出厂编号") + @TableField(exist = false) + private String factoryNo; + /** + * 管理编号 + */ + @Excel(name = "管理编号", width = 15) + @Schema(description = "管理编号") + @TableField(exist = false) + private String managementNo; } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentIrradiationBoard.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentIrradiationBoard.java index fda3b34..016073f 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentIrradiationBoard.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentIrradiationBoard.java @@ -30,88 +30,130 @@ public class ExperimentIrradiationBoard implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") - private java.lang.String id; + private java.lang.String id; /** * 创建人 */ @Schema(description = "创建人") - private java.lang.String createBy; + private java.lang.String createBy; /** * 创建日期 */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") @Schema(description = "创建日期") - private java.util.Date createTime; + private java.util.Date createTime; /** * 更新人 */ @Schema(description = "更新人") - private java.lang.String updateBy; + private java.lang.String updateBy; /** * 更新日期 */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") @Schema(description = "更新日期") - private java.util.Date updateTime; + private java.util.Date updateTime; /** * 所属部门 */ @Schema(description = "所属部门") - private java.lang.String sysOrgCode; + private java.lang.String sysOrgCode; /** * 试验ID */ @Excel(name = "试验ID", width = 15) @Schema(description = "试验ID") - private java.lang.String experimentId; + private java.lang.String experimentId; + /** + * 样品ID + */ + @Excel(name = "样品ID", width = 15) + @Schema(description = "样品ID") + private java.lang.String sampleId; + /** + * 样品信息 + */ + @TableField(exist = false) + private ExperimentSampleInfo sampleInfo; + /** + * 名称 + */ + @Excel(name = "样品名称", width = 15) + @Schema(description = "样品名称") + @TableField(exist = false) + private String sampleName; /** * 样品类型 */ @Excel(name = "样品类型", width = 15) @Schema(description = "样品类型") - private java.lang.String sampleType; + @TableField(exist = false) + private java.lang.String sampleType; /** * 样品型号 */ @Excel(name = "样品型号", width = 15) @Schema(description = "样品型号") - private java.lang.String sampleModel; + @TableField(exist = false) + private java.lang.String sampleModel; /** * 批次 */ @Excel(name = "批次", width = 15) @Schema(description = "批次") - private java.lang.String sampleBatch; + @TableField(exist = false) + private java.lang.String sampleBatch; /** - * 辐照板数量 + * 型号批次 */ - @Excel(name = "辐照板数量", width = 15) - @Schema(description = "辐照板数量") - private java.lang.String irradiationBoardNumber; + @Schema(description = "型号批次") + @TableField(exist = false) + private String modelBatch; /** - * 辐照板编号 + * 生产厂家 */ - @Excel(name = "辐照板编号", width = 15) - @Schema(description = "辐照板编号") - private java.lang.String irradiationBoardCode; - /** - * 计量有效期 - */ - @Excel(name = "计量有效期", width = 15) - @Schema(description = "计量有效期") - private java.lang.String measurementValidity; - /** - * 占源面积 - */ - @Excel(name = "占源面积", width = 15) - @Schema(description = "占源面积") - private java.lang.String sourceArea; + @Excel(name = "生产厂家", width = 15) + @Schema(description = "生产厂家") + @TableField(exist = false) + private String sampleManufacturer; /** * 图片 */ @Excel(name = "图片", width = 15) @Schema(description = "图片") - private java.lang.String sampleImage; + @TableField(exist = false) + private java.lang.String sampleImage; + /** + * 辐照板数量 + */ + @Excel(name = "辐照板数量", width = 15) + @Schema(description = "辐照板数量") + private java.lang.String irradiationBoardNumber; + /** + * 辐照板编号 + */ + @Excel(name = "辐照板编号", width = 15) + @Schema(description = "辐照板编号") + private java.lang.String irradiationBoardCode; + /** + * 计量有效期 + */ + @Excel(name = "计量有效期", width = 15) + @Schema(description = "计量有效期") + private java.lang.String measurementValidity; + /** + * 占源面积 + */ + @Excel(name = "占源面积", width = 15) + @Schema(description = "占源面积") + private java.lang.String sourceArea; + + /** + * 辐照板编号 + */ + @Excel(name = "辐照板图片", width = 15) + @Schema(description = "辐照板图片") + private java.lang.String irradiationBoardImage; } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentSampleInfo.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentSampleInfo.java index 16d897e..0d30c39 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentSampleInfo.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/entity/ExperimentSampleInfo.java @@ -92,9 +92,13 @@ public class ExperimentSampleInfo implements Serializable { /** * 生产厂家 */ - @Excel(name = "生产厂家", width = 15) - @Schema(description = "生产厂家") + @Schema(description = "生产厂家ID") private String sampleManufacturer; + @Excel(name = "生产厂家", width = 15) + + @Schema(description = "生产厂家名称") + @TableField(exist = false) + private String sampleManufacturerName; /** * 图片 */ diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/mapper/xml/ExperimentMapper.xml b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/mapper/xml/ExperimentMapper.xml index e683062..25025d1 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/mapper/xml/ExperimentMapper.xml +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/mapper/xml/ExperimentMapper.xml @@ -11,6 +11,7 @@ left join experiment_report r on r.experiment_id = e.id left join experiment_radiation_process rp on rp.experiment_id = e.id + e.status is not null AND ((r.auditor=#{loginUser.id} and r.status='PROOFREAD_PASS') or (r.proofreader=#{loginUser.id} and r.status='INIT') diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentDeviationConditionService.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentDeviationConditionService.java index 3f73248..2f3787d 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentDeviationConditionService.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentDeviationConditionService.java @@ -3,6 +3,7 @@ package org.jeecg.modules.database.service; import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.database.entity.ExperimentDeviationCondition; +import java.io.Serializable; import java.util.List; /** @@ -14,4 +15,9 @@ import java.util.List; public interface IExperimentDeviationConditionService extends IService { List getByExperimentId(String experimentId); + List getBySampleId(String sampleId); + + void assembleDetails(ExperimentDeviationCondition experimentDeviationCondition); + + void removeBySampleId(Serializable id); } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentDeviationEquipmentService.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentDeviationEquipmentService.java index 0e86000..91c4b92 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentDeviationEquipmentService.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentDeviationEquipmentService.java @@ -3,6 +3,7 @@ package org.jeecg.modules.database.service; import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.database.entity.ExperimentDeviationEquipment; +import java.io.Serializable; import java.util.List; /** @@ -14,4 +15,9 @@ import java.util.List; public interface IExperimentDeviationEquipmentService extends IService { List getByExperimentId(String experimentId); + List getBySampleId(String sampleId); + + void assembleDetails(ExperimentDeviationEquipment experimentDeviationEquipment); + + void removeBySampleId(Serializable id); } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentIrradiationBoardService.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentIrradiationBoardService.java index 99f7d86..4578dd8 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentIrradiationBoardService.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/IExperimentIrradiationBoardService.java @@ -3,6 +3,7 @@ package org.jeecg.modules.database.service; import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.database.entity.ExperimentIrradiationBoard; +import java.io.Serializable; import java.util.List; /** @@ -14,4 +15,9 @@ import java.util.List; public interface IExperimentIrradiationBoardService extends IService { List getByExperimentId(String experimentId); + List getBySampleId(String sampleId); + + void assembleDetails(ExperimentIrradiationBoard experimentIrradiationBoard); + + void removeBySampleId(Serializable id); } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDeviationConditionServiceImpl.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDeviationConditionServiceImpl.java index e3cc5af..62073cd 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDeviationConditionServiceImpl.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDeviationConditionServiceImpl.java @@ -2,12 +2,18 @@ package org.jeecg.modules.database.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.apache.commons.lang3.StringUtils; import org.jeecg.modules.database.entity.ExperimentDeviationCondition; +import org.jeecg.modules.database.entity.ExperimentSampleInfo; import org.jeecg.modules.database.mapper.ExperimentDeviationConditionMapper; import org.jeecg.modules.database.service.IExperimentDeviationConditionService; +import org.jeecg.modules.database.service.IExperimentSampleInfoService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.io.Serializable; import java.util.List; +import java.util.stream.Collectors; /** * @Description: 试验偏置条件信息 @@ -18,8 +24,41 @@ import java.util.List; @Service public class ExperimentDeviationConditionServiceImpl extends ServiceImpl implements IExperimentDeviationConditionService { + @Autowired + private IExperimentSampleInfoService experimentSampleInfoService; + @Override public List getByExperimentId(String experimentId) { return list(new LambdaQueryWrapper().eq(ExperimentDeviationCondition::getExperimentId, experimentId)); } + + @Override + public List getBySampleId(String sampleId) { + List list = list( + new LambdaQueryWrapper().eq(ExperimentDeviationCondition::getSampleId, sampleId)); + return list; + } + + @Override + public void assembleDetails(ExperimentDeviationCondition experimentDeviationCondition) { + String sampleId = experimentDeviationCondition.getSampleId(); + if (StringUtils.isNotBlank(sampleId)) { + ExperimentSampleInfo sampleInfo = experimentSampleInfoService.getById(sampleId); + experimentDeviationCondition.setSampleInfo(sampleInfo); + experimentDeviationCondition.setSampleName(sampleInfo.getSampleName()); + experimentDeviationCondition.setSampleType(sampleInfo.getSampleType()); + experimentDeviationCondition.setSampleModel(sampleInfo.getSampleModel()); + experimentDeviationCondition.setSampleBatch(sampleInfo.getSampleBatch()); + experimentDeviationCondition.setModelBatch(sampleInfo.getModelBatch()); + experimentDeviationCondition.setSampleImage(sampleInfo.getSampleImage()); + experimentDeviationCondition.setSampleManufacturer(sampleInfo.getSampleManufacturer()); + } + } + + @Override + public void removeBySampleId(Serializable sampleId) { + List bySampleId = getBySampleId(String.valueOf(sampleId)); + List collect = bySampleId.stream().map(v -> v.getId()).collect(Collectors.toList()); + removeByIds(collect); + } } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDeviationEquipmentServiceImpl.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDeviationEquipmentServiceImpl.java index d78187d..a32972d 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDeviationEquipmentServiceImpl.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDeviationEquipmentServiceImpl.java @@ -3,17 +3,17 @@ package org.jeecg.modules.database.service.impl; import cn.hutool.core.util.ObjUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.jeecg.modules.database.entity.Equipment; -import org.jeecg.modules.database.entity.ExperimentDeviationEquipment; +import org.apache.commons.lang3.StringUtils; +import org.jeecg.modules.database.entity.*; import org.jeecg.modules.database.mapper.ExperimentDeviationEquipmentMapper; -import org.jeecg.modules.database.service.IEquipmentService; -import org.jeecg.modules.database.service.IExperimentDeviationEquipmentService; +import org.jeecg.modules.database.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.Serializable; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** * @Description: 试验加偏设备信息 @@ -25,7 +25,9 @@ import java.util.Objects; public class ExperimentDeviationEquipmentServiceImpl extends ServiceImpl implements IExperimentDeviationEquipmentService { @Autowired - private IEquipmentService equipmentService; + private IEquipmentService equipmentService; + @Autowired + private IExperimentSampleInfoService experimentSampleInfoService; @Override public List getByExperimentId(String experimentId) { @@ -34,6 +36,12 @@ public class ExperimentDeviationEquipmentServiceImpl extends ServiceImpl getBySampleId(String sampleId) { + List list = list( + new LambdaQueryWrapper().eq(ExperimentDeviationEquipment::getSampleId, sampleId)); + return list; + } @Override public ExperimentDeviationEquipment getById(Serializable id) { @@ -42,13 +50,41 @@ public class ExperimentDeviationEquipmentServiceImpl extends ServiceImpl bySampleId = getBySampleId(String.valueOf(sampleId)); + List collect = bySampleId.stream().map(v -> v.getId()).collect(Collectors.toList()); + removeByIds(collect); + } } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDocServiceImpl.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDocServiceImpl.java index b93d994..b2469d2 100755 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDocServiceImpl.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentDocServiceImpl.java @@ -381,13 +381,23 @@ public class ExperimentDocServiceImpl extends ServiceImpl sampleInfoList = JSON.parseArray(sampleInfo, JSONObject.class); if (CollUtil.isNotEmpty(sampleInfoList)) { + List deviationConditionList = experiment.getDeviationConditionList(); + if (CollUtil.isEmpty(deviationConditionList)) { + deviationConditionList = new ArrayList<>(); + } for (int i = 0; i < sampleInfoList.size(); i++) { JSONObject info = sampleInfoList.get(i); - params.put("table" + i, Tables.of(new String[][] {new String[] {"试验样品名称", getStringOrDefault(info, - "sampleName"), "试验样品型号", getStringOrDefault(info, "sampleModel")}, - new String[] {"批 次", getStringOrDefault(info, "sampleBatch"), "试验样品编号", getStringOrDefault(info, - "sampleType")}, new String[] {"生产厂家", getStringOrDefault(info, "sampleManufacturer"), - "试验样品数量", sampleInfoList.size() + ""}, new String[] {"放置地点", "", "接收日期", ""},}) + String batchNo = deviationConditionList.stream().filter( + v -> StringUtils.equals(v.getSampleModel(), getStringOrDefault( + info, "sampleModel")) && StringUtils.equals(v.getSampleType(), getStringOrDefault( + info, "sampleType"))).findFirst().map(ExperimentDeviationCondition::getSampleNumber).orElse(""); + params.put("table" + i, Tables.of(new String[][] { + new String[] {"试验样品名称", getStringOrDefault(info, "sampleName"), "试验样品型号", getStringOrDefault( + info, "sampleModel")}, + new String[] {"批 次", getStringOrDefault(info, "sampleBatch"), "试验样品编号", batchNo}, + new String[] {"生产厂家", getStringOrDefault(info, "sampleManufacturer"), "试验样品数量", + batchNo.split(",").length + ""}, + new String[] {"放置地点", "", "接收日期", ""},}) .border(BorderStyle.DEFAULT).create()); String imgUrls = info.getString("picture"); if (StringUtils.isNotBlank(imgUrls)) { @@ -473,7 +483,7 @@ public class ExperimentDocServiceImpl extends ServiceImpl params = new HashMap<>(); params.put("index", i + 1); params.put("设备名称", Optional.ofNullable(v.getEquipmentName()).orElse("")); - params.put("管理编号", Optional.ofNullable(v.getEquipmentNo()).orElse("")); + params.put("管理编号", Optional.ofNullable(v.getManagementNo()).orElse("")); params.put("使用日期", experiment.getStartDate()); params.put("归还日期", experiment.getEndDate()); - Equipment equipment = equipmentService.getByManagementNo(v.getEquipmentNo()); + Equipment equipment = equipmentService.getByManagementNo(v.getManagementNo()); params.put("计量有效期", Optional.ofNullable(equipment).map(s -> s.getExpireDate()).orElse("")); params.put("异常记录", ""); list.add(params); diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentIrradiationBoardServiceImpl.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentIrradiationBoardServiceImpl.java index 42a7eaa..50bb9af 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentIrradiationBoardServiceImpl.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentIrradiationBoardServiceImpl.java @@ -2,12 +2,18 @@ package org.jeecg.modules.database.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.apache.commons.lang3.StringUtils; import org.jeecg.modules.database.entity.ExperimentIrradiationBoard; +import org.jeecg.modules.database.entity.ExperimentSampleInfo; import org.jeecg.modules.database.mapper.ExperimentIrradiationBoardMapper; import org.jeecg.modules.database.service.IExperimentIrradiationBoardService; +import org.jeecg.modules.database.service.IExperimentSampleInfoService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.io.Serializable; import java.util.List; +import java.util.stream.Collectors; /** * @Description: 试验辐照板信息 @@ -18,9 +24,44 @@ import java.util.List; @Service public class ExperimentIrradiationBoardServiceImpl extends ServiceImpl implements IExperimentIrradiationBoardService { + @Autowired + private IExperimentSampleInfoService experimentSampleInfoService; @Override public List getByExperimentId(String experimentId) { - return list(new LambdaQueryWrapper().eq(ExperimentIrradiationBoard::getExperimentId, experimentId)); + List list = list( + new LambdaQueryWrapper().eq(ExperimentIrradiationBoard::getExperimentId, experimentId)); + list.forEach(this::assembleDetails); + return list; + } + + @Override + public List getBySampleId(String sampleId) { + List list = list( + new LambdaQueryWrapper().eq(ExperimentIrradiationBoard::getSampleId, sampleId)); + return list; + } + + @Override + public void assembleDetails(ExperimentIrradiationBoard experimentIrradiationBoard) { + String sampleId = experimentIrradiationBoard.getSampleId(); + if (StringUtils.isNotBlank(sampleId)) { + ExperimentSampleInfo sampleInfo = experimentSampleInfoService.getById(sampleId); + experimentIrradiationBoard.setSampleInfo(sampleInfo); + experimentIrradiationBoard.setSampleName(sampleInfo.getSampleName()); + experimentIrradiationBoard.setSampleType(sampleInfo.getSampleType()); + experimentIrradiationBoard.setSampleModel(sampleInfo.getSampleModel()); + experimentIrradiationBoard.setSampleBatch(sampleInfo.getSampleBatch()); + experimentIrradiationBoard.setModelBatch(sampleInfo.getModelBatch()); + experimentIrradiationBoard.setSampleImage(sampleInfo.getSampleImage()); + experimentIrradiationBoard.setSampleManufacturer(sampleInfo.getSampleManufacturer()); + } + } + + @Override + public void removeBySampleId(Serializable sampleId) { + List bySampleId = getBySampleId(String.valueOf(sampleId)); + List collect = bySampleId.stream().map(v -> v.getId()).collect(Collectors.toList()); + removeByIds(collect); } } diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentSampleInfoServiceImpl.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentSampleInfoServiceImpl.java index bbf8f6a..f4f0106 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentSampleInfoServiceImpl.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentSampleInfoServiceImpl.java @@ -1,13 +1,19 @@ package org.jeecg.modules.database.service.impl; +import cn.hutool.core.util.ObjUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.apache.commons.lang3.StringUtils; +import org.jeecg.modules.database.entity.Client; import org.jeecg.modules.database.entity.ExperimentSampleInfo; import org.jeecg.modules.database.mapper.ExperimentSampleInfoMapper; -import org.jeecg.modules.database.service.IExperimentSampleInfoService; +import org.jeecg.modules.database.service.*; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.io.Serializable; import java.util.List; +import java.util.Optional; /** * @Description: 试验样品信息 @@ -18,6 +24,41 @@ import java.util.List; @Service public class ExperimentSampleInfoServiceImpl extends ServiceImpl implements IExperimentSampleInfoService { + @Autowired + private IClientService clientService; + @Autowired + private IExperimentDeviationEquipmentService experimentDeviationEquipmentService; + @Autowired + private IExperimentDeviationConditionService experimentDeviationConditionService; + @Autowired + private IExperimentIrradiationBoardService experimentIrradiationBoardService; + + @Override + public ExperimentSampleInfo getById(Serializable id) { + ExperimentSampleInfo byId = super.getById(id); + this.assembleDetails(byId); + return byId; + } + + @Override + public boolean removeById(Serializable id) { + super.removeById(id); + experimentDeviationEquipmentService.removeBySampleId(id); + experimentDeviationConditionService.removeBySampleId(id); + experimentIrradiationBoardService.removeBySampleId(id); + return true; + } + + private void assembleDetails(ExperimentSampleInfo sampleInfo) { + if (ObjUtil.isNull(sampleInfo)) { + return; + } + String sampleManufacturerId = sampleInfo.getSampleManufacturer(); + if (StringUtils.isNotBlank(sampleManufacturerId)) { + Client byId = clientService.getById(sampleManufacturerId); + sampleInfo.setSampleManufacturerName(Optional.ofNullable(byId).map(v -> v.getName()).orElse(sampleManufacturerId)); + } + } @Override public List getByExperimentId(String experimentId) { diff --git a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentServiceImpl.java b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentServiceImpl.java index f57ed03..3b1a0c8 100644 --- a/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentServiceImpl.java +++ b/physical-module-system/physical-system-biz/src/main/java/org/jeecg/modules/database/service/impl/ExperimentServiceImpl.java @@ -262,34 +262,34 @@ public class ExperimentServiceImpl extends ServiceImpl sampleInfoList = experiment.getSampleInfoList(); - if (CollUtil.isNotEmpty(sampleInfoList)) { - for (ExperimentSampleInfo sampleInfo : sampleInfoList) { - sampleInfo.setExperimentId(experiment.getId()); - experimentSampleInfoService.saveOrUpdate(sampleInfo); - } - } - List deviationConditionList = experiment.getDeviationConditionList(); - if (CollUtil.isNotEmpty(deviationConditionList)) { - for (ExperimentDeviationCondition deviationCondition : deviationConditionList) { - deviationCondition.setExperimentId(experiment.getId()); - experimentDeviationConditionService.saveOrUpdate(deviationCondition); - } - } - List deviationEquipmentList = experiment.getDeviationEquipmentList(); - if (CollUtil.isNotEmpty(deviationEquipmentList)) { - for (ExperimentDeviationEquipment deviationEquipment : deviationEquipmentList) { - deviationEquipment.setExperimentId(experiment.getId()); - experimentDeviationEquipmentService.saveOrUpdate(deviationEquipment); - } - } - List irradiationBoardList = experiment.getIrradiationBoardList(); - if (CollUtil.isNotEmpty(irradiationBoardList)) { - for (ExperimentIrradiationBoard irradiationBoard : irradiationBoardList) { - irradiationBoard.setExperimentId(experiment.getId()); - experimentIrradiationBoardService.saveOrUpdate(irradiationBoard); - } - } + //List sampleInfoList = experiment.getSampleInfoList(); + //if (CollUtil.isNotEmpty(sampleInfoList)) { + // for (ExperimentSampleInfo sampleInfo : sampleInfoList) { + // sampleInfo.setExperimentId(experiment.getId()); + // experimentSampleInfoService.saveOrUpdate(sampleInfo); + // } + //} + //List deviationConditionList = experiment.getDeviationConditionList(); + //if (CollUtil.isNotEmpty(deviationConditionList)) { + // for (ExperimentDeviationCondition deviationCondition : deviationConditionList) { + // deviationCondition.setExperimentId(experiment.getId()); + // experimentDeviationConditionService.saveOrUpdate(deviationCondition); + // } + //} + //List deviationEquipmentList = experiment.getDeviationEquipmentList(); + //if (CollUtil.isNotEmpty(deviationEquipmentList)) { + // for (ExperimentDeviationEquipment deviationEquipment : deviationEquipmentList) { + // deviationEquipment.setExperimentId(experiment.getId()); + // experimentDeviationEquipmentService.saveOrUpdate(deviationEquipment); + // } + //} + //List irradiationBoardList = experiment.getIrradiationBoardList(); + //if (CollUtil.isNotEmpty(irradiationBoardList)) { + // for (ExperimentIrradiationBoard irradiationBoard : irradiationBoardList) { + // irradiationBoard.setExperimentId(experiment.getId()); + // experimentIrradiationBoardService.saveOrUpdate(irradiationBoard); + // } + //} List fileList = experiment.getFileList(); if (CollUtil.isNotEmpty(fileList)) {