| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.AuditStatusDTO; |
| | | import com.ruoyi.system.dto.ExperimentDispatchSignDTO; |
| | | import com.ruoyi.system.dto.TExperimentDispatchDTO; |
| | | import com.ruoyi.system.dto.UpAndDownDTO; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:experimentDispatch:delete')") |
| | | @Log(title = "实验调度信息-删除实验调度", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除实验调度") |
| | | @DeleteMapping(value = "/api/t-experiment-dispatch/deleteByIds") |
| | | @DeleteMapping(value = "/open/t-experiment-dispatch/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | // 删除组别 |
| | | experimentDispatchGroupService.remove(Wrappers.lambdaQuery(TExperimentDispatchGroup.class).in(TExperimentDispatchGroup::getDispatchId, ids)); |
| | |
| | | return R.ok(experimentDispatchService.removeByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除实验调度 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:experimentDispatch:sign')") |
| | | @Log(title = "实验调度信息-实验调度签字", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "实验调度签字") |
| | | @PostMapping(value = "/api/t-experiment-dispatch/sign") |
| | | public R<Boolean> sign(@RequestBody String param) { |
| | | ExperimentDispatchSignDTO experimentDispatchSign = JSON.parseObject(param, ExperimentDispatchSignDTO.class); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | TExperimentDispatchParticipants experimentDispatchParticipants = experimentDispatchParticipantsService.getOne(Wrappers.lambdaQuery(TExperimentDispatchParticipants.class) |
| | | .eq(TExperimentDispatchParticipants::getDispatchId, experimentDispatchSign.getDispatchId()) |
| | | .eq(TExperimentDispatchParticipants::getRoleType, roleType) |
| | | .eq(TExperimentDispatchParticipants::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | if(experimentDispatchParticipants != null){ |
| | | experimentDispatchParticipants.setStatus(2); |
| | | experimentDispatchParticipants.setSignTime(LocalDateTime.now()); |
| | | experimentDispatchParticipants.setConfirmSign(experimentDispatchSign.getConfirmSign()); |
| | | experimentDispatchParticipantsService.updateById(experimentDispatchParticipants); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |