|
@@ -17,10 +17,12 @@ import com.boman.domain.GenTable;
|
|
|
import com.boman.domain.GenTableColumn;
|
|
|
import com.boman.domain.SysDictData;
|
|
|
import com.boman.domain.constant.*;
|
|
|
+import com.boman.domain.dto.ProcessDto;
|
|
|
import com.boman.domain.dto.RoleMenuDto;
|
|
|
import com.boman.domain.exception.NoSuchFunctionException;
|
|
|
import com.boman.gen.api.RemoteGenTableColumnService;
|
|
|
import com.boman.gen.api.RemoteGenTableService;
|
|
|
+import com.boman.jflow.api.RemoteJflowProcessService;
|
|
|
import com.boman.jflow.api.RemoteJflowTaskService;
|
|
|
import com.boman.system.api.RemoteMenuService;
|
|
|
import com.boman.domain.SysMenu;
|
|
@@ -92,7 +94,7 @@ public class TableServiceCmdService {
|
|
|
@Resource
|
|
|
private RemoteMenuService remoteMenuService;
|
|
|
@Resource
|
|
|
- private RemoteJflowTaskService remoteJflowTaskService;
|
|
|
+ private RemoteJflowProcessService remoteJflowProcessService;
|
|
|
|
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(TableServiceCmdService.class);
|
|
|
|
|
@@ -210,15 +212,26 @@ public class TableServiceCmdService {
|
|
|
RowResult rowResult;
|
|
|
for (Long id : idArr) {
|
|
|
// 校验权限
|
|
|
- if (BooleanUtils.isTrue(checkAuthObjectDelete(genTable, id, pkName))) {
|
|
|
- rowResult = deleteService.objectLogicDelete(new Long[]{id}, dto.getTable(), pkName, jsonObject);
|
|
|
- if (rowResult.isOk()) {
|
|
|
- LOGGER.info("逻辑删除成功, tableName: {}, id: {}, 操作人: {}", tableContext.getTableName(), id, getLoginUser().getUsername());
|
|
|
- continue;
|
|
|
- }
|
|
|
- LOGGER.info("逻辑删除失败, tableName: {}, id: {}, 操作人: {}", tableContext.getTableName(), id, getLoginUser().getUsername());
|
|
|
- } else {
|
|
|
+ if (BooleanUtils.isFalse(checkAuthObjectDelete(genTable, id, pkName))) {
|
|
|
rowResult = RowResult.create(RowResult.FAIL, "无操作权限");
|
|
|
+ result.add(rowResult);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ rowResult = deleteService.objectLogicDelete(new Long[]{id}, dto.getTable(), pkName, jsonObject);
|
|
|
+ if (!rowResult.isOk()) {
|
|
|
+ LOGGER.info("逻辑删除失败, tableName: {}, id: {}, 操作人: {}", tableContext.getTableName(), id, getLoginUser().getUsername());
|
|
|
+ result.add(rowResult);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ LOGGER.info("逻辑删除成功, tableName: {}, id: {}, 操作人: {}", tableContext.getTableName(), id, getLoginUser().getUsername());
|
|
|
+ Boolean stopProcess = dto.getStopProcess();
|
|
|
+ if (BooleanUtils.isTrue(stopProcess)) {
|
|
|
+ ProcessDto processDto = new ProcessDto();
|
|
|
+ processDto.setBusinessCode(id);
|
|
|
+ processDto.setHardShut(Boolean.TRUE);
|
|
|
+ remoteJflowProcessService.shut(processDto);
|
|
|
}
|
|
|
|
|
|
result.add(rowResult);
|