add 企标计划变更流程关联标准-通过processId删除

This commit is contained in:
lijiarao
2024-10-10 18:00:35 +08:00
parent 540340b2fa
commit 3f0ba155ac
2 changed files with 22 additions and 0 deletions
@@ -106,6 +106,20 @@ public class ProcessPlanChangeLinkController extends JeroController<ProcessPlanC
processPlanChangeLinkService.deleteById(id);
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED);
}
/**
* 通过id删除
*/
@AutoLog(value = "企标计划变更流程关联标准-通过processId删除")
@ApiOperation(value = "企标计划变更流程关联标准-通过processId删除", notes = "企标计划变更流程关联标准-通过processId删除")
@PostMapping(value = "/deleteByProcessId")
public Result<String> deleteByProcessId(@RequestBody IdMapBody map) {
String id = map.getId();
if (StringUtils.isBlank(id)) {
return Result.error("请选择数据");
}
processPlanChangeLinkService.deleteByProcessId(id);
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED);
}
/**
* 批量删除
@@ -1,6 +1,7 @@
package com.jero.modules.activiti.process.planchange.service;
import cn.hutool.core.collection.CollStreamUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.system.api.ISysBaseAPI;
import com.jero.common.system.query.QueryGenerator;
@@ -79,5 +80,12 @@ public class ProcessPlanChangeLinkService extends ServiceImpl<ProcessPlanChangeL
ProcessPlanChangeLink processPlanChangeLink = this.getById(id);
return processPlanChangeLink;
}
public void deleteByProcessId(String id) {
LambdaQueryWrapper<ProcessPlanChangeLink> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ProcessPlanChangeLink::getProcessId,id);
this.remove(wrapper);
}
}