ad4f414f3a3191c191bdaf1a5d8632f89690ce70.svn-base 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. package xin.glue.ui.G.G01;
  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. import com.posdata.glue.dao.vo.PosRowSet;
  7. public class XinSaveCCMSt extends PosActivity {
  8. public String runActivity(PosContext context) {
  9. String[] CCM_SPEED_MIN = (String[])context.get("CCM_SPEED_MIN");
  10. String[] CCM_SPEED_MAX = (String[])context.get("CCM_SPEED_MAX");
  11. String[] CCM_SPEED_AVG = (String[])context.get("CCM_SPEED_AVG");
  12. String[] LT_ARRV_TEMP = (String[])context.get("LT_ARRV_TEMP");
  13. String[] SOLIDE_TEMP1 = (String[])context.get("SOLIDE_TEMP1");
  14. String[] SOLIDE_TEMP2 = (String[])context.get("SOLIDE_TEMP2");
  15. String[] TD_TEMP_MIN = (String[])context.get("TD_TEMP_MIN");
  16. String[] TD_TEMP_MAX = (String[])context.get("TD_TEMP_MAX");
  17. String[] TD_TEMP_AVG = (String[])context.get("TD_TEMP_AVG");
  18. String[] MD1_WTH_MIN = (String[])context.get("MD1_WTH_MIN");
  19. String[] MD1_WTH_MAX = (String[])context.get("MD1_WTH_MAX");
  20. String[] MD2_WTH_MIN = (String[])context.get("MD2_WTH_MIN");
  21. String[] MD2_WTH_MAX = (String[])context.get("MD2_WTH_MAX");
  22. String[] COOL_WATER = (String[])context.get("COOL_WATER");
  23. String[] MD1_OSCILL_CNT = (String[])context.get("MD1_OSCILL_CNT");
  24. String[] MD1_OSCILL_WTH = (String[])context.get("MD1_OSCILL_WTH");
  25. String[] MD2_OSCILL_CNT = (String[])context.get("MD2_OSCILL_CNT");
  26. String[] MD2_OSCILL_WTH = (String[])context.get("MD2_OSCILL_WTH");
  27. String[] STL_GRD = (String[])context.get("STL_GRD");
  28. PosParameter param = new PosParameter();
  29. param.setWhereClauseParameter(0, STL_GRD[0]);
  30. PosRowSet rowset = this.getDao("mesdao").find("UIG010020_03.select", param);
  31. if(rowset.hasNext()){
  32. param = new PosParameter();
  33. param.setWhereClauseParameter(0, CCM_SPEED_MIN[0]);
  34. param.setWhereClauseParameter(1, CCM_SPEED_MAX[0]);
  35. param.setWhereClauseParameter(2, CCM_SPEED_AVG[0]);
  36. param.setWhereClauseParameter(3, LT_ARRV_TEMP[0]);
  37. param.setWhereClauseParameter(4, SOLIDE_TEMP1[0]);
  38. param.setWhereClauseParameter(5, SOLIDE_TEMP2[0]);
  39. param.setWhereClauseParameter(6, TD_TEMP_MIN[0]);
  40. param.setWhereClauseParameter(7, TD_TEMP_MAX[0]);
  41. param.setWhereClauseParameter(8, TD_TEMP_AVG[0]);
  42. param.setWhereClauseParameter(9, MD1_WTH_MIN[0]);
  43. param.setWhereClauseParameter(10, MD1_WTH_MAX[0]);
  44. param.setWhereClauseParameter(11, MD2_WTH_MIN[0]);
  45. param.setWhereClauseParameter(12, MD2_WTH_MAX[0]);
  46. param.setWhereClauseParameter(13, COOL_WATER[0]);
  47. param.setWhereClauseParameter(14, MD1_OSCILL_CNT[0]);
  48. param.setWhereClauseParameter(15, MD1_OSCILL_WTH[0]);
  49. param.setWhereClauseParameter(16, MD2_OSCILL_CNT[0]);
  50. param.setWhereClauseParameter(17, MD2_OSCILL_WTH[0]);
  51. param.setWhereClauseParameter(18, STL_GRD[0]);
  52. this.getDao("mesdao").update("UIG010020_01.update", param);
  53. }else{
  54. param = new PosParameter();
  55. param.setValueParamter(0, CCM_SPEED_MIN[0]);
  56. param.setValueParamter(1, CCM_SPEED_MAX[0]);
  57. param.setValueParamter(2, CCM_SPEED_AVG[0]);
  58. param.setValueParamter(3, LT_ARRV_TEMP[0]);
  59. param.setValueParamter(4, SOLIDE_TEMP1[0]);
  60. param.setValueParamter(5, SOLIDE_TEMP2[0]);
  61. param.setValueParamter(6, TD_TEMP_MIN[0]);
  62. param.setValueParamter(7, TD_TEMP_MAX[0]);
  63. param.setValueParamter(8, TD_TEMP_AVG[0]);
  64. param.setValueParamter(9, MD1_WTH_MIN[0]);
  65. param.setValueParamter(10, MD1_WTH_MAX[0]);
  66. param.setValueParamter(11, MD2_WTH_MIN[0]);
  67. param.setValueParamter(12, MD2_WTH_MAX[0]);
  68. param.setValueParamter(13, COOL_WATER[0]);
  69. param.setValueParamter(14, MD1_OSCILL_CNT[0]);
  70. param.setValueParamter(15, MD1_OSCILL_WTH[0]);
  71. param.setValueParamter(16, MD2_OSCILL_CNT[0]);
  72. param.setValueParamter(17, MD2_OSCILL_WTH[0]);
  73. param.setValueParamter(18, STL_GRD[0]);
  74. this.getDao("mesdao").update("UIG010020_01.insert", param);
  75. }
  76. return PosBizControlConstants.SUCCESS;
  77. }
  78. }