⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fix_pay.ec

📁 这是一个使用 informix esql/c 技术开发的银行程序的部分代码。
💻 EC
📖 第 1 页 / 共 5 页
字号:
dat=(yy+mm/12-1)*10000+1200+dd;elsedat=yy*10000+1200+dd;do{   if(dat1<=dat&&dat1>=dat3)               {                dat3=dat1;                ll1=rat;               }   $fetch next read1;  }while(sqlca.sqlcode!=SQLNOTFOUND);$close read1;                          }                        lx2=(long)am*(ts%t4)*ll3/30/1000;                              if(t1==10)lx2=(long)lx2;                        }                  break;           case 11:                  if(t4>ts)                              {                  lx=(long)amount*ts*ll3/30/1000;                  if(t1==10)lx=(long)lx;                              }                  else {                  lx=(long)amount*t4*ll1/30/1000;                  if(t1==10)lx=(long)lx;                  lx2=(long)amount*(ts-t4)*ll3/30/1000;                  if(t1==10)lx2=(long)lx2;                       }                  break;           }   }t1=lx1;lx1=t1+(long)((lx1-t1)*100+0.5000001)/100.0;*maint=lx1;  lx+=lx2;t1=lx;if(t3!=2&&t3!=12&&t3!=3)lx=t1+(long)((lx-t1)*100+0.5000001)/100.0;return(lx);}double get_rmb(k,amount,exch)short k;double amount,*exch;{$double hl;$short sy;double lx=0;long i;sy=k;$ select sy,hl into $sy,$hl from exch_rate where sy=$sy;lx=amount*hl;i=lx;lx=i+(long)((lx-i)*100.0+0.5)/100.0;*exch=hl;return(lx);}void prtf_inte(k,dat,amount,sum)long k,dat;double amount,sum;{$double rat,dat1,bl;$long k1;$int y,m,sy,sm,sd,wy,wm,wd;char c3;double ll1,ll2,ll3;double lx=0,am,lx1=0,lx2=0,lx3=0,lx4=0,interes1=0,hlx=0,mlx=0;short year,month,day;long yy,mm,mm1,dd,zx,t1,t2,t3,t4,dat2,dat3,dat4,ts,ts1,m1,m2,m3,yer,da2;long i,j,dq[6]={90,180,360,720,1080,1800};num_date(&year,&month,&day);yy=dat/10000;/*t1=amount;amount=t1;*/mm=(dat%10000)/100;dd=dat%100;t1=k/100;if(day>=dd)ts=(year-yy)*360+(month-mm)*30+day-dd;else   {                       if(month==1){yer=year-1;                                   mm1=12;                                   }                       else{  mm1=month-1;                              yer=year;                            }                       m1=yer%400;                       m2=yer%100;                       m3=yer%4;                       if(mm1==1||mm1==3||mm1==5||mm1==7||mm1==8||mm1==10||mm1==12) da2=31;                       else if(mm1!=2) da2=30;                            else if(m1==0||m2!=0&&m3==0) da2=29;                                 else da2=28;              ts=(yer-yy)*360+(mm1-mm)*30+da2+day-dd;   }t1=k/10000;t2=k%10000;t3=t2/100;t4=t2%100*30;if(t1>32&&t1!=50){        t1-=32;        t3=3;        k-=320000;         }if(t1==50){          t1=18;          t3=8;        k-=320000;          }k1=k;$ declare rea1 scroll cursor for select ll,rq into $rat,$dat1 from inter_rate where syh=$k1;    if(sqlca.sqlcode!=0)      {        move(21,20);        addstr("申请");        mess((short)9);        printw("(%d), ",sqlca.sqlcode);        mess((short)3);        getch();        return;      } $ open rea1; if(sqlca.sqlcode !=0)  {    printw("** %d 错误 1: 打开利率表出错 **",sqlca.sqlcode);   getch();   return;   }$fetch first rea1;dat2=0;dat3=0;do{   if(dat1>=dat2)               {                dat2=dat1;                ll2=rat;               }    if(dat1<=dat&&dat1>=dat3)               {                dat3=dat1;                ll1=rat;               }   $fetch next rea1;  }while(sqlca.sqlcode!=SQLNOTFOUND);$close rea1;if(t1==18)k1=t1*10000+200;else k1=t1*10000+1200;$ declare rea2 scroll cursor for select ll,rq into $rat,$dat1 from inter_rate where syh=$k1;    if(sqlca.sqlcode!=0)      {        move(21,20);        addstr("申请");        mess((short)9);        printw("(%d), ",sqlca.sqlcode);        mess((short)3);        getch();        return;      } $ open rea2; if(sqlca.sqlcode !=0)  {    printw("** %d 错误 2: 打开利率表出错 **",sqlca.sqlcode);   getch();   return;   }$fetch first rea2;dat4=0;do{   if(dat1>=dat4)               {                dat4=dat1;                ll3=rat;               }    $fetch next rea2;  }while(sqlca.sqlcode!=SQLNOTFOUND);$close rea2;   if(t1==18)    {    switch(t3)          {           case 1:                  if(t4>ts)                              {                       lx=(long)amount*ts*ll3/30/1000;         /* 120 LINE COPYED*/         mlx=0;        interes1=(long)(lx+lx2)+(long)(((lx+lx2)-(long)(lx+lx2))*100+0.5000001)/100.0;              /* hlx=(long)lx2+(long)((lx2-(long)lx2)*100+0.5000001)/100.0;*/                printf("%c%c%c%c\n\n",27,'[','5','i');                addspacef(8);                printf("%-10s",ss);                addspacef(10);                printf("%4d年%2d月%2d日 %2d时%2d分",year%100,month,day,                  ti/100,ti%100);                addspacef(11);                printf("%-10s",ss);                addspacef(10);                printf("%4d年%2d月%2d日 %2d时%2d分\n",year%100,month,day,                  ti/100,ti%100);                addspacef(14);                printf("%-8s",na);                addspacef(10);                prtf_inum(s_n,2);                putchar('-');                prtf_inum(a_n,9);                addspacef(10);                printf("%-6s",st);                addspacef(8);                printf("%-8s",na);                addspacef(10);                prtf_inum(s_n,2);                putchar('-');                prtf_inum(a_n,9);                addspacef(10);                printf("%-6s\n",st);                addspacef(14);                switch(toupper(cu_t))                  {                    case 'C':                      printf("加拿大元");                      break;                    case 'F':                      printf("法国法郎");                      break;                    case 'H':                      printf("港元    ");                      break;                    case 'J':                      printf("日元    ");                      break;                    case 'M':                      printf("德国马克");                      break;                    case 'P':                      printf("英镑    ");                      break;                    case 'R':                      printf("人民币  ");                      break;                    case 'U':                      printf("美元    ");                  }                addspacef(8);                printf("双整部提");                addspacef(8);                if(te<12) printf("%1d月",te);                else printf("%1d年",te/12);                addspacef(8);                printf("%3d",b_n);                addspacef(8);                switch(toupper(cu_t))                  {                    case 'C':                      printf("加拿大元");                      break;                    case 'F':                      printf("法国法郎");                      break;                    case 'H':                      printf("港元    ");                      break;                    case 'J':                      printf("日元    ");                      break;                    case 'M':                      printf("德国马克");                      break;                    case 'P':                      printf("英镑    ");                      break;                    case 'R':                      printf("人民币  ");                      break;                    case 'U':                      printf("美元    ");                  }                addspacef(8);                printf("双整部提");                addspacef(8);                if(te<12) printf("%1d月",te);                else printf("%1d年",te/12);                addspacef(8);                printf("%3d\n\n",b_n);                addspacef(11);                prtf_dnum(amount,13);                addspacef(7);                prtf_dnum(interes1,13);                addspacef(3);                prtf_dnum(mlx,13);                addspacef(5);                prtf_dnum(amount,13);                addspacef(7);                prtf_dnum(interes1,13);                addspacef(3);                prtf_dnum(mlx,13);                printf("\n\n\n\n\n\n\n\n");                addspacef(28);        interes1=(long)(interes1+amount)+(long)(((interes1+amount)-(long)(interes1+amount))*100+0.5000001)/100.0;                prtf_dnum(sum,16);                addspacef(38);                prtf_dnum(sum,16);                printf("\n");                printf("%c%c%c%c%c",12,27,'[','4','i');                              }                  else {                        if(t4>=1080)                       {if(t4==1080) y=yy+3;                        else y=yy+5;                         m=mm;                        $ select bl,sy,sm,sd,wy,wm,wd into $bl,$sy,$sm,$sd,$wy,$wm,$wd from maint_rate where y=$y and m=$m;                        if(t4==1080){                                 if(sy!=0&&sm!=0&&sd!=0)                                                {                                   if(sy<yy||sy==yy&&sm<mm||sy==yy&&sm==mm&&sd<=dd)                                                   {                                             ts1=t4;                                                      }                                        else                                             ts1=(y-sy)*360+(m-sm)*30+dd-sd;                                                 }                                     else                                            ts1=0;                                           }                                  else    {                                 if(wy!=0&&wm!=0&&wd!=0)                                                {                                   if(wy<yy||wy==yy&&wm<mm||wy==yy&&wm==mm&&wd<=dd)                                                   {                                             ts1=t4;                                                      }                                        else                                             ts1=(y-wy)*360+(m-wm)*30+dd-sd;                                                 }                                     else                                            ts1=0;                                           }                     lx1=(long)amount*bl/10000*ts1;                        }                 else                     lx1=0;               lx=(long)amount*t4*ll1/30/1000;               lx2=(long)amount*(ts-t4)*ll3/30/1000;         mlx=(long)lx1+(long)((lx1-(long)lx1)*100+0.5000001)/100.0;        interes1=(long)(lx+lx2)+(long)(((lx+lx2)-(long)(lx+lx2))*100+0.5000001)/100.0;              /* hlx=(long)lx2+(long)((lx2-(long)lx2)*100+0.5000001)/100.0;*/                printf("%c%c%c%c\n\n\n",27,'[','5','i');                addspacef(8);                printf("%-10s",ss);                addspacef(10);                printf("%4d年%2d月%2d日 %2d时%2d分",year%100,month,day,                  ti/100,ti%100);                addspacef(11);                printf("%-10s",ss);                addspacef(10);                printf("%4d年%2d月%2d日 %2d时%2d分\n",year%100,month,day,                  ti/100,ti%100);                addspacef(14);                printf("%-8s",na);                addspacef(10);                prtf_inum(s_n,2);                putchar('-');                prtf_inum(a_n,9);                addspacef(10);                printf("%-6s",st);                addspacef(8);                printf("%-8s",na);                addspacef(10);                prtf_inum(s_n,2);                putchar('-');                prtf_inum(a_n,9);                addspacef(10);                printf("%-6s\n",st);                addspacef(14);                switch(toupper(cu_t))                  {                    case 'C':                      printf("加拿大元");                      break;                    case 'F':                      printf("法国法郎");                      break;                    case 'H':                      printf("港元    ");                      break;                    case 'J':                      printf("日元    ");                      break;                    case 'M':                      printf("德国马克");                      break;                    case 'P':                      printf("英镑    ");                      break;                    case 'R':                      printf("人民币  ");                      break;                    case 'U':                      printf("美元    ");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -