主表:
id操作编号箱体编号所属类别所属类别体积颜色备注状态id状态制表人创建时间
弹出表
箱体编号箱体名称客户发生时间状态制表人
JS
//流转记录var boxView = mini.get("boxView");var grid2 = mini.get("datagrid2"); //查看详情function onActionRenderer(e) { var s = ' 流转记录 '; return s;}//流转记录function view(){ var row = grid.getSelected(); if(row){ grid2.load({id:row.id}); boxView.show(); }else{ mini.alert("请选择一条记录", "系统提示"); }}
controller显示方法
/** * @title 取食品箱过程记录列表数据 * @author wangyu * @data 2017-04-17 */ public ModelAndView list(HttpServletRequest request, HttpServletResponse response) { String p = request.getParameter("pageIndex"); String limit = request.getParameter("pageSize"); int toLimit = NumberUtils.toInt(limit, Constants.VALUE_PAGE_SIZE); int toStart = (NumberUtils.toInt(p, 0) - 1) * toLimit; String id = request.getParameter("id"); Page page = boxRecordManager.getBoxRecord(toStart, toLimit,id); JSONObject jo = new JSONObject(); jo.put("total", page.getTotalCount()); jo.put("data", JsonUtil.pageToJson(page, new JsonCallback() { @Override public void process(IJsonArray jsonArray, IJsonObject jsonObject, Object data) { } @Override public String[] getExcludes() { return null; } })); this.renderText(response, jo.toString()); return null; }
Manager 查询方法
/** * @title 取食品食品箱过程记录 * @author wangyu * @date 2017-04-17 * @param id * 食品箱id */ public Page getBoxRecord(int start, int pageSize, String id) { StringBuffer sb = new StringBuffer(); sb.append(" select bbr.* ,bb.BC_BOX_NUMBER,"); sb.append(" sde1.DICTNAME AS 'STATUS_name',"); sb.append(" KH_SHORT_NAME,"); sb.append(" su.SU_USER_NAME"); sb.append(" FROM base_box_record bbr"); sb.append(" inner join base_box bb on bb.BC_ID = bbr.XL_BOX_ID"); sb.append(" inner join base_customer bc on bc.KH_ID = bbr.XL_CUSTOMER_ID"); sb.append(" inner join sys_dict_entry sde1 on sde1.DICTID=bbr.XL_STATUS_ID and sde1.DICTTYPEID='YW_BOX_STATUS'"); sb.append(" inner join sys_user su on su.ID=bbr.XL_CREATE_USER_ID"); if (id != null && !id.equalsIgnoreCase("")){ sb.append(" and bbr.XL_BOX_ID ='" + id + "'"); } sb.append(" ORDER BY bbr.XL_CREATE_TIME desc"); Query query = this.getSqlQuery(sb.toString()); query.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP); Page page = this.pageSqlQuery(query, sb.toString(), start, pageSize, super.COUNT_MODE, null); BoxRecordDto boxRecordDto = null; ListboxDtos = new ArrayList (); for (Map map : (List