十年前的废酸定额核算系统源代码.docx
《十年前的废酸定额核算系统源代码.docx》由会员分享,可在线阅读,更多相关《十年前的废酸定额核算系统源代码.docx(41页珍藏版)》请在冰豆网上搜索。
![十年前的废酸定额核算系统源代码.docx](https://file1.bdocx.com/fileroot1/2023-8/14/0f523ed2-16f3-4153-aa03-d91df83cfc0c/0f523ed2-16f3-4153-aa03-d91df83cfc0c1.gif)
十年前的废酸定额核算系统源代码
SETPROCTOWADR.FOX
DOTN01
************************************************************
*TN01*
************************************************************
PROCEDURETN01
SETTALKOFF
SETSTATOFF
SETSAFEOFF
SETSCOROFF
SETESCAOFF
SETECHOOFF
SETDOHIOFF
GB=''
_UC=''
LOADTEST
CALLTESTWITH_UC
IFLEFT(_UC,1)='1'
SETCOLOTO+GB/B,+W/G
CLEAR
SETCOLOTO/0
@10,20CLEARTO16,61
SETCOLOTO+W/BG
@9,18SAY'******************************************'
@10,18SAY'**'
@11,18SAY'**'
@12,18SAY'**'
@13,18SAY'**'
@14,18SAY'**'
@15,18SAY'******************************************'
SETCOLOTO+GR/R,R/R
@10,20SAY''
@11,20SAY'UCDOSnotbeinstalled'
@12,20SAY''
@13,20SAY'PressanykeytoEXIT!
'
@14,20SAY''
@12,36GETGB
READ
SETCOLOTO
CLEAR
QUIT
ENDIF
IFLEFT(_UC,1)<>'0'
SETCOLOTO+GB/B,+W/G
CLEAR
SETCOLOTO/0
@10,20CLEARTO16,61
SETCOLOTO+W/BG
@9,18SAY'******************************************'
@10,18SAY'**'
@11,18SAY'**'
@12,18SAY'**'
@13,18SAY'**'
@14,18SAY'**'
@15,18SAY'******************************************'
SETCOLOTO+GR/R,R/R
@10,20SAY''
@11,20SAY'UCDOS特殊显示程序TX.COM没有运行'
@12,20SAY''
@13,20SAY'请按任意键退出本系统!
'
@14,20SAY''
@12,36GETGB
READ
SETCOLOTO
CLEAR
QUIT
ENDIF
RELEMODUTEST
SETCOLOTO/B
DOWHILE.T.
SETCOLOTO/1
CLEAR
@0,0SAYCHR(14)+'[CU1,0]'
@0,0SAYCHR(14)+'[RE0,0,WADR.OV3]'
SETDEVITOSCRE
SETMESSAGETO24
SETCOLORTO/0
@11,4CLEARTO21,43
SETCOLORTO+BG/BG,+W/BG
@10,1SAY'┏━━━━━━━━━━━━━━━━━┓'
@11,1SAY'┃┃'
@12,1SAY'┠─────────────────┨'
@13,1SAY'┃┃'
@14,1SAY'┃┃'
@15,1SAY'┃┃'
@16,1SAY'┃┃'
@17,1SAY'┃┃'
@18,1SAY'┃┃'
@19,1SAY'┃┃'
@20,1SAY'┗━━━━━━━━━━━━━━━━━┛'
SETCOLORTO+GR/+G
@11,5SAY'主菜单【2005年完整版】'
SETCOLORTO+GR/R,+G/1
@13,5PROMPT'1──定额核算'MESSAGE'对生产定额进行核算,显示出详细的计算过程'
@14,5PROMPT'2──输入数据'MESSAGE'输入核算生产定额时所需原始数据'
@15,5PROMPT'3──打印计算过程'MESSAGE'将详细的计算过程打印出来注意:
准备好打印机!
'
@16,5PROMPT'4──打印盘点数据'MESSAGE'将盘点数据输送成打印出来注意:
准备好打印机!
'
@17,5PROMPT'5──输送计算过程'MESSAGE'将详细的计算过程输送出相关的资料(TXT文件)'
@18,5PROMPT'6──输送盘点数据'MESSAGE'将盘点数据输送成相关资料(TXT文件)'
@19,5PROMPT'7──退出'MESSAGE'退出本系统'
MENUTOXZ
@0,0SAYCHR(14)+'[CU1,1]'
DOCASE
CASEXZ=1
DOTN03
CASEXZ=2
DOTN02
CASEXZ=3
DOTN06
CASEXZ=4
DOTN07
CASEXZ=5
DOTN04
CASEXZ=6
DOTN05
CASEXZ=7
USE
EXIT
ENDCASE
ENDD
SETCOLORTOB/N
Y1=79
Y2=0
DOWHILEY1>39
@0,Y1CLEATO24,Y1
@0,Y2CLEATO24,Y2
Y1=Y1-1
Y2=Y2+1
Z=1
DOWHILZ<1500
Z=Z+1
ENDD
ENDD
SETSTATON
SETCOLOTO
QUIT
************************************************************
*TN02*
************************************************************
PROCEDURETN02
@0,0SAYCHR(14)+'[CU1,0]'
SETCOLOTO/0
@18,52CLEARTO21,70
SETCOLORTO+BG/BG,+W/BG
@17,51SAY'┏━━━━━━┓'
@18,51SAY'┃┃'
@19,51SAY'┃┃'
@20,51SAY'┗━━━━━━┛'
MMMM=1
DOWHILE.T.
SETCOLORTO+GR/R,+G/1
@18,55SAY'请输入密码'
M=''
MM=''
SETCOLOTOR/B
@19,55CLEATO19,64
PJ=1
DOWHILPJ<=8
SETCONSOFF
WAITTOM
STOREMM+MTOMM
XA=55+PJ
XS='@19,'+STR(XA)+'SAY'
&XS.'*'
PJ=PJ+1
ENDD
SETCONSON
IFUPPE(MM)='20052005'
EXIT
ELSE
MMMM=MMMM+1
IFMMMM=3
RETU
ENDIF
ENDIF
ENDDO
USEWADR.LIB
SETCOLOTO+GR/B,+W/G
@0,0SAYCHR(14)+'[CU1,1]'
SETFORMTOWADR.FMT
APPE
USE
SETFORMTO
CLEARALL
RETU
************************************************************
*TN03*
************************************************************
PROCEDURETN03
SETCOLOTO+GB/B,+W/G
CLEAR
CLEARALL
P=1
DIMELXYB(25),LXYQ(25)
DOWHILE.T.
DOWHILE.T.
SETCOLOTO+GB/B,+W/G
CLEAR
YEA=0
MN=0
SETCOLOTO/0
@10,20CLEARTO16,61
SETCOLOTO+W/BG
@9,18SAY'┏━━━━━━━━━━━━━━━━━━━┓'
@10,18SAY'┃┃'
@11,18SAY'┃┃'
@12,18SAY'┃┃'
@13,18SAY'┃┃'
@14,18SAY'┃┃'
@15,18SAY'┗━━━━━━━━━━━━━━━━━━━┛'
SETCOLOTO+GR/R,+W/G
@10,20SAY''
@11,20SAY'请按要求输入时间'
@12,20SAY'年份(2005-2050):
'
@13,20SAY'月份(1-12):
'
@14,20SAY''
@12,50GETYEAPICT'9999'
@13,51GETMNPICT'99'
READ
IFYEA<2005.OR.YEA>2050.OR.MN<1.OR.MN>12
LOOP
ENDIF
USEWADR.LIB
LOCATEFORYEAR=YEA.AND.MON=MN
IF.NOT.FOUND()
LXY=''
@10,20SAY''
@11,20SAY'本期原始数据不存在,无法进行定额核算!
'
@12,20SAY''
@13,20SAY'是否进行其它时间的定额核算(Y/N)?
'
@14,20SAY''
@13,54GETLXYPICT'!
'
READ
IFUPPE(LXY)='Y'
LOOP
ELSE
RETU
ENDIF
ELSE
SCATTERTOLXYB(25)
LOCATEFORYEAR=LXYB(3).AND.MON=LXYB(4)
IF.NOT.FOUND()
LXY=''
@11,20SAY'上期原始数据不存在,无法进行定额核算!
'
@12,20SAY''
@13,20SAY'按任意键返回主菜单'
SETCOLOTO,R/R
GG=SYS(2002)
@13,56GETLXYPICT'!
'
READ
SETCOLOTO
GG=SYS(2002,1)
RETU
ENDIF
SCATTERTOLXYQ(25)
@11,20SAY''
@12,20SAY'正在进行数据处理!
请稍候......'
@13,20SAY''
EXIT
ENDIF
ENDDO
WACLL=LXYB(5)+LXYQ(6)-LXYB(6)-LXYB(7)
SAHL=WACLL*LXYB(12)/100
SACL=LXYB(8)+LXYB(9)-LXYQ(9)+LXYB(10)
DSAJCC=LXYB(11)-LXYQ(11)
SAZ=SAHL-DSAJCC
SAHSL=SACL/SAZ*100
NAHL=WACLL*(LXYB(13)+1.66*LXYB(14))/100
NACL=LXYB(15)+LXYB(16)-LXYQ(16)
XYNA=LXYB(17)*50/1000
NAZ=NAHL+XYNA
NAHSL=NACL/NAZ*100
ZYHL=LXYB(18)+LXYQ(19)-LXYB(19)
ZYDR=ZYHL/WACLL*1000
YNACL=LXYB(20)+LXYB(21)-LXYQ(21)
CJHL=LXYB(22)+LXYQ(23)-LXYB(23)
CJDR=CJHL/YNACL*1000
SHHL=LXYB(24)+LXYQ(25)-LXYB(25)
SHDR=SHHL/YNACL*1000
SETCOLOTO+GR/B
CLEAR
?
SPACE(14)+LTRIM(STR(LXYB(3)))+'年'+LTRIM(STR(LXYB(4)))+'月至'+LTRIM(STR(LXYB
(1)))+'年'+LTRIM(STR(LXYB
(2)))+'月废酸生产定额计算'
?
?
'A1、废酸处理量=废酸领入量+上期末结存-本期末结存-废酸损失量'
?
SPACE(19)+'='+LTRIM(STR(LXYB(5),9,3))+'+'+LTRIM(STR(LXYQ(6),9,3))+'-'+LTRIM(STR(LXYB(6),9,3))+'-'+LTRIM(STR(LXYB(7),9,3))
?
SPACE(19)+'='+LTRIM(STR(WACLL,9,3))
?
'2、废酸中含硫酸量=废酸处理量×SA%'
?
SPACE(19)+'='+LTRIM(STR(WACLL,9,3))+'×'+LTRIM(STR(LXYB(12),5,2))+'%'
?
SPACE(19)+'='+LTRIM(STR(SAHL,9,3))
?
'3、硫酸产量=硫酸发送量+本期末结存-上期末结存+外售酸'
?
SPACE(19)+'='+LTRIM(STR(LXYB(8),9,3))+'+'+LTRIM(STR(LXYB(9),9,3))+'-'+LTRIM(STR(LXYQ(9),9,3))+'+'+LTRIM(STR(LXYB(10),9,3))
?
SPACE(19)+'='+LTRIM(STR(SACL,9,3))
?
'4、稀硫酸的结存差=本期末稀硫酸量-上期末稀硫酸量'
?
SPACE(19)+'='+LTRIM(STR(LXYB(11),9,3))+'-'+LTRIM(STR(LXYQ(11),9,3))
?
SPACE(19)+'='+LTRIM(STR(DSAJCC,9,3))
?
'5、硫酸回收率=硫酸产量/(废酸中含硫酸量-稀硫酸的结存差)×100%'
?
SPACE(19)+'='+LTRIM(STR(SACL,9,3))+'/('+LTRIM(STR(SAHL,9,3))+'-'+LTRIM(STR(DSAJCC,9,3))+')×100%'
?
SPACE(19)+'='+LTRIM(STR(SACL,9,3))+'/'+LTRIM(STR(SAZ,9,3))+'×100%'
?
SPACE(19)+'='+LTRIM(STR(SAHSL,6,2))+SPACE(3)+'%'
SETCOLOTO+GR/G
XZ=''
@24,20SAY'按任意键继续'GETXZPICT'!
'
READ
SETCOLOTO+GR/B
CLEAR
?
SPACE(14)+LTRIM(STR(LXYB(3)))+'年'+LTRIM(STR(LXYB(4)))+'月至'+LTRIM(STR(LXYB
(1)))+'年'+LTRIM(STR(LXYB
(2)))+'月废酸生产定额计算'
?
?
'B1、废酸处理量='+LTRIM(STR(WACLL,9,3))
?
'2、废酸中含硝酸量=废酸处理量×(NA%+1.66×N2O3%)/100'
?
SPACE(19)+'='+LTRIM(STR(WACLL,9,3))+'×('+LTRIM(STR(LXYB(13),5,2))+'+1.66×'+LTRIM(STR(LXYB(14),5,2))+')/100'
?
SPACE(19)+'='+LTRIM(STR(NAHL,9,3))
?
'3、硝酸产量=硝酸发送量+本期末结存-上期末结存'
?
SPACE(19)+'='+LTRIM(STR(LXYB(15),9,3))+'+'+LTRIM(STR(LXYB(16),9,3))+'-'+LTRIM(STR(LXYQ(16),9,3))
?
SPACE(19)+'='+LTRIM(STR(NACL,9,3))
?
'4、硝烟折成硝酸=本期梯恩梯产量×50/1000'
?
SPACE(19)+'='+LTRIM(STR(LXYB(17),9,3))+'×50/1000'
?
SPACE(19)+'='+LTRIM(STR(XYNA,9,3))
?
'5、硝酸回收率=硝酸产量/(废酸中含硝酸量+硝烟折成硝酸量)×100%'
?
SPACE(19)+'='+LTRIM(STR(NACL,9,3))+'/('+LTRIM(STR(NAHL,9,3))+'+'+LTRIM(STR(XYNA,9,3))+')×100%'
?
SPACE(19)+'='+LTRIM(STR(NACL,9,3))+'/'+LTRIM(STR(NAZ,9,3))+'×100%'
?
SPACE(19)+'='+LTRIM(STR(NAHSL,6,2))+SPACE(3)+'%'
?
'C1、重油耗量=重油领入量+上期末结存-本期末结存'
?
SPACE(19)+'='+LTRIM(STR(LXYB(18),9,3))+'+'+LTRIM(STR(LXYQ(19),9,3))+'-'+LTRIM(STR(LXYB(19),9,3))
?
SPACE(19)+'='+LTRIM(STR(ZYHL,9,3))
?
'2、重油耗率=重油耗量/废酸处理量'
?
SPACE(19)+'='+LTRIM(STR(ZYHL,9,3))+'/'+LTRIM(STR(WACLL,9,3))
?
SPACE(19)+'='+LTRIM(STR(ZYDR,6,2))+SPACE(3)+'kg重油/T废酸'
SETCOLOTO+GR/G
XZ=''
@24,20SAY'按任意键继续'GETXZPICT'!
'
READ
SETCOLOTO+GR/B
CLEAR
?
SPACE(14)+LTRIM(STR(LXYB(3)))+'年'+LTRIM(STR(LXYB(4)))+'月至'+LTRIM(STR(LXYB
(1)))+'年'+LTRIM(STR(LXYB
(2)))+'月废酸生产定额计算'
?
?
'D1、亚硫酸钠产量=亚硫酸钠发送量+上期末结存-本期末结存'
?
SPACE(19)+'='+LTRIM(STR(LXYB(20),9,3))+'+'+LTRIM(STR(LXYB(21),9,3))+'-'+LTRIM(STR(LXYQ(21),9,3))
?
SPACE(19)+'='+LTRIM(STR(YNACL,9,3))
?
'2、纯碱耗量=纯碱领入量+上期末结存-本期末结存'
?
SPACE(19)+'='+LTRIM(STR(LXYB(22),9,3))+'+'+LTRIM(STR(LXYQ(23),9,3))+'-'+LTRIM(STR(LXYB(23),9,3))
?
SPACE(19)+'='+LTRIM(STR(CJHL,9,3))
?
'3、纯碱耗率=纯碱耗量/亚硫酸产量'
?
SPACE(19)+'='+LTRIM(STR(CJHL,9,3))+'/'+LTRIM(STR(YNACL,9,3))
?
SPACE(19)+'='+LTRIM(STR(CJDR,6,2))+SPACE
(2)+'kg纯碱/T亚硫酸钠'
?
'E1、亚硫酸钠产量='+LTRIM(STR(YNACL,9,3))
?
'2、硫磺耗量=硫磺领入量+上期末结存-本期末结存'
?
SPACE(19)+'='+LTRIM(STR(LXYB(24),9,3))+'+'+LTRIM(STR(LXYQ(25),9,3))+'-'+LTRIM(STR(LXYB(25),9,3))
?
SPACE(19)+'='+LTRIM(STR(SHHL,9,3))
?
'3、硫磺耗率=硫磺耗量/亚硫酸产量'
?
SPACE(19)+'='+LTRIM(STR(SHHL,9,3))+'/'+LTRIM(STR(YNACL,9,3))
?
SPACE(19)+'='+LTRIM(STR(SHDR,6,2))+SPACE
(2)+'kg硫磺/T亚硫酸钠'
SETCOLOTO+GR/G
@24,20SAY'是否还要继续计算其它时间生产定额(Y/N)?
'GETXZPICT'!
'
READ
IFUPPE(XZ)<>'Y'
RETU
ENDIF
ENDDO
RETU
************************************************************
*TN04*
************************************************************
PROCEDURETN04
SETCOLOTO+GB/B,+W/G
CLEAR
CLEARALL
P=1
DIMELXYB(25),LXYQ(25)
DOWHILE.T.
DOWHILE.T.
SETCOLOTO+GB/B,+W/G
CLEAR
YEA=0
MN=0
SETCOLOTO/0
@10,20CLEARTO16,61
SETCOLOTO+W/BG
@9,18SAY'┏━━━━━━━━━━━━━━━━━━━┓'
@10,18SAY'┃┃'
@11,18SAY'┃┃'
@12,18SAY'┃┃'
@13,18SAY'┃┃'
@14,18SAY'┃┃'
@15,18SAY'┗━━━━━━━━━━━━━━━━━━━┛'
SETCOLOTO+GR/R,+W/G
@10,20SAY''
@11,20SAY'请按要求输入时间'
@12,20SAY'年份(2005-2050):
'
@13,20SAY'月份(1-12):
'
@14,20SAY''
@12,50GETYE