class gdbase{
int articlenumber;
String urlx;
double oprice[]=new double[100];
double hprice[]=new double[100];
double lprice[]=new double[100];
double cprice[]=new double[100];
double volume[]=new double[100];
int year[]=new int[100];
String month[]=new String[100];
int day[]=new int[100];
String name;
String dbtable;
int ccode;
int chnumber;
int cyear[]=new int[1000];
int cday[]=new int[1000];
String cmonth[]=new String[1000];
int s,sx;
int plan[]=new int[100];
int originaldata;
String curl[]=new String[1000];
String cname[]=new String[1000];
int companynumber;
public static void main(String [] args) {
gdbase test= new gdbase();
}
gdbase(){
dbtable="gdbase01";
company com=new company();
com.makedata();
cname=com.cname;
curl=com.curl;
companynumber=com.companynumber;
for (ccode=1;ccode<companynumber+1;ccode++){
name=cname[ccode];
urlx=curl[ccode];
System.out.println(name);
access ac=new access();
ac.makedata(urlx);
articlenumber=ac.articlenumber;
year=ac.year;
month=ac.month;
day=ac.day;
hprice=ac.hprice;
lprice=ac.lprice;
oprice=ac.oprice;
cprice=ac.cprice;
volume=ac.volume;
chdata ch=new chdata();
ch.makedata(dbtable,ccode);
ch.makedn(dbtable);
chnumber=ch.chnumber;
originaldata=ch.originaldata;
cyear=ch.cyear;
cmonth=ch.cmonth;
cday=ch.cday;
planx();
insertdata is=new insertdata();
is.name=name;
is.ccode=ccode;
is.year=year;
is.month=month;
is.day=day;
is.hprice=hprice;
is.lprice=lprice;
is.oprice=oprice;
is.cprice=cprice;
is.volume=volume;
sx=originaldata;
for(s=0;s<articlenumber;s++){
if(plan[s]<50)sx=sx+1;
if(plan[s]<50)is.makedata(dbtable,sx,s);
}
}
}
void planx(){
int h,z;
for(s=0;s<articlenumber;s++){
z=0;
plan[s]=0;
for(sx=1;sx<chnumber+1;sx++){
h=0;
if(year[s]==cyear[sx])h=h+1;
if(month[s].equals(cmonth[sx]))h=h+1;
if(day[s]==cday[sx])h=h+1;
if(h==3)z=100;
}
if(z>50)plan[s]=100;
}
}
}
最終更新:2011年03月30日 12:30