日期:2014-05-16 浏览次数:20502 次
public List<GoodsListBean> findGoodsListBean(String goodsnum, Integer vmid, Integer omid, String rusjstart, String rusjend) throws Exception { // if (userid == null) { // return new ArrayList<PusMenu>(); // } StringBuilder sbstr = new StringBuilder( "SELECT g.*,u.name acceptancename,c.name companyname,vm.name vmname" + " ,om.name omname,cc.name contactsname FROM goods g,pus_sys_user u,companyinfors c " + " ,variety_management vm,origin_management om ,companycontacts cc WHERE g.acceptanceid=u.id" + " AND g.companyid=c.id AND g.vmid=vm.id AND g.omid=om.id " + " AND g.contactsid=cc.id AND g.state=1"); List<GoodsListBean> list = jdbcTemplate.query(sbstr.toString(), new BeanPropertyRowMapper(GoodsListBean.class)); return list; }
List<GoodsListBean> listg=new ArrayList<GoodsListBean>(); //List<GoodsListBean> listgend=new ArrayList<GoodsListBean>(); try { listg=goodsDao.findGoodsListBean(goodsnum, vmid, omid,rusjstart, rusjend); } catch (Exception e1) { // TODO Auto-generated catch block e1.printStackTrace(); logger.error("货物查询异常", e1); listg=new ArrayList<GoodsListBean>(); } mapjson.put( "rows", listg);