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

📄 有成绩分组.bak

📁 田径运动会管理系统RAR 用VFP编写
💻 BAK
字号:
***第四步
***从队员总表.dbf 到数组A,A到表-------现在做的是有报名成绩的情况的分组,采用蛇形分组的方法!!!!
*!*	set path to c:\zbydhxt
use 队员总表.dbf in 0 alias xxx2
use 各项目单位名单.dbf in 0 alias xxx3
use 分组后存放表.dbf in 0 alias xxx5
use 统计表.dbf in 0 alias xxx6
sele xxx5
zap
sele xxx2
sort to jjj on 报名成绩/A for left(ltrim(trim(项目代码)),1)='J'
sort to ttt on 报名成绩/D for left(ltrim(trim(项目代码)),1)='T'
use jjj in 0 alias xxjj
use ttt in 0 alias xxtt


sele xxx6
go 1
	do while .not.eof()
   xmdm=项目代码
   xmmc=项目名称
   xb=性别
   zb=分组名称
   fzs=分组数
   zs1=组数1
   zs2=组数2
   rs1=人数1
   rs2=人数2
   dws=单位数
   zrs=总人数
   rrr=单位的最多人数
   skip

if left(xmdm,1)='J'&&&径赛项目的分组
sele xxjj
endif
if left(xmdm,1)='T'
sele xxtt
endif
if left(xmdm,2)<>'JL'.and.zrs>1
   dimension A [zrs]
   store 'not' to A
******************************************************************************
        set filter to 分组名称=zb.and.性别=xb.and.项目代码=xmdm
        n=1
       locate for 分组名称=zb.and.性别=xb.and.项目代码=xmdm
        do while .not.eof()
              hm=号码
              skip
              A(n)=hm
              n=n+1
        enddo
        set filter to
*!*	      clear 
*****************************************************************************      
&&&&&&完成一个项目,一个组别,一个性别的所有单位的表到数组A的输入过程
***********************************程序要继续向下进行
yyy=1
xxx=1
hhh=0
xxhh=1
if zs1#0
   for eee1=1 to zs1
     for eee2=1 to rs1
      hhh=A(yyy)
      yyy=yyy+1
      sele xxx5
      append blank
      repl 号码 with hhh,机器分组号 with xxx,项目代码 with xmdm,;
      项目名称 with xmmc,性别 with xb,分组名称 with zb,序号 with xxhh
      xxhh=xxhh+1
  endfor
      xxx=xxx+1
endfor
endif

if zs2#0
 for pp=1 to zs2
   for qq=1 to rs2
   hhh=B (yyy)
   yyy=yyy+1
   sele xxx5
   append blank
   repl 号码 with hhh,机器分组号 with xxx,项目代码 with xmdm,;
   项目名称 with xmmc,性别 with xb,分组名称 with zb,序号 with xxhh
   xxhh=xxhh+1
   endfor
   xxx=xxx+1
 endfor
 endif
******************************************************************************
endif
sele xxx6
enddo
******************************************************************************
***给号码赋姓名
sele xxx5
go 1
do while .not.eof()
  hm=号码
  sele xxx2
  locate for 号码=hm
  if found()
    xm=姓名
    dwdm=单位代码
    sele xxx5
    repl 姓名 with xm,单位代码 with dwdm
    endif
    sele xxx5
    skip
enddo
 
*****接力项目

sele xxx6
set filter to left(项目代码,2)<>'JL'     &&&&&&&&项目代码="JL1".or.项目代码="JL2"
go top
do while .not.eof()
   xmdm=项目代码
   xmmc=项目名称
   xb=性别
   zb=分组名称
   zs1=组数1
   zs2=组数2
   rs1=人数1
   rs2=人数2
   dws=单位数
  skip
  sele xxx3
  set filter to 项目代码=xmdm.and.性别=xb.and.分组名称=zb
     xxhh=1
     go top
     do while .not.eof()
         dwdm=单位代码
         skip
         sele xxx5
         append blank
         repl 机器分组号 with 1,项目代码 with xmdm,项目名称 with xmmc,性别 with xb,;
         分组名称 with zb,序号 with xxhh,单位代码 with dwdm  &&&&,号码 with dwdmtoc
         xxhh=xxhh+1
         sele xxx3
     enddo
   set filter to
   sele xxx6
enddo
set filter to
    
use 单位初始.dbf in 0 alias dwcs
sele xxx5
go 1
do while .not.eof()
  dwdm=单位代码
  sele dwcs
  locate for 单位代码=dwdm
  if found()
     dwjc=单位简称
     sele xxx5
     repl 单位简称 with dwjc
     endif
     sele xxx5
     skip
     enddo
   sele dwcs
   use
sele xxx2
use
sele xxx3
use
sele xxx5
use
sele xxx6
use
sele xxjj
use
sele xxtt
use

⌨️ 快捷键说明

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