| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- package xin.glue.ui.B.B02;
- 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.PosJdbcDao;
- import com.posdata.glue.dao.manager.PosQueryDefinition;
- import com.posdata.glue.dao.manager.PosQueryManager;
- import com.posdata.glue.dao.vo.PosParameter;
- import com.posdata.glue.dao.vo.PosRowSet;
- /**
- * 查询钢卷号的材质判定结果
- * @Description {界面ID:UIB020140}
- * @author 梅贵平{meiguiping}
- * @date 2008-12-10 下午04:31:11
- * @JDK Version jdk1.4.2
- */
- public class FindCoilQltyResult extends PosActivity
- {
- public String runActivity(PosContext context)
- {
- PosGenericDao dao = this.getDao("mesdao");
-
- String[] SMPNO = (String[])context.get("SMP_NO");//样片号
- String[] startTime = (String[])context.get("startTime");//开始时间
- String[] endTime = (String[])context.get("endTime");//结束时间
- String[] COILNO_1 = (String[])context.get("COILNO_1");//钢卷号
- String[] COILNO_2 = (String[])context.get("COILNO_2");
-
- // System.out.println("$$$$$$$$$$$$$$$$$$$"+COILNO_1[0]);
- StringBuffer bfSql = getManagerSql("UIB020140_01.SELECT");
- PosParameter param = new PosParameter();
- int j = 0;
- if(!"0000".equals(startTime[0]) && !"9999".equals(endTime[0]))//按判定日期查询
- {
- bfSql.append("\n AND LCM.QLTY_DCS_DTIME BETWEEN ? AND ? ");
- param.setWhereClauseParameter(j++, startTime[0]);
- param.setWhereClauseParameter(j++, endTime[0]);
- }
- if(SMPNO[0].length() > 5)
- {
- bfSql.append("\n AND LCM.SMP_NO = ?");
- param.setWhereClauseParameter(j++, SMPNO[0]);//样片号
- }
- if(!"".equals(COILNO_1[0]))
- {
- bfSql.append("\n AND SUBSTR(CCM.OLD_SAMPL_NO , 1 , 10) BETWEEN ? AND ? ");
- param.setWhereClauseParameter(j++, COILNO_1[0]);
- param.setWhereClauseParameter(j++, COILNO_2[0]);
- }
- bfSql.append(" \n ORDER BY CCM.OLD_SAMPL_NO");
- PosRowSet rowset = dao.findByQueryStatement(bfSql.toString() , param);
- context.put("LotInfoResult", rowset);
- return PosBizControlConstants.SUCCESS;
- }
-
- public StringBuffer getManagerSql(String id)
- {
- PosJdbcDao dao = (PosJdbcDao)this.getDao("mesdao");
- PosQueryManager ppt = dao.getQueryManager();
- PosQueryDefinition x = ppt.getQueryDefinition(id);
- return new StringBuffer(x.getQueryStatement());
- }
- }
|