| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- package xin.glue.ui.H.H05;
- import java.sql.Connection;
- import java.sql.Date;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import java.text.DateFormat;
- import java.text.SimpleDateFormat;
- import xin.glue.ui.common.DataSo;
- 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.PosJdbcDao;
- import com.posdata.glue.dao.manager.PosQueryDefinition;
- import com.posdata.glue.dao.manager.PosQueryManager;
- import com.posdata.glue.dao.vo.PosParameter;
- import com.posdata.glue.dao.vo.PosRowSet;
- public class SearchKeFa extends PosActivity {
- public String runActivity(PosContext context) {
-
- // Connection conn = null;
- // PreparedStatement ps = null;
- // ResultSet rs = null;
- // String ret = "";
- //
- //
- // SimpleDateFormat tempDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- // String currDate = tempDate.format(new java.util.Date());
- // try {
- //
- // conn = DataSo.getDataSource2().getConnection();
- // ps = conn.prepareStatement("insert into if_raw_mtr_coil_m (COIL_NO,COIL_SOURCE,COIL_SORT,HEATNO,SMP_NO) values (?,?,?,?,?)");
- //
- // ps.setString(1, currDate);
- // ps.setString(2, "1");
- // ps.setString(3, "1");
- // ps.setString(4, "1");
- // ps.setString(5, "1");
- // ps.executeUpdate();
- //
- // } catch (Exception e) {
- // e.printStackTrace();
- // }finally{
- // try {
- // if(null != ps)
- // ps.close();
- // if(null != conn)
- // conn.close();
- // } catch (SQLException e) {
- // e.printStackTrace();
- // }
- // }
- String[] DLIV_TP = (String[])context.get("DLIV_TP");
- String[] ORD_NO = (String[])context.get("ORD_NO");
- String[] SPEC_STL_GRD = (String[])context.get("SPEC_STL_GRD");
-
- String[] sqlOrdFl = (String[])context.get("sqlStr");
- logger.logInfo("------------------------" + sqlOrdFl[0]);
- StringBuffer sqlStr = null;
- StringBuffer sqlStr2 = null;
- PosJdbcDao dao = (PosJdbcDao)this.getDao("mesdao");
- PosQueryManager ppt = dao.getQueryManager();
- PosQueryDefinition x = ppt.getQueryDefinition("UIG050900_01.select");
- PosQueryDefinition xx = ppt.getQueryDefinition("UIG050900_03.select");
- sqlStr = new StringBuffer(x.getQueryStatement());
- sqlStr2 = new StringBuffer(xx.getQueryStatement());
-
- sqlStr = sqlStr.append("\n");
- sqlStr = sqlStr.append(sqlOrdFl[0]);
- sqlStr = sqlStr.append("\n");
- sqlStr = sqlStr.append(sqlStr2);
-
- logger.logDebug("------------------" + sqlStr);
- PosParameter param = new PosParameter();
- param.setWhereClauseParameter(0, DLIV_TP[0]);
- param.setWhereClauseParameter(1, ORD_NO[0]);
- param.setWhereClauseParameter(2, SPEC_STL_GRD[0]);
-
- PosRowSet rowSet = getDao("mesdao").findByQueryStatement(sqlStr.toString(), param);
-
- context.put("UIH050900_ERSULT", rowSet);
- return PosBizControlConstants.SUCCESS;
- }
- }
|