0f46162076c0aa40e7ec309470ae43deae0a25cf.svn-base 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. package xin.glue.nui.D.D04;
  2. import java.math.BigDecimal;
  3. import java.text.DecimalFormat;
  4. import java.util.HashMap;
  5. import java.util.Map;
  6. import com.posdata.glue.PosException;
  7. import com.posdata.glue.biz.activity.PosActivity;
  8. import com.posdata.glue.biz.constants.PosBizControlConstants;
  9. import com.posdata.glue.biz.control.PosBizProvider;
  10. import com.posdata.glue.context.PosContext;
  11. import com.posdata.glue.dao.vo.PosParameter;
  12. import com.posdata.glue.dao.vo.PosRow;
  13. import com.posdata.glue.dao.vo.PosRowSet;
  14. import com.posdata.glue.msg.PosMESMessageImpl;
  15. import com.posdata.glue.msg.PosMessage;
  16. public class CustomInsertChargeSpec extends PosActivity {
  17. public String runActivity(PosContext context) {
  18. // TBF01_SPEC_CAST(Cast Spec)
  19. String sDb_CastEdtSeq = null ; //CAST_EDT_SEQ
  20. String sDb_CastManaNo = null ; //CAST_MANA_NO
  21. //String sDb_ChgCastManaNo = null ; //CHG_CAST_MANA_NO
  22. //String sDb_CcmWrkstrDtime = null ; //CCM_WRKSTR_DTIME
  23. //String sDb_CcmWrkendDtime = null ; //CCM_WRKEND_DTIME
  24. //String sDb_Fl = null ; //FL
  25. //String sDb_RegDtime = null ; //REG_DTIME
  26. //String sDb_RegId = null ; //REG_ID
  27. //String sDb_ModDtime = null ; //MOD_DTIME
  28. //String sDb_ModId = null ; //MOD_ID
  29. // TBF01_SPEC_CHARGE
  30. String sDb_ChargeEdtSeq = null ; //CHARGE_EDT_SEQ
  31. String sDb_ChargeManaNo = null ; //CHARGE_MANA_NO
  32. //String sDb_CastEdtSeq = null ; //CAST_EDT_SEQ
  33. //String sDb_CastManaNo = null ; //CAST_MANA_NO
  34. String sDb_CastChargeSeq = null ; //CAST_CHARGE_SEQ
  35. String sDb_CastEdtChargeCnt = null ; //CAST_EDT_CHARGE_CNT
  36. String sDb_ProdnmCd = null ; //PRODNM_CD
  37. String sDb_StlGrd = null ; //STL_GRD
  38. String sDb_StlGrpCd = null ; //STL_GRP_CD
  39. String sDb_ChargeRt = null ; //CHARGE_RT
  40. String sDb_SpecAbbsym = null ; //SPEC_ABBSYM
  41. String sDb_TreatRtCd = null ; //TREAT_RT_CD
  42. String sDb_PathProcCd = null ; //PATH_PROC_CD
  43. String sDb_PathMillCd = null ; //PATH_MILL_CD
  44. String sDb_LineProcCd = null ; //LINE_PROC_CD
  45. String sDb_CcmThk = null ; //CCM_THK
  46. String sDb_CcmWth = null ; //CCM_WTH
  47. String sDb_CcmTme = null ; //CCM_TME
  48. String sDb_WidChgFl = null ; //WID_CHG_FL
  49. String sDb_OrdSlabCnt = null ; //ORD_SLAB_CNT
  50. String sDb_NonordSlabCnt = null ; //NONORD_SLAB_CNT
  51. String sDb_NonordChargeFl = null ; //NONORD_CHARGE_FL
  52. String sDb_SlabCnt = null ; //SLAB_CNT
  53. String sDb_PrevChargeWgt = null ; //PREV_CHARGE_WGT
  54. String sDb_HcrClf = null ; //HCR_CLF
  55. String sDb_EmgmtrNmgClf = null ; //EMGMTR_NMG_CLF
  56. String sDb_SmsDuedate = null ; //SMS_DUEDATE
  57. String sDb_PrcLine = null ; //PRC_LINE
  58. String sDb_CcmPrcLine = null ; //CCM_PRC_LINE
  59. String sDb_TdNo = null ; //TD_NO
  60. String sDb_MdNo1 = null ; //MD_NO1
  61. String sDb_MdNo2 = null ; //MD_NO2
  62. String sDb_TdUseCnt = null ; //TD_USE_CNT
  63. String sDb_MdUseCnt1 = null ; //MD_USE_CNT1
  64. String sDb_MdUseCnt2 = null ; //MD_USE_CNT2
  65. String sDb_BofTempTgt = null ; //BOF_TEMP_TGT
  66. String sDb_CasTempTgt = null ; //CAS_TEMP_TGT
  67. String sDb_RhTempTgt = null ; //RH_TEMP_TGT
  68. String sDb_LfTempTgt = null ; //LF_TEMP_TGT
  69. String sDb_TdTempAvg = null ; //TD_TEMP_AVG
  70. String sDb_TdTempMin = null ; //TD_TEMP_MIN
  71. String sDb_TdTempMax = null ; //TD_TEMP_MAX
  72. String sDb_SolideTempTgt1 = null ; //SOLIDE_TEMP_TGT1
  73. String sDb_SolideTempTgt2 = null ; //SOLIDE_TEMP_TGT2
  74. String sDb_CcSpeedAvg1 = null ; //CC_SPEED_AVG1
  75. String sDb_CcSpeedMin1 = null ; //CC_SPEED_MIN1
  76. String sDb_CcSpeedMax1 = null ; //CC_SPEED_MAX1
  77. String sDb_CcSpeedAvg2 = null ; //CC_SPEED_AVG2
  78. String sDb_CcSpeedMin2 = null ; //CC_SPEED_MIN2
  79. String sDb_CcSpeedMax2 = null ; //CC_SPEED_MAX2
  80. String sDb_HmStrDtime = null ; //HM_STR_DTIME
  81. String sDb_BlowStrDtime = null ; //BLOW_STR_DTIME
  82. String sDb_PreBofStrDtime = null ; //PRE_BOF_STR_DTIME
  83. String sDb_PreBofEndDtime = null ; //PRE_BOF_END_DTIME
  84. String sDb_PreCasStrDtime = null ; //PRE_CAS_STR_DTIME
  85. String sDb_PreCasEndDtime = null ; //PRE_CAS_END_DTIME
  86. String sDb_PreRhStrDtime = null ; //PRE_RH_STR_DTIME
  87. String sDb_PreRhEndDtime = null ; //PRE_RH_END_DTIME
  88. String sDb_PreLfStrDtime = null ; //PRE_LF_STR_DTIME
  89. String sDb_PreLfEndDtime = null ; //PRE_LF_END_DTIME
  90. String sDb_PreCcmStrDtime = null ; //PRE_CCM_STR_DTIME
  91. String sDb_PreCcmEndDtime = null ; //PRE_CCM_END_DTIME
  92. String sDb_ProgCd = null ; //PROG_CD
  93. String sDb_StatusCd = null ; //STATUS_CD
  94. String sDb_MillFl = null ; //MILL_FL
  95. String sDb_Fl = null ; //FL
  96. String sDb_ReschCauseCd = null ; //RESCH_CAUSE_CD
  97. String sDb_ReschDtime = null ; //RESCH_DTIME
  98. String sDb_ReschId = null ; //RESCH_ID
  99. String sDb_RegDtime = null ; //REG_DTIME
  100. String sDb_RegId = null ; //REG_ID
  101. String sDb_ModDtime = null ; //MOD_DTIME
  102. String sDb_ModId = null ; //MOD_ID
  103. // TBF01_CHARGE_IDX
  104. String sDb_OrgSeq = null ; //ORG_SEQ
  105. String sDb_ChgSeq = null ; //CHG_SEQ
  106. //String sDb_ChargeEdtSeq = null ; //CHARGE_EDT_SEQ
  107. //String sDb_ChargeManaNo = null ; //CHARGE_MANA_NO
  108. String sDb_ChgChargeManaNo = null ; //CHG_CHARGE_MANA_NO
  109. //String sDb_StatusCd = null ; //STATUS_CD
  110. //String sDb_HcrClf = null ; //HCR_CLF
  111. //String sDb_RegDtime = null ; //REG_DTIME
  112. String sDb_L2Send = null ; //L2_SEND
  113. //String sDb_PrcLine = null ; //PRC_LINE
  114. //String sDb_CcmPrcLine = null ; //CCM_PRC_LINE
  115. // TBF01_SPEC_SLAB
  116. String sDb_SlabEdtSeq = null ; //SLAB_EDT_SEQ
  117. //String sDb_SlabManaNo = null ; //SLAB_MANA_NO
  118. //String sDb_CastEdtSeq = null ; //CAST_EDT_SEQ
  119. //String sDb_CastManaNo = null ; //CAST_MANA_NO
  120. //String sDb_ChargeEdtSeq = null ; //CHARGE_EDT_SEQ
  121. //String sDb_ChargeManaNo = null ; //CHARGE_MANA_NO
  122. //String sDb_ChargeSlabSeq = null ; //CHARGE_SLAB_SEQ
  123. //String sDb_ProdnmCd = null ; //PRODNM_CD
  124. //String sDb_StlGrd = null ; //STL_GRD
  125. //String sDb_StlGrpCd = null ; //STL_GRP_CD
  126. //String sDb_SlabRt = null ; //SLAB_RT
  127. //String sDb_SlabThk = null ; //SLAB_THK
  128. //String sDb_SlabWth = null ; //SLAB_WTH
  129. //String sDb_SlabLen = null ; //SLAB_LEN
  130. //String sDb_SlabLenMin = null ; //SLAB_LEN_MIN
  131. //String sDb_SlabLenMax = null ; //SLAB_LEN_MAX
  132. //String sDb_SlabWthTop = null ; //SLAB_WTH_TOP
  133. //String sDb_SlabWthBot = null ; //SLAB_WTH_BOT
  134. //String sDb_SlabWgt = null ; //SLAB_WGT
  135. //String sDb_CcmCutPreTme = null ; //CCM_CUT_PRE_TME
  136. //String sDb_CcmCutTme = null ; //CCM_CUT_TME
  137. //String sDb_HcrClf = null ; //HCR_CLF
  138. //String sDb_EmgmtrNmgClf = null ; //EMGMTR_NMG_CLF
  139. //String sDb_OverRollYn = null ; //OVER_ROLL_YN
  140. //String sDb_SampleCut = null ; //SAMPLE_CUT
  141. //String sDb_SlabCutCnt = null ; //SLAB_CUT_CNT
  142. //String sDb_OrdFl = null ; //ORD_FL
  143. //String sDb_OrdNo = null ; //ORD_NO
  144. //String sDb_OrdSeq = null ; //ORD_SEQ
  145. //String sDb_OrdThk = null ; //ORD_THK
  146. //String sDb_OrdWth = null ; //ORD_WTH
  147. //String sDb_OrdLen = null ; //ORD_LEN
  148. //String sDb_OrdWgt = null ; //ORD_WGT
  149. //String sDb_CoilIndia = null ; //COIL_INDIA
  150. //String sDb_CoilOutdia = null ; //COIL_OUTDIA
  151. //String sDb_OrdWgtMin = null ; //ORD_WGT_MIN
  152. //String sDb_OrdWgtMax = null ; //ORD_WGT_MAX
  153. //String sDb_PackMethod = null ; //PACK_METHOD
  154. //String sDb_DelvReqDate = null ; //DELV_REQ_DATE
  155. //String sDb_OrdUseageCd = null ; //ORD_USEAGE_CD
  156. //String sDb_CustCd = null ; //CUST_CD
  157. //String sDb_OrdcustCd = null ; //ORDCUST_CD
  158. //String sDb_SpecAbbsym = null ; //SPEC_ABBSYM
  159. //String sDb_SpmProcYn = null ; //SPM_PROC_YN
  160. //String sDb_ScarpingProcYn = null ; //SCARPING_PROC_YN
  161. //String sDb_KeepwarmYn = null ; //KEEPWARM_YN
  162. //String sDb_StatusCd = null ; //STATUS_CD
  163. //String sDb_MillFl = null ; //MILL_FL
  164. //String sDb_MillSlabEdtSeq = null ; //MILL_SLAB_EDT_SEQ
  165. //String sDb_RegDtime = null ; //REG_DTIME
  166. //String sDb_RegId = null ; //REG_ID
  167. //String sDb_ModDtime = null ; //MOD_DTIME
  168. //String sDb_ModId = null ; //MOD_ID
  169. // TBF01_SPEC_SLAB_D
  170. //String sDb_SlabEdtSeq = null ; //SLAB_EDT_SEQ
  171. //String sDb_SlabCutSeq = null ; //SLAB_CUT_SEQ
  172. //String sDb_SlabThk = null ; //SLAB_THK
  173. //String sDb_SlabWth = null ; //SLAB_WTH
  174. //String sDb_SlabLen = null ; //SLAB_LEN
  175. //String sDb_SlabWgt = null ; //SLAB_WGT
  176. //String sDb_OrdThk = null ; //ORD_THK
  177. //String sDb_OrdWth = null ; //ORD_WTH
  178. //String sDb_OrdLen = null ; //ORD_LEN
  179. //String sDb_OrdWgt = null ; //ORD_WGT
  180. //String sDb_CoilIndia = null ; //COIL_INDIA
  181. //String sDb_CoilOutdia = null ; //COIL_OUTDIA
  182. //String sDb_OrdNo = null ; //ORD_NO
  183. //String sDb_OrdSeq = null ; //ORD_SEQ
  184. //String sDb_OrdFl = null ; //ORD_FL
  185. //String sDb_StatusCd = null ; //STATUS_CD
  186. // Temporary Variables
  187. String sLaneSeq = null ;
  188. String sDb_LaneCd = null ; //LANE_CD
  189. String sDb_PreFix = null ; //PRE_FIX
  190. String sDb_MxLane1Seq = null ; //MX_LANE1_SEQ
  191. String sDb_MxLane2Seq = null ; //MX_LANE2_SEQ
  192. String sDb_MatSpecSeq = null ; //MAT_SPEC_SEQ
  193. String sLaneCdFlag = "00" ;
  194. String P_PGM_ID = "NID040010";
  195. String SERVICE_POSTFIX = "-service";
  196. // for (Iterator iterator = context.entrySet().iterator(); iterator.hasNext();) {
  197. // Map.Entry entry = (Map.Entry) iterator.next();
  198. // System.out.println(entry.getKey() + "=" + entry.getValue());
  199. // }
  200. //
  201. PosRowSet rs = (PosRowSet)context.get("CastSpecResult");
  202. PosRow row = null;
  203. Map map = new HashMap();
  204. rs.reset();
  205. if( rs.hasNext() ) {
  206. row = rs.next();
  207. map = row.getAttributes();
  208. sDb_CastEdtSeq = ((BigDecimal)map.get("NX_CAST_EDT_SEQ" )).toString();
  209. sDb_CastManaNo = ((String )map.get("NX_CAST_MANA_NO" )).toString();
  210. //sDb_ChgCastManaNo = ((BigDecimal)map.get("NX_CHG_CAST_MANA_NO")).toString();
  211. sDb_RegDtime = ((String )map.get("CURR_DTIME" )).toString();
  212. sDb_RegId = ((String )map.get("CURR_ID" )).toString();
  213. sDb_ModDtime = ((String )map.get("CURR_DTIME" )).toString();
  214. sDb_ModId = ((String )map.get("CURR_ID" )).toString();
  215. }
  216. rs = (PosRowSet)context.get("ChargeSpecMaxResult");
  217. row = null;
  218. map = new HashMap();
  219. if( rs.hasNext() ) {
  220. row = rs.next();
  221. map = row.getAttributes();
  222. sDb_ChargeEdtSeq = ((BigDecimal)map.get("MX_CHARGE_EDT_SEQ" )).toString();
  223. }
  224. rs = (PosRowSet)context.get("LaneMaxSeq");
  225. row = null;
  226. map = new HashMap();
  227. if( rs.hasNext() ) {
  228. row = rs.next();
  229. map = row.getAttributes();
  230. sDb_PreFix = ((String )map.get("PRE_FIX" )).toString();
  231. sDb_MxLane1Seq = ((BigDecimal)map.get("MX_LANE1_SEQ")).toString();
  232. sDb_MxLane2Seq = ((BigDecimal)map.get("MX_LANE2_SEQ")).toString();
  233. }
  234. rs = (PosRowSet)context.get("ChargeDnResult");
  235. row = null;
  236. map = new HashMap();
  237. PosParameter param = null;
  238. while(rs.hasNext()){
  239. row = rs.next();
  240. map = row.getAttributes();
  241. sDb_MatSpecSeq = ((String )map.get("MAT_SPEC_SEQ" )).toString() ; //MAT_SPEC_SEQ(=CHARGE_NO)
  242. sDb_LaneCd = ((String )map.get("LANE_CD" )).toString() ; //LANE_CD
  243. if( "1".equals(sDb_LaneCd) ) {
  244. // if("0".equals(sDb_MxLane1Seq))
  245. // {
  246. // sDb_MxLane1Seq = String.valueOf(Integer
  247. // .parseInt(sDb_MxLane1Seq) + 499); //寧뵀짱욜쾨짱뵀긴뫘(미땍속500) 20191230--wl
  248. // }
  249. sDb_MxLane1Seq = String.valueOf( Integer.parseInt(sDb_MxLane1Seq) + 1 );
  250. sLaneSeq = new DecimalFormat("00000").format(Integer.parseInt(sDb_MxLane1Seq));
  251. if( "0".equals(sLaneCdFlag.substring(0, 1)) ) {
  252. sLaneCdFlag = sDb_LaneCd + sLaneCdFlag.substring(1);
  253. }
  254. } else if( "2".equals(sDb_LaneCd) ) {
  255. /* 20191231*/
  256. if("0".equals(sDb_MxLane2Seq))
  257. {
  258. sDb_MxLane2Seq = String.valueOf(Integer
  259. .parseInt(sDb_MxLane2Seq) + 499); //랗뵀짱욜쾨짱뵀긴뫘(미땍속500) 20151230--wl
  260. }
  261. sDb_MxLane2Seq = String.valueOf( Integer.parseInt(sDb_MxLane2Seq) + 1 );
  262. sLaneSeq = new DecimalFormat("00000").format(Integer.parseInt(sDb_MxLane2Seq));
  263. if( "0".equals(sLaneCdFlag.substring(1)) ) {
  264. sLaneCdFlag = sLaneCdFlag.substring(0, 1) + sDb_LaneCd;
  265. }
  266. } else {
  267. continue;
  268. }
  269. sDb_ChargeEdtSeq = String.valueOf( Integer.parseInt(sDb_ChargeEdtSeq) + 1 ); //CHARGE_EDT_SEQ
  270. sDb_ChargeManaNo = sDb_PreFix + sDb_LaneCd + "-" + sLaneSeq + "A" ; //CHARGE_MANA_NO
  271. //sDb_CastEdtSeq = sDb_CastEdtSeq ; //CAST_EDT_SEQ
  272. //sDb_CastManaNo = sDb_CastManaNo ; //CAST_MANA_NO
  273. sDb_CastChargeSeq = ((BigDecimal)map.get("CAST_CHARGE_SEQ" )).toString() ; //CAST_CHARGE_SEQ
  274. sDb_CastEdtChargeCnt = ((BigDecimal)map.get("CAST_EDT_CHARGE_CNT")).toString() ; //CAST_EDT_CHARGE_CNT
  275. sDb_ProdnmCd = ((String )map.get("PRODNM_CD" )).toString() ; //PRODNM_CD
  276. sDb_StlGrd = ((String )map.get("STL_GRD" )).toString() ; //STL_GRD
  277. sDb_StlGrpCd = ((String )map.get("STL_GRP_CD" )).toString() ; //STL_GRP_CD
  278. sDb_ChargeRt = ((String )map.get("CHARGE_RT" )).toString() ; //CHARGE_RT
  279. sDb_SpecAbbsym = ((String )map.get("SPEC_ABBSYM" )).toString() ; //SPEC_ABBSYM
  280. sDb_TreatRtCd = ((String )map.get("TREAT_RT_CD" )).toString() ; //TREAT_RT_CD
  281. sDb_PathProcCd = ((String )map.get("PATH_PROC_CD" )).toString() ; //PATH_PROC_CD
  282. sDb_PathMillCd = "" ; //PATH_MILL_CD
  283. sDb_LineProcCd = ((String )map.get("LANE_PROC_CD" )).toString() ; //LINE_PROC_CD
  284. sDb_CcmThk = ((BigDecimal)map.get("CCM_THK" )).toString() ; //CCM_THK
  285. sDb_CcmWth = ((BigDecimal)map.get("CCM_WTH" )).toString() ; //CCM_WTH
  286. sDb_CcmTme = "0" ; //CCM_TME
  287. sDb_WidChgFl = "N" ; //WID_CHG_FL
  288. sDb_OrdSlabCnt = ((BigDecimal)map.get("ORD_SLAB_CNT" )).toString() ; //ORD_SLAB_CNT
  289. sDb_NonordSlabCnt = ((BigDecimal)map.get("NONORD_SLAB_CNT" )).toString() ; //NONORD_SLAB_CNT
  290. sDb_NonordChargeFl = ((String )map.get("NONORD_CHARGE_FL" )).toString() ; //NONORD_CHARGE_FL
  291. sDb_SlabCnt = ((BigDecimal)map.get("SLAB_CNT" )).toString() ; //SLAB_CNT
  292. sDb_PrevChargeWgt = ((BigDecimal)map.get("PREV_CHARGE_WGT" )).toString() ; //PREV_CHARGE_WGT
  293. sDb_HcrClf = ((String )map.get("HCR_CLF" )).toString() ; //HCR_CLF
  294. sDb_EmgmtrNmgClf = ((String )map.get("EMGMTR_NMG_CLF" )).toString() ; //EMGMTR_NMG_CLF
  295. sDb_SmsDuedate = "" ; //SMS_DUEDATE
  296. sDb_PrcLine = ((String )map.get("LANE_CD" )).toString() ; //PRC_LINE
  297. sDb_CcmPrcLine = ((String )map.get("LANE_CD" )).toString() ; //CCM_PRC_LINE
  298. sDb_TdNo = "" ; //TD_NO
  299. sDb_MdNo1 = "0" ; //MD_NO1
  300. sDb_MdNo2 = "0" ; //MD_NO2
  301. sDb_TdUseCnt = "0" ; //TD_USE_CNT
  302. sDb_MdUseCnt1 = "0" ; //MD_USE_CNT1
  303. sDb_MdUseCnt2 = "0" ; //MD_USE_CNT2
  304. sDb_BofTempTgt = ((BigDecimal)map.get("BOF_TEMP_TGT" )).toString() ; //BOF_TEMP_TGT
  305. sDb_CasTempTgt = ((BigDecimal)map.get("CAS_TEMP_TGT" )).toString() ; //CAS_TEMP_TGT
  306. sDb_RhTempTgt = ((BigDecimal)map.get("RH_TEMP_TGT" )).toString() ; //RH_TEMP_TGT
  307. sDb_LfTempTgt = ((BigDecimal)map.get("LF_TEMP_TGT" )).toString() ; //LF_TEMP_TGT
  308. sDb_TdTempAvg = ((BigDecimal)map.get("TD_TEMP_AVG" )).toString() ; //TD_TEMP_AVG
  309. sDb_TdTempMin = ((BigDecimal)map.get("TD_TEMP_MIN" )).toString() ; //TD_TEMP_MIN
  310. sDb_TdTempMax = ((BigDecimal)map.get("TD_TEMP_MAX" )).toString() ; //TD_TEMP_MAX
  311. sDb_SolideTempTgt1 = ((BigDecimal)map.get("SOLIDE_TEMP_TGT1" )).toString() ; //SOLIDE_TEMP_TGT1
  312. sDb_SolideTempTgt2 = ((BigDecimal)map.get("SOLIDE_TEMP_TGT2" )).toString() ; //SOLIDE_TEMP_TGT2
  313. sDb_CcSpeedAvg1 = "0" ; //CC_SPEED_AVG1
  314. sDb_CcSpeedMin1 = "0" ; //CC_SPEED_MIN1
  315. sDb_CcSpeedMax1 = "0" ; //CC_SPEED_MAX1
  316. sDb_CcSpeedAvg2 = "0" ; //CC_SPEED_AVG2
  317. sDb_CcSpeedMin2 = "0" ; //CC_SPEED_MIN2
  318. sDb_CcSpeedMax2 = "0" ; //CC_SPEED_MAX2
  319. sDb_HmStrDtime = "" ; //HM_STR_DTIME
  320. sDb_BlowStrDtime = "" ; //BLOW_STR_DTIME
  321. sDb_PreBofStrDtime = "" ; //PRE_BOF_STR_DTIME
  322. sDb_PreBofEndDtime = "" ; //PRE_BOF_END_DTIME
  323. sDb_PreCasStrDtime = "" ; //PRE_CAS_STR_DTIME
  324. sDb_PreCasEndDtime = "" ; //PRE_CAS_END_DTIME
  325. sDb_PreRhStrDtime = "" ; //PRE_RH_STR_DTIME
  326. sDb_PreRhEndDtime = "" ; //PRE_RH_END_DTIME
  327. sDb_PreLfStrDtime = "" ; //PRE_LF_STR_DTIME
  328. sDb_PreLfEndDtime = "" ; //PRE_LF_END_DTIME
  329. sDb_PreCcmStrDtime = "" ; //PRE_CCM_STR_DTIME
  330. sDb_PreCcmEndDtime = "" ; //PRE_CCM_END_DTIME
  331. sDb_ProgCd = "JBA" ; //PROG_CD
  332. sDb_StatusCd = "A" ; //STATUS_CD
  333. sDb_MillFl = "N" ; //MILL_FL
  334. sDb_Fl = "" ; //FL
  335. sDb_ReschCauseCd = "" ; //RESCH_CAUSE_CD
  336. sDb_ReschDtime = "" ; //RESCH_DTIME
  337. sDb_ReschId = "" ; //RESCH_ID
  338. //sDb_RegDtime = sDb_RegDtime ; //REG_DTIME
  339. //sDb_RegId = sDb_RegId ; //REG_ID
  340. //sDb_ModDtime = sDb_ModDtime ; //MOD_DTIME
  341. //sDb_ModId = sDb_ModId ; //MOD_ID
  342. param = new PosParameter();
  343. param.setValueParamter( 0, sDb_ChargeEdtSeq ); //CHARGE_EDT_SEQ
  344. param.setValueParamter( 1, sDb_ChargeManaNo ); //CHARGE_MANA_NO
  345. param.setValueParamter( 2, sDb_CastEdtSeq ); //CAST_EDT_SEQ
  346. param.setValueParamter( 3, sDb_CastManaNo ); //CAST_MANA_NO
  347. param.setValueParamter( 4, sDb_CastChargeSeq ); //CAST_CHARGE_SEQ
  348. param.setValueParamter( 5, sDb_CastEdtChargeCnt ); //CAST_EDT_CHARGE_CNT
  349. param.setValueParamter( 6, sDb_ProdnmCd ); //PRODNM_CD
  350. param.setValueParamter( 7, sDb_StlGrd ); //STL_GRD
  351. param.setValueParamter( 8, sDb_StlGrpCd ); //STL_GRP_CD
  352. param.setValueParamter( 9, sDb_ChargeRt ); //CHARGE_RT
  353. param.setValueParamter( 10, sDb_SpecAbbsym ); //SPEC_ABBSYM
  354. param.setValueParamter( 11, sDb_TreatRtCd ); //TREAT_RT_CD
  355. param.setValueParamter( 12, sDb_PathProcCd ); //PATH_PROC_CD
  356. param.setValueParamter( 13, sDb_PathMillCd ); //PATH_MILL_CD
  357. param.setValueParamter( 14, sDb_LineProcCd ); //LINE_PROC_CD
  358. param.setValueParamter( 15, sDb_CcmThk ); //CCM_THK 처음슬라브 두께
  359. param.setValueParamter( 16, sDb_CcmWth ); //CCM_WTH
  360. param.setValueParamter( 17, sDb_CcmTme ); //CCM_TME
  361. param.setValueParamter( 18, sDb_WidChgFl ); //WID_CHG_FL
  362. param.setValueParamter( 19, sDb_OrdSlabCnt ); //ORD_SLAB_CNT
  363. param.setValueParamter( 20, sDb_NonordSlabCnt ); //NONORD_SLAB_CNT
  364. param.setValueParamter( 21, sDb_NonordChargeFl ); //NONORD_CHARGE_FL
  365. param.setValueParamter( 22, sDb_SlabCnt ); //SLAB_CNT
  366. param.setValueParamter( 23, sDb_PrevChargeWgt ); //PREV_CHARGE_WGT
  367. param.setValueParamter( 24, sDb_HcrClf ); //HCR_CLF
  368. param.setValueParamter( 25, sDb_EmgmtrNmgClf ); //EMGMTR_NMG_CLF
  369. param.setValueParamter( 26, sDb_SmsDuedate ); //SMS_DUEDATE
  370. param.setValueParamter( 27, sDb_PrcLine ); //PRC_LINE
  371. param.setValueParamter( 28, sDb_CcmPrcLine ); //CCM_PRC_LINE
  372. param.setValueParamter( 29, sDb_TdNo ); //TD_NO
  373. param.setValueParamter( 30, sDb_MdNo1 ); //MD_NO1
  374. param.setValueParamter( 31, sDb_MdNo2 ); //MD_NO2
  375. param.setValueParamter( 32, sDb_TdUseCnt ); //TD_USE_CNT
  376. param.setValueParamter( 33, sDb_MdUseCnt1 ); //MD_USE_CNT1
  377. param.setValueParamter( 34, sDb_MdUseCnt2 ); //MD_USE_CNT2
  378. param.setValueParamter( 35, sDb_BofTempTgt ); //BOF_TEMP_TGT
  379. param.setValueParamter( 36, sDb_CasTempTgt ); //CAS_TEMP_TGT
  380. param.setValueParamter( 37, sDb_RhTempTgt ); //RH_TEMP_TGT
  381. param.setValueParamter( 38, sDb_LfTempTgt ); //LF_TEMP_TGT
  382. param.setValueParamter( 39, sDb_TdTempAvg ); //TD_TEMP_AVG
  383. param.setValueParamter( 40, sDb_TdTempMin ); //TD_TEMP_MIN
  384. param.setValueParamter( 41, sDb_TdTempMax ); //TD_TEMP_MAX
  385. param.setValueParamter( 42, sDb_SolideTempTgt1 ); //SOLIDE_TEMP_TGT1
  386. param.setValueParamter( 43, sDb_SolideTempTgt2 ); //SOLIDE_TEMP_TGT2
  387. param.setValueParamter( 44, sDb_CcSpeedAvg1 ); //CC_SPEED_AVG1
  388. param.setValueParamter( 45, sDb_CcSpeedMin1 ); //CC_SPEED_MIN1
  389. param.setValueParamter( 46, sDb_CcSpeedMax1 ); //CC_SPEED_MAX1
  390. param.setValueParamter( 47, sDb_CcSpeedAvg2 ); //CC_SPEED_AVG2
  391. param.setValueParamter( 48, sDb_CcSpeedMin2 ); //CC_SPEED_MIN2
  392. param.setValueParamter( 49, sDb_CcSpeedMax2 ); //CC_SPEED_MAX2
  393. param.setValueParamter( 50, sDb_HmStrDtime ); //HM_STR_DTIME
  394. param.setValueParamter( 51, sDb_BlowStrDtime ); //BLOW_STR_DTIME
  395. param.setValueParamter( 52, sDb_PreBofStrDtime ); //PRE_BOF_STR_DTIME
  396. param.setValueParamter( 53, sDb_PreBofEndDtime ); //PRE_BOF_END_DTIME
  397. param.setValueParamter( 54, sDb_PreCasStrDtime ); //PRE_CAS_STR_DTIME
  398. param.setValueParamter( 55, sDb_PreCasEndDtime ); //PRE_CAS_END_DTIME
  399. param.setValueParamter( 56, sDb_PreRhStrDtime ); //PRE_RH_STR_DTIME
  400. param.setValueParamter( 57, sDb_PreRhEndDtime ); //PRE_RH_END_DTIME
  401. param.setValueParamter( 58, sDb_PreLfStrDtime ); //PRE_LF_STR_DTIME
  402. param.setValueParamter( 59, sDb_PreLfEndDtime ); //PRE_LF_END_DTIME
  403. param.setValueParamter( 60, sDb_PreCcmStrDtime ); //PRE_CCM_STR_DTIME
  404. param.setValueParamter( 61, sDb_PreCcmEndDtime ); //PRE_CCM_END_DTIME
  405. param.setValueParamter( 62, sDb_ProgCd ); //PROG_CD
  406. param.setValueParamter( 63, sDb_StatusCd ); //STATUS_CD
  407. param.setValueParamter( 64, sDb_MillFl ); //MILL_FL
  408. param.setValueParamter( 65, sDb_Fl ); //FL
  409. param.setValueParamter( 66, sDb_ReschCauseCd ); //RESCH_CAUSE_CD
  410. param.setValueParamter( 67, sDb_ReschDtime ); //RESCH_DTIME
  411. param.setValueParamter( 68, sDb_ReschId ); //RESCH_ID
  412. param.setValueParamter( 69, sDb_RegDtime ); //REG_DTIME
  413. param.setValueParamter( 70, sDb_RegId ); //REG_ID
  414. param.setValueParamter( 71, sDb_ModDtime ); //MOD_DTIME
  415. param.setValueParamter( 72, sDb_ModId ); //MOD_ID
  416. logger.logInfo("Charge Spec PK's(sDb_ChargeEdtSeq) = ["+ sDb_ChargeEdtSeq +"]");
  417. getDao("mesdao").insert("NID040010.ChargeSpec.Row.Insert", param);
  418. sDb_OrgSeq = sDb_ChargeEdtSeq ; //ORG_SEQ
  419. sDb_ChgSeq = sDb_ChargeEdtSeq ; //CHG_SEQ
  420. //sDb_ChargeEdtSeq = null ; //CHARGE_EDT_SEQ
  421. //sDb_ChargeManaNo = null ; //CHARGE_MANA_NO
  422. sDb_ChgChargeManaNo = sDb_ChargeManaNo ; //CHG_CHARGE_MANA_NO
  423. //sDb_StatusCd = null ; //STATUS_CD
  424. //sDb_HcrClf = null ; //HCR_CLF
  425. //sDb_RegDtime = null ; //REG_DTIME
  426. sDb_L2Send = "N" ; //L2_SEND
  427. //sDb_PrcLine = null ; //PRC_LINE
  428. //sDb_CcmPrcLine = null ; //CCM_PRC_LINE
  429. param = new PosParameter();
  430. param.setValueParamter( 0, sDb_OrgSeq ); //ORG_SEQ
  431. param.setValueParamter( 1, sDb_ChgSeq ); //CHG_SEQ
  432. param.setValueParamter( 2, sDb_ChargeEdtSeq ); //CHARGE_EDT_SEQ
  433. param.setValueParamter( 3, sDb_ChargeManaNo ); //CHARGE_MANA_NO
  434. param.setValueParamter( 4, sDb_ChgChargeManaNo ); //CHG_CHARGE_MANA_NO
  435. param.setValueParamter( 5, sDb_StatusCd ); //STATUS_CD
  436. param.setValueParamter( 6, sDb_HcrClf ); //HCR_CLF
  437. param.setValueParamter( 7, sDb_RegDtime ); //REG_DTIME
  438. param.setValueParamter( 8, sDb_L2Send ); //L2_SEND
  439. param.setValueParamter( 9, sDb_PrcLine ); //PRC_LINE
  440. param.setValueParamter( 10, sDb_CcmPrcLine ); //CCM_PRC_LINE
  441. logger.logInfo("Charge Index PK's(sDb_OrgSeq) = ["+ sDb_OrgSeq +"]");
  442. logger.logInfo("Charge Spec PK's(sDb_ChargeEdtSeq) = ["+ sDb_ChargeEdtSeq +"]");
  443. getDao("mesdao").insert("NID040010.ChargeIdx.Row.Insert", param);
  444. // 슬라브넣구(차지에 해당하는 슬라브 한 방에)
  445. // 슬라브조합넣구(차지에 해당하는 슬라브+조합슬라브 한 방에)
  446. PosRowSet rs2 = getDao("mesdao").find("NID040010.SlabSpec.MaxPK.Select");
  447. PosRow row2 = null ;
  448. Map map2 = new HashMap();
  449. if( rs2.hasNext() ) {
  450. row2 = rs2.next();
  451. map2 = row2.getAttributes();
  452. sDb_SlabEdtSeq = ((BigDecimal)map2.get("MX_SLAB_EDT_SEQ" )).toString();
  453. }
  454. param = new PosParameter();
  455. param.setValueParamter( 0, sDb_CcmPrcLine ); //CCM_LANE
  456. param.setValueParamter( 1, sDb_StlGrpCd ); //FAC_STL_GRP
  457. param.setValueParamter( 2, sDb_SlabEdtSeq ); //SLAB_EDT_SEQ
  458. param.setValueParamter( 3, sDb_CastEdtSeq ); //CAST_EDT_SEQ
  459. param.setValueParamter( 4, sDb_CastManaNo ); //CAST_MANA_NO
  460. param.setValueParamter( 5, sDb_ChargeEdtSeq ); //CHARGE_EDT_SEQ
  461. param.setValueParamter( 6, sDb_ChargeManaNo ); //CHARGE_MANA_NO
  462. param.setValueParamter( 7, sDb_RegDtime ); //REG_DTIME
  463. param.setValueParamter( 8, sDb_RegId ); //REG_ID
  464. param.setValueParamter( 9, sDb_MatSpecSeq ); //CHARGE_NO
  465. logger.logInfo("Slab Spec Started PK's(sDb_SlabEdtSeq) = ["+ sDb_SlabEdtSeq +"]");
  466. logger.logInfo("Charge Spec PK's(sDb_ChargeEdtSeq) = ["+ sDb_ChargeEdtSeq +"]");
  467. logger.logInfo("Cast Spec PK's(sDb_CastEdtSeq) = ["+ sDb_CastEdtSeq +"]");
  468. getDao("mesdao").insert("NID040010.SlabSpec.All.Insert", param);
  469. param = new PosParameter();
  470. param.setValueParamter( 0, sDb_SlabEdtSeq ); //SLAB_EDT_SEQ
  471. param.setValueParamter( 1, sDb_MatSpecSeq ); //CHARGE_NO
  472. logger.logInfo("Slab Spec-D Started PK's(sDb_SlabEdtSeq) = ["+ sDb_SlabEdtSeq +"]");
  473. logger.logInfo("Slab Design ChargeNo(sDb_MatSpecSeq) = ["+ sDb_MatSpecSeq +"]");
  474. getDao("mesdao").insert("NID040010.SlabDetailSpec.All.Insert", param);
  475. //CALL NIE012070_SaveOrdSts
  476. //NIE012070_CALL(sDb_ChargeManaNo, Long.parseLong(sDb_PrevChargeWgt), sDb_RegId, P_PGM_ID );
  477. } // Ending While Loop(Every Charge row)
  478. ////xin.glue.nui.E.E01.OrdStsMain
  479. ////Calling NIE012080
  480. //context.put(PosBizControlConstants.SERVICE_NAME, "NIE012080" + SERVICE_POSTFIX);
  481. //PosBizProvider.getController().doSubController(context, false);
  482. //xin.glue.nui.F.F01.SMSSchTme
  483. //Calling NIF012180
  484. PosMessage message = new PosMESMessageImpl();
  485. context.setMessage(message);
  486. if( "10".equals(sLaneCdFlag) ) {
  487. sLaneCdFlag = "1";
  488. } else if( "02".equals(sLaneCdFlag) ) {
  489. sLaneCdFlag = "2";
  490. } else if( "12".equals(sLaneCdFlag) ) {
  491. sLaneCdFlag = "3";
  492. }
  493. message.setObject("PRC_LINE", sLaneCdFlag );
  494. message.setObject("L2_SEND" , "N" );
  495. context.put(PosBizControlConstants.SERVICE_NAME, "NIF012180" + SERVICE_POSTFIX);
  496. PosBizProvider.getController().doSubController(context, false);
  497. return PosBizControlConstants.SUCCESS;
  498. }
  499. public PosContext NIE012070_CALL(String V_CHARGE_MANA_NO, long V_WGT, String V_REG_ID, String V_PGM_ID)
  500. {
  501. PosContext context = new PosContext();
  502. PosMessage message = new PosMESMessageImpl();
  503. //SaveOrdSts
  504. String TcId = "NIE012070";
  505. message.setTCID(TcId);
  506. message.setObject("MSG_ID", TcId);
  507. message.setObject("BEF_ORD_NO", "");
  508. message.setObject("BEF_ORD_SEQ", "");
  509. message.setObject("ORD_NO", "");
  510. message.setObject("ORD_SEQ", "");
  511. message.setObject("BEF_PROG_CD", "");
  512. message.setObject("PROG_CD", "JBA");
  513. message.setObject("MAT_TYPE", "CH");
  514. message.setObject("MAT_NO", V_CHARGE_MANA_NO);
  515. message.setObject("WGT", new BigDecimal(V_WGT));
  516. message.setObject("PGMID", V_PGM_ID);
  517. message.setObject("REG_ID", V_REG_ID);
  518. context.setMessage(message);
  519. message.setTCID(TcId);
  520. String SERVICE_POSTFIX = "-service";
  521. context.put(PosBizControlConstants.SERVICE_NAME, TcId + SERVICE_POSTFIX);
  522. PosBizProvider.getController().doSubController(context, false);
  523. String SERVICE_ERR_MSG = (String) context.get("SERVICE_ERR_MSG");
  524. if (SERVICE_ERR_MSG != null)
  525. {
  526. throw new PosException(SERVICE_ERR_MSG);
  527. }
  528. return context;
  529. }
  530. }