package xin.glue.ui.F.F01; 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; /** * @author 王小炎(wangxiaoyan) * @desc 检查出钢指示中相关标准信息是否缺失 * @return */ public class CheckStandard extends PosActivity { public String runActivity(PosContext context) { String[] rowStatus = (String[]) context.get("rowStuts"); String[] chargeManaNo = (String[]) context.get("CHARGE_MANA_NO_EN"); // -------------2010-5-7 王黎添加 解决字符串越界异常----------------- if (chargeManaNo == null || "".equals(chargeManaNo[0])) { return PosBizControlConstants.SUCCESS; } // -------------2010-5-7 王黎添加 解决字符串越界异常----------------- PosParameter param = new PosParameter(); param.setWhereClauseParameter(0, chargeManaNo[0].substring(2, 3)); param.setWhereClauseParameter(1, chargeManaNo[0]); PosRowSet rowset = getDao("mesdao").find("UIF012030_STL_STANDARD.find", param); // rowset.reset(); context.put("rs4", "Y"); while (rowset.hasNext()) { PosRow row = rowset.next(); String CHARGE_MANA_NO = (String) row.getAttribute("CHARGE_MANA_NO"); String BOF_TEMP_TGT = (String) row.getAttribute("BOF_TEMP_TGT"); String CAS_TEMP_TGT = (String) row.getAttribute("CAS_TEMP_TGT"); String RH_TEMP_TGT = (String) row.getAttribute("RH_TEMP_TGT"); String LF_TEMP_TGT = (String) row.getAttribute("LF_TEMP_TGT"); String PREV_CHARGE_WGT = (String) row.getAttribute("PREV_CHARGE_WGT"); if (BOF_TEMP_TGT == null || "".equals(BOF_TEMP_TGT) || CAS_TEMP_TGT == null || "".equals(CAS_TEMP_TGT) || RH_TEMP_TGT == null || "".equals(RH_TEMP_TGT) || LF_TEMP_TGT == null || "".equals(LF_TEMP_TGT) || PREV_CHARGE_WGT == null || "".equals(PREV_CHARGE_WGT)) { context.put("rs4", "N"); break; } } return PosBizControlConstants.SUCCESS; } }