diff --git a/打卷检验管理/U_MJManageNewFDNew.pas b/打卷检验管理/U_MJManageNewFDNew.pas index a6c1fc8..9a0b50c 100644 --- a/打卷检验管理/U_MJManageNewFDNew.pas +++ b/打卷检验管理/U_MJManageNewFDNew.pas @@ -259,7 +259,7 @@ type Button5: TButton; ADOQueryPrint1: TADOQuery; RMDB_Main1: TRMDBDataSet; - RM3: TRMGridReport; + RM3: TRMGridReport; Edit5: TEdit; Label43: TLabel; Label53: TLabel; @@ -1701,7 +1701,7 @@ begin begin Close; sql.Clear; - sql.Add('select sum(A.mjlen) as ZC,sum(A.MJMaoZ) as ZZ from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' '); + sql.Add('select sum(A.mjlen) as ZC,sum(A.MJQty4) as ZZ from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' '); Open; end; with ADOQuery2 do @@ -1730,8 +1730,8 @@ begin Close; sql.Clear; sql.Add('select sum(A.mjlen) as GCD,sum(A.MJMaoZ) as Gzl,count(*) as Gps '); - sql.Add(',ZPgj=(select sum(MJMaoZ)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'' ) '); - sql.Add(',CPgj=(select sum(MJMaoZ)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'') '); + sql.Add(',ZPgj=(select sum(MJQty4) from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'' ) '); + sql.Add(',CPgj=(select sum(MJQty4) from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'') '); sql.Add(',ZPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'' ) '); sql.Add(',CPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'') '); sql.Add(' from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' group by mainid,subid '); //and A.mjstr4=''' + trim(mjstr4.text) + ''' @@ -2544,7 +2544,7 @@ begin begin Close; sql.Clear; - sql.Add('select sum(mjlen) as ZC ,sum(MJMaoZ) as ZZ from WFB_MJJY where Subid=''' + Trim(APID.Text) + ''' '); + sql.Add('select sum(mjlen) as ZC ,sum(MJQty4) as ZZ from WFB_MJJY where Subid=''' + Trim(APID.Text) + ''' '); Open; end; sycd := strtofloatdef(Label56.Caption, 0) - strtofloatdef(Trim(ADOQuery1.fieldbyname('ZC').AsString), 0); @@ -2564,13 +2564,13 @@ begin Close; sql.Clear; sql.Add('select sum(A.mjlen) as GCD,sum(A.MJMaoZ) as Gzl,count(*) as Gps '); - sql.Add(',ZPgj=(select sum(MJMaoZ)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'' ) '); - sql.Add(',CPgj=(select sum(MJMaoZ)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'') '); + sql.Add(',ZPgj=(select sum(MJQty4)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'' ) '); + sql.Add(',CPgj=(select sum(MJQty4)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'') '); sql.Add(',ZPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'' ) '); sql.Add(',CPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''Ʒ'') '); sql.Add(' from WFB_MJJY A where A.Subid=''' + Trim(APID.Text) + ''' group by mainid,subid '); Open; - end; + end; Label62.Caption := 'Ʒ:' + Trim(ADOQuery2.fieldbyname('ZPgj').AsString); Label63.Caption := 'Ʒ:' + Trim(ADOQuery2.fieldbyname('CPgj').AsString); @@ -2939,7 +2939,7 @@ begin begin Close; sql.Clear; - sql.Add('select sum(A.mjlen) as ZC,sum(A.MJMaoZ) as ZZ from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' '); + sql.Add('select sum(A.mjlen) as ZC,sum(A.MJQty4) as ZZ from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' '); Open; end; with ADOQuery2 do