301df41c9ec2390048cd1509a4f1430f7e346824.svn-base 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package xin.glue.ui.B.common;
  2. import xin.glue.ui.B.B02.MutilConditionFind;
  3. import com.posdata.glue.biz.activity.PosActivity;
  4. import com.posdata.glue.biz.constants.PosBizControlConstants;
  5. import com.posdata.glue.context.PosContext;
  6. import com.posdata.glue.dao.PosGenericDao;
  7. import com.posdata.glue.dao.vo.PosParameter;
  8. import com.posdata.glue.dao.vo.PosRowSet;
  9. /**
  10. *
  11. * @Description {界面ID:板坯详细信息查询}
  12. * @author 梅贵平{meiguiping}
  13. * @date 2009-8-9 下午07:24:16
  14. * @JDK Version jdk1.4.2
  15. */
  16. public class FindSlabLibaryInfo extends PosActivity
  17. {
  18. public String runActivity(PosContext context)
  19. {
  20. PosGenericDao dao = this.getDao("mesdao");
  21. PosParameter param = null;
  22. String[]CHARGENO = (String[])context.get("CHARGENO");
  23. String[]SHEN_SDTIME = (String[])context.get("SHEN_SDTIME");
  24. String[]SHEN_EDTIME = (String[])context.get("SHEN_EDTIME");
  25. String[]STLGRD = (String[])context.get("STLGRD");//牌号
  26. String[]CHARGENO1 = (String[])context.get("CHARGENO1");
  27. MutilConditionFind mcf = new MutilConditionFind();
  28. StringBuffer sb = mcf.getQuerySql("UIB030201.SELECT");
  29. param = new PosParameter();
  30. int j = 0;
  31. if(!"".equals(CHARGENO[0]))
  32. {
  33. sb.append("\n AND SUBSTR(CCM.SLAB_NO , 1 , 10) BETWEEN ? AND ? ");
  34. param.setWhereClauseParameter(j++, CHARGENO[0]);
  35. param.setWhereClauseParameter(j++, CHARGENO1[0]);
  36. }
  37. if(!"0000".equals(SHEN_SDTIME[0]))
  38. {
  39. sb.append("\n AND CCM.SLAB_CUT_DTIME BETWEEN ? AND ?");
  40. param.setWhereClauseParameter(j++, SHEN_SDTIME[0]);
  41. param.setWhereClauseParameter(j++, SHEN_EDTIME[0]);
  42. }
  43. if(!"".equals(STLGRD[0]))
  44. {
  45. sb.append("\n AND CCM.STL_GRD = ? ");
  46. param.setWhereClauseParameter(j++, STLGRD[0]);
  47. }
  48. StringBuffer sbb = new StringBuffer(sb.toString());
  49. //总量
  50. PosRowSet rowSet1 = dao.findByQueryStatement(sb.toString(), param);//总量
  51. context.put("ListResult_1", rowSet1);
  52. //在库量
  53. sb.append("\n AND SUBSTR(CCM.CUR_LOAD_LOC , 0 , 1) = 'L'");
  54. PosRowSet rowSet2 = dao.findByQueryStatement(sb.toString(), param);
  55. context.put("ListResult_2", rowSet2);
  56. //出库量
  57. sbb.append("\n AND SUBSTR(CCM.CUR_LOAD_LOC , 0 , 1) != 'L'");//出库量
  58. PosRowSet rowSet3 = dao.findByQueryStatement(sbb.toString() , param);
  59. context.put("ListResult_3", rowSet3);
  60. return PosBizControlConstants.SUCCESS;
  61. }
  62. }