|
@@ -7,6 +7,7 @@ import com.example.opc_common.util.Blank;
|
|
import com.example.opc_common.util.ConstantStr;
|
|
import com.example.opc_common.util.ConstantStr;
|
|
import com.example.opc_common.util.Result;
|
|
import com.example.opc_common.util.Result;
|
|
import com.example.opc_da.dao.DictDao;
|
|
import com.example.opc_da.dao.DictDao;
|
|
|
|
+import com.example.opc_da.dao.ItemGroupDao;
|
|
import com.example.opc_da.dao.ReportTableDao;
|
|
import com.example.opc_da.dao.ReportTableDao;
|
|
import com.example.opc_da.dynamicSchedule.CronTaskRegister;
|
|
import com.example.opc_da.dynamicSchedule.CronTaskRegister;
|
|
import com.example.opc_da.dynamicSchedule.SchedulingRunnable;
|
|
import com.example.opc_da.dynamicSchedule.SchedulingRunnable;
|
|
@@ -28,6 +29,9 @@ public class ReportTableServiceImpl implements ReportTableService {
|
|
@Resource
|
|
@Resource
|
|
private ReportTableDao reportTableDao;
|
|
private ReportTableDao reportTableDao;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ItemGroupDao itemGroupDao;
|
|
|
|
+
|
|
@Resource
|
|
@Resource
|
|
private UserUtil userUtil;
|
|
private UserUtil userUtil;
|
|
|
|
|
|
@@ -175,6 +179,14 @@ public class ReportTableServiceImpl implements ReportTableService {
|
|
reportTable.setUserGroupList(userGroupList);
|
|
reportTable.setUserGroupList(userGroupList);
|
|
}
|
|
}
|
|
if (isAutoReport == ConstantStr.AUTOMATIC_REPORT) {
|
|
if (isAutoReport == ConstantStr.AUTOMATIC_REPORT) {
|
|
|
|
+ List<ItemGroup> itemGroupList = itemGroupDao.getItemGroupListByTableId(id);
|
|
|
|
+ if (Blank.isNotEmpty(itemGroupList)) {
|
|
|
|
+ for (ItemGroup itemGroup : itemGroupList) {
|
|
|
|
+ if (itemGroup.getRunState() == ConstantStr.START_UP) {
|
|
|
|
+ return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "此报表作为事件驱动报表,已被配置在运行的数据组上了,请停止运行数据组后再试");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (Blank.isEmpty(cron)) {
|
|
if (Blank.isEmpty(cron)) {
|
|
return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "cron表达式不能为空");
|
|
return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "cron表达式不能为空");
|
|
}
|
|
}
|