508f3f1b0dc9bcef2579caa98915f942d956e0fa.svn-base 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package xin.glue.ui.B.B02;
  2. import com.posdata.glue.biz.activity.PosActivity;
  3. import com.posdata.glue.biz.constants.PosBizControlConstants;
  4. import com.posdata.glue.context.PosContext;
  5. import com.posdata.glue.dao.PosGenericDao;
  6. import com.posdata.glue.dao.vo.PosParameter;
  7. /**
  8. * @Description 改变样片现状,使其从进入入库待机进入检验待机状态{界面ID:UIB020110}
  9. * @author 梅贵平{meiguiping}
  10. * @date 2008-10-31 下午06:09:54
  11. * @JDK Version jdk1.4.2
  12. */
  13. public class ChangeLotActuality extends PosActivity
  14. {
  15. public String runActivity(PosContext context)
  16. {
  17. String[] REG_NM = (String[])context.get("REG_NM");//登录人
  18. String[] SMP_NO = (String[])context.get("SMP_NO"); //试样号
  19. String[] SMP_CUT_LOC = (String[])context.get("SMP_CUT_LOC");//获得状态,如入库待机为B
  20. String[] CHK = (String[])context.get("CHK");
  21. String[] rowStatus = (String[])context.get("rowStatus"); //状态
  22. //获得要更新的次数,因为在两个表中,试样号肯定都会存在,所以以它做为循环条件
  23. if(rowStatus == null) return PosBizControlConstants.SUCCESS;
  24. int iCount = rowStatus.length;
  25. PosParameter param = null;//对TBB02_LOT_COM的更新
  26. PosGenericDao dao = this.getDao("mesdao");
  27. for(int i=0; i < iCount; i++)
  28. {
  29. //更新TBB02_LOT_COM表中满足条件的试样的状态,从B到C,即从入库待机进入检验待机状态
  30. if("Y".equals(CHK[i]))
  31. {
  32. param = new PosParameter();
  33. param.setWhereClauseParameter(0, REG_NM[0]);
  34. param.setWhereClauseParameter(1, SMP_NO[i]);
  35. param.setWhereClauseParameter(2, SMP_CUT_LOC[i]);
  36. dao.update("UIB020110_01.UPDATE" , param);
  37. param = new PosParameter();
  38. param.setWhereClauseParameter(0, SMP_NO[i]);
  39. param.setWhereClauseParameter(1, SMP_CUT_LOC[i]);
  40. dao.update("UIB020110_02.UPDATE", param);
  41. }
  42. }
  43. return PosBizControlConstants.SUCCESS;
  44. }
  45. }