| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- package xin.glue.ui.B.B02;
- import java.util.ArrayList;
- import java.util.HashMap;
- 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.vo.PosParameter;
- import com.posdata.glue.dao.vo.PosRow;
- import com.posdata.glue.dao.vo.PosRowSet;
- import xin.glue.ui.B.common.SqlTools;
- public class FindSMPStatus extends PosActivity {
- public String runActivity(PosContext context) {
- PosGenericDao dao = this.getDao("mesdao");
- PosRowSet rowSet0= null;
- PosRowSet rowSet1= null;
- PosRowSet rowSet2= null;
- PosParameter param = null;
- PosRow row = null;
-
- String[] date = (String[])context.get("date");
-
- param = new PosParameter();
- param.setWhereClauseParameter(0, date[0]);
- param.setWhereClauseParameter(1, date[0]);
- param.setWhereClauseParameter(2, date[0]);
- param.setWhereClauseParameter(3, date[0]);
- rowSet0 = dao.find("UIB020260_01.SELECT", param);
- context.put("SMPRESULT" , rowSet0);
- rowSet0.reset();
-
- param = new PosParameter();
- param.setWhereClauseParameter(0, date[0]);
- param.setWhereClauseParameter(1, date[0]);
- rowSet0 = dao.find("UIB020260_02.SELECT", param);
- param = new PosParameter();
- param.setWhereClauseParameter(0, date[0]);
- rowSet1 = dao.find("UIB020260_03.SELECT", param);
-
- param = new PosParameter();
- param.setWhereClauseParameter(0, date[0]);
- rowSet2 = dao.find("UIB020260_04.SELECT", param);
-
- HashMap map;
- ArrayList list = new ArrayList();
- int i = 0;
- while(rowSet0.hasNext())
- {
- map = new HashMap();
- row = rowSet0.next();
- String CNT1 = (!"".equals( row.getAttribute("CNT1")))?(String)row.getAttribute("CNT1"):"";
- String CNT2 = (!"".equals( row.getAttribute("CNT2")))?(String)row.getAttribute("CNT2"):"";
- String CNT3 = (!"".equals( row.getAttribute("CNT3")))?(String)row.getAttribute("CNT3"):"";
- String CNT4 = (!"".equals( row.getAttribute("CNT4")))?(String)row.getAttribute("CNT4"):"";
- map.put("CNT1",CNT1);
- map.put("CNT2",CNT2);
- map.put("CNT3",CNT3);
- map.put("CNT4",CNT4);
- if(i == 0)
- {
- int count = 1;
- while(rowSet1.hasNext())
- {
- row = rowSet1.next();
- String QLTY_CD;
- String CNT;
- QLTY_CD = (!"".equals( row.getAttribute("QLTY_CD")))?
- (String)row.getAttribute("QLTY_CD"):"";
- CNT = (!"".equals( row.getAttribute("CNT")))?
- (String)row.getAttribute("CNT"):"";
- map.put("CNT3_"+count, QLTY_CD+" "+CNT);
- count++;
- }
- if(!rowSet1.hasNext())
- {
- for(int lcnt = 1;lcnt < 7;lcnt++)
- {
- map.put("CNT3_"+lcnt,"");
- }
- }
- }
- if(i == 1)
- {
- int count = 1;
- while(rowSet2.hasNext())
- {
- row = rowSet2.next();
- String QLTY_CD;
- String CNT;
- QLTY_CD = !"".equals( row.getAttribute("QLTY_CD"))?
- (String)row.getAttribute("QLTY_CD"):"";
- CNT = !"".equals( row.getAttribute("CNT"))?
- (String)row.getAttribute("CNT"):"";
- map.put("CNT3_"+count, QLTY_CD+" "+CNT);
- count++;
- }
- }
- i++;
- list.add(map);
- }
- context.put("QLTYRESULT" , list);
-
- return PosBizControlConstants.SUCCESS;
- }
- }
|