package xin.glue.ui.G.G04; import com.posdata.glue.biz.activity.PosActivity; import com.posdata.glue.biz.constants.PosBizControlConstants; import com.posdata.glue.context.PosContext; import com.posdata.glue.dao.vo.PosParameter; public class XinAddYardAddr extends PosActivity { public String runActivity(PosContext context) { String[] yardAddr = (String[])context.get("YARD_ADDR"); String[] storelay = (String[])context.get("STORELAY"); String[] addrService = (String[])context.get("ADDR_SERVICE"); int storelayCount = Integer.parseInt(storelay[0]); PosParameter param = new PosParameter(); if(storelayCount > 0){ for(int i = 1 ; i <= storelayCount ; i++){ param = new PosParameter(); String spStorelay = null; if(i < 10) spStorelay = "0" + i; else spStorelay = i + ""; param.setValueParamter(0, yardAddr[0]); param.setValueParamter(1, spStorelay); this.getDao("mesdao").insert("UIG040022_SLAB_YARD.insert", param); } param = new PosParameter(); param.setValueParamter(0, yardAddr[0]); param.setValueParamter(1, addrService[0]); this.getDao("mesdao").insert("UIG040022_ST_SLAB_YARD.insert",param); } return PosBizControlConstants.SUCCESS; } }