d45b49bcb26fdf540f652f730a79b3bbdfcb7647.svn-base 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package xin.glue.ui.H.H05;
  2. import xin.glue.ui.common.PosGridSave;
  3. //import xin.glue.ui.common.component.PosSiteConfig;
  4. import xin.glue.ui.common.component.PosSiteLog;
  5. import com.posdata.glue.biz.activity.PosActivity;
  6. import com.posdata.glue.biz.constants.PosBizControlConstants;
  7. import com.posdata.glue.context.PosContext;
  8. import com.posdata.glue.dao.vo.PosParameter;
  9. import com.posdata.glue.dao.vo.PosRow;
  10. import com.posdata.glue.dao.vo.PosRowSet;
  11. public class PosWkBeamCmdDelete extends PosActivity{
  12. public String runActivity(PosContext context)
  13. {
  14. String[] rowStatus = (String[]) context.get("rowStatus");
  15. String[] WK_BEAM = (String[]) context.get("WK_BEAM");
  16. String[] COIL_NO = (String[]) context.get("COIL_NO");
  17. String[] TO_ADDR = (String[]) context.get("TO_ADDR");
  18. String[] CR_NO = (String[]) context.get("CR_NO");
  19. String[] ORD_SEQ = (String[]) context.get("ORD_SEQ");
  20. logger.logInfo("PosWkBeamCmdDelete---> rowStatus["+ rowStatus.length+"]" );
  21. for(int i=0;i<rowStatus.length;i++){
  22. if (ORD_SEQ[i] != null && !ORD_SEQ[i].equals("") ) {
  23. logger.logInfo("PosWkBeamCmdDelete---> ORD_SEQ["+ ORD_SEQ[i]+"]" );
  24. PosParameter param1 = new PosParameter();
  25. param1.setWhereClauseParameter(0, ORD_SEQ[i]);
  26. PosRowSet CrOrdVO = this.getDao("mesdao").find("UIH050050_CR_ORD.select", param1);
  27. if(CrOrdVO.hasNext()) {
  28. PosParameter param2 = new PosParameter();
  29. param2.setValueParamter(0, "3");
  30. param2.setValueParamter(1, "UIH050050");
  31. param2.setValueParamter(2, ORD_SEQ[i]);
  32. getDao("mesdao").update("UIH050050_CR_ORD_DEL.update",param2);
  33. PosParameter param3 = new PosParameter();
  34. param3.setValueParamter(0, "");
  35. param3.setValueParamter(1, TO_ADDR[i]);
  36. getDao("mesdao").update("NIH050010_RES_YARD.update",param3);
  37. PosParameter param4 = new PosParameter();
  38. param4.setValueParamter(0, "");
  39. param4.setValueParamter(1, "UIH050050");
  40. param4.setValueParamter(2, WK_BEAM[i]);
  41. getDao("mesdao").update("UIH050050_WKBEAM_RESV.update",param4);
  42. }
  43. }
  44. }
  45. return PosBizControlConstants.SUCCESS;
  46. }
  47. }