package xin.glue.ui.G.G04; import java.math.BigDecimal; import java.sql.CallableStatement; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; 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.PosBizControlIF; import com.posdata.glue.biz.control.PosBizProvider; import com.posdata.glue.component.PosConstants; 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 XinSaveSlabRecut extends PosActivity { public String runActivity(PosContext context) { String[] REG_ID = (String[])context.get("REG_ID"); String[] ORL_SLAB_NO = (String[])context.get("ORL_SLAB_NO"); String[] REG_SHIP = (String[])context.get("REG_SHIP"); String[] REG_GROUP = (String[])context.get("REG_GROUP"); String[] CUT_CNT = (String[])context.get("CUT_CNT"); String[] CHARGE_NO = (String[])context.get("CHARGE_NO"); String[] MODIFY_CODE = (String[])context.get("MODIFY_CODE"); String[] SLAB_NO = (String[])context.get("SLAB_NO"); String[] SLAB_THK = (String[])context.get("SLAB_THK"); String[] SLAB_WTH = (String[])context.get("SLAB_WTH"); String[] SLAB_LEN = (String[])context.get("SLAB_LEN"); String[] SLAB_WGT = (String[])context.get("SLAB_WGT"); String[] SLAB_SIZE_DEC_GRD = (String[])context.get("SLAB_SIZE_DEC_GRD"); String[] CUR_LOAD_LOC = (String[])context.get("CUR_LOAD_LOC"); String[] ORL_LOAD_LOC = (String[])context.get("ORL_LOAD_LOC"); String[] DSN_SLAB_NO = (String[])context.get("DSN_SLAB_NO"); String[] SUB_DSN_SLAB_NO = (String[])context.get("SUB_DSN_SLAB_NO"); String[] SLAB_CUT_SEQ = (String[])context.get("SLAB_CUT_SEQ"); //磅重 String[] weight_wgt = new String[SLAB_NO.length]; PosParameter param = null; String OrdNo = ""; String OrdSeq = ""; String OrdFl = ""; String CurProgCd = ""; String BefProgCd = ""; String BefOrdNo = ""; String BefOrdSeq = ""; String NonOrdResCd = ""; String NonOrdResDate = ""; String smsYardEntDtime = ""; String slabStockEntDtime = ""; String slabRt = ""; String SLAB_EXT_RZ_TIME = ""; param = new PosParameter(); param.setWhereClauseParameter(0,ORL_SLAB_NO[0]); PosRowSet slabComVo = getDao("mesdao").find("UIG040070_04.select", param); if (slabComVo.hasNext()) { PosRow slabComROW = slabComVo.next(); OrdNo = (String)slabComROW.getAttribute("ORD_NO"); OrdSeq = (String)slabComROW.getAttribute("ORD_SEQ"); CurProgCd = (String)slabComROW.getAttribute("CUR_PROG_CD"); OrdFl = (String)slabComROW.getAttribute("ORD_FL"); smsYardEntDtime = (String)slabComROW.getAttribute("SMS_YARD_ENT_DTIME"); slabStockEntDtime = (String)slabComROW.getAttribute("SLAB_STOCK_ENT_DTIME"); slabRt = (String)slabComROW.getAttribute("SLAB_RT"); SLAB_EXT_RZ_TIME = (String)slabComROW.getAttribute("SLAB_EXT_RZ_TIME"); BefProgCd = CurProgCd; BefOrdNo = OrdNo; BefOrdSeq = OrdSeq; }else{ context.put("MESSAGES", " 错误,缺少板坯信息! "); return PosBizControlConstants.SUCCESS; } if(!(CurProgCd.equals("RBA")||CurProgCd.equals("RRC")||CurProgCd.equals("RGB"))){ context.put("MESSAGES", " 坯料状态错误,不能操作! "); return PosBizControlConstants.SUCCESS; } //区分炼钢热轧入库 if(ORL_LOAD_LOC[0] == "" || ORL_LOAD_LOC[0] == null) { context.put("MESSAGES", " 错误,原坯料无垛位! "); return PosBizControlConstants.SUCCESS; } if(ORL_LOAD_LOC[0].substring(0, 1).equals("L") || ORL_LOAD_LOC[0].substring(0, 1).equals("H")){ DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss"); smsYardEntDtime = formatter.format(new Date()); }else if(ORL_LOAD_LOC[0].substring(0, 1).equals("Z")){ DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss"); slabStockEntDtime = formatter.format(new Date()); }/*else{ context.put("MESSAGES", " 错误,坯料不在库! "); return PosBizControlConstants.SUCCESS; }*/ String sql = "SELECT COILSTAT(T.SLAB_NO) STAT_FLAG FROM TBG02_SLAB_COMM T WHERE T.SLAB_NO = ?"; param = new PosParameter(); param.setWhereClauseParameter(0, ORL_SLAB_NO[0]); PosRowSet rowset = this.getDao("mesdao").findByQueryStatement(sql, param); if (rowset.hasNext())//查询库存信息 已出库板坯不允许强制结束 { PosRow row = rowset.next(); String stat = (String)row.getAttribute("STAT_FLAG");// if(!"在库".equals(stat)){ context.put("MESSAGES", ORL_SLAB_NO[0] + "板坯已不在炼钢库,不允许进行分切操作,请核实"); return PosBizControlConstants.SUCCESS; } } //未指示切割 全部降为余材 if(MODIFY_CODE[0].equals("02")){ CurProgCd = slabRt.equals("H")?"RRC":"RGB"; OrdFl = "2"; OrdNo = ""; OrdSeq = ""; NonOrdResCd = "3A"; //尺寸变更 DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss"); NonOrdResDate = formatter.format(new Date()); // 指示切割 }else if(MODIFY_CODE[0].equals("03")){ CurProgCd = slabRt.equals("H")?"RRC":"RGB"; OrdFl = "1"; //OrdNo = ""; //OrdSeq = ""; //NonOrdResCd = "3A"; //尺寸变更 //DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss"); //NonOrdResDate = formatter.format(new Date()); } if(SLAB_NO.length > 0 ){ //磅重分摊 短坯走理论,长坯为母坯磅重减去短坯理重 子坯只有两块 double weightAll = 0.0; double lengthOld = 0.0; double lengthAll = 0.0; param = new PosParameter(); param.setWhereClauseParameter(0, ORL_SLAB_NO[0]); PosRowSet SlabInfo = getDao("mesdao").find("UIG040070_SLAB_COMM_ALL.select", param); if(SlabInfo.hasNext()){ PosRow SlabInfoRow = SlabInfo.next(); BigDecimal weight_wgt1 = (BigDecimal)SlabInfoRow.getAttribute("WEIGHT_WGT"); lengthOld = Double.parseDouble(SlabInfoRow.getAttribute("SLAB_LEN").toString()); if(weight_wgt1 != null && weight_wgt1.doubleValue() != 0){ weightAll = Double.parseDouble(SlabInfoRow.getAttribute("WEIGHT_WGT").toString()); }else{ weightAll = Double.parseDouble(SlabInfoRow.getAttribute("SLAB_WGT").toString()); } for(int i = 0 ; i < SLAB_NO.length ; i++){ if(i+1 < SLAB_NO.length){ if(Integer.parseInt(SLAB_LEN[i]) < Integer.parseInt(SLAB_LEN[i+1])){ weight_wgt[i] = Double.parseDouble(SLAB_LEN[i])*Double.parseDouble(SLAB_WTH[i])*Double.parseDouble(SLAB_THK[i])*7.85/1000000000 + ""; weight_wgt[i+1] = weightAll - Double.parseDouble(SLAB_LEN[i])*Double.parseDouble(SLAB_WTH[i])*Double.parseDouble(SLAB_THK[i])*7.85/1000000000 + ""; }else if(Integer.parseInt(SLAB_LEN[i]) > Integer.parseInt(SLAB_LEN[i+1])){ weight_wgt[i+1] = Double.parseDouble(SLAB_LEN[i+1])*Double.parseDouble(SLAB_WTH[i+1])*Double.parseDouble(SLAB_THK[i+1])*7.85/1000000000 + ""; weight_wgt[i] = weightAll - Double.parseDouble(SLAB_LEN[i+1])*Double.parseDouble(SLAB_WTH[i+1])*Double.parseDouble(SLAB_THK[i+1])*7.85/1000000000 + ""; }else{ weight_wgt[i+1] = weightAll/2 + ""; weight_wgt[i] = weightAll/2 + ""; } } lengthAll += Double.parseDouble(SLAB_LEN[i]); } //总长度限制 if(lengthAll > lengthOld){ context.put("MESSAGES", " 利库子坯总长度大于母坯,请修改母坯定尺后再利库! "); return PosBizControlConstants.SUCCESS; } }else{ context.put("MESSAGES", " 没有此原板坯! "); return PosBizControlConstants.SUCCESS; } for(int i = 0 ; i < SLAB_NO.length ; i++){ String storelay = null; param = new PosParameter(); if(CUR_LOAD_LOC[i]== null&& CUR_LOAD_LOC[i].equals(""))continue; param.setWhereClauseParameter(0, CUR_LOAD_LOC[i]); PosRowSet storelayVo = getDao("mesdao").find("UIG040060_YARD_LAY.select", param); if(storelayVo.hasNext()){ PosRow storelayRow = storelayVo.next(); storelay = (String)storelayRow.getAttribute("STORELAY"); }else{ context.put("MESSAGES", " 没有此垛位! "); return PosBizControlConstants.SUCCESS; } //理重重新计算 SLAB_WGT[i] = Double.parseDouble(SLAB_LEN[i])*Double.parseDouble(SLAB_WTH[i])*Double.parseDouble(SLAB_THK[i])*7.85/1000000 + ""; param = new PosParameter(); param.setWhereClauseParameter(0, SLAB_NO[i]); param.setWhereClauseParameter(1, "UIG040070"); param.setWhereClauseParameter(2,CUR_LOAD_LOC[i]); param.setWhereClauseParameter(3, storelay); this.getDao("mesdao").update("UIG040070_SLAB_YARD.update", param); param = new PosParameter(); param.setValueParamter(0, SLAB_NO[i]); param.setValueParamter(1, CurProgCd ); param.setValueParamter(2, BefOrdNo); param.setValueParamter(3, BefOrdSeq ); param.setValueParamter(4, OrdNo ); param.setValueParamter(5, OrdSeq ); param.setValueParamter(6, OrdFl ); param.setValueParamter(7, SLAB_THK[i]); param.setValueParamter(8, SLAB_WTH[i]); param.setValueParamter(9, SLAB_LEN[i]); param.setValueParamter(10, SLAB_WGT[i]); param.setValueParamter(11, MODIFY_CODE[0]); param.setValueParamter(12, SLAB_THK[i]); param.setValueParamter(13, SLAB_WTH[i]); param.setValueParamter(14, SLAB_LEN[i]); param.setValueParamter(15, SLAB_WGT[i]); param.setValueParamter(16, REG_SHIP[0]); param.setValueParamter(17, REG_GROUP[0]); param.setValueParamter(18, REG_ID[0]); param.setValueParamter(19, SLAB_SIZE_DEC_GRD[i]); param.setValueParamter(20, NonOrdResCd); param.setValueParamter(21, NonOrdResDate); param.setValueParamter(22, CUR_LOAD_LOC[i] + storelay); param.setValueParamter(23, smsYardEntDtime); param.setValueParamter(24, slabStockEntDtime); param.setValueParamter(25, SLAB_NO[i]); param.setValueParamter(26, weight_wgt[i]); param.setValueParamter(27, SLAB_EXT_RZ_TIME); param.setValueParamter(28, ORL_SLAB_NO[0]); this.getDao("mesdao").insert("UIG040070_SHR.insert",param); param = new PosParameter(); param.setValueParamter(0, SLAB_NO[i]); param.setValueParamter(1, ORL_SLAB_NO[0]); param.setValueParamter(2, SLAB_NO[i]); param.setValueParamter(3, SLAB_CUT_SEQ[i]); param.setValueParamter(4, new BigDecimal(SLAB_THK[i])); param.setValueParamter(5, new BigDecimal(SLAB_WTH[i])); param.setValueParamter(6, new BigDecimal(SLAB_LEN[i])); param.setValueParamter(7, DSN_SLAB_NO[i]); param.setValueParamter(8, SUB_DSN_SLAB_NO[i]); param.setValueParamter(9, ORL_SLAB_NO[0]); this.getDao("mesdao").insert("UIG040070_SHR_COMMD_03.insert",param); param = new PosParameter(); param.setValueParamter(0, OrdFl); param.setValueParamter(1, SLAB_NO[i]); getDao("mesdao").update("UIG040070_SLAB_COMM_D_ORDFL.update", param); /*新增板坯利库切割表 20211208 jiangxin*/ param = new PosParameter(); param.setValueParamter(0, ORL_SLAB_NO[0]); param.setValueParamter(1, REG_ID[0]); param.setValueParamter(2, SLAB_NO[i]); this.getDao("mesdao").insert("UIG040070_INCISE_01.insert",param); //指示切割 if(MODIFY_CODE[0].equals("03")){ BigDecimal Wgt = new BigDecimal(SLAB_WGT[i]); String RtnSizeDec = ""; param = new PosParameter(); param.setWhereClauseParameter(0, SLAB_NO[i]); param.setWhereClauseParameter(1, new BigDecimal(SLAB_THK[i])); param.setWhereClauseParameter(2, new BigDecimal(SLAB_WTH[i])); param.setWhereClauseParameter(3, new BigDecimal(SLAB_LEN[i])); param.setWhereClauseParameter(4, Wgt); PosRowSet rowSet = getDao("mesdao").find("UIG040070_SLAB_SIZE_DEC.select", param); if(rowSet.hasNext()){ PosRow row = rowSet.next(); RtnSizeDec = (String)row.getAttribute("RES"); }else{ context.put("MESSAGES", " 错误,尺寸判定错误! "); return PosBizControlConstants.FAILURE; } if(RtnSizeDec.equals("Y")){ SLAB_SIZE_DEC_GRD[i] = "1"; }else if(RtnSizeDec.equals("N")){ SLAB_SIZE_DEC_GRD[i] = "2"; }else if(RtnSizeDec.equals("F")){ context.put("MESSAGES", " 错误,不能为指示切割! "); return PosBizControlConstants.FAILURE; } //尺寸不合格 if(SLAB_SIZE_DEC_GRD[i].equals("2")){ CurProgCd = slabRt.equals("H")?"RRC":"RGB"; OrdFl = "2"; OrdNo = ""; OrdSeq = ""; NonOrdResCd = "3B"; //尺寸异常 DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss"); NonOrdResDate = formatter.format(new Date()); }else if(SLAB_SIZE_DEC_GRD[i].equals("1")){ if (OrdFl != null && OrdFl.equals("2")) { CurProgCd = slabRt.equals("H")?"RRC":"RGB"; } else if (OrdFl.equals("1")){ CurProgCd = "RBA"; //轧钢指示待机 } } param = new PosParameter(); param.setWhereClauseParameter(0, OrdFl); param.setWhereClauseParameter(1, OrdNo); param.setWhereClauseParameter(2, OrdSeq); param.setWhereClauseParameter(3, NonOrdResCd); param.setWhereClauseParameter(4, NonOrdResDate); param.setWhereClauseParameter(5, CurProgCd); param.setWhereClauseParameter(6, SLAB_NO[i]); getDao("mesdao").update("UIG040070_SLAB_SIZE_DEC.update", param); } //进程整理 BigDecimal SlabWgt = new BigDecimal(SLAB_WGT[i]); SendProg_NIE012070(SLAB_NO[i],OrdNo,OrdSeq,BefOrdNo,BefOrdSeq,CurProgCd,BefProgCd,"TM",SlabWgt); SendProg_NIE012080(); /*财务数据上抛*/ CallableStatement cstm = null; try { cstm = this.getDao("mesdao").getCallableStatement("UPLOAD_DATA.CAL"); cstm.setString(1, SLAB_NO[i]); cstm.setString(2, "11AD"); cstm.setString(3, "N"); cstm.setString(4, "板坯利库"); cstm.setString(5, REG_ID[0]); cstm.registerOutParameter(6, java.sql.Types.VARCHAR); cstm.execute(); String err = cstm.getString(6); }catch(Exception ex){ ex.printStackTrace(); } finally{ if(cstm != null){ try{ cstm.close(); }catch(Exception e) { e.printStackTrace(); } } } } //结束母板坯 param = new PosParameter(); param.setWhereClauseParameter(0, ORL_SLAB_NO[0]); this.getDao("mesdao").update("UIG040070_SLAB_END.update",param); param = new PosParameter(); param.setWhereClauseParameter(0, ORL_SLAB_NO[0]); this.getDao("mesdao").update("UIG040070_SLAB_COMM.update", param); CallableStatement cstm = null; try {/*母板坯结束后再上抛母坯*/ cstm = this.getDao("mesdao").getCallableStatement("UPLOAD_DATA.CAL"); cstm.setString(1, ORL_SLAB_NO[0]); cstm.setString(2, "11AD"); cstm.setString(3, "N"); cstm.setString(4, "板坯利库"); cstm.setString(5, REG_ID[0]); cstm.registerOutParameter(6, java.sql.Types.VARCHAR); cstm.execute(); String err = cstm.getString(6); }catch(Exception ex){ ex.printStackTrace(); } finally{ if(cstm != null){ try{ cstm.close(); }catch(Exception e) { e.printStackTrace(); } } } //整理垛位 SendProg_NIG040200(ORL_LOAD_LOC[0].substring(0,(ORL_LOAD_LOC[0].length()-2))); context.put("MESSAGES", " 操作成功! "); } return PosBizControlConstants.SUCCESS; } // SLAB SIZE DECISION ( RESULT SLAB WGT,ORDER WGT COMPARE) // TBG02_SLAB_COMM--> SLAB_WGT // TBG02_SLAB_COMM_D --> ORD_NO,ORD_SEQ // TBA01_ORD_LINE --> PROD_WGT_MIN,PROD_WGT_MAX public String SlabSizeDec(BigDecimal slabThk,BigDecimal slabWth,BigDecimal slabLen,String SlabNo,BigDecimal SlabWgt) { logger.logInfo("XinSaveSlabComm SlabWgt:"+SlabWgt); BigDecimal SlabThk = slabThk; BigDecimal SlabWth = slabWth; BigDecimal SlabLen = slabLen; BigDecimal ordLen = new BigDecimal(0); BigDecimal ordWgt = new BigDecimal(0); BigDecimal coilOutDia = new BigDecimal(0); BigDecimal coilInDia = new BigDecimal(0); BigDecimal ordThk = new BigDecimal(0); BigDecimal ordWth = new BigDecimal(0); BigDecimal coilThk = new BigDecimal(0); BigDecimal coilWth = new BigDecimal(0); PosParameter param1 = new PosParameter(); param1.setWhereClauseParameter(0, SlabNo); PosRowSet CommDVO = getDao("mesdao").find("NIG020610_SLAB_COMM_D.select", param1); PosRowSet CommDVO2 = getDao("mesdao").find("UIG020060_SLAB_COMMD_ORD.select",param1); if(CommDVO2.hasNext()){ PosRow row = CommDVO2.next(); ordThk = (BigDecimal)row.getAttribute("SLAB_THK"); ordWth = (BigDecimal)row.getAttribute("SLAB_WTH"); coilThk = (BigDecimal)row.getAttribute("ORD_THK"); coilWth = (BigDecimal)row.getAttribute("ORD_WTH"); coilInDia = (BigDecimal)row.getAttribute("COIL_INDIA"); }else return "F"; BigDecimal total = ordWth.add(new BigDecimal(100)); if(SlabWth.compareTo(ordWth) < 0||total.compareTo(SlabWth) < 0){ return "N"; } param1 = new PosParameter(); PosRowSet rateVo = getDao("mesdao").find("UIG020060_proc_rate.select", param1); BigDecimal procRate = new BigDecimal(1); if(rateVo.hasNext()){ PosRow posrow = rateVo.next(); procRate = (BigDecimal)posrow.getAttribute("PROC_RATE"); } if ( CommDVO.hasNext()) { PosRow CommDROW = CommDVO.next(); BigDecimal PROD_WGT_MIN = (BigDecimal)CommDROW.getAttribute("PROD_WGT_MIN"); BigDecimal PROD_WGT_MAX = (BigDecimal)CommDROW.getAttribute("PROD_WGT_MAX"); logger.logInfo("XinSaveSlabComm PROD_WGT_MIN:"+PROD_WGT_MIN); logger.logInfo(PROD_WGT_MIN); logger.logInfo(PROD_WGT_MAX); ordWgt = SlabWgt.multiply(procRate); ordWgt = ordWgt.divide(new BigDecimal(100)); logger.logInfo("XinSaveSlabComm ordWgt:"+ ordWgt); if(PROD_WGT_MIN == null)PROD_WGT_MIN = new BigDecimal(0); if(PROD_WGT_MAX == null)PROD_WGT_MAX = new BigDecimal(0); //如果板坯重量不在订单重量范围内 if (ordWgt.compareTo(PROD_WGT_MIN) < 0 || PROD_WGT_MAX.compareTo(ordWgt) < 0 ) { //取消订单 return "N"; } } logger.logInfo("ordWgt=" + ordWgt ); logger.logInfo("ordThk=" + ordThk ); logger.logInfo("SlabWth=" + SlabWth ); ordLen = ordWgt.multiply(new BigDecimal(1000000)); ordLen = ordLen.divide(coilThk,3,BigDecimal.ROUND_HALF_UP); ordLen = ordLen.divide(coilWth,3,BigDecimal.ROUND_HALF_UP); ordLen = ordLen.divide(new BigDecimal(7.85),0,BigDecimal.ROUND_HALF_UP); coilOutDia = new BigDecimal(Math.sqrt(ordWgt.multiply(new BigDecimal(1000000).multiply(new BigDecimal(4)).divide(new BigDecimal(7.85*3.14*0.98),3,BigDecimal.ROUND_HALF_UP).divide(SlabWth,0,BigDecimal.ROUND_HALF_UP)).add(coilInDia.multiply(coilInDia)).doubleValue())); logger.logInfo("-------------slabThk" + slabThk + "--slabWth" + slabWth + "--slabLen" + slabLen + "--ordLen" + ordLen + "--ordWgt" + ordWgt + "--coilOutDia" + coilOutDia + "--" ); param1 = new PosParameter(); param1.setWhereClauseParameter(0,slabThk); param1.setWhereClauseParameter(1,slabWth); param1.setWhereClauseParameter(2,slabLen); param1.setWhereClauseParameter(3,ordLen); param1.setWhereClauseParameter(4,ordWgt); param1.setWhereClauseParameter(5,coilOutDia); param1.setWhereClauseParameter(6,SlabNo); int rowset = getDao("mesdao").update("UIG020060_slab_comm_d.update",param1); return "Y"; } public PosContext SendProg_NIE012070(String MatNo,String sOrdNo,String sOrdSeq,String sBefOrdNo,String sBefOrdSeq,String sProgCd,String BefProcCd,String sKind,BigDecimal nwgt ) { PosContext context = new PosContext(); PosMessage message = new PosMESMessageImpl(); String TcId = "NIE012070"; message.setTCID(TcId); message.setObject("MSG_ID",TcId); message.setObject("BEF_ORD_NO",sBefOrdNo); message.setObject("BEF_ORD_SEQ",sBefOrdSeq); message.setObject("ORD_NO",sOrdNo); message.setObject("ORD_SEQ",sOrdSeq); message.setObject("BEF_PROG_CD",BefProcCd); message.setObject("PROG_CD",sProgCd); message.setObject("MAT_TYPE",sKind); message.setObject("MAT_NO",MatNo); message.setObject("WGT", nwgt ); message.setObject("PGMID","UIG040070"); message.setObject("REG_ID","UIG040070"); message.setTCID(TcId); context.setMessage(message); // this.processComponent(PosConstants.CREATE_MESSAGE, context); // String transactionCode = context.getMessage().getTC(); String SERVICE_POSTFIX = "-service"; context.put(PosBizControlConstants.SERVICE_NAME, TcId + SERVICE_POSTFIX); // context.setMessage(message); PosBizControlIF controller = PosBizProvider.getController(); controller.doSubController(context,false); return null; } public void SendProg_NIE012080() { PosContext context = new PosContext(); PosMessage message = new PosMESMessageImpl(); String TcId = "NIE012080"; message.setTCID(TcId); message.setObject("MSG_ID",TcId); message.setObject("AA",null); context.setMessage(message); this.processComponent(PosConstants.CREATE_MESSAGE, context); String transactionCode = context.getMessage().getTC(); message.setTCID(TcId); String serviceName = "NIE012080"; String SERVICE_POSTFIX = "-service"; context.put(PosBizControlConstants.SERVICE_NAME, serviceName + SERVICE_POSTFIX); context.setMessage(message); PosBizControlIF controller = PosBizProvider.getController(); controller.doSubController(context,false); } public String SendProg_NIG040200(String yardAddr) { logger.logInfo("PosSaveSlabCutting---> yardAddr:"+yardAddr ); PosContext context = new PosContext(); PosMessage message = new PosMESMessageImpl(); String TcId = "NIG040200"; message.setTCID(TcId); message.setObject("MSG_ID",TcId); message.setObject("YARD_ADDR",yardAddr); 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"); logger.logInfo("PosSaveSlabCutting SendProg_NIE012070 SERVICE_ERR_MSG:"+SERVICE_ERR_MSG ); if (SERVICE_ERR_MSG != null) { throw new PosException(SERVICE_ERR_MSG); } return null; } }