| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- package xin.glue.ui.B.common;
- import java.util.List;
- import com.posdata.glue.context.PosContext;
- import com.posdata.glue.dao.PosGenericDao;
- import com.posdata.glue.dao.PosJdbcDao;
- import com.posdata.glue.dao.manager.PosQueryDefinition;
- import com.posdata.glue.dao.manager.PosQueryManagerImpl;
- import com.posdata.glue.dao.vo.PosParameter;
- public class SaveModifyHistory
- {
- public static boolean writeLog(PosGenericDao dao, String interfaceID , String status , String queryId
- , List params , String pgmID ,String userName )
- {
- try {
- PosQueryManagerImpl queryManager = (PosQueryManagerImpl)PosContext.getBeanFactory().getBeanObject("queryManager");
- PosQueryDefinition query = queryManager.getQueryDefinition(queryId);
- PosParameter param = new PosParameter();
- String paramValue = "";
- param.setValueParamter(0, interfaceID);//界面ID
- param.setValueParamter(1, status);//U、D
- param.setValueParamter(2, query.getQueryStatement());//执行SQL
- int count = params.size();
- for (int i=0; i<count; i++)
- paramValue += "P" + i + ": " + params.get(i) + " ";
- param.setValueParamter(3, paramValue);//参数
- param.setValueParamter(4, pgmID);//程序ID
- param.setValueParamter(5, userName);//操作人
- dao.insert("UIB.COMMON_01.INSERT", param);
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- return true;
- }
- }
|