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; import com.posdata.glue.dao.vo.PosRowSet; public class XinDeleteYardAddr extends PosActivity { public String runActivity(PosContext context) { String[] yardAddr = (String[])context.get("YARD_ADDR"); String[] storelay = (String[])context.get("YARD_COUNT"); String[] chk = (String[])context.get("CHK"); int storelayCount = Integer.parseInt(storelay[0]); PosParameter param = new PosParameter(); PosRowSet rowset = null; if(storelayCount > 0){ for(int i = 0 ; i < yardAddr.length ; i++){ if(chk[i].equals("Y")){ param = new PosParameter(); param.setWhereClauseParameter(0, yardAddr[i]); rowset = this.getDao("mesdao").find("UIG040022_SELECT_YARD_02.select",param); if(rowset.hasNext()){ continue; } param = new PosParameter(); param.setValueParamter(0, yardAddr[i]); this.getDao("mesdao").update("UIG040022_SLAB_YARD.delete", param); param = new PosParameter(); param.setValueParamter(0, yardAddr[i]); this.getDao("mesdao").update("UIG040022_ST_SLAB_YARD.delete",param); } } } return PosBizControlConstants.SUCCESS; } }