📄 hand_dated4.ec
字号:
/* demand_hand */#include </u/ebcsav/include/sav.h>$include sqlca;$include sqlda;void addspace();void addspacef();void mess();char y_n();char readdv();char readst();char readch();long ac_num();double get_rate();void prt_inum();void prt_dnum();void prtf_inum();void prtf_dnum();void prtf_upper();short num_time();#include </u/ebcsav/include/begin>short n=1,ti,year1,month1,p,lnm,yy1,yy2,mm1,mm2,dd1,dd2;double x;long k,a_num1=0,anm2=0;unsigned char c;char st[30],fg1;FILE *pf,*pf1;$ char s_num[2],nam[9],ter[2],cu_type[2],addres[25],statu[2], s_type[2],ope_num[2],flg[2],l_num[2];$ long a_num,pas,cr_num,ope_date,int_date,las_date,las_mon;$ double amoun,amoun1,amound,interes,maint_v;$ short cred_type;$ long cred_num,b_num;move(0,29);$ database saving;printw("零 整 储 蓄 移 植");amound=0.0;s_num[0]=op.num&0x7f;s_num[1]='\0';pas=0;nam[0]='\0';flg[1]='\0';l_num[0]=0;l_num[1]='\0';flg[0]=0;s_type[1]='\0';cu_type[0]='R';cu_type[1]='\0';amoun=0.0;addres[0]='\0';statu[0]='A';statu[1]='\0';pas=0;maint_v=0.0;interes=0.0;ter[0]=0;ter[1]='\0';addres[0]='\0';pf=fopen("/u/ebcsav/data/dated1.txt","r");pf1=fopen("/u/ebcsav/data/dated2.txt","r"); p=0; $ begin work;while(1) { move(2,0); clrtobot(); block(1,0,22,80); move(23,16); standout(); mess((short)1); standend(); fscanf(pf,"%*2s%7ld%*5s%2hd%*c%2hd%*c%2hd%*9s%1hd%*2s%14lf%*2s%14lf%*10s%8s%*c%2hd%*c%2hd%*c%2hd%*4s%6ld%*8s%2hd%*10s", &a_num,&yy1,&mm1,&dd1,&ti,&amoun1,&amoun,nam,&yy2,&mm2,&dd2,&pas,&lnm); if(feof(pf)) break; while(a_num>a_num1) fscanf(pf1,"%*4s%7ld%*3s%7ld%*c%s",&a_num1,&cr_num,addres); l_num[0]=lnm; ter[0]=ti*12; ope_date=yy1*10000+mm1*100+dd1+19000000; las_date=yy2*10000+mm2*100+dd2+19000000; las_mon=yy2*100+mm2+190000; int_date=19970306; if(a_num!=a_num1) { addres[0]='('; addres[1]=')'; addres[2]='\0'; } move(3,10); addstr("帐 号: "); move(3,48); prt_inum((long)(op.num&0x7f),2); addstr("-"); move(3,52); prt_inum(a_num,9); move(4,10); addstr("姓 名: "); move(5,10); addstr("密 码: "); move(6,10); addstr("币 种: "); move(6,48); addstr("人民币"); move(7,10); addstr("行 号: "); move(8,10); addstr("额 度: "); move(9,10); addstr("余 额: "); move(10,10); addstr("地 址: "); move(11,10); addstr("凭 证 号: "); move(12,10); addstr("开户日期: "); move(13,10); addstr("最后日期: "); move(14,10); addstr("存 期: "); move(4,48); printw("%-8s",nam); move(05,48); printw("%d",pas); move(07,48); printw("%d",l_num[0]); move(8,48); prt_dnum(amoun,16); move(9,48); prt_dnum(amoun1,16); move(10,48); printw("%-25s",addres); move(11,48); prt_inum(cr_num,7); move(12,48); printw("%4d年%2d月%2d日",ope_date/10000,ope_date%10000/100, ope_date%100); move(13,48); printw("%4d年%2d月",las_mon/100,las_mon); move(14,48); printw("%d年",ter[0]/12); refresh(); if(a_num<1)getch(); anm2++; amound+=amoun1; ope_num[0]=op_num; ope_num[1]='\0'; cred_type=2; s_type[0]=cred_type; cred_num=cr_num; move(20,20); $ insert into r_dated values ($s_num,$a_num,$nam,$pas,$cu_type,$ter,$amoun,$amoun1, $addres,$cr_num,$ope_date,$int_date,$statu,$flg, $las_date,$maint_v,$interes,$las_mon,$l_num); if(sqlca.sqlcode!=0) { addstr("写"); mess((short)14); printw("(%d), ",sqlca.sqlcode); getch(); p=1; } else { move(20,20); addspace(40); move(20,20); mess((short)13); } } if(p==0) { $ commit work; } else { $ rollback work; }fclose(pf);$ close database;printw("\n anm2=%d amound=%13.2f",anm2,amound);getch();#include </u/ebcsav/include/end>#include </u/ebcsav/include/mess>#include </u/ebcsav/include/addspace>#include </u/ebcsav/include/addspacef>#include </u/ebcsav/include/y_n>#include </u/ebcsav/include/prt_inum>#include </u/ebcsav/include/prt_dnum>#include </u/ebcsav/include/prtf_inum>#include </u/ebcsav/include/prtf_dnum>#include </u/ebcsav/include/prtf_upper>#include </u/ebcsav/include/num_time>#include </u/ebcsav/include/readch>#include </u/ebcsav/include/readdv>#include </u/ebcsav/include/readst>#include </u/ebcsav/include/ac_num>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -