dd7ff38da693876395b8661ad50ace79cd2fd4c3.svn-base 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. package xin.glue.ui.D.D01;
  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.vo.PosParameter;
  6. public class DesignSlabDnRst extends PosActivity
  7. {
  8. public String runActivity(PosContext context)
  9. {
  10. // TODO Auto-generated method stub
  11. logger.logInfo("Here is DesignSlabDnRst.java!!!");
  12. String[] rowStatus1 = (String[])context.get("rowStatus1" );
  13. // UID010031.xrw's datagrid : dg1
  14. String[] CHK_FG1 = (String[])context.get("CHK_FG1" );
  15. String[] sDb_OrdNo = (String[])context.get("ORD_NO" );
  16. String[] sDb_OrdSeq = (String[])context.get("ORD_SEQ" );
  17. String[] sDb_SlabThk = (String[])context.get("SLAB_THK" );
  18. String[] sDb_SlabWth = (String[])context.get("SLAB_WTH" );
  19. String[] sDb_SlabLen = (String[])context.get("SLAB_LEN" );
  20. String[] sDb_SlabWgt = (String[])context.get("SLAB_WGT" );
  21. //String[] sDb_SlabTrmthTp = (String[])context.get("SLAB_TRMTH_TP" );
  22. String[] sDb_Gravity = (String[])context.get("GRAVITY" );
  23. //String[] sDb_AutodsnYn = (String[])context.get("AUTODSN_YN" );
  24. //String[] sDb_CoilPackWgtMin = (String[])context.get("COIL_PACK_WGT_MIN" );
  25. String[] sDb_CoilPackWgtMin = (String[])context.get("PROD_WGT_MIN" );
  26. //String[] sDb_CoilPackWgtMax = (String[])context.get("COIL_PACK_WGT_MAX" );
  27. String[] sDb_CoilPackWgtMax = (String[])context.get("PROD_WGT_MAX" );
  28. String[] sDb_FacStlGrd = (String[])context.get("FAC_STL_GRD" );
  29. String[] sDb_CoilThk = (String[])context.get("COIL_THK" );
  30. String[] sDb_CoilWth = (String[])context.get("COIL_WTH" );
  31. String[] sDb_CoilLen = (String[])context.get("COIL_LEN" );
  32. String[] sDb_CoilWgt = (String[])context.get("COIL_WGT" );
  33. String[] sDb_ProcPath = (String[])context.get("PROC_PATH" );
  34. String[] sDb_HcrClf = (String[])context.get("HCR_CLF" );
  35. String[] sDb_EmgmtrYn = (String[])context.get("EMGMTR_YN" );
  36. String[] sDb_FacStlGrp = (String[])context.get("FAC_STL_GRP" );
  37. //String[] sDb_CombYn = (String[])context.get("COMB_YN" );
  38. //String[] sDb_CoilIndia = (String[])context.get("COIL_INDIA" );
  39. String[] sDb_CoilIndia = (String[])context.get("ORD_INDIA" );
  40. //String[] sDb_CoilOutdia = (String[])context.get("COIL_OUTDIA" );
  41. String[] sDb_CoilOutdia = (String[])context.get("ORD_OUTDIA" );
  42. String[] sDb_DsnProcStat = (String[])context.get("DSN_PROC_STAT" ); //DSN_PROC_STAT 설계상태('1':설계대상 '2':설계완료 '3':설계확정)
  43. String[] sDb_DsnProcYn = (String[])context.get("DSN_PROC_YN" ); //DSN_PROC_YN 설계진행여부(Y/N)
  44. String[] sDb_SlabCnt = (String[])context.get("SLAB_CNT" );
  45. String[] sDb_KeepwarmYn = (String[])context.get("KEEPWARM_YN" );
  46. String[] sDb_prodLine = (String[])context.get("PROD_LINE");
  47. String[] sDb_C_CoilThk = (String[])context.get("C_COIL_THK");
  48. String[] sDb_C_CoilWth = (String[])context.get("C_COIL_WTH");
  49. int iCnt = 0;
  50. if (rowStatus1 != null)
  51. {
  52. iCnt = rowStatus1.length;
  53. }
  54. logger.logInfo("rowCount1 = ["+ iCnt +"]");
  55. PosParameter param = null;
  56. for(int i=0 ; i < iCnt; i++)
  57. {
  58. logger.logInfo("CHK_FG["+ i +"] = ["+ CHK_FG1[i] +"] sDb_DsnProcStat = ["+ sDb_DsnProcStat[i] +"] sDb_DsnProcYn = ["+ sDb_DsnProcYn[i] +"]");
  59. if ("1".equals(CHK_FG1[i]))
  60. { // update
  61. if ("1".equals(sDb_DsnProcStat[i]) && "N".endsWith(sDb_DsnProcYn[i]))
  62. {
  63. param = new PosParameter();
  64. // update tbd01_slabdn_obj
  65. param.setWhereClauseParameter( 0, "Y" ) ; //Pre-View
  66. param.setWhereClauseParameter( 1, "1" ) ; //Pre-Save
  67. param.setWhereClauseParameter( 2, sDb_OrdNo[i] ) ;
  68. param.setWhereClauseParameter( 3, sDb_OrdSeq[i] ) ;
  69. getDao("mesdao").update("ModifyTargetRows.update", param);
  70. // insert into tbd01_slabdn_rst
  71. param = new PosParameter();
  72. param.setValueParamter( 0, sDb_OrdNo[i] ); //, ORD_NO, ORD_SEQ
  73. param.setValueParamter( 1, sDb_OrdSeq[i] );
  74. param.setValueParamter( 2, sDb_SlabThk[i] ); //, SLAB_THK, SLAB_WTH, SLAB_LEN, SLAB_WGT
  75. param.setValueParamter( 3, sDb_SlabWth[i] );
  76. param.setValueParamter( 4, sDb_SlabLen[i] );
  77. param.setValueParamter( 5, sDb_SlabWgt[i] );
  78. //param.setValueParamter( 6, sDb_SlabTrmthTp[i] );
  79. param.setValueParamter( 6, sDb_Gravity[i] );
  80. //param.setValueParamter( 7, sDb_AutodsnYn[i] );
  81. param.setValueParamter( 7, sDb_CoilPackWgtMin[i] ); //, COIL_PACK_WGT_MIN, COIL_PACK_WGT_MAX
  82. param.setValueParamter( 8, sDb_CoilPackWgtMax[i] );
  83. param.setValueParamter( 9, sDb_FacStlGrd[i] ); //, FAC_STL_GRD
  84. param.setValueParamter( 10, sDb_CoilThk[i] ); //, COIL_THK, COIL_WTH, COIL_LEN, COIL_WGT
  85. param.setValueParamter( 11, sDb_CoilWth[i] );
  86. param.setValueParamter( 12, sDb_CoilLen[i] );
  87. param.setValueParamter( 13, sDb_CoilWgt[i] );
  88. param.setValueParamter( 14, sDb_ProcPath[i] );
  89. param.setValueParamter( 15, sDb_HcrClf[i] );
  90. param.setValueParamter( 16, (sDb_EmgmtrYn[i] == null) ? "N" : sDb_EmgmtrYn[i] );
  91. param.setValueParamter( 17, sDb_FacStlGrp[i] );
  92. param.setValueParamter( 18, "N");
  93. if(sDb_CoilIndia[i] == null)
  94. {
  95. sDb_CoilIndia[i] = "";
  96. }
  97. param.setValueParamter( 19, (sDb_CoilIndia[i]== null) ? "0" : sDb_CoilIndia[i]);
  98. param.setValueParamter( 20, sDb_CoilOutdia[i] );
  99. param.setValueParamter( 21, sDb_KeepwarmYn[i] );
  100. param.setValueParamter( 22, sDb_prodLine[i] );
  101. param.setValueParamter( 23, sDb_C_CoilThk[i] );
  102. param.setValueParamter( 24, sDb_C_CoilWth[i] );
  103. param.setValueParamter( 25, sDb_SlabCnt[i] );
  104. getDao("mesdao").update("DesignSlabDnRst.insert", param);
  105. }
  106. }
  107. }
  108. return PosBizControlConstants.SUCCESS;
  109. }
  110. }