| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602 |
- package xin.glue.nui.D.D03;
- import java.math.BigDecimal;
- import java.text.DecimalFormat;
- import java.util.HashMap;
- import java.util.Map;
- import com.posdata.glue.PosException;
- import com.posdata.glue.biz.activity.PosActivity;
- import com.posdata.glue.biz.constants.PosBizControlConstants;
- import com.posdata.glue.biz.control.PosBizProvider;
- import com.posdata.glue.context.PosContext;
- import com.posdata.glue.dao.vo.PosParameter;
- import com.posdata.glue.dao.vo.PosRow;
- import com.posdata.glue.dao.vo.PosRowSet;
- import com.posdata.glue.msg.PosMESMessageImpl;
- import com.posdata.glue.msg.PosMessage;
- public class CustomInsertChargeSpec extends PosActivity {
- public String runActivity(PosContext context) {
-
- // TBF01_SPEC_CAST(Cast Spec)
- String sDb_CastEdtSeq = null ; //CAST_EDT_SEQ
- String sDb_CastManaNo = null ; //CAST_MANA_NO
- //String sDb_ChgCastManaNo = null ; //CHG_CAST_MANA_NO
- //String sDb_CcmWrkstrDtime = null ; //CCM_WRKSTR_DTIME
- //String sDb_CcmWrkendDtime = null ; //CCM_WRKEND_DTIME
- //String sDb_Fl = null ; //FL
- //String sDb_RegDtime = null ; //REG_DTIME
- //String sDb_RegId = null ; //REG_ID
- //String sDb_ModDtime = null ; //MOD_DTIME
- //String sDb_ModId = null ; //MOD_ID
- // TBF01_SPEC_CHARGE
- String sDb_ChargeEdtSeq = null ; //CHARGE_EDT_SEQ
- String sDb_ChargeManaNo = null ; //CHARGE_MANA_NO
- //String sDb_CastEdtSeq = null ; //CAST_EDT_SEQ
- //String sDb_CastManaNo = null ; //CAST_MANA_NO
- String sDb_CastChargeSeq = null ; //CAST_CHARGE_SEQ
- String sDb_CastEdtChargeCnt = null ; //CAST_EDT_CHARGE_CNT
- String sDb_ProdnmCd = null ; //PRODNM_CD
- String sDb_StlGrd = null ; //STL_GRD
- String sDb_StlGrpCd = null ; //STL_GRP_CD
- String sDb_ChargeRt = null ; //CHARGE_RT
- String sDb_SpecAbbsym = null ; //SPEC_ABBSYM
- String sDb_TreatRtCd = null ; //TREAT_RT_CD
- String sDb_PathProcCd = null ; //PATH_PROC_CD
- String sDb_PathMillCd = null ; //PATH_MILL_CD
- String sDb_LineProcCd = null ; //LINE_PROC_CD
- String sDb_CcmThk = null ; //CCM_THK
- String sDb_CcmWth = null ; //CCM_WTH
- String sDb_CcmTme = null ; //CCM_TME
- String sDb_WidChgFl = null ; //WID_CHG_FL
- String sDb_OrdSlabCnt = null ; //ORD_SLAB_CNT
- String sDb_NonordSlabCnt = null ; //NONORD_SLAB_CNT
- String sDb_NonordChargeFl = null ; //NONORD_CHARGE_FL
- String sDb_SlabCnt = null ; //SLAB_CNT
- String sDb_PrevChargeWgt = null ; //PREV_CHARGE_WGT
- String sDb_HcrClf = null ; //HCR_CLF
- String sDb_EmgmtrNmgClf = null ; //EMGMTR_NMG_CLF
- String sDb_SmsDuedate = null ; //SMS_DUEDATE
- String sDb_PrcLine = null ; //PRC_LINE
- String sDb_CcmPrcLine = null ; //CCM_PRC_LINE
- String sDb_TdNo = null ; //TD_NO
- String sDb_MdNo1 = null ; //MD_NO1
- String sDb_MdNo2 = null ; //MD_NO2
- String sDb_TdUseCnt = null ; //TD_USE_CNT
- String sDb_MdUseCnt1 = null ; //MD_USE_CNT1
- String sDb_MdUseCnt2 = null ; //MD_USE_CNT2
- String sDb_BofTempTgt = null ; //BOF_TEMP_TGT
- String sDb_CasTempTgt = null ; //CAS_TEMP_TGT
- String sDb_RhTempTgt = null ; //RH_TEMP_TGT
- String sDb_LfTempTgt = null ; //LF_TEMP_TGT
- String sDb_TdTempAvg = null ; //TD_TEMP_AVG
- String sDb_TdTempMin = null ; //TD_TEMP_MIN
- String sDb_TdTempMax = null ; //TD_TEMP_MAX
- String sDb_SolideTempTgt1 = null ; //SOLIDE_TEMP_TGT1
- String sDb_SolideTempTgt2 = null ; //SOLIDE_TEMP_TGT2
- String sDb_CcSpeedAvg1 = null ; //CC_SPEED_AVG1
- String sDb_CcSpeedMin1 = null ; //CC_SPEED_MIN1
- String sDb_CcSpeedMax1 = null ; //CC_SPEED_MAX1
- String sDb_CcSpeedAvg2 = null ; //CC_SPEED_AVG2
- String sDb_CcSpeedMin2 = null ; //CC_SPEED_MIN2
- String sDb_CcSpeedMax2 = null ; //CC_SPEED_MAX2
- String sDb_HmStrDtime = null ; //HM_STR_DTIME
- String sDb_BlowStrDtime = null ; //BLOW_STR_DTIME
- String sDb_PreBofStrDtime = null ; //PRE_BOF_STR_DTIME
- String sDb_PreBofEndDtime = null ; //PRE_BOF_END_DTIME
- String sDb_PreCasStrDtime = null ; //PRE_CAS_STR_DTIME
- String sDb_PreCasEndDtime = null ; //PRE_CAS_END_DTIME
- String sDb_PreRhStrDtime = null ; //PRE_RH_STR_DTIME
- String sDb_PreRhEndDtime = null ; //PRE_RH_END_DTIME
- String sDb_PreLfStrDtime = null ; //PRE_LF_STR_DTIME
- String sDb_PreLfEndDtime = null ; //PRE_LF_END_DTIME
- String sDb_PreCcmStrDtime = null ; //PRE_CCM_STR_DTIME
- String sDb_PreCcmEndDtime = null ; //PRE_CCM_END_DTIME
- String sDb_ProgCd = null ; //PROG_CD
- String sDb_StatusCd = null ; //STATUS_CD
- String sDb_MillFl = null ; //MILL_FL
- String sDb_Fl = null ; //FL
- String sDb_ReschCauseCd = null ; //RESCH_CAUSE_CD
- String sDb_ReschDtime = null ; //RESCH_DTIME
- String sDb_ReschId = null ; //RESCH_ID
- String sDb_RegDtime = null ; //REG_DTIME
- String sDb_RegId = null ; //REG_ID
- String sDb_ModDtime = null ; //MOD_DTIME
- String sDb_ModId = null ; //MOD_ID
- // TBF01_CHARGE_IDX
- String sDb_OrgSeq = null ; //ORG_SEQ
- String sDb_ChgSeq = null ; //CHG_SEQ
- //String sDb_ChargeEdtSeq = null ; //CHARGE_EDT_SEQ
- //String sDb_ChargeManaNo = null ; //CHARGE_MANA_NO
- String sDb_ChgChargeManaNo = null ; //CHG_CHARGE_MANA_NO
- //String sDb_StatusCd = null ; //STATUS_CD
- //String sDb_HcrClf = null ; //HCR_CLF
- //String sDb_RegDtime = null ; //REG_DTIME
- String sDb_L2Send = null ; //L2_SEND
- //String sDb_PrcLine = null ; //PRC_LINE
- //String sDb_CcmPrcLine = null ; //CCM_PRC_LINE
- String ins_charge_str_dtime = null; // CCM_PRC_LINE
- String ins_charge_end_dtime = null; // CCM_PRC_LINE
-
- // TBF01_SPEC_SLAB
- String sDb_SlabEdtSeq = null ; //SLAB_EDT_SEQ
- //String sDb_SlabManaNo = null ; //SLAB_MANA_NO
- //String sDb_CastEdtSeq = null ; //CAST_EDT_SEQ
- //String sDb_CastManaNo = null ; //CAST_MANA_NO
- //String sDb_ChargeEdtSeq = null ; //CHARGE_EDT_SEQ
- //String sDb_ChargeManaNo = null ; //CHARGE_MANA_NO
- //String sDb_ChargeSlabSeq = null ; //CHARGE_SLAB_SEQ
- //String sDb_ProdnmCd = null ; //PRODNM_CD
- //String sDb_StlGrd = null ; //STL_GRD
- //String sDb_StlGrpCd = null ; //STL_GRP_CD
- //String sDb_SlabRt = null ; //SLAB_RT
- //String sDb_SlabThk = null ; //SLAB_THK
- //String sDb_SlabWth = null ; //SLAB_WTH
- //String sDb_SlabLen = null ; //SLAB_LEN
- //String sDb_SlabLenMin = null ; //SLAB_LEN_MIN
- //String sDb_SlabLenMax = null ; //SLAB_LEN_MAX
- //String sDb_SlabWthTop = null ; //SLAB_WTH_TOP
- //String sDb_SlabWthBot = null ; //SLAB_WTH_BOT
- //String sDb_SlabWgt = null ; //SLAB_WGT
- //String sDb_CcmCutPreTme = null ; //CCM_CUT_PRE_TME
- //String sDb_CcmCutTme = null ; //CCM_CUT_TME
- //String sDb_HcrClf = null ; //HCR_CLF
- //String sDb_EmgmtrNmgClf = null ; //EMGMTR_NMG_CLF
- //String sDb_OverRollYn = null ; //OVER_ROLL_YN
- //String sDb_SampleCut = null ; //SAMPLE_CUT
- //String sDb_SlabCutCnt = null ; //SLAB_CUT_CNT
- //String sDb_OrdFl = null ; //ORD_FL
- //String sDb_OrdNo = null ; //ORD_NO
- //String sDb_OrdSeq = null ; //ORD_SEQ
- //String sDb_OrdThk = null ; //ORD_THK
- //String sDb_OrdWth = null ; //ORD_WTH
- //String sDb_OrdLen = null ; //ORD_LEN
- //String sDb_OrdWgt = null ; //ORD_WGT
- //String sDb_CoilIndia = null ; //COIL_INDIA
- //String sDb_CoilOutdia = null ; //COIL_OUTDIA
- //String sDb_OrdWgtMin = null ; //ORD_WGT_MIN
- //String sDb_OrdWgtMax = null ; //ORD_WGT_MAX
- //String sDb_PackMethod = null ; //PACK_METHOD
- //String sDb_DelvReqDate = null ; //DELV_REQ_DATE
- //String sDb_OrdUseageCd = null ; //ORD_USEAGE_CD
- //String sDb_CustCd = null ; //CUST_CD
- //String sDb_OrdcustCd = null ; //ORDCUST_CD
- //String sDb_SpecAbbsym = null ; //SPEC_ABBSYM
- //String sDb_SpmProcYn = null ; //SPM_PROC_YN
- //String sDb_ScarpingProcYn = null ; //SCARPING_PROC_YN
- //String sDb_KeepwarmYn = null ; //KEEPWARM_YN
- //String sDb_StatusCd = null ; //STATUS_CD
- //String sDb_MillFl = null ; //MILL_FL
- //String sDb_MillSlabEdtSeq = null ; //MILL_SLAB_EDT_SEQ
- //String sDb_RegDtime = null ; //REG_DTIME
- //String sDb_RegId = null ; //REG_ID
- //String sDb_ModDtime = null ; //MOD_DTIME
- //String sDb_ModId = null ; //MOD_ID
- // TBF01_SPEC_SLAB_D
- //String sDb_SlabEdtSeq = null ; //SLAB_EDT_SEQ
- //String sDb_SlabCutSeq = null ; //SLAB_CUT_SEQ
- //String sDb_SlabThk = null ; //SLAB_THK
- //String sDb_SlabWth = null ; //SLAB_WTH
- //String sDb_SlabLen = null ; //SLAB_LEN
- //String sDb_SlabWgt = null ; //SLAB_WGT
- //String sDb_OrdThk = null ; //ORD_THK
- //String sDb_OrdWth = null ; //ORD_WTH
- //String sDb_OrdLen = null ; //ORD_LEN
- //String sDb_OrdWgt = null ; //ORD_WGT
- //String sDb_CoilIndia = null ; //COIL_INDIA
- //String sDb_CoilOutdia = null ; //COIL_OUTDIA
- //String sDb_OrdNo = null ; //ORD_NO
- //String sDb_OrdSeq = null ; //ORD_SEQ
- //String sDb_OrdFl = null ; //ORD_FL
- //String sDb_StatusCd = null ; //STATUS_CD
-
- // Temporary Variables
- String sLaneSeq = null ;
- String sDb_LaneCd = null ; //LANE_CD
- String sDb_PreFix = null ; //PRE_FIX
- String sDb_MxLane1Seq = null ; //MX_LANE1_SEQ
- String sDb_MxLane2Seq = null ; //MX_LANE2_SEQ
- String sDb_MatSpecSeq = null ; //MAT_SPEC_SEQ
- String sLaneCdFlag = "00" ;
- String P_PGM_ID = "NID030010";
- String SERVICE_POSTFIX = "-service";
-
- // for (Iterator iterator = context.entrySet().iterator(); iterator.hasNext();) {
- // Map.Entry entry = (Map.Entry) iterator.next();
- // System.out.println(entry.getKey() + "=" + entry.getValue());
- // }
- //
- PosRowSet rs = (PosRowSet)context.get("CastSpecResult");
- PosRow row = null;
- Map map = new HashMap();
- rs.reset();
- if( rs.hasNext() ) {
- row = rs.next();
- map = row.getAttributes();
- sDb_CastEdtSeq = ((BigDecimal)map.get("NX_CAST_EDT_SEQ" )).toString();
- sDb_CastManaNo = ((String )map.get("NX_CAST_MANA_NO" )).toString();
- //sDb_ChgCastManaNo = ((BigDecimal)map.get("NX_CHG_CAST_MANA_NO")).toString();
- sDb_RegDtime = ((String )map.get("CURR_DTIME" )).toString();
- sDb_RegId = ((String )map.get("CURR_ID" )).toString();
- sDb_ModDtime = ((String )map.get("CURR_DTIME" )).toString();
- sDb_ModId = ((String )map.get("CURR_ID" )).toString();
- }
- rs = (PosRowSet)context.get("ChargeSpecMaxResult");
- row = null;
- map = new HashMap();
- if( rs.hasNext() ) {
- row = rs.next();
- map = row.getAttributes();
- sDb_ChargeEdtSeq = ((BigDecimal)map.get("MX_CHARGE_EDT_SEQ" )).toString();
- }
-
- rs = (PosRowSet)context.get("LaneMaxSeq");
- row = null;
- map = new HashMap();
- if( rs.hasNext() ) {
- row = rs.next();
- map = row.getAttributes();
- sDb_PreFix = ((String )map.get("PRE_FIX" )).toString();
- sDb_MxLane1Seq = ((BigDecimal)map.get("MX_LANE1_SEQ")).toString();
- sDb_MxLane2Seq = ((BigDecimal)map.get("MX_LANE2_SEQ")).toString();
- }
-
- rs = (PosRowSet)context.get("ChargeDnResult");
- row = null;
- map = new HashMap();
- PosParameter param = null;
-
- while(rs.hasNext()){
- row = rs.next();
- map = row.getAttributes();
- sDb_MatSpecSeq = ((String )map.get("MAT_SPEC_SEQ" )).toString() ; //MAT_SPEC_SEQ(=CHARGE_NO)
- sDb_LaneCd = ((String )map.get("LANE_CD" )).toString() ; //LANE_CD
- if( "1".equals(sDb_LaneCd) ) {
-
- // if("0".equals(sDb_MxLane1Seq))
- // {
- // sDb_MxLane1Seq = String.valueOf(Integer
- // .parseInt(sDb_MxLane1Seq) + 499); //寧뵀짱욜쾨짱뵀긴뫘(미땍속500) 20191230--wl
- // }
- //
- sDb_MxLane1Seq = String.valueOf( Integer.parseInt(sDb_MxLane1Seq) + 1 );
- sLaneSeq = new DecimalFormat("00000").format(Integer.parseInt(sDb_MxLane1Seq));
-
- if( "0".equals(sLaneCdFlag.substring(0, 1)) ) {
- sLaneCdFlag = sDb_LaneCd + sLaneCdFlag.substring(1);
- }
-
- } else if( "2".equals(sDb_LaneCd) ) {
-
-
- /* 20191231*/
- if("0".equals(sDb_MxLane2Seq))
- {
- sDb_MxLane2Seq = String.valueOf(Integer
- .parseInt(sDb_MxLane2Seq) + 499); //랗뵀짱욜쾨짱뵀긴뫘(미땍속500) 20151230--wl
- }
- sDb_MxLane2Seq = String.valueOf( Integer.parseInt(sDb_MxLane2Seq) + 1 );
- sLaneSeq = new DecimalFormat("00000").format(Integer.parseInt(sDb_MxLane2Seq));
- if( "0".equals(sLaneCdFlag.substring(1)) ) {
- sLaneCdFlag = sLaneCdFlag.substring(0, 1) + sDb_LaneCd;
- }
-
- } else {
- continue;
- }
- sDb_ChargeEdtSeq = String.valueOf( Integer.parseInt(sDb_ChargeEdtSeq) + 1 ); //CHARGE_EDT_SEQ
- sDb_ChargeManaNo = sDb_PreFix + sDb_LaneCd + "-" + sLaneSeq + "A" ; //CHARGE_MANA_NO
- //sDb_CastEdtSeq = sDb_CastEdtSeq ; //CAST_EDT_SEQ
- //sDb_CastManaNo = sDb_CastManaNo ; //CAST_MANA_NO
- sDb_CastChargeSeq = ((BigDecimal)map.get("CAST_CHARGE_SEQ" )).toString() ; //CAST_CHARGE_SEQ
- sDb_CastEdtChargeCnt = ((BigDecimal)map.get("CAST_EDT_CHARGE_CNT")).toString() ; //CAST_EDT_CHARGE_CNT
- sDb_ProdnmCd = ((String )map.get("PRODNM_CD" )).toString() ; //PRODNM_CD
- sDb_StlGrd = ((String )map.get("STL_GRD" )).toString() ; //STL_GRD
- sDb_StlGrpCd = ((String )map.get("STL_GRP_CD" )).toString() ; //STL_GRP_CD
- sDb_ChargeRt = ((String )map.get("CHARGE_RT" )).toString() ; //CHARGE_RT
- sDb_SpecAbbsym = ((String )map.get("SPEC_ABBSYM" )).toString() ; //SPEC_ABBSYM
- sDb_TreatRtCd = ((String )map.get("TREAT_RT_CD" )).toString() ; //TREAT_RT_CD
- sDb_PathProcCd = ((String )map.get("PATH_PROC_CD" )).toString() ; //PATH_PROC_CD
- sDb_PathMillCd = "" ; //PATH_MILL_CD
- sDb_LineProcCd = ((String )map.get("LANE_PROC_CD" )).toString() ; //LINE_PROC_CD
- sDb_CcmThk = ((BigDecimal)map.get("CCM_THK" )).toString() ; //CCM_THK
- sDb_CcmWth = ((BigDecimal)map.get("CCM_WTH" )).toString() ; //CCM_WTH
- sDb_CcmTme = "0" ; //CCM_TME
- sDb_WidChgFl = "N" ; //WID_CHG_FL
- sDb_OrdSlabCnt = ((BigDecimal)map.get("ORD_SLAB_CNT" )).toString() ; //ORD_SLAB_CNT
- sDb_NonordSlabCnt = ((BigDecimal)map.get("NONORD_SLAB_CNT" )).toString() ; //NONORD_SLAB_CNT
- sDb_NonordChargeFl = ((String )map.get("NONORD_CHARGE_FL" )).toString() ; //NONORD_CHARGE_FL
- sDb_SlabCnt = ((BigDecimal)map.get("SLAB_CNT" )).toString() ; //SLAB_CNT
- sDb_PrevChargeWgt = ((BigDecimal)map.get("PREV_CHARGE_WGT" )).toString() ; //PREV_CHARGE_WGT
- sDb_HcrClf = ((String )map.get("HCR_CLF" )).toString() ; //HCR_CLF
- sDb_EmgmtrNmgClf = ((String )map.get("EMGMTR_NMG_CLF" )).toString() ; //EMGMTR_NMG_CLF
- sDb_SmsDuedate = "" ; //SMS_DUEDATE
- sDb_PrcLine = ((String )map.get("LANE_CD" )).toString() ; //PRC_LINE
- sDb_CcmPrcLine = ((String )map.get("LANE_CD" )).toString() ; //CCM_PRC_LINE
- sDb_TdNo = "" ; //TD_NO
- sDb_MdNo1 = "0" ; //MD_NO1
- sDb_MdNo2 = "0" ; //MD_NO2
- sDb_TdUseCnt = "0" ; //TD_USE_CNT
- sDb_MdUseCnt1 = "0" ; //MD_USE_CNT1
- sDb_MdUseCnt2 = "0" ; //MD_USE_CNT2
- sDb_BofTempTgt = ((BigDecimal)map.get("BOF_TEMP_TGT" )).toString() ; //BOF_TEMP_TGT
- sDb_CasTempTgt = ((BigDecimal)map.get("CAS_TEMP_TGT" )).toString() ; //CAS_TEMP_TGT
- sDb_RhTempTgt = ((BigDecimal)map.get("RH_TEMP_TGT" )).toString() ; //RH_TEMP_TGT
- sDb_LfTempTgt = ((BigDecimal)map.get("LF_TEMP_TGT" )).toString() ; //LF_TEMP_TGT
- sDb_TdTempAvg = ((BigDecimal)map.get("TD_TEMP_AVG" )).toString() ; //TD_TEMP_AVG
- sDb_TdTempMin = ((BigDecimal)map.get("TD_TEMP_MIN" )).toString() ; //TD_TEMP_MIN
- sDb_TdTempMax = ((BigDecimal)map.get("TD_TEMP_MAX" )).toString() ; //TD_TEMP_MAX
- sDb_SolideTempTgt1 = ((BigDecimal)map.get("SOLIDE_TEMP_TGT1" )).toString() ; //SOLIDE_TEMP_TGT1
- sDb_SolideTempTgt2 = ((BigDecimal)map.get("SOLIDE_TEMP_TGT2" )).toString() ; //SOLIDE_TEMP_TGT2
- sDb_CcSpeedAvg1 = "0" ; //CC_SPEED_AVG1
- sDb_CcSpeedMin1 = "0" ; //CC_SPEED_MIN1
- sDb_CcSpeedMax1 = "0" ; //CC_SPEED_MAX1
- sDb_CcSpeedAvg2 = "0" ; //CC_SPEED_AVG2
- sDb_CcSpeedMin2 = "0" ; //CC_SPEED_MIN2
- sDb_CcSpeedMax2 = "0" ; //CC_SPEED_MAX2
- sDb_HmStrDtime = "" ; //HM_STR_DTIME
- sDb_BlowStrDtime = "" ; //BLOW_STR_DTIME
- sDb_PreBofStrDtime = "" ; //PRE_BOF_STR_DTIME
- sDb_PreBofEndDtime = "" ; //PRE_BOF_END_DTIME
- sDb_PreCasStrDtime = "" ; //PRE_CAS_STR_DTIME
- sDb_PreCasEndDtime = "" ; //PRE_CAS_END_DTIME
- sDb_PreRhStrDtime = "" ; //PRE_RH_STR_DTIME
- sDb_PreRhEndDtime = "" ; //PRE_RH_END_DTIME
- sDb_PreLfStrDtime = "" ; //PRE_LF_STR_DTIME
- sDb_PreLfEndDtime = "" ; //PRE_LF_END_DTIME
- sDb_PreCcmStrDtime = "" ; //PRE_CCM_STR_DTIME
- sDb_PreCcmEndDtime = "" ; //PRE_CCM_END_DTIME
- sDb_ProgCd = "JBA" ; //PROG_CD
- sDb_StatusCd = "A" ; //STATUS_CD
- sDb_MillFl = "N" ; //MILL_FL
- sDb_Fl = "" ; //FL
- sDb_ReschCauseCd = "" ; //RESCH_CAUSE_CD
- sDb_ReschDtime = "" ; //RESCH_DTIME
- sDb_ReschId = "" ; //RESCH_ID
- //sDb_RegDtime = sDb_RegDtime ; //REG_DTIME
- //sDb_RegId = sDb_RegId ; //REG_ID
- //sDb_ModDtime = sDb_ModDtime ; //MOD_DTIME
- //sDb_ModId = sDb_ModId ; //MOD_ID
-
- ins_charge_str_dtime = ((String) map.get("INSCHARGESTRDTIME")).toString(); // PRC_LINE
- ins_charge_end_dtime = ((String) map.get("INSCHARGEENDDTIME")).toString(); // CCM_PRC_LINE
-
- param = new PosParameter();
- param.setValueParamter( 0, sDb_ChargeEdtSeq ); //CHARGE_EDT_SEQ
- param.setValueParamter( 1, sDb_ChargeManaNo ); //CHARGE_MANA_NO
- param.setValueParamter( 2, sDb_CastEdtSeq ); //CAST_EDT_SEQ
- param.setValueParamter( 3, sDb_CastManaNo ); //CAST_MANA_NO
- param.setValueParamter( 4, sDb_CastChargeSeq ); //CAST_CHARGE_SEQ
- param.setValueParamter( 5, sDb_CastEdtChargeCnt ); //CAST_EDT_CHARGE_CNT
- param.setValueParamter( 6, sDb_ProdnmCd ); //PRODNM_CD
- param.setValueParamter( 7, sDb_StlGrd ); //STL_GRD
- param.setValueParamter( 8, sDb_StlGrpCd ); //STL_GRP_CD
- param.setValueParamter( 9, sDb_ChargeRt ); //CHARGE_RT
- param.setValueParamter( 10, sDb_SpecAbbsym ); //SPEC_ABBSYM
- param.setValueParamter( 11, sDb_TreatRtCd ); //TREAT_RT_CD
- param.setValueParamter( 12, sDb_PathProcCd ); //PATH_PROC_CD
- param.setValueParamter( 13, sDb_PathMillCd ); //PATH_MILL_CD
- param.setValueParamter( 14, sDb_LineProcCd ); //LINE_PROC_CD
- param.setValueParamter( 15, sDb_CcmThk ); //CCM_THK 처음슬라브 두께
- param.setValueParamter( 16, sDb_CcmWth ); //CCM_WTH
- param.setValueParamter( 17, sDb_CcmTme ); //CCM_TME
- param.setValueParamter( 18, sDb_WidChgFl ); //WID_CHG_FL
- param.setValueParamter( 19, sDb_OrdSlabCnt ); //ORD_SLAB_CNT
- param.setValueParamter( 20, sDb_NonordSlabCnt ); //NONORD_SLAB_CNT
- param.setValueParamter( 21, sDb_NonordChargeFl ); //NONORD_CHARGE_FL
- param.setValueParamter( 22, sDb_SlabCnt ); //SLAB_CNT
- param.setValueParamter( 23, sDb_PrevChargeWgt ); //PREV_CHARGE_WGT
- param.setValueParamter( 24, sDb_HcrClf ); //HCR_CLF
- param.setValueParamter( 25, sDb_EmgmtrNmgClf ); //EMGMTR_NMG_CLF
- param.setValueParamter( 26, sDb_SmsDuedate ); //SMS_DUEDATE
- param.setValueParamter( 27, sDb_PrcLine ); //PRC_LINE
- param.setValueParamter( 28, sDb_CcmPrcLine ); //CCM_PRC_LINE
- param.setValueParamter( 29, sDb_TdNo ); //TD_NO
- param.setValueParamter( 30, sDb_MdNo1 ); //MD_NO1
- param.setValueParamter( 31, sDb_MdNo2 ); //MD_NO2
- param.setValueParamter( 32, sDb_TdUseCnt ); //TD_USE_CNT
- param.setValueParamter( 33, sDb_MdUseCnt1 ); //MD_USE_CNT1
- param.setValueParamter( 34, sDb_MdUseCnt2 ); //MD_USE_CNT2
- param.setValueParamter( 35, sDb_BofTempTgt ); //BOF_TEMP_TGT
- param.setValueParamter( 36, sDb_CasTempTgt ); //CAS_TEMP_TGT
- param.setValueParamter( 37, sDb_RhTempTgt ); //RH_TEMP_TGT
- param.setValueParamter( 38, sDb_LfTempTgt ); //LF_TEMP_TGT
- param.setValueParamter( 39, sDb_TdTempAvg ); //TD_TEMP_AVG
- param.setValueParamter( 40, sDb_TdTempMin ); //TD_TEMP_MIN
- param.setValueParamter( 41, sDb_TdTempMax ); //TD_TEMP_MAX
- param.setValueParamter( 42, sDb_SolideTempTgt1 ); //SOLIDE_TEMP_TGT1
- param.setValueParamter( 43, sDb_SolideTempTgt2 ); //SOLIDE_TEMP_TGT2
- param.setValueParamter( 44, sDb_CcSpeedAvg1 ); //CC_SPEED_AVG1
- param.setValueParamter( 45, sDb_CcSpeedMin1 ); //CC_SPEED_MIN1
- param.setValueParamter( 46, sDb_CcSpeedMax1 ); //CC_SPEED_MAX1
- param.setValueParamter( 47, sDb_CcSpeedAvg2 ); //CC_SPEED_AVG2
- param.setValueParamter( 48, sDb_CcSpeedMin2 ); //CC_SPEED_MIN2
- param.setValueParamter( 49, sDb_CcSpeedMax2 ); //CC_SPEED_MAX2
- param.setValueParamter( 50, sDb_HmStrDtime ); //HM_STR_DTIME
- param.setValueParamter( 51, sDb_BlowStrDtime ); //BLOW_STR_DTIME
- param.setValueParamter( 52, sDb_PreBofStrDtime ); //PRE_BOF_STR_DTIME
- param.setValueParamter( 53, sDb_PreBofEndDtime ); //PRE_BOF_END_DTIME
- param.setValueParamter( 54, sDb_PreCasStrDtime ); //PRE_CAS_STR_DTIME
- param.setValueParamter( 55, sDb_PreCasEndDtime ); //PRE_CAS_END_DTIME
- param.setValueParamter( 56, sDb_PreRhStrDtime ); //PRE_RH_STR_DTIME
- param.setValueParamter( 57, sDb_PreRhEndDtime ); //PRE_RH_END_DTIME
- param.setValueParamter( 58, sDb_PreLfStrDtime ); //PRE_LF_STR_DTIME
- param.setValueParamter( 59, sDb_PreLfEndDtime ); //PRE_LF_END_DTIME
- param.setValueParamter( 60, sDb_PreCcmStrDtime ); //PRE_CCM_STR_DTIME
- param.setValueParamter( 61, sDb_PreCcmEndDtime ); //PRE_CCM_END_DTIME
- param.setValueParamter( 62, sDb_ProgCd ); //PROG_CD
- param.setValueParamter( 63, sDb_StatusCd ); //STATUS_CD
- param.setValueParamter( 64, sDb_MillFl ); //MILL_FL
- param.setValueParamter( 65, sDb_Fl ); //FL
- param.setValueParamter( 66, sDb_ReschCauseCd ); //RESCH_CAUSE_CD
- param.setValueParamter( 67, sDb_ReschDtime ); //RESCH_DTIME
- param.setValueParamter( 68, sDb_ReschId ); //RESCH_ID
-
- param.setValueParamter( 69, ins_charge_str_dtime ); //REG_DTIME
- param.setValueParamter( 70, ins_charge_end_dtime ); //REG_ID
- param.setValueParamter( 71, sDb_CastManaNo ); //REG_DTIME
- param.setValueParamter( 72, sDb_CastChargeSeq ); //REG_ID
-
- param.setValueParamter( 73, sDb_RegDtime ); //REG_DTIME
- param.setValueParamter( 74, sDb_RegId ); //REG_ID
- param.setValueParamter( 75, sDb_ModDtime ); //MOD_DTIME
- param.setValueParamter( 76, sDb_ModId ); //MOD_ID
- logger.logInfo("Charge Spec PK's(sDb_ChargeEdtSeq) = ["+ sDb_ChargeEdtSeq +"]");
- getDao("mesdao").insert("NID030010.ChargeSpec.Row.Insert", param);
- sDb_OrgSeq = sDb_ChargeEdtSeq ; //ORG_SEQ
- sDb_ChgSeq = sDb_ChargeEdtSeq ; //CHG_SEQ
- //sDb_ChargeEdtSeq = null ; //CHARGE_EDT_SEQ
- //sDb_ChargeManaNo = null ; //CHARGE_MANA_NO
- sDb_ChgChargeManaNo = sDb_ChargeManaNo ; //CHG_CHARGE_MANA_NO
- //sDb_StatusCd = null ; //STATUS_CD
- //sDb_HcrClf = null ; //HCR_CLF
- //sDb_RegDtime = null ; //REG_DTIME
- sDb_L2Send = "N" ; //L2_SEND
- //sDb_PrcLine = null ; //PRC_LINE
- //sDb_CcmPrcLine = null ; //CCM_PRC_LINE
-
- param = new PosParameter();
- param.setValueParamter( 0, sDb_OrgSeq ); //ORG_SEQ
- param.setValueParamter( 1, sDb_ChgSeq ); //CHG_SEQ
- param.setValueParamter( 2, sDb_ChargeEdtSeq ); //CHARGE_EDT_SEQ
- param.setValueParamter( 3, sDb_ChargeManaNo ); //CHARGE_MANA_NO
- param.setValueParamter( 4, sDb_ChgChargeManaNo ); //CHG_CHARGE_MANA_NO
- param.setValueParamter( 5, sDb_StatusCd ); //STATUS_CD
- param.setValueParamter( 6, sDb_HcrClf ); //HCR_CLF
- param.setValueParamter( 7, sDb_RegDtime ); //REG_DTIME
- param.setValueParamter( 8, sDb_L2Send ); //L2_SEND
- param.setValueParamter( 9, sDb_PrcLine ); //PRC_LINE
- param.setValueParamter( 10, sDb_CcmPrcLine ); //CCM_PRC_LINE
-
- logger.logInfo("Charge Index PK's(sDb_OrgSeq) = ["+ sDb_OrgSeq +"]");
- logger.logInfo("Charge Spec PK's(sDb_ChargeEdtSeq) = ["+ sDb_ChargeEdtSeq +"]");
- getDao("mesdao").insert("NID030010.ChargeIdx.Row.Insert", param);
-
- // 슬라브넣구(차지에 해당하는 슬라브 한 방에)
- // 슬라브조합넣구(차지에 해당하는 슬라브+조합슬라브 한 방에)
- PosRowSet rs2 = getDao("mesdao").find("NID030010.SlabSpec.MaxPK.Select");
- PosRow row2 = null ;
- Map map2 = new HashMap();
- if( rs2.hasNext() ) {
- row2 = rs2.next();
- map2 = row2.getAttributes();
- sDb_SlabEdtSeq = ((BigDecimal)map2.get("MX_SLAB_EDT_SEQ" )).toString();
- }
-
- param = new PosParameter();
- param.setValueParamter( 0, sDb_CcmPrcLine ); //CCM_LANE
- param.setValueParamter( 1, sDb_StlGrpCd ); //FAC_STL_GRP
- param.setValueParamter( 2, sDb_SlabEdtSeq ); //SLAB_EDT_SEQ
- param.setValueParamter( 3, sDb_CastEdtSeq ); //CAST_EDT_SEQ
- param.setValueParamter( 4, sDb_CastManaNo ); //CAST_MANA_NO
- param.setValueParamter( 5, sDb_ChargeEdtSeq ); //CHARGE_EDT_SEQ
- param.setValueParamter( 6, sDb_ChargeManaNo ); //CHARGE_MANA_NO
- param.setValueParamter( 7, sDb_RegDtime ); //REG_DTIME
- param.setValueParamter( 8, sDb_RegId ); //REG_ID
- param.setValueParamter( 9, sDb_MatSpecSeq ); //CHARGE_NO
- logger.logInfo("Slab Spec Started PK's(sDb_SlabEdtSeq) = ["+ sDb_SlabEdtSeq +"]");
- logger.logInfo("Charge Spec PK's(sDb_ChargeEdtSeq) = ["+ sDb_ChargeEdtSeq +"]");
- logger.logInfo("Cast Spec PK's(sDb_CastEdtSeq) = ["+ sDb_CastEdtSeq +"]");
- getDao("mesdao").insert("NID030010.SlabSpec.All.Insert", param);
-
- param = new PosParameter();
- param.setValueParamter( 0, sDb_SlabEdtSeq ); //SLAB_EDT_SEQ
- param.setValueParamter( 1, sDb_MatSpecSeq ); //CHARGE_NO
- logger.logInfo("Slab Spec-D Started PK's(sDb_SlabEdtSeq) = ["+ sDb_SlabEdtSeq +"]");
- logger.logInfo("Slab Design ChargeNo(sDb_MatSpecSeq) = ["+ sDb_MatSpecSeq +"]");
- getDao("mesdao").insert("NID030010.SlabDetailSpec.All.Insert", param);
- //CALL NIE012070_SaveOrdSts
- //NIE012070_CALL(sDb_ChargeManaNo, Long.parseLong(sDb_PrevChargeWgt), sDb_RegId, P_PGM_ID );
- } // Ending While Loop(Every Charge row)
- ////xin.glue.nui.E.E01.OrdStsMain
- ////Calling NIE012080
- //context.put(PosBizControlConstants.SERVICE_NAME, "NIE012080" + SERVICE_POSTFIX);
- //PosBizProvider.getController().doSubController(context, false);
- //xin.glue.nui.F.F01.SMSSchTme
- //Calling NIF012180
- PosMessage message = new PosMESMessageImpl();
- context.setMessage(message);
- if( "10".equals(sLaneCdFlag) ) {
- sLaneCdFlag = "1";
- } else if( "02".equals(sLaneCdFlag) ) {
- sLaneCdFlag = "2";
- } else if( "12".equals(sLaneCdFlag) ) {
- sLaneCdFlag = "3";
- }
- message.setObject("PRC_LINE", sLaneCdFlag );
- message.setObject("L2_SEND" , "N" );
-
- context.put(PosBizControlConstants.SERVICE_NAME, "NIF012180" + SERVICE_POSTFIX);
- PosBizProvider.getController().doSubController(context, false);
- return PosBizControlConstants.SUCCESS;
- }
- public PosContext NIE012070_CALL(String V_CHARGE_MANA_NO, long V_WGT, String V_REG_ID, String V_PGM_ID)
- {
- PosContext context = new PosContext();
- PosMessage message = new PosMESMessageImpl();
-
- //SaveOrdSts
- String TcId = "NIE012070";
- message.setTCID(TcId);
- message.setObject("MSG_ID", TcId);
- message.setObject("BEF_ORD_NO", "");
- message.setObject("BEF_ORD_SEQ", "");
- message.setObject("ORD_NO", "");
- message.setObject("ORD_SEQ", "");
- message.setObject("BEF_PROG_CD", "");
- message.setObject("PROG_CD", "JBA");
- message.setObject("MAT_TYPE", "CH");
- message.setObject("MAT_NO", V_CHARGE_MANA_NO);
- message.setObject("WGT", new BigDecimal(V_WGT));
- message.setObject("PGMID", V_PGM_ID);
- message.setObject("REG_ID", V_REG_ID);
- context.setMessage(message);
- message.setTCID(TcId);
-
- String SERVICE_POSTFIX = "-service";
- context.put(PosBizControlConstants.SERVICE_NAME, TcId + SERVICE_POSTFIX);
- PosBizProvider.getController().doSubController(context, false);
-
- String SERVICE_ERR_MSG = (String) context.get("SERVICE_ERR_MSG");
-
- if (SERVICE_ERR_MSG != null)
- {
- throw new PosException(SERVICE_ERR_MSG);
- }
-
- return context;
- }
- }
|