| | |
| | | } |
| | | |
| | | @Transactional |
| | | public Response addKZ(Experiment experiment) { |
| | | public Response addKZFZ(Experiment experiment) { |
| | | //插入experiment数据 |
| | | experiment.setCreateTime(new Date()); |
| | | //新增初始化状态为0未开始,正在进行 |
| | |
| | | kzMapper.insert((ExperimentBaseDataKZ) experiment.getBaseData()); |
| | | |
| | | //插入experiment_point数据 |
| | | ExperimentPoint point = (ExperimentPoint) experiment.getPoint(); |
| | | point.setStatus(1); |
| | | pointMapper.insert(point); |
| | | |
| | | List<ExperimentPoint> points = (List<ExperimentPoint>) experiment.getPoint(); |
| | | points.stream().forEach(p->p.setStatus(0)); |
| | | pointMapper.insertBatchSomeColumn(points); |
| | | //TODO 插入紧急停止数据 |
| | | |
| | | return new Response().setMsg(1,"新增成功"); |