|
|
@@ -52,6 +52,10 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
@Autowired
|
|
|
private SysResumptionMapper sysResumptionMapper;
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<Long> selectItemIdsByPlanId(Long id) {
|
|
|
+ return appPlanToItemMapper.selectItemIdsByPlanId(id);
|
|
|
+ }
|
|
|
// @Autowired
|
|
|
// private ResumptionService resumptionService;
|
|
|
|
|
|
@@ -104,8 +108,8 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
String name = (String) redisTemplate.opsForValue().get(key);
|
|
|
ruleItemVo.setSafeTypeText(name);
|
|
|
|
|
|
- if(ObjectUtil.isNotNull(ruleItemVo.getBusinessType())){
|
|
|
- key="dict_config_point_business_type_"+ruleItemVo.getBusinessType() ;
|
|
|
+ if (ObjectUtil.isNotNull(ruleItemVo.getBusinessType())) {
|
|
|
+ key = "dict_config_point_business_type_" + ruleItemVo.getBusinessType();
|
|
|
name = (String) redisTemplate.opsForValue().get(key);
|
|
|
ruleItemVo.setBusinessTypeText(name);
|
|
|
}
|
|
|
@@ -121,7 +125,8 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
AppPlan plan = convertToAppPlan(app);
|
|
|
if (app.getId() == null) {
|
|
|
//新增
|
|
|
-
|
|
|
+ plan.setPlanOfOrgId(app.getPlanCreateOrgId());
|
|
|
+ plan.setPlanOfOrgName(app.getPlanCreateOrgName());
|
|
|
//验证名称是否重复
|
|
|
QueryWrapper<AppPlan> qw = new QueryWrapper<>();
|
|
|
qw.lambda().eq(AppPlan::getPlanName, app.getPlanName());
|
|
|
@@ -154,7 +159,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
AppPlanToItem item = null;
|
|
|
for (RuleItemVo ruleItemVo : itemList) {
|
|
|
item = new AppPlanToItem();
|
|
|
- item.setItemId(ruleItemVo.getId());
|
|
|
+ item.setItemId(ruleItemVo.getItemId());
|
|
|
item.setPlanId(id);
|
|
|
item.setPointScan(ruleItemVo.isPointScan());
|
|
|
item.setRequired(ruleItemVo.isRequired());
|
|
|
@@ -224,7 +229,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
AppPlanToItem item = null;
|
|
|
for (RuleItemVo ruleItemVo : itemList) {
|
|
|
item = new AppPlanToItem();
|
|
|
- item.setItemId(ruleItemVo.getId());
|
|
|
+ item.setItemId(ruleItemVo.getItemId());
|
|
|
item.setPlanId(id);
|
|
|
item.setPointScan(ruleItemVo.isPointScan());
|
|
|
item.setRequired(ruleItemVo.isRequired());
|
|
|
@@ -278,8 +283,8 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
String key = "dict_config_check_type_" + ruleItemVo.getSafeType();
|
|
|
String name = (String) redisTemplate.opsForValue().get(key);
|
|
|
ruleItemVo.setSafeTypeText(name);
|
|
|
- if(ObjectUtil.isNotNull(ruleItemVo.getBusinessType())){
|
|
|
- key="dict_config_point_business_type_"+ruleItemVo.getBusinessType() ;
|
|
|
+ if (ObjectUtil.isNotNull(ruleItemVo.getBusinessType())) {
|
|
|
+ key = "dict_config_point_business_type_" + ruleItemVo.getBusinessType();
|
|
|
name = (String) redisTemplate.opsForValue().get(key);
|
|
|
ruleItemVo.setBusinessTypeText(name);
|
|
|
}
|
|
|
@@ -304,7 +309,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
/**
|
|
|
* 验证计划是否被应用
|
|
|
*/
|
|
|
- Long num = sysResumptionMapper.selectCount(new QueryWrapper<SysResumption>().eq("planId",id));
|
|
|
+ Long num = sysResumptionMapper.selectCount(new QueryWrapper<SysResumption>().eq("plan_id", id));
|
|
|
if (num > 0) {
|
|
|
throw new RuntimeException("计划已生成任务,不能删除!");
|
|
|
}
|
|
|
@@ -346,7 +351,9 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
plan.setPlanStatus(app.getPlanStatus());
|
|
|
plan.setOrgType(app.getExecOrgType());
|
|
|
plan.setId(app.getId());
|
|
|
+ plan.setPlanType(app.getPlanType());
|
|
|
plan.setNotResumptionOnRest(app.getNotResumptionOnRest());
|
|
|
+ plan.setExecOrgType(app.getExecOrgType());
|
|
|
|
|
|
return plan;
|
|
|
}
|
|
|
@@ -355,16 +362,20 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
|
AppPlan plan = new AppPlan();
|
|
|
plan.setCheckType(app.getExecType());
|
|
|
- plan.setCheckOrgType(app.getOrgType());
|
|
|
+// plan.setCheckOrgType(app.getOrgType());
|
|
|
+ plan.setPlanCreateOrgId(app.getPlanCreateOrgId());
|
|
|
+ plan.setPlanCreateOrgName(app.getPlanCreateOrgName());
|
|
|
Date time = new Date();
|
|
|
- if(app.getId()==null){
|
|
|
+ if (app.getId() == null) {
|
|
|
plan.setCreateTime(time);
|
|
|
}
|
|
|
plan.setUpdateTime(time);
|
|
|
plan.setModifiedName(SecurityUtils.getUsername());
|
|
|
plan.setModifiedBy(SecurityUtils.getUserId());
|
|
|
- plan.setExecOrgType(app.getOrgType());
|
|
|
+ plan.setExecOrgType(app.getExecOrgType());
|
|
|
plan.setExecType(app.getExecType());
|
|
|
+ plan.setPlanType(app.getPlanType());
|
|
|
+ plan.setCount(app.getCount());
|
|
|
|
|
|
plan.setDescription(app.getNote());
|
|
|
plan.setPlanCycle(app.getPlanCycle());
|
|
|
@@ -372,7 +383,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
plan.setPlanName(app.getPlanName());
|
|
|
|
|
|
plan.setPlanStatus(app.getPlanStatus());
|
|
|
- plan.setPlanType(0);
|
|
|
+ plan.setDescription(app.getNote());
|
|
|
|
|
|
plan.setId(app.getId());
|
|
|
plan.setNotResumptionOnRest(app.getNotResumptionOnRest());
|