| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- package pda;
- //����ֵ�´��ӿ�
- import java.sql.SQLException;
- import java.text.SimpleDateFormat;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.List;
- import com.alibaba.fastjson.JSON;
- import com.alibaba.fastjson.JSONArray;
- import com.alibaba.fastjson.JSONObject;
- import UIB.COM.XmlSqlParsersFactory;
- import CoreFS.SA01.CoreIComponent;
- import CoreFS.SA06.CoreReturnObject;
- import CoreFS.SA01.CoreException;
- import CoreFS.SA01.CoreExceptionHandler;
- import CoreFS.SA06.CoreSqlType.CoreOracleType;
- import QCM.JHY01.JHY0101.AddAutoSample;
- import java.io.IOException;
- import java.sql.ResultSet;
- import java.sql.Array;
- import java.sql.PreparedStatement;
- //import com.sun.xml.bind.v2.runtime.unmarshaller.XsiNilLoader.Array;
- public class CharacteristicValue extends CoreIComponent implements
- ICharacteristicValue
- {
-
- public String abc(String MESSAGESEQ,String b)
- {
- String dd = MESSAGESEQ + b;
- return dd;
- }
- //ִ�д洢���� pnameΪ�洢������ arΪ�洢�����������
- public String uim01001 (String pname, ArrayList<String> ar) throws IOException, SQLException
- {
- ArrayList<String> sqlparams = new ArrayList<String>(); // �洢�����������
- ArrayList<Integer> sqltypes = new ArrayList<Integer>(); // �洢���������������
-
- for(int i=0;i<ar.size();i++)
- {
- sqltypes.add(CoreOracleType.STRING_TYPE.ordinal());
- sqlparams.add(ar.get(i));
- }
- ArrayList<Integer> temp = new ArrayList<Integer>();
- ArrayList<String> temp1 = new ArrayList<String>();
- temp.add(CoreOracleType.STRING_TYPE.ordinal());
- temp.add(CoreOracleType.STRING_TYPE.ordinal());
- CoreReturnObject cro = new CoreReturnObject();
- cro = this.getDao("KgDao").ExcuteProcedure(pname, sqltypes, sqlparams,temp, temp1);
- //String ret = temp1.get(0) + temp1.get(1);
- String ret = temp1.get(1);
- return ret;
- }
- //ִ�д洢���� pnameΪ�洢������ CP_Type�������� parmar2Ϊ�������
- //public String uim01002 (String pname,String CP_Type,ArrayList<ArrayList<String>> parmar2) throws SQLException
- /*
- public String uim01002 (String pname,String CP_Type,ArrayList parmar2) throws SQLException
- {
- Array ar=null;
- ArrayList sqlparams = new ArrayList(); // �洢�����������
- ArrayList<Integer> sqltypes = new ArrayList<Integer>(); // �洢���������������
-
- for(int i=0;i<parmar2.size();i++)
- {
- sqltypes.add(CoreOracleType.ARRAY_TYPE.ordinal());
- ar = this.getDao("KgDao").getArray( CP_Type,(ArrayList) parmar2.get(i));
- //java.sql.Array ar = this.getDao("KgDao").getArray( CP_Type,parmar2.get(i));
- sqlparams.add(ar);
- }
- ArrayList<Integer> temp = new ArrayList<Integer>();
- ArrayList<String> temp1 = new ArrayList<String>();
- temp.add(CoreOracleType.STRING_TYPE.ordinal());
- temp.add(CoreOracleType.STRING_TYPE.ordinal());
- CoreReturnObject cro = new CoreReturnObject();
- cro = this.getDao("KgDao").ExcuteProcedure(pname, sqltypes, sqlparams,temp, temp1);
- String ret = temp1.get(1);
- return ret;
- }
- */
- public String uim01002(String ProcedureName,ArrayList arcd1,ArrayList arcd2) throws SQLException
- {
- String name = ProcedureName;
- Array ar1=null;
- Array ar2=null;
- ArrayList sqlparams = new ArrayList(); // �洢�����������
- ArrayList sqltypes = new ArrayList(); // �洢���������������
-
- sqltypes.add(CoreOracleType.ARRAY_TYPE.ordinal());
- ar1 = this.getDao("KgDao").getArray( "STR_ARY_TYPE", arcd1);
- sqlparams.add(ar1);
-
- sqltypes.add(CoreOracleType.ARRAY_TYPE.ordinal());
- ar2 = this.getDao("KgDao").getArray( "STR_ARY_TYPE", arcd2);
- sqlparams.add(ar2);
-
- ArrayList temp = new ArrayList();
- temp.add(CoreOracleType.STRING_TYPE.ordinal());
- temp.add(CoreOracleType.STRING_TYPE.ordinal());
- //ArrayList temp1 = new ArrayList();
- ArrayList<String> temp1 = new ArrayList<String>();
- CoreReturnObject cro = new CoreReturnObject();
- cro = this.getDao("KgDao").ExcuteProcedure(name, sqltypes, sqlparams,temp, temp1);
- String ret = temp1.get(1);
- return ret;
- }
- public String uimSelect(String abc) throws IOException, SQLException
- {
- String sql = abc;//"SELECT T.Area_No,t.area_name FROM C_TBK08_COIL_YARD_AREA T where t.area_type = 2";
- CoreReturnObject cro = new CoreReturnObject();
- cro = this.getDao("KgDao").ExcuteQuery(sql);
- //List a = (List)new java.util.ArrayList();
- //a.add(cro.getResult());
- String a = cro.getResult().toString();
- return a;
- }
- @SuppressWarnings("unused")
- @Override
- public String autoGenerationSampleInfo(String materialInfo) {
- JSONObject json = JSON.parseObject(materialInfo);
- JSONArray material= json.getJSONArray("KEY");
- AddAutoSample sample=new AddAutoSample();
- String msg = "";
- try {
- msg = sample.AutoGenerationSampleInfo(material);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return msg;
- }
- }
|