4c0264309258ef24e454ec2b47ea6015312acbd1.svn-base 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154
  1. package xin.glue.nui.H.H02;
  2. import java.math.BigDecimal;
  3. import java.sql.CallableStatement;
  4. import java.sql.SQLException;
  5. import java.text.DateFormat;
  6. import java.text.SimpleDateFormat;
  7. import java.util.Date;
  8. import xin.glue.ui.common.PosDateFormat;
  9. import xin.glue.ui.common.ProduceFactory;
  10. import com.posdata.glue.PosException;
  11. import com.posdata.glue.biz.activity.PosActivity;
  12. import com.posdata.glue.biz.constants.PosBizControlConstants;
  13. import com.posdata.glue.biz.control.PosBizControlIF;
  14. import com.posdata.glue.biz.control.PosBizProvider;
  15. import com.posdata.glue.component.PosConstants;
  16. import com.posdata.glue.context.PosContext;
  17. import com.posdata.glue.dao.vo.PosParameter;
  18. import com.posdata.glue.dao.vo.PosRow;
  19. import com.posdata.glue.dao.vo.PosRowSet;
  20. import com.posdata.glue.msg.PosMESMessageImpl;
  21. import com.posdata.glue.msg.PosMessage;
  22. /*
  23. * author:王小炎
  24. * date:2008-10-17
  25. * desc:接收LEVEL2中所发生的热轧实绩录入到热轧实绩表TBH02_MILL_RESULT中
  26. */
  27. public class XinSaveMillResult extends PosActivity
  28. {
  29. public String runActivity(PosContext context)
  30. {
  31. logger.logDebug("XinSaveMillResult start !!! ");
  32. PosMessage message = context.getMessage();
  33. //实际钢卷号
  34. String coil_no_l2 = (String)message.get("COIL_NO"); //1 钢卷号
  35. String slab_no = (String)message.get("SLAB_NO"); //2 板坯号
  36. String stl_grd = (String)message.get("STL_GRD"); //3 订货钢种
  37. String rhf_descal_yn = (String)message.get("RHF_DESCAL_YN"); //4 加热炉后的除磷机是否使用标记
  38. String rm_ent_descal_yn = (String)message.get("RM_ENT_DESCAL_YN"); //5 RM入口处的除磷机是否使用标记
  39. String rm_ext_descal_yn = (String)message.get("RM_EXT_DESCAL_YN");
  40. String rm1_pass_cnt = (String)message.get("RM1_PASS_CNT"); //7 RM1 轧制道次
  41. String rm2_pass_cnt = (String)message.get("RM2_PASS_CNT"); //8 RM2 轧制道次
  42. String r1_ext_temp = (String)message.get("R1_EXT_TEMP"); //9 粗轧温度(R1后)
  43. String r2_ext_temp = (String)message.get("R2_EXT_TEMP"); //10 粗轧温度(R2后)
  44. String rm_ext_avg_thk = (String)message.get("RM_EXT_AVG_THK"); //11 RM 出口平均厚度
  45. String rm_ext_avg_wth = (String)message.get("RM_EXT_AVG_WTH"); //12 RM 出口平均宽度
  46. String rm_ext_avg_len = (String)message.get("RM_EXT_AVG_LEN"); //13 RM 出口平均长度
  47. String f1_ent_pass_dtime = (String)message.get("F1_ENT_PASS_DTIME"); //14 入 F1 时刻
  48. String f7_ent_pass_dtime = (String)message.get("F7_ENT_PASS_DTIME"); //15 入 F7 时刻
  49. String fst_inact_stand_no = (String)message.get("FST_INACT_STAND_NO"); //16 第一个空过机架
  50. String snd_inact_stand_no = (String)message.get("SND_INACT_STAND_NO"); //17 第二个空过机架
  51. String trd_inact_stand_no = (String)message.get("TRD_INACT_STAND_NO"); //18 第三个空过机架
  52. String f1_ent_temp_avg = (String)message.get("F1_ENT_TEMP_AVG"); //19 进入 F1 前平均温度
  53. String f1_ent_temp_max = (String)message.get("F1_ENT_TEMP_MAX"); //20 进入 F1 前最大温度
  54. String f1_ent_temp_min = (String)message.get("F1_ENT_TEMP_MIN"); //21 进入 F1 前最小温度
  55. //新增以便和接口表对起
  56. BigDecimal f1_ent_temp_out_of_len = (BigDecimal)message.get("F1_ENT_TEMP_OUT_OF_LEN"); //进入 F1 前温度不在公差范围的长度
  57. String fm_ext_strip_thk = (String)message.get("FM_EXT_STRIP_THK"); //22 额定轧制厚度
  58. String fm_ext_strip_thk_avg = (String)message.get("FM_EXT_STRIP_THK_AVG"); //23 轧制厚度平均值【钢卷厚度】
  59. String fm_ext_strip_thk_max = (String)message.get("FM_EXT_STRIP_THK_MAX"); //24 轧制厚度最大值
  60. String fm_ext_strip_thk_min = (String)message.get("FM_EXT_STRIP_THK_MIN"); //25 轧制厚度最小值
  61. //与接口表对应一致
  62. String fm_ext_strip_thk_out_of_l = (String)message.get("FM_EXT_STRIP_THK_OUT_OF_LEN");//26 轧制厚度不在公差范围内的长度
  63. String fm_ext_strip_wth = (String)message.get("FM_EXT_STRIP_WTH"); //27 额定轧制宽度
  64. String fm_ext_strip_wth_avg = (String)message.get("FM_EXT_STRIP_WTH_AVG"); //28 轧制宽度平均值【钢卷宽度】
  65. String fm_ext_strip_wth_max = (String)message.get("FM_EXT_STRIP_WTH_MAX"); //29 轧制宽度最大值
  66. String fm_ext_strip_wth_min = (String)message.get("FM_EXT_STRIP_WTH_MIN"); //30 轧制宽度最小值
  67. //与接口表对应一致
  68. String fm_ext_strip_wth_out_of_l = (String)message.get("FM_EXT_STRIP_WTH_OUT_OF_LEN");//31 轧制宽度不在公差范围内的长度
  69. String fm_ext_strip_crown = (String)message.get("FM_EXT_STRIP_CROWN"); //32 额定凸度
  70. String fm_ext_strip_crown_avg = (String)message.get("FM_EXT_STRIP_CROWN_AVG"); //33 凸度平均值
  71. String fm_ext_strip_crown_max = (String)message.get("FM_EXT_STRIP_CROWN_MAX"); //34 凸度最大值
  72. String fm_ext_strip_crown_min = (String)message.get("FM_EXT_STRIP_CROWN_MIN"); //35 凸度最小值
  73. //与接口表对应一致
  74. String fm_ext_strip_crown_out_of = (String)message.get("FM_EXT_STRIP_CROWN_OUT_OF_LEN"); //36 凸度不在公差范围内的长度
  75. String fm_sym_strip_flatness_avg = (String)message.get("FM_SYM_STRIP_FLATNESS_AVG"); //37 对称平直度平均值
  76. String fm_sym_strip_flatness_max = (String)message.get("FM_SYM_STRIP_FLATNESS_MAX"); //38 对称平直度最大值
  77. String fm_sym_strip_flatness_min = (String)message.get("FM_SYM_STRIP_FLATNESS_MIN"); //39 对称平直度最小值
  78. //与接口表对应一致
  79. String fm_sym_strip_out_or_range = (String)message.get("FM_SYM_STRIP_OUT_OF_RANGE");//40 对称平直度不在公差范围内的长度
  80. String fm_asy_strip_flatness_avg = (String)message.get("FM_ASY_STRIP_FLATNESS_AVG"); //41 非对称平直度平均值
  81. String fm_asy_strip_flatness_max = (String)message.get("FM_ASY_STRIP_FLATNESS_MAX"); //42 非对称平直度最大值
  82. String fm_asy_strip_flatness_min = (String)message.get("FM_ASY_STRIP_FLATNESS_MIN"); //43 非对称平直度最小值
  83. String fm_asy_strip_out_of_range = (String)message.get("FM_ASY_STRIP_OUT_OF_RANGE"); //44 非对称平直度不在公差范围内的长度
  84. String fm_strip_wdg_avg = (String)message.get("FM_STRIP_WDG_AVG"); //45 稧型 出口平均值
  85. String fm_strip_wdg_max = (String)message.get("FM_STRIP_WDG_MAX"); //46 稧型 出口最大值
  86. String fm_strip_wdg_min = (String)message.get("FM_STRIP_WDG_MIN"); //47 稧型 出口最小值
  87. String fm_strip_wdg_out_of_range = (String)message.get("FM_STRIP_WDG_OUT_OF_RANGE"); //48 稧型 不在公差范围内的长度
  88. String fm_ext_strip_temp = (String)message.get("FM_EXT_STRIP_TEMP"); //49 额定终轧温度
  89. String fm_ext_strip_temp_avg = (String)message.get("FM_EXT_STRIP_TEMP_AVG"); //50 终轧温度平均值
  90. //这里改变MSG中值,与接口文档对应起来
  91. String fm_ext_strip_temp_max = (String)message.get("FM_EXT_STRIP_TEMP_MAX"); //51 终轧温度最大值
  92. String fm_ext_strip_temp_min = (String)message.get("FM_EXT_STRIP_TEMP_MIN"); //52 终轧温度最小值
  93. String strip_out_of_range = (String)message.get("STRIP_OUT_OF_RANGE"); //53 终轧温度 不在公差范围内的长度
  94. String dc_temp = (String)message.get("DC_TEMP"); //54 额定卷取温度
  95. String dc_temp_avg = (String)message.get("DC_TEMP_AVG"); //55 卷取温度平均值
  96. String dc_temp_max = (String)message.get("DC_TEMP_MAX"); //56 卷取温度最大值
  97. String dc_temp_min = (String)message.get("DC_TEMP_MIN"); //57 卷取温度最小均值
  98. String dc_temp_out_of_range = (String)message.get("DC_TEMP_OUT_OF_RANGE"); //58 卷取温度 不在公差范围内的长度
  99. String dc_no = (String)message.get("DC_NO"); //59 卷取机号
  100. String dc_on_dtime = (String)message.get("DC_ON_DTIME"); //60 开始卷取时刻
  101. String dc_off_dtime = (String)message.get("DC_OFF_DTIME"); //61 结束卷取时刻
  102. BigDecimal coil_wgt = (BigDecimal)message.get("COIL_WGT"); //62 钢卷重量
  103. String coil_wgt_dec_clf = (String)message.get("COIL_WGT_DEC_CLF"); //63 钢卷重量区分
  104. String coil_india = (String)message.get("COIL_INDIA"); //64 钢卷内径
  105. String coil_outdia = (String)message.get("COIL_OUTDIA"); //65 钢卷外径
  106. String coil_len = (String)message.get("COIL_LEN"); //66 钢卷长度
  107. String coil_lock_yn = (String)message.get("COIL_LOCK_YN"); //67 钢卷封锁标记
  108. String thk_wth_chang_clf = (String)message.get("THK_WTH_CHANG_CLF"); //68 厚度宽度变更 SIGN
  109. String chang_cause_cd = (String)message.get("CHANG_CAUSE_CD"); //69 厚度宽度变更理由代码
  110. String chang_empno = (String)message.get("CHANG_EMPNO"); //70 变更责任人
  111. String chang_thk = (String)message.get("CHANG_THK"); //71 厚度变更目标(实绩)
  112. String chang_wth = (String)message.get("CHANG_WTH"); //72 宽度变更目标(实绩)
  113. String head_tail_cut_yn = (String)message.get("HEAD_TAIL_CUT_YN"); //74 精轧入口温度(F1)
  114. String f1_ent_temp = (String)message.get("F1_ENT_TEMP"); //75 穿带速度
  115. String f7_mill_speed_head = (String)message.get("F7_MILL_SPEED_HEAD"); //76 轧制速度 ACC1
  116. String f7_mill_speed_acc1 = (String)message.get("F7_MILL_SPEED_ACC1"); //77 轧制速度 ACC2
  117. String f7_mill_speed_acc2 = (String)message.get("F7_MILL_SPEED_ACC2"); //78 轧制速度 Vmax
  118. String f7_mill_speed_vmax = (String)message.get("F7_MILL_SPEED_VMAX"); //79 轧制速度 VT
  119. String f7_mill_speed_vt = (String)message.get("F7_MILL_SPEED_VT"); //79 轧制速度 VT
  120. //没有用到
  121. //String f7_mill_speed_vt = (String)message.get("F7_MILL_SPEED_VT");
  122. //这里取的时候就是BigDecimal 所以不用转换
  123. //BigDecimal Wgt = new BigDecimal(coil_wgt);
  124. //80 F7_MILL_SPEED_VT
  125. //拒收原因代码 在不同的电文中,MSG中没有
  126. //String missno_clf_cd = (String)message.get("MISSNO_CLF_CD");//81 Reject 区分代码
  127. //在轧制接口表中没有
  128. //String missno_cause_cd = (String)message.get("MISSNO_CAUSE_CD");//82 Reject理由代码
  129. //拒收时间 在不同的电文中,MSG中没有
  130. //String missno_dtime = (String)message.get("MISSNO_DTIME");//83 Reject 发生时间
  131. //在轧制接口表中没有
  132. //String missno_bar_thk = (String)message.get("MISSNO_BAR_THK");//84 Reject时Bar厚
  133. //在轧制接口表中没有
  134. //String missno_bar_wth = (String)message.get("MISSNO_BAR_WTH");//85 Reject时Bar宽
  135. String coil_rem = (String)message.get("COIL_REM"); //86 钢卷注释
  136. String strip_thk_band1 = (String)message.get("STRIP_THK_BAND1"); //87 Strip Thickness 钢卷厚度分类1
  137. String strip_thk_band2 = (String)message.get("STRIP_THK_BAND2"); //88 Strip Thickness 钢卷厚度分类2
  138. String strip_thk_band3 = (String)message.get("STRIP_THK_BAND3"); //89 Strip Thickness 钢卷厚度分类3
  139. String strip_thk_band4 = (String)message.get("STRIP_THK_BAND4"); //90 Strip Thickness 钢卷厚度
  140. String strip_thk_band5 = (String)message.get("STRIP_THK_BAND5"); //91 Strip Thickness 钢卷厚度分类5
  141. String strip_thk_band6 = (String)message.get("STRIP_THK_BAND6"); //92 Strip Thickness 钢卷厚度分类6
  142. String strip_wth_band1 = (String)message.get("STRIP_WTH_BAND1"); //93 Strip Width 钢卷宽度分类1
  143. String strip_wth_band2 = (String)message.get("STRIP_WTH_BAND2"); //94 Strip Width 钢卷宽度分类2
  144. String strip_wth_band3 = (String)message.get("STRIP_WTH_BAND3"); //95 Strip Width 钢卷宽度分类3
  145. String strip_wth_band4 = (String)message.get("STRIP_WTH_BAND4"); //96 Strip Width 钢卷宽度分类4
  146. String strip_wth_band5 = (String)message.get("STRIP_WTH_BAND5"); //97 Strip Width 钢卷宽度分类5
  147. String strip_wth_band6 = (String)message.get("STRIP_WTH_BAND6"); //98 Strip Width 钢卷宽度分类6
  148. String strip_crown_band1 = (String)message.get("STRIP_CROWN_BAND1"); //99 Strip Crown 钢卷凸度分类1
  149. String strip_crown_band2 = (String)message.get("STRIP_CROWN_BAND2"); //100Strip Crown 钢卷凸度分类2
  150. String strip_crown_band3 = (String)message.get("STRIP_CROWN_BAND3"); //101Strip Crown 钢卷凸度分类3
  151. String strip_crown_band4 = (String)message.get("STRIP_CROWN_BAND4"); //102Strip Crown 钢卷凸度分类4
  152. String strip_crown_band5 = (String)message.get("STRIP_CROWN_BAND5"); //103Strip Crown 钢卷凸度分类5
  153. String strip_crown_band6 = (String)message.get("STRIP_CROWN_BAND6"); //104Strip Crown 钢卷凸度分类6
  154. String strip_sym_flatness_band1 = (String)message.get("STRIP_SYM_FLATNESS_BAND1"); //105Strip symm flatness 钢卷平直度分类1
  155. String strip_sym_flatness_band2 = (String)message.get("STRIP_SYM_FLATNESS_BAND2"); //106Strip symm flatness 钢卷平直度分类2
  156. String strip_sym_flatness_band3 = (String)message.get("STRIP_SYM_FLATNESS_BAND3"); //107Strip symm flatness 钢卷平直度分类3
  157. String strip_sym_flatness_band4 = (String)message.get("STRIP_SYM_FLATNESS_BAND4"); //108Strip symm flatness 钢卷平直度分类4
  158. String strip_sym_flatness_band5 = (String)message.get("STRIP_SYM_FLATNESS_BAND5"); //109Strip symm flatness 钢卷平直度分类5
  159. String strip_sym_flatness_band6 = (String)message.get("STRIP_SYM_FLATNESS_BAND6"); //110Strip symm flatness 钢卷平直度分类6
  160. String strip_asy_flatness_band1 = (String)message.get("STRIP_ASY_FLATNESS_BAND1"); //111非对称平直度 钢卷平直度分类1
  161. String strip_asy_flatness_band2 = (String)message.get("STRIP_ASY_FLATNESS_BAND2"); //112非对称平直度 钢卷平直度分类2
  162. String strip_asy_flatness_band3 = (String)message.get("STRIP_ASY_FLATNESS_BAND3"); //113非对称平直度 钢卷平直度分类3
  163. String strip_asy_flatness_band4 = (String)message.get("STRIP_ASY_FLATNESS_BAND4"); //114非对称平直度 钢卷平直度分类4
  164. String strip_asy_flatness_band5 = (String)message.get("STRIP_ASY_FLATNESS_BAND5"); //115非对称平直度 钢卷平直度分类5
  165. String strip_asy_flatness_band6 = (String)message.get("STRIP_ASY_FLATNESS_BAND6"); //116非对称平直度 钢卷平直度分类6
  166. String strip_wdg_band1 = (String)message.get("STRIP_WDG_BAND1"); //117Strip Wedge 钢卷平直度分类1
  167. String strip_wdg_band2 = (String)message.get("STRIP_WDG_BAND2"); //118Strip Wedge 钢卷平直度分类2
  168. String strip_wdg_band3 = (String)message.get("STRIP_WDG_BAND3"); //119Strip Wedge 钢卷平直度分类3
  169. String strip_wdg_band4 = (String)message.get("STRIP_WDG_BAND4"); //120Strip Wedge 钢卷平直度分类4
  170. String strip_wdg_band5 = (String)message.get("STRIP_WDG_BAND5"); //121Strip Wedge 钢卷平直度分类5
  171. String strip_wdg_band6 = (String)message.get("STRIP_WDG_BAND6"); //122Strip Wedge 钢卷平直度分类6
  172. String temp_rm_band1 = (String)message.get("TEMP_RM_BAND1"); //123粗轧出口温度 温度分类1
  173. String temp_rm_band2 = (String)message.get("TEMP_RM_BAND2"); //124粗轧出口温度 温度分类2
  174. String temp_rm_band3 = (String)message.get("TEMP_RM_BAND3"); //125粗轧出口温度 温度分类3
  175. String temp_rm_band4 = (String)message.get("TEMP_RM_BAND4"); //126粗轧出口温度 温度分类4
  176. String temp_rm_band5 = (String)message.get("TEMP_RM_BAND5"); //127粗轧出口温度 温度分类5
  177. String temp_rm_band6 = (String)message.get("TEMP_RM_BAND6");
  178. //128粗轧出口温度 温度分类6
  179. //改变MSG中值与接口表对应起来
  180. String temp_fm_band1 = (String)message.get("TEMP_FM_BAND1"); //129终轧温度 温度分类1
  181. String temp_fm_band2 = (String)message.get("TEMP_FM_BAND2"); //130终轧温度 温度分类2
  182. String temp_fm_band3 = (String)message.get("TEMP_FM_BAND3"); //131终轧温度 温度分类3
  183. String temp_fm_band4 = (String)message.get("TEMP_FM_BAND4"); //132终轧温度 温度分类4
  184. String temp_fm_band5 = (String)message.get("TEMP_FM_BAND5"); //133终轧温度 温度分类5
  185. String temp_fm_band6 = (String)message.get("TEMP_FM_BAND6"); //134终轧温度 温度分类6
  186. String dc_temp_band1 = (String)message.get("DC_TEMP_BAND1"); //135卷取温度 温度分类1
  187. String dc_temp_band2 = (String)message.get("DC_TEMP_BAND2"); //136卷取温度 温度分类2
  188. String dc_temp_band3 = (String)message.get("DC_TEMP_BAND3"); //137卷取温度 温度分类3
  189. String dc_temp_band4 = (String)message.get("DC_TEMP_BAND4"); //138卷取温度 温度分类4
  190. String dc_temp_band5 = (String)message.get("DC_TEMP_BAND5"); //139卷取温度 温度分类5
  191. String dc_temp_band6 = (String)message.get("DC_TEMP_BAND6"); //140卷取温度 温度分类6
  192. //没有
  193. //String mill_dtime = (String)message.get("MILL_DTIME"); //141轧钢时间
  194. //没有
  195. //String size_change_dtime = (String)message.get("SIZE_CHANGE_DTIME"); //142厚度宽度变化时间
  196. String currDate = null;
  197. String sShift = null;
  198. //计划钢卷号
  199. String coil_no = null;
  200. //这里从二级接收过来的卷号为实际卷号,为了能够解析数据到实际表。把实际钢卷号转换为计划钢卷号。
  201. //在执行相应的程序,把数据写入表中
  202. PosParameter paramAA = new PosParameter();
  203. paramAA.setWhereClauseParameter(0, coil_no_l2);
  204. //这里是实际钢卷号
  205. logger.logDebug("XinSaveMillResult OLD_SAMPL_NO !!! "+coil_no_l2);
  206. PosRowSet CoilNoVo = getDao("mesdao").find("NIH020050_06.select", paramAA);
  207. //查询出计划卷号的情况下,处理相应的业务类数据
  208. if(CoilNoVo.hasNext()){
  209. PosRow CoilNoRow = CoilNoVo.next();
  210. coil_no = (String) CoilNoRow.getAttribute("COIL_NO");
  211. //这里是计划钢卷号
  212. logger.logDebug("PosSaveMillToCoilComm COIL_NO !!! "+coil_no);
  213. //如果卷取结束时间为空,则放入系统时间
  214. if(dc_off_dtime.length() == 0 ){
  215. DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
  216. currDate = formatter.format(new Date());
  217. dc_off_dtime = currDate;
  218. }
  219. // 这里的班次的时间段就由基础表维护。可能存在2班或者3班的情况,那么就是有值的就进行判断没有的就是没有设定的。
  220. PosParameter paramSA = new PosParameter();
  221. PosParameter paramSB = new PosParameter();
  222. PosParameter paramSC = new PosParameter();
  223. //这里获取三个班次相应的时间
  224. String sqlA = "SELECT to_number(A.SM_EFNM) SM_EFNM,to_number(A.SM_ESNM) SM_ESNM FROM TBZ00_COMMCD A WHERE A.LG_CD = 'H07001' AND A.SM_CD = '1'";
  225. String sqlB = "SELECT to_number(A.SM_EFNM) SM_EFNM,to_number(A.SM_ESNM) SM_ESNM,A.SHRXM FROM TBZ00_COMMCD A WHERE A.LG_CD = 'H07001' AND A.SM_CD = '2'";
  226. String sqlC = "SELECT to_number(A.SM_EFNM) SM_EFNM,to_number(A.SM_ESNM) SM_ESNM FROM TBZ00_COMMCD A WHERE A.LG_CD = 'H07001' AND A.SM_CD = '3'";
  227. PosRowSet ShiftA = getDao("mesdao").findByQueryStatement(sqlA, paramSA);
  228. PosRowSet ShiftB = getDao("mesdao").findByQueryStatement(sqlB, paramSB);
  229. PosRowSet ShiftC = getDao("mesdao").findByQueryStatement(sqlC, paramSC);
  230. BigDecimal SM_EFNMA = null;
  231. BigDecimal SM_ESNMA = null;
  232. BigDecimal SM_EFNMB = null;
  233. BigDecimal SM_ESNMB = null;
  234. //这里是中班是否超过0点指标。如果超过0点就判断早班和晚班的情况,其它为中班。如果不超过0点就判断早班和中班的情况,其它为晚班
  235. String SHRXM = null;
  236. BigDecimal SM_EFNMC = null;
  237. BigDecimal SM_ESNMC = null;
  238. if(ShiftA.hasNext()){
  239. PosRow ShiftAA = ShiftA.next();
  240. SM_EFNMA = (BigDecimal) ShiftAA.getAttribute("SM_EFNM");
  241. SM_ESNMA = (BigDecimal) ShiftAA.getAttribute("SM_ESNM");
  242. }
  243. if(ShiftB.hasNext()){
  244. PosRow ShiftBB = ShiftB.next();
  245. SM_EFNMB = (BigDecimal) ShiftBB.getAttribute("SM_EFNM");
  246. SM_ESNMB = (BigDecimal) ShiftBB.getAttribute("SM_ESNM");
  247. SHRXM = (String) ShiftBB.getAttribute("SHRXM");
  248. }
  249. if(ShiftC.hasNext()){
  250. PosRow ShiftCC = ShiftC.next();
  251. SM_EFNMC = (BigDecimal) ShiftCC.getAttribute("SM_EFNM");
  252. SM_ESNMC = (BigDecimal) ShiftCC.getAttribute("SM_ESNM");
  253. }
  254. int SM_EFNMAA;
  255. int SM_ESNMAA;
  256. int SM_EFNMBB;
  257. int SM_ESNMBB;
  258. int SM_EFNMCC;
  259. int SM_ESNMCC;
  260. int hhmi = Integer.parseInt(dc_off_dtime.substring(8, 12));
  261. if(SM_EFNMA == null){
  262. SM_EFNMAA = 0;
  263. }else{
  264. SM_EFNMAA = SM_EFNMA.intValue();
  265. }
  266. if(SM_ESNMA == null){
  267. SM_ESNMAA = 0;
  268. }else{
  269. SM_ESNMAA = SM_ESNMA.intValue();
  270. }
  271. if(SM_EFNMB == null){
  272. SM_EFNMBB = 0;
  273. }else{
  274. SM_EFNMBB = SM_EFNMB.intValue();
  275. }
  276. if(SM_ESNMB == null){
  277. SM_ESNMBB = 0;
  278. }else{
  279. SM_ESNMBB = SM_ESNMB.intValue();
  280. }
  281. if(SM_EFNMC == null){
  282. SM_EFNMCC = 0;
  283. }else{
  284. SM_EFNMCC = SM_EFNMC.intValue();
  285. }
  286. if(SM_ESNMC == null){
  287. SM_ESNMCC = 0;
  288. }else{
  289. SM_ESNMCC = SM_ESNMC.intValue();
  290. }
  291. //如果出现中班输入为空的情况,说明是三班两倒。就一定会存在早班和晚班,那么只要判断早班即可
  292. if(SM_EFNMB == null || SM_ESNMB == null){
  293. if(hhmi > SM_EFNMAA && hhmi < SM_ESNMAA){
  294. //早班,这里只要判断符合不符合早班的情况即可
  295. sShift = "1";
  296. }else{
  297. sShift = "3";
  298. }
  299. }else{
  300. if(null != SHRXM && SHRXM.equals("Y")){
  301. //如果标志为Y,说明中班的结束时间超过0点,这时判断早班和晚班的情况。
  302. if(hhmi > SM_EFNMAA && hhmi < SM_ESNMAA){
  303. sShift = "1";
  304. }else if(hhmi > SM_EFNMCC && hhmi < SM_ESNMCC){
  305. sShift = "3";
  306. }else{
  307. sShift = "2";
  308. }
  309. }else{
  310. //如果标志不为Y,说明中班的结束时间没有超过0点,这时判断早班和中班的情况。
  311. if(hhmi > SM_EFNMAA && hhmi < SM_ESNMAA){
  312. sShift = "1";
  313. }else if(hhmi > SM_EFNMBB && hhmi < SM_ESNMBB){
  314. sShift = "2";
  315. }else{
  316. sShift = "3";
  317. }
  318. }
  319. }
  320. //这里需要用到天数前移一天和后退一天的共用方法,因为对三班和两班而言中班和晚班都可能存在跨天的情况。跨天后取班组时就要把时间前移
  321. PosDateFormat dateFormat = new PosDateFormat();
  322. // sShift = dateFormat.getShiftT(dc_off_dtime);
  323. // 这里需要获取昨天和明天的时间
  324. String ZDate = null;
  325. String MDate = null;
  326. // 当前时间加一天
  327. MDate = dateFormat.AddDateFunc(dc_off_dtime,1);
  328. //当前时间减一天
  329. ZDate = dateFormat.AddDateFunc(dc_off_dtime,-1);
  330. String sGroup = null;
  331. //判断,跨天的班组需要前移时间,这样才能对得上班组
  332. if(SM_EFNMB == null || SM_ESNMB == null){
  333. //两班的情况,这里需要对时间进行前移。把产量计算的昨天晚班的产量
  334. if(null != sShift && sShift.equals("3")){
  335. //这里还需要判断,当前时间是大于晚班开始时间小于2400还是大于0000小于结束时间
  336. if(hhmi >= SM_EFNMCC && hhmi <= 2400){
  337. PosParameter paramA = new PosParameter();
  338. paramA.setWhereClauseParameter(0, dc_off_dtime.substring(0,6));
  339. paramA.setWhereClauseParameter(1, dc_off_dtime.substring(6,8));
  340. paramA.setWhereClauseParameter(2, sShift);
  341. paramA.setWhereClauseParameter(3, "H");
  342. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  343. if (groupVO.hasNext()){
  344. PosRow groupROW = groupVO.next();
  345. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  346. }
  347. logger.logDebug(" 两班早班当前的班次班组!! "+sShift+":"+sGroup+"卷取时间:"+dc_off_dtime);
  348. }else if(hhmi >= 0000 && hhmi <= SM_ESNMCC){
  349. PosParameter paramA = new PosParameter();
  350. paramA.setWhereClauseParameter(0, ZDate.substring(0,6));
  351. paramA.setWhereClauseParameter(1, ZDate.substring(6,8));
  352. paramA.setWhereClauseParameter(2, sShift);
  353. paramA.setWhereClauseParameter(3, "H");
  354. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  355. if (groupVO.hasNext()){
  356. PosRow groupROW = groupVO.next();
  357. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  358. }
  359. logger.logDebug(" 两班晚班当前的班次班组!! "+sShift+":"+sGroup+"前移时间:"+ZDate);
  360. }
  361. }else if(null != sShift && sShift.equals("1")){
  362. PosParameter paramA = new PosParameter();
  363. paramA.setWhereClauseParameter(0, dc_off_dtime.substring(0,6));
  364. paramA.setWhereClauseParameter(1, dc_off_dtime.substring(6,8));
  365. paramA.setWhereClauseParameter(2, sShift);
  366. paramA.setWhereClauseParameter(3, "H");
  367. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  368. if (groupVO.hasNext()){
  369. PosRow groupROW = groupVO.next();
  370. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  371. }
  372. logger.logDebug(" 两班早班当前的班次班组!! "+sShift+":"+sGroup+"卷取时间:"+dc_off_dtime);
  373. }else{
  374. //不存在
  375. logger.logDebug(" 两班班次班组不存在的情况!! ");
  376. }
  377. }else{
  378. //三班的情况
  379. if(null != SHRXM && SHRXM.equals("Y")){
  380. if(null != sShift && sShift.equals("1")){
  381. PosParameter paramA = new PosParameter();
  382. paramA.setWhereClauseParameter(0, dc_off_dtime.substring(0,6));
  383. paramA.setWhereClauseParameter(1, dc_off_dtime.substring(6,8));
  384. paramA.setWhereClauseParameter(2, sShift);
  385. paramA.setWhereClauseParameter(3, "H");
  386. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  387. if (groupVO.hasNext()){
  388. PosRow groupROW = groupVO.next();
  389. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  390. }
  391. logger.logDebug(" 三班早班当前的班次班组!! "+sShift+":"+sGroup+"时间:"+dc_off_dtime);
  392. }else if(null != sShift && sShift.equals("2")){
  393. if(hhmi >= SM_EFNMBB && hhmi <= 2400){
  394. PosParameter paramA = new PosParameter();
  395. paramA.setWhereClauseParameter(0, dc_off_dtime.substring(0,6));
  396. paramA.setWhereClauseParameter(1, dc_off_dtime.substring(6,8));
  397. paramA.setWhereClauseParameter(2, sShift);
  398. paramA.setWhereClauseParameter(3, "H");
  399. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  400. if (groupVO.hasNext()){
  401. PosRow groupROW = groupVO.next();
  402. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  403. }
  404. logger.logDebug(" 三班中班当前的班次班组!! "+sShift+":"+sGroup+"时间:"+dc_off_dtime);
  405. }else if(hhmi >= 0000 && hhmi <= SM_ESNMBB){
  406. PosParameter paramA = new PosParameter();
  407. paramA.setWhereClauseParameter(0, ZDate.substring(0,6));
  408. paramA.setWhereClauseParameter(1, ZDate.substring(6,8));
  409. paramA.setWhereClauseParameter(2, sShift);
  410. paramA.setWhereClauseParameter(3, "H");
  411. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  412. if (groupVO.hasNext()){
  413. PosRow groupROW = groupVO.next();
  414. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  415. }
  416. logger.logDebug(" 三班中班当前的班次班组!! "+sShift+":"+sGroup+"前移时间:"+ZDate);
  417. }
  418. }else if(null != sShift && sShift.equals("3")){
  419. //中班超过0点,晚班是从当天的凌晨开始的
  420. PosParameter paramA = new PosParameter();
  421. paramA.setWhereClauseParameter(0, dc_off_dtime.substring(0,6));
  422. paramA.setWhereClauseParameter(1, dc_off_dtime.substring(6,8));
  423. paramA.setWhereClauseParameter(2, sShift);
  424. paramA.setWhereClauseParameter(3, "H");
  425. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  426. if (groupVO.hasNext()){
  427. PosRow groupROW = groupVO.next();
  428. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  429. }
  430. logger.logDebug(" 三班晚班当前的班次班组!! "+sShift+":"+sGroup+"时间:"+dc_off_dtime);
  431. }
  432. }else{
  433. if(null != sShift && sShift.equals("1")){
  434. PosParameter paramA = new PosParameter();
  435. paramA.setWhereClauseParameter(0, dc_off_dtime.substring(0,6));
  436. paramA.setWhereClauseParameter(1, dc_off_dtime.substring(6,8));
  437. paramA.setWhereClauseParameter(2, sShift);
  438. paramA.setWhereClauseParameter(3, "H");
  439. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  440. if (groupVO.hasNext()){
  441. PosRow groupROW = groupVO.next();
  442. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  443. }
  444. logger.logDebug(" 三班早班当前的班次班组!! "+sShift+":"+sGroup+"时间:"+dc_off_dtime);
  445. }else if(null != sShift && sShift.equals("2")){
  446. PosParameter paramA = new PosParameter();
  447. paramA.setWhereClauseParameter(0, dc_off_dtime.substring(0,6));
  448. paramA.setWhereClauseParameter(1, dc_off_dtime.substring(6,8));
  449. paramA.setWhereClauseParameter(2, sShift);
  450. paramA.setWhereClauseParameter(3, "H");
  451. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  452. if (groupVO.hasNext()){
  453. PosRow groupROW = groupVO.next();
  454. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  455. }
  456. logger.logDebug(" 三班中班当前的班次班组!! "+sShift+":"+sGroup+"时间:"+dc_off_dtime);
  457. }else if(null != sShift && sShift.equals("3")){
  458. //这里如果中班不超过0点而正好是2400点的情况,对于晚班来说应该先判断是否是0000-0800的情况
  459. if(hhmi >= 0000 && hhmi <= SM_ESNMCC){
  460. PosParameter paramA = new PosParameter();
  461. paramA.setWhereClauseParameter(0, dc_off_dtime.substring(0,6));
  462. paramA.setWhereClauseParameter(1, dc_off_dtime.substring(6,8));
  463. paramA.setWhereClauseParameter(2, sShift);
  464. paramA.setWhereClauseParameter(3, "H");
  465. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  466. if (groupVO.hasNext()){
  467. PosRow groupROW = groupVO.next();
  468. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  469. }
  470. logger.logDebug(" 三班晚班当前的班次班组!! "+sShift+":"+sGroup+"时间:"+dc_off_dtime);
  471. }else if(hhmi >= SM_EFNMCC && hhmi <= 2400){
  472. PosParameter paramA = new PosParameter();
  473. paramA.setWhereClauseParameter(0, MDate.substring(0,6));
  474. paramA.setWhereClauseParameter(1, MDate.substring(6,8));
  475. paramA.setWhereClauseParameter(2, sShift);
  476. paramA.setWhereClauseParameter(3, "H");
  477. PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
  478. if (groupVO.hasNext()){
  479. PosRow groupROW = groupVO.next();
  480. sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
  481. }
  482. logger.logDebug(" 三班晚班当前的班次班组!! "+sShift+":"+sGroup+"时间:"+MDate);
  483. }
  484. }
  485. }
  486. }
  487. PosParameter param0 = new PosParameter();
  488. PosParameter param1 = new PosParameter();
  489. param0.setWhereClauseParameter(0, coil_no);
  490. PosRowSet rowset0 = this.getDao("mesdao").find("NIH020050_01.select", param0);
  491. if(rowset0.hasNext())
  492. {
  493. param1.setWhereClauseParameter(0 , slab_no); //1 板坯号
  494. param1.setWhereClauseParameter(1 , stl_grd); //2 订货钢种
  495. param1.setWhereClauseParameter(2 , rhf_descal_yn); //3 加热炉后的除磷机是否使用标记
  496. param1.setWhereClauseParameter(3 , rm_ent_descal_yn); //4 RM入口处的除磷机是否使用标记
  497. param1.setWhereClauseParameter(4 , rm_ext_descal_yn); //5 RM出口处的除磷机是否使用标记
  498. param1.setWhereClauseParameter(5 , rm1_pass_cnt); //6 RM1 轧制道次
  499. param1.setWhereClauseParameter(6 , rm2_pass_cnt); //7 RM2 轧制道次
  500. param1.setWhereClauseParameter(7 , r1_ext_temp); //8 粗轧温度(R1后)
  501. param1.setWhereClauseParameter(8 , r2_ext_temp); //9 粗轧温度(R2后)
  502. param1.setWhereClauseParameter(9 , rm_ext_avg_thk); //10 RM 出口平均厚度
  503. param1.setWhereClauseParameter(10 , rm_ext_avg_wth); //11 RM 出口平均宽度
  504. param1.setWhereClauseParameter(11 , rm_ext_avg_len); //12 RM 出口平均长度
  505. param1.setWhereClauseParameter(12 , f1_ent_pass_dtime); //13 入 F1 时刻
  506. param1.setWhereClauseParameter(13 , f7_ent_pass_dtime); //14 入 F7 时刻
  507. param1.setWhereClauseParameter(14 , fst_inact_stand_no); //15 第一个空过机架
  508. param1.setWhereClauseParameter(15 , snd_inact_stand_no); //16 第二个空过机架
  509. param1.setWhereClauseParameter(16 , trd_inact_stand_no); //17 第三个空过机架
  510. param1.setWhereClauseParameter(17 , f1_ent_temp_avg); //18 进入 F1 前平均温度
  511. param1.setWhereClauseParameter(18 , f1_ent_temp_max); //19 进入 F1 前最大温度
  512. param1.setWhereClauseParameter(19 , f1_ent_temp_min); //20 进入 F1 前最小温度
  513. param1.setWhereClauseParameter(20 , fm_ext_strip_thk); //21 额定轧制厚度
  514. param1.setWhereClauseParameter(21 , fm_ext_strip_thk_avg); //22 轧制厚度平均值【钢卷厚度】
  515. param1.setWhereClauseParameter(22 , fm_ext_strip_thk_max); //23 轧制厚度最大值
  516. param1.setWhereClauseParameter(23 , fm_ext_strip_thk_min); //24 轧制厚度最小值
  517. param1.setWhereClauseParameter(24 , fm_ext_strip_thk_out_of_l); //25 轧制厚度不在公差范围内的长度
  518. param1.setWhereClauseParameter(25 , fm_ext_strip_wth); //26 额定轧制宽度
  519. param1.setWhereClauseParameter(26 , fm_ext_strip_wth_avg); //27 轧制宽度平均值【钢卷宽度】
  520. param1.setWhereClauseParameter(27 , fm_ext_strip_wth_max); //28 轧制宽度最大值
  521. param1.setWhereClauseParameter(28 , fm_ext_strip_wth_min); //29 轧制宽度最小值
  522. param1.setWhereClauseParameter(29 , fm_ext_strip_wth_out_of_l); //30 轧制宽度不在公差范围内的长度
  523. param1.setWhereClauseParameter(30 , fm_ext_strip_crown); //31 额定凸度
  524. param1.setWhereClauseParameter(31 , fm_ext_strip_crown_avg); //32 凸度平均值
  525. param1.setWhereClauseParameter(32 , fm_ext_strip_crown_max); //33 凸度最大值
  526. param1.setWhereClauseParameter(33 , fm_ext_strip_crown_min); //34 凸度最小值
  527. param1.setWhereClauseParameter(34 , fm_ext_strip_crown_out_of); //35 凸度不在公差范围内的长度
  528. param1.setWhereClauseParameter(35 , fm_sym_strip_flatness_avg); //36 对称平直度平均值
  529. param1.setWhereClauseParameter(36 , fm_sym_strip_flatness_max); //37 对称平直度最大值
  530. param1.setWhereClauseParameter(37 , fm_sym_strip_flatness_min); //38 对称平直度最小值
  531. param1.setWhereClauseParameter(38 , fm_sym_strip_out_or_range); //39 对称平直度不在公差范围内的长度
  532. param1.setWhereClauseParameter(39 , fm_asy_strip_flatness_avg); //40 非对称平直度平均值
  533. param1.setWhereClauseParameter(40 , fm_asy_strip_flatness_max); //41 非对称平直度最大值
  534. param1.setWhereClauseParameter(41 , fm_asy_strip_flatness_min); //42 非对称平直度最小值
  535. param1.setWhereClauseParameter(42 , fm_asy_strip_out_of_range); //43 非对称平直度不在公差范围内的长度
  536. param1.setWhereClauseParameter(43 , fm_strip_wdg_avg); //44 稧型 出口平均值
  537. param1.setWhereClauseParameter(44 , fm_strip_wdg_max); //45 稧型 出口最大值
  538. param1.setWhereClauseParameter(45 , fm_strip_wdg_min); //46 稧型 出口最小值
  539. param1.setWhereClauseParameter(46 , fm_strip_wdg_out_of_range); //47 稧型 不在公差范围内的长度
  540. param1.setWhereClauseParameter(47 , fm_ext_strip_temp); //48 额定终轧温度
  541. param1.setWhereClauseParameter(48 , fm_ext_strip_temp_avg); //49 终轧温度平均值
  542. param1.setWhereClauseParameter(49 , fm_ext_strip_temp_max); //50 终轧温度最大值
  543. param1.setWhereClauseParameter(50 , fm_ext_strip_temp_min); //51 终轧温度最小值
  544. param1.setWhereClauseParameter(51 , strip_out_of_range); //52 终轧温度 不在公差范围内的长度
  545. param1.setWhereClauseParameter(52 , dc_temp); //53 额定卷取温度
  546. param1.setWhereClauseParameter(53 , dc_temp_avg); //54 卷取温度平均值
  547. param1.setWhereClauseParameter(54 , dc_temp_max); //55 卷取温度最大值
  548. param1.setWhereClauseParameter(55 , dc_temp_min); //56 卷取温度最小均值
  549. param1.setWhereClauseParameter(56 , dc_temp_out_of_range); //57 卷取温度 不在公差范围内的长度
  550. param1.setWhereClauseParameter(57 , dc_no); //58 卷取机号
  551. param1.setWhereClauseParameter(58 , dc_on_dtime); //59 开始卷取时刻
  552. param1.setWhereClauseParameter(59 , dc_off_dtime); //60 结束卷取时刻
  553. param1.setWhereClauseParameter(60 , coil_wgt); //61 钢卷重量
  554. param1.setWhereClauseParameter(61 , coil_wgt_dec_clf); //62 钢卷重量区分
  555. param1.setWhereClauseParameter(62 , coil_india); //63 钢卷内径
  556. param1.setWhereClauseParameter(63 , coil_outdia); //64 钢卷外径
  557. param1.setWhereClauseParameter(64 , coil_len); //65 钢卷长度
  558. param1.setWhereClauseParameter(65 , coil_lock_yn); //66 钢卷封锁标记
  559. param1.setWhereClauseParameter(66 , thk_wth_chang_clf); //67 厚度宽度变更 SIGN
  560. param1.setWhereClauseParameter(67 , chang_cause_cd); //68 厚度宽度变更理由代码
  561. param1.setWhereClauseParameter(68 , chang_empno); //69 变更责任人
  562. param1.setWhereClauseParameter(69 , chang_thk); //70 厚度变更目标(实绩)
  563. param1.setWhereClauseParameter(70 , chang_wth); //71 宽度变更目标(实绩)
  564. param1.setWhereClauseParameter(71 , head_tail_cut_yn); //72
  565. param1.setWhereClauseParameter(72 , f1_ent_temp); //73 精轧入口温度(F1)
  566. param1.setWhereClauseParameter(73 , f7_mill_speed_head); //74 穿带速度
  567. param1.setWhereClauseParameter(74 , f7_mill_speed_acc1); //75 轧制速度 ACC1
  568. param1.setWhereClauseParameter(75 , f7_mill_speed_acc2); //76 轧制速度 ACC2
  569. param1.setWhereClauseParameter(76 , f7_mill_speed_vmax); //77 轧制速度 Vmax
  570. param1.setWhereClauseParameter(77 , coil_rem); //78 钢卷注释
  571. param1.setWhereClauseParameter(78 , strip_thk_band1); //79 Strip Thickness 钢卷厚度分类1
  572. param1.setWhereClauseParameter(79 , strip_thk_band2); //80 Strip Thickness 钢卷厚度分类2
  573. param1.setWhereClauseParameter(80 , strip_thk_band3); //81 Strip Thickness 钢卷厚度分类3
  574. param1.setWhereClauseParameter(81 , strip_thk_band4); //82 Strip Thickness 钢卷厚度
  575. param1.setWhereClauseParameter(82 , strip_thk_band5); //83 Strip Thickness 钢卷厚度分类5
  576. param1.setWhereClauseParameter(83 , strip_thk_band6); //84 Strip Thickness 钢卷厚度分类6
  577. param1.setWhereClauseParameter(84 , strip_wth_band1); //85 Strip Width 钢卷宽度分类1
  578. param1.setWhereClauseParameter(85 , strip_wth_band2); //86 Strip Width 钢卷宽度分类2
  579. param1.setWhereClauseParameter(86 , strip_wth_band3); //87 Strip Width 钢卷宽度分类3
  580. param1.setWhereClauseParameter(87 , strip_wth_band4); //88 Strip Width 钢卷宽度分类4
  581. param1.setWhereClauseParameter(88 , strip_wth_band5); //89 Strip Width 钢卷宽度分类5
  582. param1.setWhereClauseParameter(89 , strip_wth_band6); //90 Strip Width 钢卷宽度分类6
  583. param1.setWhereClauseParameter(90 , strip_crown_band1); //91 Strip Crown 钢卷凸度分类1
  584. param1.setWhereClauseParameter(91 , strip_crown_band2); //92 Strip Crown 钢卷凸度分类2
  585. param1.setWhereClauseParameter(92 , strip_crown_band3); //93Strip Crown 钢卷凸度分类3
  586. param1.setWhereClauseParameter(93, strip_crown_band4); //94Strip Crown 钢卷凸度分类4
  587. param1.setWhereClauseParameter(94, strip_crown_band5); //95Strip Crown 钢卷凸度分类5
  588. param1.setWhereClauseParameter(95, strip_crown_band6); //96Strip Crown 钢卷凸度分类6
  589. param1.setWhereClauseParameter(96, strip_sym_flatness_band1); //97Strip symm flatness 钢卷平直度分类1
  590. param1.setWhereClauseParameter(97, strip_sym_flatness_band2); //98Strip symm flatness 钢卷平直度分类2
  591. param1.setWhereClauseParameter(98, strip_sym_flatness_band3); //99Strip symm flatness 钢卷平直度分类3
  592. param1.setWhereClauseParameter(99, strip_sym_flatness_band4); //100Strip symm flatness 钢卷平直度分类4
  593. param1.setWhereClauseParameter(100, strip_sym_flatness_band5); //101Strip symm flatness 钢卷平直度分类5
  594. param1.setWhereClauseParameter(101, strip_sym_flatness_band6); //102Strip symm flatness 钢卷平直度分类6
  595. param1.setWhereClauseParameter(102, strip_asy_flatness_band1); //103非对称平直度 钢卷平直度分类1
  596. param1.setWhereClauseParameter(103, strip_asy_flatness_band2); //104非对称平直度 钢卷平直度分类2
  597. param1.setWhereClauseParameter(104, strip_asy_flatness_band3); //105非对称平直度 钢卷平直度分类3
  598. param1.setWhereClauseParameter(105, strip_asy_flatness_band4); //106非对称平直度 钢卷平直度分类4
  599. param1.setWhereClauseParameter(106, strip_asy_flatness_band5); //107非对称平直度 钢卷平直度分类5
  600. param1.setWhereClauseParameter(107, strip_asy_flatness_band6); //108非对称平直度 钢卷平直度分类6
  601. param1.setWhereClauseParameter(108, strip_wdg_band1); //109Strip Wedge 钢卷平直度分类1
  602. param1.setWhereClauseParameter(109, strip_wdg_band2); //110Strip Wedge 钢卷平直度分类2
  603. param1.setWhereClauseParameter(110, strip_wdg_band3); //111Strip Wedge 钢卷平直度分类3
  604. param1.setWhereClauseParameter(111, strip_wdg_band4); //112Strip Wedge 钢卷平直度分类4
  605. param1.setWhereClauseParameter(112, strip_wdg_band5); //113Strip Wedge 钢卷平直度分类5
  606. param1.setWhereClauseParameter(113, strip_wdg_band6); //114Strip Wedge 钢卷平直度分类6
  607. param1.setWhereClauseParameter(114, temp_rm_band1); //115粗轧出口温度 温度分类1
  608. param1.setWhereClauseParameter(115, temp_rm_band2); //116粗轧出口温度 温度分类2
  609. param1.setWhereClauseParameter(116, temp_rm_band3); //117粗轧出口温度 温度分类3
  610. param1.setWhereClauseParameter(117, temp_rm_band4); //118粗轧出口温度 温度分类4
  611. param1.setWhereClauseParameter(118, temp_rm_band5); //119粗轧出口温度 温度分类5
  612. param1.setWhereClauseParameter(119, temp_rm_band6); //120粗轧出口温度 温度分类6
  613. param1.setWhereClauseParameter(120, temp_fm_band1); //121终轧温度 温度分类1
  614. param1.setWhereClauseParameter(121, temp_fm_band2); //122终轧温度 温度分类2
  615. param1.setWhereClauseParameter(122, temp_fm_band3); //123终轧温度 温度分类3
  616. param1.setWhereClauseParameter(123, temp_fm_band4); //124终轧温度 温度分类4
  617. param1.setWhereClauseParameter(124, temp_fm_band5); //125终轧温度 温度分类5
  618. param1.setWhereClauseParameter(125, temp_fm_band6); //126终轧温度 温度分类6
  619. param1.setWhereClauseParameter(126, dc_temp_band1); //127卷取温度 温度分类1
  620. param1.setWhereClauseParameter(127, dc_temp_band2); //128卷取温度 温度分类2
  621. param1.setWhereClauseParameter(128, dc_temp_band3); //129卷取温度 温度分类3
  622. param1.setWhereClauseParameter(129, dc_temp_band4); //130卷取温度 温度分类4
  623. param1.setWhereClauseParameter(130, dc_temp_band5); //131卷取温度 温度分类5
  624. param1.setWhereClauseParameter(131, dc_temp_band6); //132卷取温度 温度分类6
  625. param1.setWhereClauseParameter(132, f1_ent_temp_out_of_len); //133进入 F1 前温度不在公差范围的长度
  626. param1.setWhereClauseParameter(133, dc_off_dtime.substring(0, 8)); //134统计日 这里使用卷取结束时间
  627. param1.setWhereClauseParameter(134, f7_mill_speed_vt); //135统计日 这里使用卷取结束时间
  628. param1.setWhereClauseParameter(135, sShift);
  629. param1.setWhereClauseParameter(136, sGroup);
  630. param1.setWhereClauseParameter(137, coil_no); //136钢卷号
  631. this.getDao("mesdao").update("NIH020050_01.update",param1);
  632. }
  633. else
  634. {
  635. param1.setValueParamter(0 , coil_no); //1 钢卷号
  636. param1.setValueParamter(1 , slab_no); //2 板坯号
  637. param1.setValueParamter(2 , stl_grd); //3 订货钢种
  638. param1.setValueParamter(3 , rhf_descal_yn); //4 加热炉后的除磷机是否使用标记
  639. param1.setValueParamter(4 , rm_ent_descal_yn); //5 RM入口处的除磷机是否使用标记
  640. param1.setValueParamter(5 , rm_ext_descal_yn); //6 RM出口处的除磷机是否使用标记
  641. param1.setValueParamter(6 , rm1_pass_cnt); //7 RM1 轧制道次
  642. param1.setValueParamter(7 , rm2_pass_cnt); //8 RM2 轧制道次
  643. param1.setValueParamter(8 , r1_ext_temp); //9 粗轧温度(R1后)
  644. param1.setValueParamter(9 , r2_ext_temp); //10 粗轧温度(R2后)
  645. param1.setValueParamter(10 , rm_ext_avg_thk); //11 RM 出口平均厚度
  646. param1.setValueParamter(11 , rm_ext_avg_wth); //12 RM 出口平均宽度
  647. param1.setValueParamter(12 , rm_ext_avg_len); //13 RM 出口平均长度
  648. param1.setValueParamter(13 , f1_ent_pass_dtime); //14 入 F1 时刻
  649. param1.setValueParamter(14 , f7_ent_pass_dtime); //15 入 F7 时刻
  650. param1.setValueParamter(15 , fst_inact_stand_no); //16 第一个空过机架
  651. param1.setValueParamter(16 , snd_inact_stand_no); //17 第二个空过机架
  652. param1.setValueParamter(17 , trd_inact_stand_no); //18 第三个空过机架
  653. param1.setValueParamter(18 , f1_ent_temp_avg); //19 进入 F1 前平均温度
  654. param1.setValueParamter(19 , f1_ent_temp_max); //20 进入 F1 前最大温度
  655. param1.setValueParamter(20 , f1_ent_temp_min); //21 进入 F1 前最小温度
  656. param1.setValueParamter(21 , fm_ext_strip_thk); //22 额定轧制厚度
  657. param1.setValueParamter(22 , fm_ext_strip_thk_avg); //23 轧制厚度平均值【钢卷厚度】
  658. param1.setValueParamter(23 , fm_ext_strip_thk_max); //24 轧制厚度最大值
  659. param1.setValueParamter(24 , fm_ext_strip_thk_min); //25 轧制厚度最小值
  660. param1.setValueParamter(25 , fm_ext_strip_thk_out_of_l); //26 轧制厚度不在公差范围内的长度
  661. param1.setValueParamter(26 , fm_ext_strip_wth); //27 额定轧制宽度
  662. param1.setValueParamter(27 , fm_ext_strip_wth_avg); //28 轧制宽度平均值【钢卷宽度】
  663. param1.setValueParamter(28 , fm_ext_strip_wth_max); //29 轧制宽度最大值
  664. param1.setValueParamter(29 , fm_ext_strip_wth_min); //30 轧制宽度最小值
  665. param1.setValueParamter(30 , fm_ext_strip_wth_out_of_l); //31 轧制宽度不在公差范围内的长度
  666. param1.setValueParamter(31 , fm_ext_strip_crown); //32 额定凸度
  667. param1.setValueParamter(32 , fm_ext_strip_crown_avg); //33 凸度平均值
  668. param1.setValueParamter(33 , fm_ext_strip_crown_max); //34 凸度最大值
  669. param1.setValueParamter(34 , fm_ext_strip_crown_min); //35 凸度最小值
  670. param1.setValueParamter(35 , fm_ext_strip_crown_out_of); //36 凸度不在公差范围内的长度
  671. param1.setValueParamter(36 , fm_sym_strip_flatness_avg); //37 对称平直度平均值
  672. param1.setValueParamter(37 , fm_sym_strip_flatness_max); //38 对称平直度最大值
  673. param1.setValueParamter(38 , fm_sym_strip_flatness_min); //39 对称平直度最小值
  674. param1.setValueParamter(39 , fm_sym_strip_out_or_range); //40 对称平直度不在公差范围内的长度
  675. param1.setValueParamter(40 , fm_asy_strip_flatness_avg); //41 非对称平直度平均值
  676. param1.setValueParamter(41 , fm_asy_strip_flatness_max); //42 非对称平直度最大值
  677. param1.setValueParamter(42 , fm_asy_strip_flatness_min); //43 非对称平直度最小值
  678. param1.setValueParamter(43 , fm_asy_strip_out_of_range); //44 非对称平直度不在公差范围内的长度
  679. param1.setValueParamter(44 , fm_strip_wdg_avg); //45 稧型 出口平均值
  680. param1.setValueParamter(45 , fm_strip_wdg_max); //46 稧型 出口最大值
  681. param1.setValueParamter(46 , fm_strip_wdg_min); //47 稧型 出口最小值
  682. param1.setValueParamter(47 , fm_strip_wdg_out_of_range); //48 稧型 不在公差范围内的长度
  683. param1.setValueParamter(48 , fm_ext_strip_temp); //49 额定终轧温度
  684. param1.setValueParamter(49 , fm_ext_strip_temp_avg); //50 终轧温度平均值
  685. param1.setValueParamter(50 , fm_ext_strip_temp_max); //51 终轧温度最大值
  686. param1.setValueParamter(51 , fm_ext_strip_temp_min); //52 终轧温度最小值
  687. param1.setValueParamter(52 , strip_out_of_range); //53 终轧温度 不在公差范围内的长度
  688. param1.setValueParamter(53 , dc_temp); //54 额定卷取温度
  689. param1.setValueParamter(54 , dc_temp_avg); //55 卷取温度平均值
  690. param1.setValueParamter(55 , dc_temp_max); //56 卷取温度最大值
  691. param1.setValueParamter(56 , dc_temp_min); //57 卷取温度最小均值
  692. param1.setValueParamter(57 , dc_temp_out_of_range); //58 卷取温度 不在公差范围内的长度
  693. param1.setValueParamter(58 , dc_no); //59 卷取机号
  694. param1.setValueParamter(59 , dc_on_dtime); //60 开始卷取时刻
  695. param1.setValueParamter(60 , dc_off_dtime); //61 结束卷取时刻
  696. param1.setValueParamter(61 , coil_wgt); //62 钢卷重量
  697. param1.setValueParamter(62 , coil_wgt_dec_clf); //63 钢卷重量区分
  698. param1.setValueParamter(63 , coil_india); //64 钢卷内径
  699. param1.setValueParamter(64 , coil_outdia); //65 钢卷外径
  700. param1.setValueParamter(65 , coil_len); //66 钢卷长度
  701. param1.setValueParamter(66 , coil_lock_yn); //67 钢卷封锁标记
  702. param1.setValueParamter(67 , thk_wth_chang_clf); //68 厚度宽度变更 SIGN
  703. param1.setValueParamter(68 , chang_cause_cd); //69 厚度宽度变更理由代码
  704. param1.setValueParamter(69 , chang_empno); //70 变更责任人
  705. param1.setValueParamter(70 , chang_thk); //71 厚度变更目标(实绩)
  706. param1.setValueParamter(71 , chang_wth); //72 宽度变更目标(实绩)
  707. param1.setValueParamter(72 , head_tail_cut_yn); //73 精轧入口温度(F1)
  708. param1.setValueParamter(73 , f1_ent_temp); //74 穿带速度
  709. param1.setValueParamter(74 , f7_mill_speed_head); //75 轧制速度 ACC1
  710. param1.setValueParamter(75 , f7_mill_speed_acc1); //76 轧制速度 ACC2
  711. param1.setValueParamter(76 , f7_mill_speed_acc2); //77 轧制速度 Vmax
  712. param1.setValueParamter(77 , f7_mill_speed_vmax); //78 轧制速度 VT
  713. param1.setValueParamter(78 , coil_rem); //79 钢卷注释
  714. param1.setValueParamter(79 , strip_thk_band1); //80 Strip Thickness 钢卷厚度分类1
  715. param1.setValueParamter(80 , strip_thk_band2); //81 Strip Thickness 钢卷厚度分类2
  716. param1.setValueParamter(81 , strip_thk_band3); //82 Strip Thickness 钢卷厚度分类3
  717. param1.setValueParamter(82 , strip_thk_band4); //83 Strip Thickness 钢卷厚度
  718. param1.setValueParamter(83 , strip_thk_band5); //84 Strip Thickness 钢卷厚度分类5
  719. param1.setValueParamter(84 , strip_thk_band6); //85 Strip Thickness 钢卷厚度分类6
  720. param1.setValueParamter(85 , strip_wth_band1); //86 Strip Width 钢卷宽度分类1
  721. param1.setValueParamter(86 , strip_wth_band2); //87 Strip Width 钢卷宽度分类2
  722. param1.setValueParamter(87 , strip_wth_band3); //88 Strip Width 钢卷宽度分类3
  723. param1.setValueParamter(88 , strip_wth_band4); //89 Strip Width 钢卷宽度分类4
  724. param1.setValueParamter(89 , strip_wth_band5); //90 Strip Width 钢卷宽度分类5
  725. param1.setValueParamter(90 , strip_wth_band6); //91 Strip Width 钢卷宽度分类6
  726. param1.setValueParamter(91 , strip_crown_band1); //92 Strip Crown 钢卷凸度分类1
  727. param1.setValueParamter(92 , strip_crown_band2); //93Strip Crown 钢卷凸度分类2
  728. param1.setValueParamter(93, strip_crown_band3); //94Strip Crown 钢卷凸度分类3
  729. param1.setValueParamter(94, strip_crown_band4); //95Strip Crown 钢卷凸度分类4
  730. param1.setValueParamter(95, strip_crown_band5); //96Strip Crown 钢卷凸度分类5
  731. param1.setValueParamter(96, strip_crown_band6); //97Strip Crown 钢卷凸度分类6
  732. param1.setValueParamter(97, strip_sym_flatness_band1); //98Strip symm flatness 钢卷平直度分类1
  733. param1.setValueParamter(98, strip_sym_flatness_band2); //99Strip symm flatness 钢卷平直度分类2
  734. param1.setValueParamter(99, strip_sym_flatness_band3); //100Strip symm flatness 钢卷平直度分类3
  735. param1.setValueParamter(100, strip_sym_flatness_band4); //101Strip symm flatness 钢卷平直度分类4
  736. param1.setValueParamter(101, strip_sym_flatness_band5); //102Strip symm flatness 钢卷平直度分类5
  737. param1.setValueParamter(102, strip_sym_flatness_band6); //103Strip symm flatness 钢卷平直度分类6
  738. param1.setValueParamter(103, strip_asy_flatness_band1); //104非对称平直度 钢卷平直度分类1
  739. param1.setValueParamter(104, strip_asy_flatness_band2); //105非对称平直度 钢卷平直度分类2
  740. param1.setValueParamter(105, strip_asy_flatness_band3); //106非对称平直度 钢卷平直度分类3
  741. param1.setValueParamter(106, strip_asy_flatness_band4); //107非对称平直度 钢卷平直度分类4
  742. param1.setValueParamter(107, strip_asy_flatness_band5); //108非对称平直度 钢卷平直度分类5
  743. param1.setValueParamter(108, strip_asy_flatness_band6); //109非对称平直度 钢卷平直度分类6
  744. param1.setValueParamter(109, strip_wdg_band1); //110Strip Wedge 钢卷平直度分类1
  745. param1.setValueParamter(110, strip_wdg_band2); //111Strip Wedge 钢卷平直度分类2
  746. param1.setValueParamter(111, strip_wdg_band3); //112Strip Wedge 钢卷平直度分类3
  747. param1.setValueParamter(112, strip_wdg_band4); //113Strip Wedge 钢卷平直度分类4
  748. param1.setValueParamter(113, strip_wdg_band5); //114Strip Wedge 钢卷平直度分类5
  749. param1.setValueParamter(114, strip_wdg_band6); //115Strip Wedge 钢卷平直度分类6
  750. param1.setValueParamter(115, temp_rm_band1); //116粗轧出口温度 温度分类1
  751. param1.setValueParamter(116, temp_rm_band2); //117粗轧出口温度 温度分类2
  752. param1.setValueParamter(117, temp_rm_band3); //118粗轧出口温度 温度分类3
  753. param1.setValueParamter(118, temp_rm_band4); //119粗轧出口温度 温度分类4
  754. param1.setValueParamter(119, temp_rm_band5); //120粗轧出口温度 温度分类5
  755. param1.setValueParamter(120, temp_rm_band6); //121粗轧出口温度 温度分类6
  756. param1.setValueParamter(121, temp_fm_band1); //122终轧温度 温度分类1
  757. param1.setValueParamter(122, temp_fm_band2); //123终轧温度 温度分类2
  758. param1.setValueParamter(123, temp_fm_band3); //124终轧温度 温度分类3
  759. param1.setValueParamter(124, temp_fm_band4); //125终轧温度 温度分类4
  760. param1.setValueParamter(125, temp_fm_band5); //126终轧温度 温度分类5
  761. param1.setValueParamter(126, temp_fm_band6); //127终轧温度 温度分类6
  762. param1.setValueParamter(127, dc_temp_band1); //128卷取温度 温度分类1
  763. param1.setValueParamter(128, dc_temp_band2); //129卷取温度 温度分类2
  764. param1.setValueParamter(129, dc_temp_band3); //130卷取温度 温度分类3
  765. param1.setValueParamter(130, dc_temp_band4); //131卷取温度 温度分类4
  766. param1.setValueParamter(131, dc_temp_band5); //132卷取温度 温度分类5
  767. param1.setValueParamter(132, dc_temp_band6); //133卷取温度 温度分类6
  768. param1.setValueParamter(133, f1_ent_temp_out_of_len); //134进入 F1 前温度不在公差范围的长度
  769. param1.setValueParamter(134, dc_off_dtime.substring(0, 8)); //135统计日 这里使用卷取结束时间
  770. param1.setValueParamter(135, f7_mill_speed_vt); //136统计日 这里使用卷取结束时间
  771. param1.setValueParamter(136, sShift);
  772. param1.setValueParamter(137, sGroup);
  773. this.getDao("mesdao").insert("NIH020050_01.insert",param1);
  774. }
  775. String SPEC_ORD_NO = null;
  776. String SPEC_ORD_SEQ = null;
  777. PosParameter param3 = new PosParameter();
  778. param3.setWhereClauseParameter(0,coil_no );
  779. PosRowSet SpecMillVo = getDao("mesdao").find("UIH020030_SPEC_MILL.select", param3);
  780. while (SpecMillVo.hasNext())
  781. {
  782. // 从TBF02_SPEC_MILL中获取的将要插入到TBH02_COIL_COMM中的字段赋值
  783. PosRow SpecMillROW = SpecMillVo.next();
  784. SPEC_ORD_NO = (String)SpecMillROW.getAttribute("ORD_NO");
  785. SPEC_ORD_SEQ = (String)SpecMillROW.getAttribute("ORD_SEQ");
  786. }
  787. PosParameter param7 = new PosParameter();
  788. param7.setWhereClauseParameter(0, slab_no );
  789. param7.setWhereClauseParameter(1, coil_no );
  790. PosRowSet specMillVo = getDao("mesdao").find("NIH020020_SPEC_MILL.select", param7);
  791. if (specMillVo.hasNext()) {
  792. PosRow specMillROW = specMillVo.next();
  793. Number SLAB_EDT_SEQ = (Number)specMillROW.getAttribute("SLAB_EDT_SEQ");
  794. PosParameter param4 = new PosParameter();
  795. param4.setWhereClauseParameter(0, "C" );
  796. param4.setWhereClauseParameter(1, slab_no );
  797. param4.setWhereClauseParameter(2, coil_no );
  798. getDao("mesdao").update("NIH020020_SPEC_MILL.update", param4);
  799. PosParameter param5 = new PosParameter();
  800. param5.setWhereClauseParameter(0, "C" );
  801. param5.setWhereClauseParameter(1, SLAB_EDT_SEQ );
  802. getDao("mesdao").update("NIH020020_SPEC_MILL_D.update", param5);
  803. PosParameter param6 = new PosParameter();
  804. param6.setWhereClauseParameter(0, "C" );
  805. param6.setWhereClauseParameter(1, SLAB_EDT_SEQ );
  806. getDao("mesdao").update("NIH020020_MILL_IDX.update", param6);
  807. }
  808. //如果出现多次吊销的情况,只在第一次的时候给予处理
  809. /*PosParameter paramx = new PosParameter();
  810. String sqlx = "select RHF_STAT from TBH02_REHEATFUR where slab_no = ? and coil_no = ? ";
  811. paramx.setWhereClauseParameter(0, slab_no);
  812. paramx.setWhereClauseParameter(1, coil_no);
  813. //判断是否有上料,如果没有上料,自动补录
  814. String RHF_STAT = null;
  815. PosRowSet rowset2 = getDao("mesdao").findByQueryStatement(sqlx, paramx);
  816. if(rowset2.hasNext()){
  817. PosRow row2 = rowset2.next();
  818. RHF_STAT = (String) row2.getAttribute("RHF_STAT");
  819. //加入日志
  820. PosParameter paramhis = new PosParameter();
  821. paramhis.setValueParamter(0, slab_no);
  822. paramhis.setValueParamter(1, coil_no);
  823. paramhis.setValueParamter(2, RHF_STAT);
  824. getDao("mesdao").insert("UIH020036_09.insert", paramhis);
  825. if("1".equals(RHF_STAT))
  826. {
  827. //此方法用来传送异动点数据
  828. ProduceFactory PD= new ProduceFactory();
  829. PD.ErpDataCover("HSLAB",slab_no,"41A","0","O","加热炉二级丢料","热轧轧制");
  830. }
  831. }
  832. else{
  833. //此方法用来传送异动点数据
  834. ProduceFactory PD= new ProduceFactory();
  835. PD.ErpDataCover("HSLAB",slab_no,"41A","0","O","加热炉二级丢料","热轧轧制");
  836. }*/
  837. PosParameter param4 = new PosParameter();
  838. param4.setWhereClauseParameter(0, "4");
  839. param4.setWhereClauseParameter(1, slab_no);
  840. param4.setWhereClauseParameter(2, coil_no);
  841. //轧制完成后,也需要改变入出表的状态
  842. getDao("mesdao").update("UIH020020_07.update", param4);
  843. PosParameter param5 = new PosParameter();
  844. param5.setWhereClauseParameter(0, slab_no);
  845. getDao("mesdao").update("UIH020020_08.update", param5);
  846. PosParameter param9 = new PosParameter();
  847. param9.setWhereClauseParameter(0, slab_no );
  848. String SlabCurrProgCd = null;
  849. String SlabBefProgCd = null;
  850. String SlabOrdNo = null;
  851. String SlabOrdSeq = null;
  852. BigDecimal SlabWgt = null;
  853. PosRowSet slabVo = getDao("mesdao").find("NIH020030_SLAB.select", param9);
  854. if(slabVo.hasNext()) {
  855. PosRow slabROW = slabVo.next();
  856. SlabCurrProgCd = (String)slabROW.getAttribute("CUR_PROG_CD");
  857. SlabBefProgCd = (String)slabROW.getAttribute("BEF_PROG_CD");
  858. SlabOrdNo = (String)slabROW.getAttribute("ORD_NO");
  859. SlabOrdSeq = (String)slabROW.getAttribute("ORD_SEQ");
  860. SlabWgt = (BigDecimal)slabROW.getAttribute("SLAB_WGT");
  861. }
  862. //TL 加入调用品质的存储过程 COPY XinSaveRhfExtract NIB028070
  863. //20180703 在此存储过程中加入更改进程的业务,判断订单是否需要平整,需要的话更改SED—-->SCA By wl 20220223迁移到PosSaveMillToCoilComm
  864. /* CallableStatement PlRtn = getDao("mesdao").getCallableStatement("NIH020050_NIB028040");
  865. try {
  866. if(PlRtn != null) {
  867. PlRtn.setString(1,coil_no);
  868. PlRtn.registerOutParameter(2, java.sql.Types.VARCHAR);
  869. PlRtn.registerOutParameter(3, java.sql.Types.VARCHAR);
  870. PlRtn.execute();
  871. String sRetCode = PlRtn.getString(2);
  872. String sRetMsg = PlRtn.getString(3);
  873. logger.logDebug("PosSAveOutHeatFurnace---> NIB028040 TC PlRtn1:["+sRetCode+"]:"+ sRetMsg);
  874. }
  875. } catch (SQLException e) {
  876. throw new PosException(e.getMessage());
  877. }finally
  878. {
  879. if (PlRtn != null)
  880. {
  881. try
  882. {
  883. PlRtn.close();
  884. }
  885. catch (SQLException e)
  886. {
  887. logger.logWarn(e.getMessage(), e);
  888. }
  889. }
  890. }*/
  891. }else{
  892. // 通过实际钢卷号没有获得计划钢卷号的信息
  893. logger.logDebug("XinSaveMillResult OLD_SAMPL_NO - > COIL_NO ERROR ");
  894. }
  895. return PosBizControlConstants.SUCCESS;
  896. }
  897. public void SendProg_NIE012070(String MatNo,String sOrdNo,String sOrdSeq,String sProgCd,String sBefProgCd,String sKind,BigDecimal wgt )
  898. {
  899. logger.logDebug("XinSaveCcmResult SendProg_NIE012070 " );
  900. PosContext context = new PosContext();
  901. PosMessage message = new PosMESMessageImpl();
  902. String TcId = "NIE012070";
  903. message.setTCID(TcId);
  904. message.setObject("MSG_ID",TcId);
  905. message.setObject("BEF_ORD_NO",null);
  906. message.setObject("BEF_ORD_SEQ",null);
  907. message.setObject("ORD_NO",sOrdNo);
  908. message.setObject("ORD_SEQ",sOrdSeq);
  909. message.setObject("BEF_PROG_CD",sBefProgCd);
  910. message.setObject("PROG_CD",sProgCd);
  911. message.setObject("MAT_TYPE",sKind);
  912. message.setObject("MAT_NO",MatNo);
  913. message.setObject("WGT", wgt );
  914. message.setObject("PGMID","XinSaveMillResult");
  915. message.setObject("REG_ID", "MILL L2");
  916. context.setMessage(message);
  917. this.processComponent(PosConstants.CREATE_MESSAGE, context);
  918. String transactionCode = context.getMessage().getTC();
  919. message.setTCID(TcId);
  920. String serviceName = "NIE012070";
  921. String SERVICE_POSTFIX = "-service";
  922. context.put(PosBizControlConstants.SERVICE_NAME, serviceName + SERVICE_POSTFIX);
  923. context.setMessage(message);
  924. PosBizControlIF controller = PosBizProvider.getController();
  925. controller.doSubController(context,false);
  926. }
  927. public void SendProg_NIE012080()
  928. {
  929. PosContext context = new PosContext();
  930. PosMessage message = new PosMESMessageImpl();
  931. String TcId = "NIE012080";
  932. message.setTCID(TcId);
  933. message.setObject("MSG_ID",TcId);
  934. message.setObject("AA",null);
  935. context.setMessage(message);
  936. this.processComponent(PosConstants.CREATE_MESSAGE, context);
  937. String transactionCode = context.getMessage().getTC();
  938. message.setTCID(TcId);
  939. String serviceName = "NIE012080";
  940. String SERVICE_POSTFIX = "-service";
  941. context.put(PosBizControlConstants.SERVICE_NAME, serviceName + SERVICE_POSTFIX);
  942. context.setMessage(message);
  943. PosBizControlIF controller = PosBizProvider.getController();
  944. controller.doSubController(context,false);
  945. }
  946. public void SendProg_NIH050010(String CoilNo,String CurPos)
  947. {
  948. PosContext context = new PosContext();
  949. PosMessage message = new PosMESMessageImpl();
  950. String TcId = "NIH050010";
  951. message.setTCID(TcId);
  952. message.setObject("MSG_ID",TcId);
  953. message.setObject("COIL_NO",CoilNo);
  954. message.setObject("CURR_POS",null);
  955. context.setMessage(message);
  956. this.processComponent(PosConstants.CREATE_MESSAGE, context);
  957. String transactionCode = context.getMessage().getTC();
  958. message.setTCID(TcId);
  959. String serviceName = TcId;
  960. String SERVICE_POSTFIX = "-service";
  961. context.put(PosBizControlConstants.SERVICE_NAME, serviceName + SERVICE_POSTFIX);
  962. context.setMessage(message);
  963. PosBizControlIF controller = PosBizProvider.getController();
  964. controller.doSubController(context,false);
  965. }
  966. }