|
@@ -340,14 +340,25 @@ public class ActBusinessController {
|
|
|
/*通过id删除草稿状态申请*/
|
|
|
@RequestMapping(value = "/delByIds", method = RequestMethod.POST)
|
|
|
public Result delByIds(String ids){
|
|
|
-
|
|
|
+ StringBuilder sbErro = new StringBuilder();
|
|
|
for(String id : ids.split(",")){
|
|
|
ActBusiness actBusiness = actBusinessService.getById(id);
|
|
|
// if(actBusiness.getStatus()!=0){
|
|
|
// return Result.error("删除失败, 仅能删除草稿状态的申请");
|
|
|
// }
|
|
|
+
|
|
|
+ TbTableInfoPractice tbTableInfoPractice = tbTableInfoPracticeService.getById(actBusiness.getTableId());
|
|
|
+ if (tbTableInfoPractice == null){
|
|
|
+ sbErro.append(actBusiness.getTitle()+"practice表获取失败,请联系管理员;");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
// 删除关联业务表
|
|
|
- actBusinessService.deleteBusiness(actBusiness.getTableName(), actBusiness.getTableId());
|
|
|
+ if (oConvertUtils.getString(tbTableInfoPractice.getRouteName()).indexOf("外部表单")==-1){
|
|
|
+ actBusinessService.deleteBusiness(actBusiness.getTableName(), actBusiness.getTableId());
|
|
|
+ }
|
|
|
+ // 删除tb_table_info_practice
|
|
|
+ tbTableInfoPracticeService.removeById(tbTableInfoPractice.getId());
|
|
|
+ // 删除act_z_business
|
|
|
actBusinessService.removeById(id);
|
|
|
}
|
|
|
return Result.ok("删除成功");
|