通过id删除生产单不上报apms
This commit is contained in:
parent
1cb26378a1
commit
dd2ae384ad
@ -278,6 +278,12 @@ public class CurrTaskController extends BaseController {
|
||||
public R<String> deleteBySheetNo(@Validated @RequestBody CurrTaskQueryParam param) {
|
||||
return currTaskService.deleteBySheetNo(param.getSheetNo());
|
||||
}
|
||||
|
||||
@PostMapping(value = "deleteById")
|
||||
@ApiOperation(value = "人工id删除未正式开始的生产单")
|
||||
public R<String> deleteById(@Validated @RequestBody IdParam param) {
|
||||
return currTaskService.deleteById(param);
|
||||
}
|
||||
@PostMapping(value = "runTask")
|
||||
@ApiOperation(value = "执行任务")
|
||||
public R<String> runTask(@Validated @RequestBody IdParam param) throws InterruptedException, IOException {
|
||||
|
@ -84,7 +84,7 @@ public interface CurrTaskService {
|
||||
* @param
|
||||
* @return 结果
|
||||
*/
|
||||
R<String> deleteBySheetNo(IdParam idParam);
|
||||
R<String> deleteById(IdParam idParam);
|
||||
|
||||
/**
|
||||
* 首页 获取当前执行的任务
|
||||
|
@ -80,6 +80,8 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
||||
KilnInfoServiceBiz kilnInfoServiceBiz;
|
||||
@Autowired
|
||||
LocationServiceBiz locationServiceBiz;
|
||||
@Autowired
|
||||
CurrTaskDetServiceBiz currTaskDetServiceBiz;
|
||||
|
||||
@Override
|
||||
public CurrTaskVo getCurrTask(IdParam idParam) {
|
||||
@ -230,8 +232,25 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> deleteBySheetNo(IdParam idParam) {
|
||||
return null;
|
||||
public R<String> deleteById(IdParam idParam) {
|
||||
CurrTask currTask = currTaskServiceBiz.getById(idParam.getId());
|
||||
if (currTask.getIsAuto()==1){
|
||||
List<CurrTask> currTaskList = currTaskServiceBiz.list(new QueryWrapper<CurrTask>().eq(CurrTask.AUTO_EXE_TASK_ID, currTask.getAutoExeTaskId()));
|
||||
for (CurrTask currTask1:currTaskList
|
||||
) {
|
||||
if (currTask1.getStatus()!=0){
|
||||
return R.failed("该自动任务已有步骤在执行中或执行完成,不能删除!");
|
||||
}
|
||||
}
|
||||
//能删除
|
||||
autoExeTaskServiceBiz.removeById(currTask.getAutoExeTaskId());
|
||||
for (CurrTask currTask1:currTaskList
|
||||
) {
|
||||
currTaskDetServiceBiz.remove(new QueryWrapper<CurrTaskDet>().eq(CurrTaskDet.CURR_TASK_ID,currTask1.getId()));
|
||||
}
|
||||
}
|
||||
currTaskServiceBiz.removeById(idParam);
|
||||
return R.ok(idParam.getId().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user