NutzCN Logo
问答 带有检索和排序功能的datagrid,返回ResponseGridBean的方法中怎么实现查询条件左联
发布于 2636天前 作者 qq_821e17cb 1240 次浏览 复制 上一个帖子 下一个帖子
标签:

@RequestMapping(value = "/doStuffOfferLine9", method = { RequestMethod.POST })
@ResponseBody
public ResponseGridBean doStuffOfferLines(HttpSession session,HttpServletRequest request,String zdbj,String brandCode,String quarterName,String quarterCode,String stuffCode ) {
User user=(User) session.getAttribute(ApplicationCommon.SESSION_ADMIN);
SysUnit unit=supplyStuffListService.getSysUnitbyUser(user);
String factoryString=unit.getSupplierCode();

       JqFormBean jq = JqFormBean.convertParasToBean(request);
       SqlExpressionGroup customerExp = Cnd.exps("1", "=", 1);

       boolean isQuery = false;
       if (StringUtil.isNotEmpty(quarterCode)) {
         customerExp.and("quarterName", "=", quarterCode);
         isQuery = true;
       }
       if (StringUtil.isNotEmpty(factoryString)) {
         customerExp.and("supplierCode", "=", factoryString);
         isQuery = true;
       }if (StringUtil.isNotEmpty(zdbj)) {
         customerExp.and("priceBillCode", "=", zdbj);
         isQuery = true;
       }
       if (isQuery) {
         jq.setCustomerExp(customerExp);
         if (jq.get_search()) {
          jq.setExp(JqSearchBean.gerCnd(StuffOfferLine.class, jq.getFilters()));
         }
         jq = supplyStuffListService.query(jq, StuffOfferLine.class);
       }
    List<StuffOfferLine> alls = jq.getRs().getRows();//本行没用,
    jq.getRs().setRows(alls);//本行没用
    return jq.getRs();

}

1 回复

用插入代码按钮重新贴一次

添加回复
请先登陆
回到顶部