| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- package xin.glue.ui.B.B01;
- import xin.glue.ui.B.B02.MutilConditionFind;
- import com.posdata.glue.biz.activity.PosActivity;
- import com.posdata.glue.biz.constants.PosBizControlConstants;
- import com.posdata.glue.context.PosContext;
- import com.posdata.glue.dao.PosGenericDao;
- import com.posdata.glue.dao.vo.PosParameter;
- import com.posdata.glue.dao.vo.PosRow;
- import com.posdata.glue.dao.vo.PosRowSet;
- /**
- *
- * @Description {界面ID:UIB010191}
- * @author 梅贵平{meiguiping}
- * @date 2009-2-23 下午02:00:46
- * @JDK Version jdk1.4.2
- */
- public class FindDefStlQlty extends PosActivity
- {
- public String runActivity(PosContext context)
- {
- ///ready
- PosRowSet rowset = null;
- PosRow row = null;
- PosParameter param = null;
- PosGenericDao dao = this.getDao("mesdao");
- MutilConditionFind mcf = new MutilConditionFind();
- ///get request data
- rowset = context.getRowSet("QltyNMXX");
- String[]SPECABBSYM = (String[])context.get("SPECABBSYM");//标准号
-
- if(rowset.count()<=0)
- return PosBizControlConstants.SUCCESS;
-
- String temp = mcf.getQuerySql("UIB010191_04.LOOP").toString();
- StringBuffer sb = new StringBuffer();
- String sqlx = "";
- int j = 1;
- // Integer inte = null;
- while(rowset.hasNext())
- {
- row = rowset.next();
- sqlx = temp.replaceFirst("[{]+[1]+[}]+", row.getAttribute("QLTY_CD").toString());
- sqlx = sqlx.replaceFirst("[{]+[2]+[}]+", new Integer(j++).toString());
- sb.append(sqlx);
- }
- String sql = mcf.getQuerySql("UIB010191_04.SELECT").toString();
- sql = sql.replaceFirst("[{]+[1]+[}]+", sb.toString());//获取最终的查询语句
-
- param = new PosParameter();
- param.setWhereClauseParameter(0, SPECABBSYM[0]);
- rowset = dao.findByQueryStatement(sql , param);
- context.put("StlQlty", rowset);
- return PosBizControlConstants.SUCCESS;
- }
- }
|