package xin.glue.ui.J.J02; /* * desc:为火运的与装车处理,垛位移到预装垛位。记录移垛历史信息 * author:唐亮 tangliang * date:2010-3-25 */ 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.PosRow; import com.posdata.glue.dao.vo.PosRowSet; public class saveYZCoil extends PosActivity{ public String runActivity(PosContext context) { //获取行状态 String[] rowStatus = (String[]) context.get("rowStatus"); String[] CHK = (String[]) context.get("CHK"); //卷号 String[] OLD_SAMPL_NO = (String[]) context.get("OLD_SAMPL_NO"); //现在位置 String[] CUR_LOAD_LOC = (String[]) context.get("CUR_LOAD_LOC"); String[] REG_ID = (String[]) context.get("REG_ID"); for (int i = 0; i < rowStatus.length; i++){ if(CHK[i] != null && CHK[i].equals("Y")){ //清除公共表信息,把正式垛位改为预装垛位 PosParameter param = new PosParameter(); param.setWhereClauseParameter(0,OLD_SAMPL_NO[i]); this.getDao("mesdao").update("FAHUO00_03.select", param); //清除垛位表信息 PosParameter param1 = new PosParameter(); param1.setWhereClauseParameter(0,OLD_SAMPL_NO[i]); this.getDao("mesdao").update("FAHUO00_04.select", param1); Number SEQ = null; int SEQ_1 = 0; // 记录库存移动的情况 PosParameter param11 = new PosParameter(); PosRowSet rows11 = getDao("mesdao").find("UIH050700_05.select", param11); if(rows11.hasNext()){ PosRow row11 = rows11.next(); SEQ = (Number) row11.getAttribute("ROLL_SEQ"); if(null == SEQ){ SEQ_1 = 1; }else{ SEQ_1 = SEQ.intValue()+1; } //取出主键后,更新移动表 PosParameter param4 = new PosParameter(); param4.setValueParamter(0, new Integer(SEQ_1)); param4.setValueParamter(1, CUR_LOAD_LOC[i]); param4.setValueParamter(2, "YZ"); param4.setValueParamter(3, OLD_SAMPL_NO[i]); param4.setValueParamter(4, ""); param4.setValueParamter(5, ""); param4.setValueParamter(6, ""); param4.setValueParamter(7, ""); param4.setValueParamter(8, REG_ID[0]); getDao("mesdao").insert("UIH050700_01.insert", param4); } } } return PosBizControlConstants.SUCCESS; } }