[修改] 删除草稿时,删除业务数据
This commit is contained in:
+2
-29
@@ -901,39 +901,12 @@ public class TodoTaskController {
|
|||||||
busProcessName.setId(id);
|
busProcessName.setId(id);
|
||||||
busProcessName.setSubmitStatus(SubmitStatusEnum.DELETE.getValue());
|
busProcessName.setSubmitStatus(SubmitStatusEnum.DELETE.getValue());
|
||||||
this.iBusProcessNameService.updateById(busProcessName);
|
this.iBusProcessNameService.updateById(busProcessName);
|
||||||
deleteData(prcType,dataId);
|
//删除业务数据
|
||||||
|
iBusProcessNewService.deleteData(prcType,dataId);
|
||||||
return WrapMapper.ok("删除成功");
|
return WrapMapper.ok("删除成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除业务数据
|
|
||||||
* @param prcType
|
|
||||||
* @param dataId
|
|
||||||
*/
|
|
||||||
private void deleteData(String prcType, String dataId) {
|
|
||||||
if ("".equals(prcType)){
|
|
||||||
//预览
|
|
||||||
powerApplyActDao.deleteByDataId(dataId);
|
|
||||||
}else if ("1".equals(prcType)){
|
|
||||||
//预览
|
|
||||||
powerApplyActDao.deleteByDataId(dataId);
|
|
||||||
} else if ("2".equals(prcType)){
|
|
||||||
//预览 + 下载
|
|
||||||
powerApplyActDao.deleteByDataId(dataId);
|
|
||||||
}else if ("3".equals(prcType)){
|
|
||||||
//下载
|
|
||||||
powerApplyActDao.deleteByDataId(dataId);
|
|
||||||
} else if("4".equals(prcType)){
|
|
||||||
//上传
|
|
||||||
ttReportManageActDao.deleteByDataId(dataId);
|
|
||||||
|
|
||||||
}else if("5".equals(prcType)){
|
|
||||||
//编辑
|
|
||||||
ttReportManageActDao.deleteByDataId(dataId);
|
|
||||||
}else {
|
|
||||||
throw new AdcDaBaseException("没有流程类型"+prcType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "已发流程", notes = "已发流程")
|
@ApiOperation(value = "已发流程", notes = "已发流程")
|
||||||
@PostMapping("/issuedProcess")
|
@PostMapping("/issuedProcess")
|
||||||
|
|||||||
+6
@@ -31,4 +31,10 @@ public interface IBusProcessNewService extends IService<BusProcessNew> {
|
|||||||
|
|
||||||
List<BusProcessNew> selectEOByTaskId(String prcId);
|
List<BusProcessNew> selectEOByTaskId(String prcId);
|
||||||
BusProcessNew selectEOByDataId(String prcId);
|
BusProcessNew selectEOByDataId(String prcId);
|
||||||
|
/**
|
||||||
|
* 删除业务数据
|
||||||
|
* @param prcType
|
||||||
|
* @param dataId
|
||||||
|
*/
|
||||||
|
void deleteData(String prcType, String dataId);
|
||||||
}
|
}
|
||||||
|
|||||||
+45
-2
@@ -1,13 +1,18 @@
|
|||||||
package com.adc.da.wkflow.business_main.service.impl;
|
package com.adc.da.wkflow.business_main.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
||||||
|
import com.adc.da.util.exception.AdcDaBaseException;
|
||||||
import com.adc.da.wkflow.business_main.entity.BusProcessNew;
|
import com.adc.da.wkflow.business_main.entity.BusProcessNew;
|
||||||
import com.adc.da.wkflow.business_main.mapper.BusProcessNewMapper;
|
import com.adc.da.wkflow.business_main.mapper.BusProcessNewMapper;
|
||||||
import com.adc.da.wkflow.business_main.service.IBusProcessNewService;
|
import com.adc.da.wkflow.business_main.service.IBusProcessNewService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.activiti.engine.TaskService;
|
import org.activiti.engine.TaskService;
|
||||||
import org.activiti.engine.task.Task;
|
import org.activiti.engine.task.Task;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@@ -26,8 +31,14 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class BusProcessNewServiceImpl extends ServiceImpl<BusProcessNewMapper, BusProcessNew> implements IBusProcessNewService {
|
public class BusProcessNewServiceImpl extends ServiceImpl<BusProcessNewMapper, BusProcessNew> implements IBusProcessNewService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
private TaskService taskService;
|
private TaskService taskService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PowerApplyActDao powerApplyActDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TtReportManageActDao ttReportManageActDao;
|
||||||
/*
|
/*
|
||||||
* @Author yuzhong
|
* @Author yuzhong
|
||||||
* @Description
|
* @Description
|
||||||
@@ -78,4 +89,36 @@ public class BusProcessNewServiceImpl extends ServiceImpl<BusProcessNewMapper, B
|
|||||||
public BusProcessNew selectEOByDataId(String dataId) {
|
public BusProcessNew selectEOByDataId(String dataId) {
|
||||||
return baseMapper.selectEOByDataId(dataId);
|
return baseMapper.selectEOByDataId(dataId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除业务数据
|
||||||
|
* @param prcType
|
||||||
|
* @param dataId
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void deleteData(String prcType, String dataId) {
|
||||||
|
if ("".equals(prcType)){
|
||||||
|
//预览
|
||||||
|
powerApplyActDao.deleteByDataId(dataId);
|
||||||
|
}else if ("1".equals(prcType)){
|
||||||
|
//预览
|
||||||
|
powerApplyActDao.deleteByDataId(dataId);
|
||||||
|
} else if ("2".equals(prcType)){
|
||||||
|
//预览 + 下载
|
||||||
|
powerApplyActDao.deleteByDataId(dataId);
|
||||||
|
}else if ("3".equals(prcType)){
|
||||||
|
//下载
|
||||||
|
powerApplyActDao.deleteByDataId(dataId);
|
||||||
|
} else if("4".equals(prcType)){
|
||||||
|
//上传
|
||||||
|
ttReportManageActDao.deleteByDataId(dataId);
|
||||||
|
|
||||||
|
}else if("5".equals(prcType)){
|
||||||
|
//编辑
|
||||||
|
ttReportManageActDao.deleteByDataId(dataId);
|
||||||
|
}else {
|
||||||
|
throw new AdcDaBaseException("没有流程类型"+prcType);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user