8f80a6603961333bcba0c990b6e20f83220f2f44.svn-base 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. package xin.glue.ui.G.G02;
  2. import java.math.BigDecimal;
  3. import com.posdata.glue.biz.activity.PosActivity;
  4. import com.posdata.glue.biz.constants.PosBizControlConstants;
  5. import com.posdata.glue.biz.control.PosBizControlIF;
  6. import com.posdata.glue.biz.control.PosBizProvider;
  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. import com.posdata.glue.msg.PosMESMessageImpl;
  12. import com.posdata.glue.msg.PosMessage;
  13. /**
  14. * LF炉实绩修改信息保存
  15. * @author 梅贵平
  16. * @date 2008-9-23
  17. */
  18. public class PosSaveLfResult extends PosActivity
  19. {
  20. public String runActivity(PosContext context)
  21. {
  22. String[]rowStutsFlag = (String[]) context.get("rowStutsFlag");//标记是否更新或插入BOF实绩(原料实绩除外)
  23. //PosGenericDao dao = this.getDao("mesdao");// 获得数据访问对象
  24. if(rowStutsFlag!=null)
  25. {
  26. String[] CHARGE_NO = (String[])context.get("CHARGE_NO");
  27. String[] PLAN_CHARGE_NO = (String[])context.get("PLAN_CHARGE_NO");
  28. //从前台表1中获取的数据
  29. String[] XIN_DATE = (String[])context.get("XIN_DATE");//统计日
  30. String[] LF_NO = (String[])context.get("LF_NO");//LF炉号
  31. String[] WKSHIFT = (String[])context.get("WKSHIFT"); //班次
  32. String[] WKGROUP = (String[])context.get("WKGROUP"); //组
  33. String[] EMP_ID = (String[])context.get("EMP_ID"); //作业人
  34. //从前台表2中获取的数据
  35. String[] ARRV_WGT = (String[])context.get("ARRV_WGT");//到达总重量
  36. String[] LF_TREAT_WGT = (String[])context.get("LF_TREAT_WGT");//LF处理重量
  37. String[] TREAT_BEF_O2_WGT = (String[])context.get("TREAT_BEF_O2_WGT");//LF开始时含氧量
  38. String[] TREAT_AFT_O2_WGT = (String[])context.get("TREAT_AFT_O2_WGT");//LF结束时含氧量
  39. String[] AR_GAS_USE_WGT = (String[])context.get("AR_GAS_USE_WGT"); //Ar 使用量
  40. String[] ELECPWR_USE_WGT = (String[])context.get("ELECPWR_USE_WGT"); //通电量
  41. String[] O2_USE_WGT = (String[])context.get("O2_USE_WGT"); //氧气用量
  42. //从前台表5中获取的数据
  43. String[] LF_ARRV_DTIME = (String[])context.get("LF_ARRV_DTIME"); //钢包到达
  44. String[] LF_STA_DTIME = (String[])context.get("LF_STA_DTIME"); //处理开始时刻
  45. String[] LF_END_DTIME = (String[])context.get("LF_END_DTIME"); //处理完成时刻
  46. String[] LF_DEP_DTIME = (String[])context.get("LF_DEP_DTIME"); //钢包离开时刻
  47. String[] ELECFLOW_STA_DTIME = (String[])context.get("ELECFLOW_STA_DTIME");//通电开始时刻
  48. String[] LF_TREAT_HOUR = (String[])context.get("LF_TREAT_HOUR"); //LF处理时间
  49. String[] AR_GAS_BLOW_HOUR = (String[])context.get("AR_GAS_BLOW_HOUR");//氩气吹入时间
  50. String[] ELECFLOW_HOUR = (String[])context.get("ELECFLOW_HOUR");//通电时间
  51. String[] ELECTROD_CONTACT_QNTY_1 = (String[])context.get("ELECTROD_CONTACT_QNTY_1");//1极
  52. String[] ELECTROD_CONTACT_QNTY_2 = (String[])context.get("ELECTROD_CONTACT_QNTY_2");//2极
  53. String[] ELECTROD_CONTACT_QNTY_3 = (String[])context.get("ELECTROD_CONTACT_QNTY_3");//3极
  54. String PlanChNo = null;
  55. if (PLAN_CHARGE_NO[0] == null || PLAN_CHARGE_NO[0].equals("")) {
  56. PlanChNo = '3'+CHARGE_NO[0].substring(1,10);
  57. } else {
  58. PlanChNo = PLAN_CHARGE_NO[0];
  59. }
  60. PosParameter paramA = new PosParameter();
  61. paramA.setWhereClauseParameter(0, PlanChNo);
  62. PosRowSet L2Send = this.getDao("mesdao").find("UIG020020_L2_SEND_CHARGE.select", paramA);
  63. if(!L2Send.hasNext()){
  64. return PosBizControlConstants.SUCCESS;
  65. }
  66. BigDecimal TapWgt = null;
  67. String sql = "SELECT CHARGE_NO FROM TBG02_LF_RESULT WHERE CHARGE_NO = ?";
  68. PosParameter posparam = new PosParameter();
  69. posparam.setWhereClauseParameter(0, CHARGE_NO[0]);
  70. PosRowSet rowset = getDao("mesdao").findByQueryStatement(sql, posparam);
  71. int count = rowset.count();
  72. if(count==0)
  73. {
  74. PosParameter param = new PosParameter();
  75. param.setValueParamter(0, CHARGE_NO[0]);
  76. //对应表1的数据
  77. param.setValueParamter(1, XIN_DATE[0]);
  78. param.setValueParamter(2, LF_NO[0]);
  79. param.setValueParamter(3, WKSHIFT[0]);
  80. param.setValueParamter(4, WKGROUP[0]);
  81. param.setValueParamter(5, EMP_ID[0]);
  82. //对应表2的数据
  83. param.setValueParamter(6, ARRV_WGT[0]);
  84. param.setValueParamter(7, LF_TREAT_WGT[0]);
  85. param.setValueParamter(8, TREAT_BEF_O2_WGT[0]);
  86. param.setValueParamter(9, TREAT_AFT_O2_WGT[0]);
  87. param.setValueParamter(10, AR_GAS_USE_WGT[0]);
  88. param.setValueParamter(11, ELECPWR_USE_WGT[0]);
  89. param.setValueParamter(12, O2_USE_WGT[0]);
  90. //对应表5的数据
  91. param.setValueParamter(13, LF_ARRV_DTIME[0]);
  92. param.setValueParamter(14, LF_STA_DTIME[0]);
  93. param.setValueParamter(15, LF_END_DTIME[0]);
  94. param.setValueParamter(16, LF_DEP_DTIME[0]);
  95. param.setValueParamter(17, ELECFLOW_STA_DTIME[0]);
  96. param.setValueParamter(18, LF_TREAT_HOUR[0]);
  97. param.setValueParamter(19, AR_GAS_BLOW_HOUR[0]);
  98. param.setValueParamter(20, ELECFLOW_HOUR[0]);
  99. param.setValueParamter(21, ELECTROD_CONTACT_QNTY_1[0]);
  100. param.setValueParamter(22, ELECTROD_CONTACT_QNTY_2[0]);
  101. param.setValueParamter(23, ELECTROD_CONTACT_QNTY_3[0]);
  102. param.setValueParamter(24, PLAN_CHARGE_NO[0]);
  103. getDao("mesdao").insert("UIG020050_01.insert",param);
  104. String STATUS_CD = null;
  105. paramA = new PosParameter();
  106. paramA.setWhereClauseParameter(0, PlanChNo);
  107. PosRowSet specChVo = this.getDao("mesdao").find("NIG020200_SPEC_CHARGE.select", paramA);
  108. if (specChVo.hasNext()) {
  109. PosRow specChROW = specChVo.next();
  110. STATUS_CD = (String) specChROW.getAttribute("STATUS_CD");
  111. }
  112. if ( STATUS_CD == null || (STATUS_CD != null && (STATUS_CD.equals("A") || STATUS_CD.equals("B")))) {
  113. //PosParameter param5 = new PosParameter();
  114. //String sProgCd = "JLF";
  115. //param5.setValueParamter(0, sProgCd);
  116. //param5.setValueParamter(1, "B");
  117. //param5.setValueParamter(2, PlanChNo);
  118. PosParameter param6 = new PosParameter();
  119. param6.setValueParamter(0, "B" );
  120. param6.setValueParamter(1, PlanChNo );
  121. this.getDao("mesdao").update("NIG020200_SPEC_PROG_02.update", param6);
  122. this.getDao("mesdao").update("NIG020200_SPEC_CHARGE_IDX.update", param6);
  123. if(STATUS_CD == null||(STATUS_CD != null&& STATUS_CD.equals("A"))){
  124. this.getDao("mesdao").update("NIG020610_SPEC_SLAB.update", param6);
  125. PosParameter param7 = new PosParameter();
  126. param7.setWhereClauseParameter(0,PlanChNo);
  127. PosRowSet specslabVo = this.getDao("mesdao").find("NIG020210_SPEC_SLAB.select", param7);
  128. while(specslabVo.hasNext()) {
  129. PosRow specslabROW = specslabVo.next();
  130. Number SlabEdtSeq = (Number)specslabROW.getAttribute("SLAB_EDT_SEQ");
  131. PosParameter param8 = new PosParameter();
  132. param8.setValueParamter(0, "B" );
  133. param8.setValueParamter(1, SlabEdtSeq );
  134. this.getDao("mesdao").update("NIG020610_SPEC_SLAB_D.update", param8);
  135. }
  136. }
  137. }
  138. if(LF_TREAT_WGT[0] == null || LF_TREAT_WGT[0].equals("")) {
  139. TapWgt = new BigDecimal(0);
  140. } else {
  141. TapWgt = new BigDecimal(LF_TREAT_WGT[0]) ;
  142. }
  143. }
  144. else
  145. {
  146. PosParameter param = new PosParameter();
  147. //对应表1的数据
  148. param.setWhereClauseParameter(0, XIN_DATE[0]);
  149. param.setWhereClauseParameter(1, LF_NO[0]);
  150. param.setWhereClauseParameter(2, WKSHIFT[0]);
  151. param.setWhereClauseParameter(3, WKGROUP[0]);
  152. param.setWhereClauseParameter(4, EMP_ID[0]);
  153. //对应表2的数据
  154. param.setWhereClauseParameter(5, ARRV_WGT[0]);
  155. param.setWhereClauseParameter(6, LF_TREAT_WGT[0]);
  156. param.setWhereClauseParameter(7, TREAT_BEF_O2_WGT[0]);
  157. param.setWhereClauseParameter(8, TREAT_AFT_O2_WGT[0]);
  158. param.setWhereClauseParameter(9, AR_GAS_USE_WGT[0]);
  159. param.setWhereClauseParameter(10, ELECPWR_USE_WGT[0]);
  160. param.setWhereClauseParameter(11, O2_USE_WGT[0]);
  161. //对应表5的数据
  162. param.setWhereClauseParameter(12, LF_ARRV_DTIME[0]);
  163. param.setWhereClauseParameter(13, LF_STA_DTIME[0]);
  164. param.setWhereClauseParameter(14, LF_END_DTIME[0]);
  165. param.setWhereClauseParameter(15, LF_DEP_DTIME[0]);
  166. param.setWhereClauseParameter(16, ELECFLOW_STA_DTIME[0]);
  167. param.setWhereClauseParameter(17, LF_TREAT_HOUR[0]);
  168. param.setWhereClauseParameter(18, AR_GAS_BLOW_HOUR[0]);
  169. param.setWhereClauseParameter(19, ELECFLOW_HOUR[0]);
  170. param.setWhereClauseParameter(20, ELECTROD_CONTACT_QNTY_1[0]);
  171. param.setWhereClauseParameter(21, ELECTROD_CONTACT_QNTY_2[0]);
  172. param.setWhereClauseParameter(22, ELECTROD_CONTACT_QNTY_3[0]);
  173. param.setWhereClauseParameter(23, PLAN_CHARGE_NO[0]);
  174. param.setWhereClauseParameter(24, CHARGE_NO[0]);
  175. getDao("mesdao").update("UIG020050_01.update",param);
  176. }
  177. saveMaster(CHARGE_NO[0],PlanChNo,TapWgt,LF_NO[0]);
  178. }
  179. //对铁合金记录执行更新或录入
  180. String []rowStuts3 =(String[]) context.get("rowStuts3");//UIG020050页面铁合金表传过来的值
  181. if(rowStuts3!=null)
  182. {
  183. String[]MAINRAW_CD = (String[])context.get("MAINRAW_CD");//铁合金CODE
  184. //String[]MAINRAW_CD_DESC = (String[])context.get("MAINRAW_CD_DESC");//铁合金CODE内容
  185. String[]MAINRAW_WGT = (String[])context.get("MAINRAW_WGT");//铁合金用量
  186. String[]CHARGE_NO = (String[])context.get("CHARGE_NO");//炉次号
  187. for(int i=0; i < rowStuts3.length; i++)
  188. {
  189. PosParameter param1 = new PosParameter();
  190. param1.setWhereClauseParameter(0, CHARGE_NO[0]);
  191. param1.setWhereClauseParameter(1, MAINRAW_CD[i]);
  192. PosRowSet scrapVo = this.getDao("mesdao").find("NIG020530_02.select", param1);
  193. if (scrapVo.hasNext()) {
  194. PosParameter param2 = new PosParameter();
  195. param2.setValueParamter(0, MAINRAW_WGT[i] );
  196. param2.setValueParamter(1, CHARGE_NO[0] );
  197. param2.setValueParamter(2, MAINRAW_CD[i] );
  198. this.getDao("mesdao").update("NIG020530_01.update", param2);
  199. } else {
  200. PosParameter param2 = new PosParameter();
  201. param2.setValueParamter(0, CHARGE_NO[0] );
  202. param2.setValueParamter(1, MAINRAW_CD[i] );
  203. param2.setValueParamter(2, MAINRAW_WGT[i]);
  204. this.getDao("mesdao").update("NIG020530_01.insert", param2);
  205. }
  206. }
  207. }
  208. //对辅料记录执行更新或录入
  209. String []rowStuts4 =(String[]) context.get("rowStuts4");//UIG020050页面铁合金表传过来的值
  210. if(rowStuts4!=null)
  211. {
  212. String[]MAINRAW_CD = (String[])context.get("MAINRAW_CD");//铁合金CODE
  213. //String[]MAINRAW_CD_DESC = (String[])context.get("MAINRAW_CD_DESC");//铁合金CODE内容
  214. String[]MAINRAW_WGT = (String[])context.get("MAINRAW_WGT");//铁合金用量
  215. String[]CHARGE_NO = (String[])context.get("CHARGE_NO");//炉次号
  216. for(int i=0; i < rowStuts4.length; i++)
  217. {
  218. PosParameter param1 = new PosParameter();
  219. param1.setWhereClauseParameter(0, CHARGE_NO[0]);
  220. param1.setWhereClauseParameter(1, MAINRAW_CD[i]);
  221. PosRowSet scrapVo = this.getDao("mesdao").find("NIG020530_02.select", param1);
  222. if (scrapVo.hasNext()) {
  223. PosParameter param2 = new PosParameter();
  224. param2.setValueParamter(0, MAINRAW_WGT[i] );
  225. param2.setValueParamter(1, CHARGE_NO[0] );
  226. param2.setValueParamter(2, MAINRAW_CD[i] );
  227. this.getDao("mesdao").update("NIG020530_01.update", param2);
  228. } else {
  229. PosParameter param2 = new PosParameter();
  230. param2.setValueParamter(0, CHARGE_NO[0] );
  231. param2.setValueParamter(1, MAINRAW_CD[i] );
  232. param2.setValueParamter(2, MAINRAW_WGT[i]);
  233. this.getDao("mesdao").update("NIG020530_01.insert", param2);
  234. }
  235. }
  236. }
  237. return PosBizControlConstants.SUCCESS;
  238. }
  239. public void saveMaster(String ChargeNo,String PlanChNo,BigDecimal wgt,String lfNo )
  240. {
  241. String PRODNM_CD = null;
  242. String STL_GRD = null;
  243. String LINE_PROC_CD = null;
  244. String HCR_CLF = null;
  245. String SPEC_ABBSYM = null;
  246. String CAST_MANA_NO = null;
  247. Number CAST_CHARGE_SEQ = null;
  248. String CHARGE_MANA_NO = null;
  249. Number CAST_EDT_CHARGE_CNT = null;
  250. PosParameter paramA = new PosParameter();
  251. paramA.setWhereClauseParameter(0, PlanChNo);
  252. PosRowSet specChVo = this.getDao("mesdao").find("NIG020200_SPEC_CHARGE.select", paramA);
  253. if (specChVo.hasNext()) {
  254. PosRow specChROW = specChVo.next();
  255. PRODNM_CD = (String)specChROW.getAttribute("PRODNM_CD");
  256. STL_GRD = (String)specChROW.getAttribute("STL_GRD");
  257. LINE_PROC_CD = (String)specChROW.getAttribute("LINE_PROC_CD");
  258. HCR_CLF = (String)specChROW.getAttribute("HCR_CLF");
  259. SPEC_ABBSYM = (String)specChROW.getAttribute("SPEC_ABBSYM");
  260. CAST_MANA_NO = (String)specChROW.getAttribute("CAST_MANA_NO");
  261. CAST_CHARGE_SEQ = (Number)specChROW.getAttribute("CAST_CHARGE_SEQ");
  262. CHARGE_MANA_NO = (String)specChROW.getAttribute("CHARGE_MANA_NO");
  263. CAST_EDT_CHARGE_CNT = (Number)specChROW.getAttribute("CAST_EDT_CHARGE_CNT");
  264. }
  265. PosParameter param8 = new PosParameter();
  266. param8.setWhereClauseParameter(0, ChargeNo);
  267. PosRowSet chComVo = this.getDao("mesdao").find("UIG020020_CH_COM.select", param8);
  268. String BefProg = null;
  269. String CurrProg = null;
  270. String ChargeStat = null;
  271. Number TapWgt = null;
  272. if (chComVo.hasNext()) {
  273. PosRow chComROW = chComVo.next();
  274. CurrProg = (String)chComROW.getAttribute("CUR_PROG_CD");
  275. BefProg = (String)chComROW.getAttribute("BEF_PROG_CD");
  276. ChargeStat = (String)chComROW.getAttribute("CHARGE_STAT");
  277. TapWgt = (Number)chComROW.getAttribute("BOF_TAPPING_WGT");
  278. if (ChargeStat != null && ChargeStat.equals("2")) {
  279. if (CurrProg != null) {
  280. if (CurrProg.equals("JRF")) {
  281. CurrProg = "JLF";
  282. BefProg = "JRF";
  283. } else if (CurrProg.equals("JLF")) {
  284. CurrProg = "JLF";
  285. } else if (!CurrProg.equals("JJB")) {
  286. BefProg = CurrProg;
  287. CurrProg = "JLF";
  288. }
  289. } else {
  290. CurrProg = "JLF";
  291. BefProg = "JBB";
  292. }
  293. PosParameter param9 = new PosParameter();
  294. param9.setValueParamter(0, CurrProg );
  295. param9.setValueParamter(1, "UIG020050");
  296. param9.setValueParamter(2, BefProg);
  297. param9.setValueParamter(3, TapWgt);
  298. param9.setValueParamter(4, wgt);
  299. param9.setValueParamter(5, lfNo);
  300. param9.setValueParamter(6, ChargeNo );
  301. this.getDao("mesdao").update("UIG020050_CH_COM.update", param9);
  302. }
  303. } else {
  304. PosParameter param10 = new PosParameter();
  305. param10.setValueParamter(0, ChargeNo );
  306. param10.setValueParamter(1, CHARGE_MANA_NO );
  307. param10.setValueParamter(2, STL_GRD );
  308. param10.setValueParamter(3, PRODNM_CD );
  309. param10.setValueParamter(4, LINE_PROC_CD );
  310. param10.setValueParamter(5, HCR_CLF );
  311. param10.setValueParamter(6, SPEC_ABBSYM );
  312. param10.setValueParamter(7, CAST_MANA_NO );
  313. param10.setValueParamter(8, CAST_CHARGE_SEQ);
  314. param10.setValueParamter(9, CAST_EDT_CHARGE_CNT);
  315. param10.setValueParamter(10, "JLF");
  316. param10.setValueParamter(11, "UIG020040");
  317. param10.setValueParamter(12, null);
  318. param10.setValueParamter(13, wgt);
  319. param10.setValueParamter(14, lfNo);
  320. this.getDao("mesdao").update("UIG020020_CH_COM.insert", param10);
  321. PosParameter param9 = new PosParameter();
  322. param9.setWhereClauseParameter(0, ChargeNo);
  323. PosRowSet specSlabVo = this.getDao("mesdao").find("NIG020200_SPEC_SLAB.select", param9);
  324. while(specSlabVo.hasNext()) {
  325. PosRow SlabSpecROW = specSlabVo.next();
  326. Number sSlabEdtSeq= (Number)SlabSpecROW.getAttribute("SLAB_EDT_SEQ");
  327. String sPlanSlabNo= (String)SlabSpecROW.getAttribute("SLAB_MANA_NO");
  328. String sStlGrd = (String)SlabSpecROW.getAttribute("STL_GRD");
  329. Number sSlabThk = (Number)SlabSpecROW.getAttribute("SLAB_THK");
  330. Number sSlabWth = (Number)SlabSpecROW.getAttribute("SLAB_WTH");
  331. Number sSlabLen = (Number)SlabSpecROW.getAttribute("SLAB_LEN");
  332. Number sSlabWgt = (Number)SlabSpecROW.getAttribute("SLAB_WGT");
  333. String sProdNmCd = (String)SlabSpecROW.getAttribute("PRODNM_CD");
  334. String sOrdFl = (String)SlabSpecROW.getAttribute("ORD_FL");
  335. String sOrdNo = (String)SlabSpecROW.getAttribute("ORD_NO");
  336. String sOrdSeq = (String)SlabSpecROW.getAttribute("ORD_SEQ");
  337. String sHcrClf = (String)SlabSpecROW.getAttribute("HCR_CLF");
  338. String sSpecAbbsym= (String)SlabSpecROW.getAttribute("SPEC_ABBSYM");
  339. Number ORD_THK = (Number)SlabSpecROW.getAttribute("ORD_THK");
  340. Number ORD_WTH = (Number)SlabSpecROW.getAttribute("ORD_WTH");
  341. Number ORD_LEN = (Number)SlabSpecROW.getAttribute("ORD_LEN");
  342. Number ORD_WGT = (Number)SlabSpecROW.getAttribute("ORD_WGT");
  343. Number COIL_INDIA = (Number)SlabSpecROW.getAttribute("COIL_INDIA");
  344. Number COIL_OUTDIA= (Number)SlabSpecROW.getAttribute("COIL_OUTDIA");
  345. String sSlabSeq = sPlanSlabNo.substring(10,13);
  346. String sSlabNo = ChargeNo+sSlabSeq;
  347. PosParameter param1 = new PosParameter();
  348. param1.setWhereClauseParameter(0, sSlabNo);
  349. PosRowSet CreatSlabVo = getDao("mesdao").find("NIG020200_CREATE_SLAB.select", param1);
  350. if (!CreatSlabVo.hasNext() ) {
  351. PosParameter param2 = new PosParameter();
  352. param2.setValueParamter(0, sSlabNo );
  353. param2.setValueParamter(1, sPlanSlabNo );
  354. param2.setValueParamter(2, sStlGrd );
  355. param2.setValueParamter(3, sSlabThk );
  356. param2.setValueParamter(4, sSlabWth );
  357. param2.setValueParamter(5, sSlabLen );
  358. param2.setValueParamter(6, sSlabWgt );
  359. param2.setValueParamter(7, sProdNmCd );
  360. param2.setValueParamter(8, sOrdFl );
  361. param2.setValueParamter(9, sOrdNo );
  362. param2.setValueParamter(10, sOrdSeq );
  363. param2.setValueParamter(11, sHcrClf );
  364. param2.setValueParamter(12, sSpecAbbsym );
  365. param2.setValueParamter(13, sOrdFl );
  366. param2.setValueParamter(14, sOrdNo );
  367. param2.setValueParamter(15, sOrdSeq );
  368. param2.setValueParamter(16, ORD_THK );
  369. param2.setValueParamter(17, ORD_WTH );
  370. param2.setValueParamter(18, ORD_LEN );
  371. param2.setValueParamter(19, COIL_INDIA );
  372. param2.setValueParamter(20, COIL_OUTDIA );
  373. param2.setValueParamter(21, ORD_WGT );
  374. getDao("mesdao").update("NIG020200_CREATE_SLAB.insert",param2);
  375. PosParameter param3 = new PosParameter();
  376. param3.setWhereClauseParameter(0, sSlabEdtSeq);
  377. PosRowSet CreatSlabDVo = getDao("mesdao").find("NIG020200_SPEC_SLAB_D.select", param3);
  378. while( CreatSlabDVo.hasNext()) {
  379. PosRow CreatSlabDROW = CreatSlabDVo.next();
  380. String S_SLAB_CUT_SEQ = (String)CreatSlabDROW.getAttribute("SLAB_CUT_SEQ");
  381. Number S_SLAB_THK = (Number)CreatSlabDROW.getAttribute("SLAB_THK");
  382. Number S_SLAB_WTH = (Number)CreatSlabDROW.getAttribute("SLAB_WTH");
  383. Number S_SLAB_LEN = (Number)CreatSlabDROW.getAttribute("SLAB_LEN");
  384. //Number S_SLAB_WGT = (Number)CreatSlabDROW.getAttribute("SLAB_WGT");
  385. Number S_ORD_THK = (Number)CreatSlabDROW.getAttribute("ORD_THK");
  386. Number S_ORD_WTH = (Number)CreatSlabDROW.getAttribute("ORD_WTH");
  387. Number S_ORD_LEN = (Number)CreatSlabDROW.getAttribute("ORD_LEN");
  388. Number S_ORD_WGT = (Number)CreatSlabDROW.getAttribute("ORD_WGT");
  389. Number S_COIL_INDIA = (Number)CreatSlabDROW.getAttribute("COIL_INDIA");
  390. Number S_COIL_OUTDIA = (Number)CreatSlabDROW.getAttribute("COIL_OUTDIA");
  391. String S_ORD_NO = (String)CreatSlabDROW.getAttribute("ORD_NO");
  392. String S_ORD_SEQ = (String)CreatSlabDROW.getAttribute("ORD_SEQ");
  393. String S_ORD_FL = (String)CreatSlabDROW.getAttribute("ORD_FL");
  394. PosParameter param5 = new PosParameter();
  395. param5.setWhereClauseParameter(0, sSlabNo);
  396. PosRowSet SalbDVo = getDao("mesdao").find("NIG020200_CREATE_SLAB_D.select", param5);
  397. if (!SalbDVo.hasNext()) {
  398. PosParameter param4 = new PosParameter();
  399. param4.setValueParamter(0, sSlabNo );
  400. param4.setValueParamter(1, S_SLAB_CUT_SEQ );
  401. param4.setValueParamter(2, S_SLAB_THK );
  402. param4.setValueParamter(3, S_SLAB_WTH );
  403. param4.setValueParamter(4, S_SLAB_LEN );
  404. param4.setValueParamter(5, S_ORD_THK );
  405. param4.setValueParamter(6, S_ORD_WTH );
  406. param4.setValueParamter(7, S_ORD_LEN );
  407. param4.setValueParamter(8, S_ORD_WGT );
  408. param4.setValueParamter(9, S_COIL_INDIA );
  409. param4.setValueParamter(10, S_COIL_OUTDIA );
  410. param4.setValueParamter(11, S_ORD_NO );
  411. param4.setValueParamter(12, S_ORD_SEQ );
  412. param4.setValueParamter(13, S_ORD_FL );
  413. getDao("mesdao").update("NIG020200_CREATE_SLAB_D.insert",param4);
  414. }
  415. }
  416. }
  417. }
  418. }
  419. SendProg_NIE012070(PlanChNo,BefProg,wgt);
  420. SendProg_NIE012080();
  421. }
  422. public PosContext SendProg_NIE012070(String ChargeNo,String BefProg,BigDecimal wgt )
  423. {
  424. // BigDecimal wgt = new BigDecimal();
  425. PosContext context = new PosContext();
  426. PosMessage message = new PosMESMessageImpl();
  427. String TcId = "NIE012070";
  428. message.setTCID(TcId);
  429. message.setObject("MSG_ID",TcId);
  430. message.setObject("BEF_ORD_NO",null);
  431. message.setObject("BEF_ORD_SEQ",null);
  432. message.setObject("ORD_NO",null);
  433. message.setObject("ORD_SEQ",null);
  434. message.setObject("BEF_PROG_CD",BefProg);
  435. message.setObject("PROG_CD","JLF");
  436. message.setObject("MAT_TYPE","CH");
  437. message.setObject("MAT_NO",ChargeNo);
  438. message.setObject("WGT", wgt );
  439. message.setObject("PGMID","UIG020030");
  440. message.setObject("REG_ID","UIG020030");
  441. message.setTCID(TcId);
  442. context.setMessage(message);
  443. String serviceName = "NIE012070";
  444. String SERVICE_POSTFIX = "-service";
  445. context.put(PosBizControlConstants.SERVICE_NAME, serviceName + SERVICE_POSTFIX);
  446. PosBizControlIF controller = PosBizProvider.getController();
  447. controller.doSubController(context,false);
  448. logger.logInfo("XinSaveBofResult---> NIE012070 TC SendProgress end" );
  449. return null;
  450. }
  451. public PosContext SendProg_NIE012080()
  452. {
  453. logger.logInfo("XinSaveBofResult SendProg_NIE012080 " );
  454. PosContext context = new PosContext();
  455. PosMessage message = new PosMESMessageImpl();
  456. String TcId = "NIE012080";
  457. message.setTCID(TcId);
  458. message.setObject("MSG_ID",TcId);
  459. message.setObject("AA",null);
  460. message.setTCID(TcId);
  461. context.setMessage(message);
  462. // this.processComponent(PosConstants.CREATE_MESSAGE, context);
  463. // String transactionCode = context.getMessage().getTC();
  464. String serviceName = "NIE012080";
  465. String SERVICE_POSTFIX = "-service";
  466. context.put(PosBizControlConstants.SERVICE_NAME, serviceName + SERVICE_POSTFIX);
  467. // context.setMessage(message);
  468. PosBizControlIF controller = PosBizProvider.getController();
  469. controller.doSubController(context,false);
  470. logger.logInfo("XinSaveBofResult---> NIE012080 TC SendProgress end" );
  471. return null;
  472. }
  473. }