9d15587e2e4a2e38cc8eeaf55165f95faa06fa68.svn-base 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package xin.glue.ui.G.G04;
  2. //import xin.glue.ui.common.PosGridSave;
  3. //import xin.glue.ui.common.component.PosSiteLog;
  4. import com.posdata.glue.biz.activity.PosActivity;
  5. import com.posdata.glue.biz.constants.PosBizControlConstants;
  6. import com.posdata.glue.context.PosContext;
  7. import com.posdata.glue.dao.vo.PosParameter;
  8. //import com.posdata.glue.dao.vo.PosRow;
  9. import com.posdata.glue.dao.vo.PosRowSet;
  10. public class PosSaveRollerTable extends PosActivity{
  11. public String runActivity(PosContext context)
  12. {
  13. String[] rowStatus = (String[]) context.get("rowStatus");
  14. String[] YARD_ADDR = (String[]) context.get("YARD_ADDR");
  15. String[] SLAB_NO = (String[]) context.get("SLAB_NO");
  16. //String[] FROM_ADDR = (String[]) context.get("FROM_ADDR");
  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("PosSaveRollerTable---> rowStatus["+ rowStatus.length+"]" );
  21. String WK_ROLLER_G = null;
  22. for(int i=0;i<rowStatus.length;i++){
  23. WK_ROLLER_G = YARD_ADDR[i].substring(0,1);
  24. //String To_StoreLay = null;
  25. /*
  26. PosParameter param3 = new PosParameter();
  27. param3.setWhereClauseParameter(0, TO_ADDR[i]);
  28. PosRowSet StoreLayVO = getDao("mesdao").find("UIG040060_YARD_LAY.select", param3);
  29. if (StoreLayVO.hasNext()) {
  30. PosRow StoreLayROW = StoreLayVO.next();
  31. To_StoreLay = (String)StoreLayROW.getAttribute("STORELAY");
  32. String ToAddress = TO_ADDR[i]+To_StoreLay;
  33. */
  34. if (ORD_SEQ[i] != null && !ORD_SEQ[i].equals("") ) {
  35. logger.logInfo("PosSaveRollerTable---> ORD_SEQ["+ ORD_SEQ[i]+"]" );
  36. PosParameter param1 = new PosParameter();
  37. param1.setWhereClauseParameter(0, ORD_SEQ[i]);
  38. PosRowSet CrOrdVO = this.getDao("mesdao").find("UIG040060_CR_ORD.select", param1);
  39. if(CrOrdVO.hasNext()) {
  40. PosParameter param2 = new PosParameter();
  41. param2.setValueParamter(0, TO_ADDR[i]);
  42. param2.setValueParamter(1, CR_NO[i]);
  43. param2.setValueParamter(2, "UIG040060");
  44. param2.setValueParamter(3, ORD_SEQ[i]);
  45. getDao("mesdao").update("UIG040060_CR_COMM.update",param2);
  46. }
  47. PosParameter param4 = new PosParameter();
  48. param4.setValueParamter(0, "1");
  49. param4.setValueParamter(1, "UIG040060");
  50. param4.setValueParamter(2, SLAB_NO[i]);
  51. param4.setValueParamter(3, YARD_ADDR[i]);
  52. getDao("mesdao").update("UIG040060_SLAB_YARD.update",param4);
  53. } else {
  54. PosParameter param2 = new PosParameter();
  55. param2.setValueParamter(0, CR_NO[i]);
  56. param2.setValueParamter(1, SLAB_NO[i]);
  57. param2.setValueParamter(2, YARD_ADDR[i]);
  58. param2.setValueParamter(3, TO_ADDR[i]);
  59. param2.setValueParamter(4, "UIG040060");
  60. getDao("mesdao").update("UIG040060_CR_ORD.insert",param2);
  61. PosParameter param4 = new PosParameter();
  62. param4.setValueParamter(0, "1");
  63. param4.setValueParamter(1, "UIG040060");
  64. param4.setValueParamter(2, SLAB_NO[i]);
  65. param4.setValueParamter(3, YARD_ADDR[i]);
  66. getDao("mesdao").update("UIG040060_SLAB_YARD.update",param4);
  67. }
  68. }
  69. context.put("WK_ROLLER_G", WK_ROLLER_G);
  70. return PosBizControlConstants.SUCCESS;
  71. }
  72. }