提交 2b32b0fd authored 作者: 孙洁清's avatar 孙洁清

评估报告管理页面修改v1.0.4

上级 4df35d8f
......@@ -36,6 +36,7 @@ public interface RuleDao extends JpaRepository<Rule,String>,JpaSpecificationExec
* @return
*/
List<Rule> findAllByTechnologyIdIn(List<String> ids);
List<Rule> findAllByTechnologyId(String id);
List<Rule> findAllByTechnologyIdEqualsAndTargetEquals(String techId,String target);
}
package com.zjty.inspect.service.impl;
import com.zjty.inspect.dao.RuleDao;
import com.zjty.inspect.dao.TechnologyDao;
import com.zjty.inspect.entity.Rule;
import com.zjty.inspect.entity.TechnologyQo;
import com.zjty.inspect.entity.Technology;
import com.zjty.inspect.service.TechnologyService;
......@@ -31,6 +33,8 @@ import java.util.Optional;
@Transactional(rollbackFor = Exception.class)
public class TechnologyServiceImpl implements TechnologyService {
@Autowired
private RuleDao ruleDao;
@Autowired
private TechnologyDao technologyDao;
......@@ -96,6 +100,12 @@ public class TechnologyServiceImpl implements TechnologyService {
*/
@Override
public void update(Technology technology) {
List<Rule> rules = ruleDao.findAllByTechnologyId(technology.getId());
for (Rule rule : rules) {
rule.setTechnologyName(technology.getTechnologyName());
}
ruleDao.saveAll(rules);
technologyDao.save(technology);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论