* <li>修改日期:
*/
@RequestMapping(params = "doTreeGrid")
@ResponseBody
public List<TreeGrid> doTreeGrid(JeecgMatterBom entity, HttpServletRequest request, HttpServletResponse response, TreeGrid treegrid) {
CriteriaQuery cq = new CriteriaQuery(JeecgMatterBom.class);
if("yes".equals(request.getParameter("isSearch"))) {
treegrid.setId(null);
entity.setId(null);
}
if(null != entity.getCode()) {
HqlGenerateUtil.installHql(cq, entity);
}
if (treegrid.getId() != null) {
cq.eq("parent.id", treegrid.getId());
} else {
cq.isNull("parent");
}
cq.add();
List<TreeGrid> list = jeecgMatterBomService.getListByCriteriaQuery(cq, false);
if(list.size() == 0 && entity.getCode() != null) {
cq = new CriteriaQuery(JeecgMatterBom.class);
JeecgMatterBom parent = new JeecgMatterBom();
entity.setParent(parent);
HqlGenerateUtil.installHql(cq, entity);
list = jeecgMatterBomService.getListByCriteriaQuery(cq, false);
}