|
@@ -361,6 +361,18 @@ public class ActBusinessController {
|
|
|
tbTableInfoPracticeService.removeById(tbTableInfoPractice.getId());
|
|
|
// 删除act_z_business
|
|
|
actBusinessService.removeById(id);
|
|
|
+ // 回调业务中的删除
|
|
|
+ QueryWrapper<TbTableInfoOuter> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("text", actBusiness.getTableName());
|
|
|
+ TbTableInfoOuter tableInfoOuter = tbTableInfoOuterService.getOne(queryWrapper);
|
|
|
+ if (tableInfoOuter != null && oConvertUtils.isNotEmpty(tableInfoOuter.getSeturl()) && tbTableInfoPractice != null) {
|
|
|
+
|
|
|
+ JSONObject jsonObject = JSON.parseObject(tbTableInfoPractice.getContent());
|
|
|
+ jsonObject.put("actionUser", "");
|
|
|
+ jsonObject.put("actionTime", DateUtils.date2Str(DateUtils.datetimeFormat.get()));
|
|
|
+ jsonObject.put("action", "删除");
|
|
|
+ HttpUtils.sendJsonPost(tableInfoOuter.getSeturl(), jsonObject);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return Result.ok("删除成功");
|
|
@@ -943,27 +955,27 @@ public class ActBusinessController {
|
|
|
JSONObject jsonObject = new JSONObject(param);
|
|
|
|
|
|
/* 判断是否已经有发起得流程 */
|
|
|
- QueryWrapper<TbTableInfoPractice> practiceQueryWrapper = new QueryWrapper<>();
|
|
|
- practiceQueryWrapper.eq("text", tableName);
|
|
|
- practiceQueryWrapper.eq("route_name", tbTableInfoOuter.getRouteName());
|
|
|
- practiceQueryWrapper.eq("content", JSON.toJSONString(jsonObject));
|
|
|
- List<TbTableInfoPractice> tableInfoPracticeList = tbTableInfoPracticeService.list(practiceQueryWrapper);
|
|
|
- if (tableInfoPracticeList.size()>0){
|
|
|
- QueryWrapper<ActBusiness> businessQueryWrapper = new QueryWrapper<>();
|
|
|
- businessQueryWrapper.eq("table_id", tableInfoPracticeList.get(0).getId());
|
|
|
- ActBusiness actBusiness = actBusinessService.getOne(businessQueryWrapper);
|
|
|
- if (actBusiness == null){
|
|
|
- result.error500("数据校验失败,请联系管理员");
|
|
|
- return result;
|
|
|
- }
|
|
|
- if (oConvertUtils.isNotEmpty(actBusiness.getProcInstId())){
|
|
|
- result.error500("流程已发起,不能重复发起");
|
|
|
- return result;
|
|
|
- }
|
|
|
- actBusiness.setRouteName(tableInfoPracticeList.get(0).getRouteName());
|
|
|
- result.success("发起申请成功");
|
|
|
- result.setResult(actBusiness);
|
|
|
- }else {
|
|
|
+// QueryWrapper<TbTableInfoPractice> practiceQueryWrapper = new QueryWrapper<>();
|
|
|
+// practiceQueryWrapper.eq("text", tableName);
|
|
|
+// practiceQueryWrapper.eq("route_name", tbTableInfoOuter.getRouteName());
|
|
|
+// practiceQueryWrapper.eq("content", JSON.toJSONString(jsonObject));
|
|
|
+// List<TbTableInfoPractice> tableInfoPracticeList = tbTableInfoPracticeService.list(practiceQueryWrapper);
|
|
|
+// if (tableInfoPracticeList.size()>0){
|
|
|
+// QueryWrapper<ActBusiness> businessQueryWrapper = new QueryWrapper<>();
|
|
|
+// businessQueryWrapper.eq("table_id", tableInfoPracticeList.get(0).getId());
|
|
|
+// ActBusiness actBusiness = actBusinessService.getOne(businessQueryWrapper);
|
|
|
+// if (actBusiness == null){
|
|
|
+// result.error500("数据校验失败,请联系管理员");
|
|
|
+// return result;
|
|
|
+// }
|
|
|
+// if (oConvertUtils.isNotEmpty(actBusiness.getProcInstId())){
|
|
|
+// result.error500("流程已发起,不能重复发起");
|
|
|
+// return result;
|
|
|
+// }
|
|
|
+// actBusiness.setRouteName(tableInfoPracticeList.get(0).getRouteName());
|
|
|
+// result.success("发起申请成功");
|
|
|
+// result.setResult(actBusiness);
|
|
|
+// }else {
|
|
|
/*保存业务表单数据到数据库表*/
|
|
|
String tableId = IdUtil.simpleUUID();
|
|
|
TbTableInfoPractice tbTableInfoPractice = new TbTableInfoPractice(tableId, tableName, tableName,
|
|
@@ -991,7 +1003,7 @@ public class ActBusinessController {
|
|
|
|
|
|
result.success("发起申请成功");
|
|
|
result.setResult(actBusiness);
|
|
|
- }
|
|
|
+// }
|
|
|
} catch (Exception ex) {
|
|
|
ex.printStackTrace();
|
|
|
result.error500("发起申请异常:"+ex.getMessage());
|