| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.ExperimentDispatchSignDTO; |
| | | import com.ruoyi.system.dto.TExperimentDispatchDTO; |
| | |
| | | @PostMapping(value = "/api/t-experiment-dispatch/update") |
| | | public R<Boolean> update(@RequestBody String param) { |
| | | TExperimentDispatchDTO dto = JSON.parseObject(param,TExperimentDispatchDTO.class); |
| | | |
| | | if (SecurityUtils.isAdmin(SecurityUtils.getUserId())){ |
| | | dto.setStatus(null); |
| | | experimentDispatchService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | experimentDispatchService.updateById(dto); |
| | | |
| | | // 添加实验分组 |
| | | experimentDispatchGroupService.remove(Wrappers.lambdaQuery(TExperimentDispatchGroup.class).eq(TExperimentDispatchGroup::getDispatchId, dto.getId())); |
| | | List<TExperimentDispatchGroup> experimentDispatchGroups = dto.getExperimentDispatchGroups(); |