package xin.glue.ui.H.H04; import xin.glue.ui.common.PosGridSave; //import xin.glue.ui.common.component.PosSiteConfig; import xin.glue.ui.common.component.PosSiteLog; 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; /* * 轧辊废弃回退界面 * @author TangLiang 唐亮 * @data 2009.9。27 * 这里把废弃的轧辊回退到磨削待机状态,状态标志为S */ public class returnDisuseRollNo extends PosActivity{ public String runActivity(PosContext context) { //轧辊号 String[] roll_no = (String[]) context.get("ROLL_NO"); //通过传入的辊号在表中查询结果是否存在,如果存在就更新否则就新增 PosParameter param0 = new PosParameter(); param0.setWhereClauseParameter(0, roll_no[0]); String sql = "select ROLL_NO from tbh04_roll where ROLL_NO = ?"; PosRowSet rowset1 = getDao("mesdao").findByQueryStatement(sql, param0); if(rowset1.hasNext()){ PosParameter param1 = new PosParameter(); //更新 param1.setWhereClauseParameter(0, roll_no[0]); getDao("mesdao").update("UIH040050_02.update", param1); //打印日志 // if (PosSiteConfig.writeLog) // PosSiteLog.writeLog(context, getDao("mesdao"),"UIH040050_01.update", param1.getWhereClauseParamters()); // }else{ //插入的情况 logger.logInfo("UIH040050的returnDisuseRollNo类中,如果roll_no不存在的话是没有办法做更新操作的"); String vtemp="return"; context.put("rs", vtemp); } return PosBizControlConstants.SUCCESS; } }