| 1234567891011121314151617181920212223242526272829303132 |
- package UIK.UIK05;
- import java.sql.SQLException;
- import java.text.SimpleDateFormat;
- import java.util.*;
- import CoreFS.SA01.CoreIComponent;
- import CoreFS.SA06.CoreReturnObject;
- public class UIK050001 extends CoreIComponent{
- public CoreReturnObject DoQuery() throws SQLException
- {
- CoreReturnObject cro = new CoreReturnObject();
-
- String str = "ROLLID,ROLL_STAT,ROLL_LOC,ROLL_DIAM,ROUGH,ROUGH_CL,YUAN_WC,ROLLSHA_WC,ROLL_WEAK,STAND_ID,ROLL_BUG,to_char(YARD_IN_TIME,'yyyy-mm-dd') YARD_IN_TIME,REG_MAN,to_char(LAST_DOWN_TIME,'yyyy-mm-dd') LAST_DOWN_TIME";
- String sqlQuery = "select " + str+" from C_TBK05_ROLL_STOCKWL ORDER BY ROLLID";
- cro = this.getDao("KgDao").ExcuteQuery(sqlQuery);
- return cro;
- }
- public CoreReturnObject DoInsert(ArrayList parms)
- {
- CoreReturnObject cro=new CoreReturnObject();
- String strSql="insert into C_TBK05_ROLL_STOCKWL(ROLLID,ROLL_STAT,ROLL_LOC,ROLL_DIAM,ROUGH,ROUGH_CL,YUAN_WC,ROLLSHA_WC,ROLL_WEAK,STAND_ID,ROLL_BUG,YARD_IN_TIME,REG_MAN,LAST_DOWN_TIME)values(?,?,?,?,?,?,?,?,?,?,?,to_date(?,'yyyy-mm-dd'),?,to_date(?,'yyyy-mm-dd'))";
- try {
- //服务执行普通的添加、修改、删除使用方法为ExcuteNonQuery
- cro=this.getDao("KgDao").ExcuteNonQuery(strSql, parms.toArray());//将ArrayList的parms转成Object[]的数组
- } catch (SQLException e) {
- // TODO Auto-generated catch block
- this.logAdapter.filelogger.logError(e.getMessage());
- cro=cro.SetErrInfo(e.getMessage());
- }
- return cro;
- }
- }
|