|
|
@@ -12,10 +12,12 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.xintong.visualinspection.bean.CheckItem;
|
|
|
import com.xintong.visualinspection.bean.CheckRule;
|
|
|
+import com.xintong.visualinspection.bean.Organ;
|
|
|
import com.xintong.visualinspection.dao.master.CheckItemDao;
|
|
|
import com.xintong.visualinspection.dao.master.CheckRuleDao;
|
|
|
import com.xintong.visualinspection.service.BaseService;
|
|
|
import com.xintong.visualinspection.service.CheckRuleService;
|
|
|
+import com.xintong.visualinspection.util.CacheUtil;
|
|
|
|
|
|
/**
|
|
|
* 文件名:UserServiceImpl
|
|
|
@@ -96,6 +98,10 @@ public class CheckRuleServiceImpl extends BaseService implements CheckRuleServic
|
|
|
}
|
|
|
checkItemList.add(o);
|
|
|
map.put(o.getParent_id(), checkItemList);
|
|
|
+ }else{
|
|
|
+ if(!map.containsKey(o.getId())){
|
|
|
+ map.put(o.getId(), new ArrayList<>());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
// 找出子
|
|
|
@@ -153,6 +159,17 @@ public class CheckRuleServiceImpl extends BaseService implements CheckRuleServic
|
|
|
|
|
|
@Override
|
|
|
public List<CheckRule> getAllAndCountItem(CheckRule checkRule) {
|
|
|
- return checkRuleDao.getAllAndCountItem(checkRule);
|
|
|
+
|
|
|
+ List<CheckRule> lists = checkRuleDao.getAllAndCountItem(checkRule);
|
|
|
+ for(CheckRule c:lists){
|
|
|
+ if(c.getChecked_dept_id()!=null){
|
|
|
+ Organ obj = CacheUtil.deptMap.get(c.getChecked_dept_id());
|
|
|
+ if(obj!=null){
|
|
|
+ c.setChecked_dept_name(obj.getOrganname());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return lists;
|
|
|
}
|
|
|
}
|