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

📄 zfrm_autogetbidu.~pas

📁 专业的评标管理系统
💻 ~PAS
📖 第 1 页 / 共 4 页
字号:

  z_s := temp_s ;

  if z_s<0 then z_s := 0 ;

  z_s := StrToFloat(Format('%2.2f', [z_s]));

  // 应该从数据库中得到, "考评"的项目编号为8
  zg_ai_id := 11 ;
  // 插入最终结果分数
  zh_Insert_SQL := 'insert into tm_autogetbidlist values('+ IntToStr(z_AutoGet.z_Auto_g_gb_id) + ', ' + IntToStr(zg_ai_id) + ', ' + FloatToStr(z_s) + ')' ;
  zh_PublicInsDelUpdQueryP(zh_Insert_SQL); //*****//
  //
end;

// 7, 质量体系认证
procedure Tzfrm_AutoGetBid.z_TenderQualitySystemP();
var
  a,b,s,temp_s: Double;
  x: Double;
begin
  //
  // 得到参数表名
  zg_ai_id := 10 ;
  z_ParamTabName := 'tm_funcparam' + IntToStr(zg_ai_id) ;
  // 得到 参数a值
  zh_Select_SQL := 'select a from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  a := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数b值
  zh_Select_SQL := 'select b from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  b := z_PublicQuery4F(zh_Select_SQL) ;  //***//

  // 得到 参数s值
  zh_Select_SQL := 'select s from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  z_s := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "质量体系"的项目编号为 26
  zg_ai_id := 26 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  x := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 条件运算
  if x=a then
    s := b
  else
    s := 0;

  //showmessage(floattostr(s)+ ','+floattostr(s1)+ ','+floattostr(s2));
  temp_s := s ;
  //showmessage(floattostr(temp_s));
  if temp_s>z_s then temp_s := z_s ;

  z_s := temp_s ;

  if z_s<0 then z_s := 0 ;

  z_s := StrToFloat(Format('%2.2f', [z_s]));

  // 应该从数据库中得到, "考评"的项目编号为8
  zg_ai_id := 10 ;
  // 插入最终结果分数
  zh_Insert_SQL := 'insert into tm_autogetbidlist values('+ IntToStr(z_AutoGet.z_Auto_g_gb_id) + ', ' + IntToStr(zg_ai_id) + ', ' + FloatToStr(z_s) + ')' ;
  zh_PublicInsDelUpdQueryP(zh_Insert_SQL); //*****//
  //
end;

// 6, 类似经验
procedure Tzfrm_AutoGetBid.z_TenderExperienceP();
var
  a,b,s,temp_s: Double;
  x: Double;
begin
  //
  // 得到参数表名
  zg_ai_id := 9 ;
  z_ParamTabName := 'tm_funcparam' + IntToStr(zg_ai_id) ;
  // 得到 参数a值
  zh_Select_SQL := 'select a from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  a := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数b值
  zh_Select_SQL := 'select b from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  b := z_PublicQuery4F(zh_Select_SQL) ;  //***//

  // 得到 参数s值
  zh_Select_SQL := 'select s from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  z_s := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "类似工程"的项目编号为 25
  zg_ai_id := 25 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  x := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 条件运算
  s := (x/a)*b ;

  //showmessage(floattostr(s)+ ','+floattostr(s1)+ ','+floattostr(s2));
  temp_s := s ;
  //showmessage(floattostr(temp_s));
  if temp_s>z_s then temp_s := z_s ;

  z_s := temp_s ;

  if z_s<0 then z_s := 0 ;

  z_s := StrToFloat(Format('%2.2f', [z_s]));

  // 应该从数据库中得到, "考评"的项目编号为8
  zg_ai_id := 9 ;
  // 插入最终结果分数
  zh_Insert_SQL := 'insert into tm_autogetbidlist values('+ IntToStr(z_AutoGet.z_Auto_g_gb_id) + ', ' + IntToStr(zg_ai_id) + ', ' + FloatToStr(z_s) + ')' ;
  zh_PublicInsDelUpdQueryP(zh_Insert_SQL); //*****//
  //
end;

// 5, 考评
procedure Tzfrm_AutoGetBid.z_TenderCheckP();
var
  a,b,c,d,e,f,s,s1,s2,temp_s: Double;
  x,y,z: Double;
begin
  //
  // 得到参数表名
  zg_ai_id := 8 ;
  z_ParamTabName := 'tm_funcparam' + IntToStr(zg_ai_id) ;
  // 得到 参数a值
  zh_Select_SQL := 'select a from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  a := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数b值
  zh_Select_SQL := 'select b from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  b := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数c值
  zh_Select_SQL := 'select c from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  c := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数d值
  zh_Select_SQL := 'select d from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  d := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数e值
  zh_Select_SQL := 'select e from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  e := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数f值
  zh_Select_SQL := 'select f from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  f := z_PublicQuery4F(zh_Select_SQL) ;  //***//

  // 得到 参数s值
  zh_Select_SQL := 'select s from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  z_s := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "地市级"的项目编号为 22
  zg_ai_id := 22 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  x := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "省级"的项目编号为 23
  zg_ai_id := 23 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  y := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "建设"的项目编号为 24
  zg_ai_id := 24 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  z := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 条件运算
  if x = a then
    s := b
  else
    s := 0 ;

  if y = c then
    s1 := d
  else
    s1 := 0 ;

  if z = e then
    s2 := f
  else
    s2 := 0 ;

  //showmessage(floattostr(s)+ ','+floattostr(s1)+ ','+floattostr(s2));
  temp_s := s + s1 + s2 ;
  //showmessage(floattostr(temp_s));
  if temp_s>z_s then temp_s := z_s ;

  z_s := temp_s ;

  if z_s<0 then z_s := 0 ;

  z_s := StrToFloat(Format('%2.2f', [z_s]));

  // 应该从数据库中得到, "考评"的项目编号为8
  zg_ai_id := 8 ;
  // 插入最终结果分数
  zh_Insert_SQL := 'insert into tm_autogetbidlist values('+ IntToStr(z_AutoGet.z_Auto_g_gb_id) + ', ' + IntToStr(zg_ai_id) + ', ' + FloatToStr(z_s) + ')' ;
  zh_PublicInsDelUpdQueryP(zh_Insert_SQL); //*****//
  //
end;

// 4, 安全文明
procedure Tzfrm_AutoGetBid.z_TendercivilizationP();
var
  a,b,c,d,s,s1,temp_s: Double;
  x,y: Double;
begin
  //
  // 得到参数表名
  zg_ai_id := 7 ;
  z_ParamTabName := 'tm_funcparam' + IntToStr(zg_ai_id) ;
  // 得到 参数a值
  zh_Select_SQL := 'select a from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  a := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数b值
  zh_Select_SQL := 'select b from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  b := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数c值
  zh_Select_SQL := 'select c from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  c := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数d值
  zh_Select_SQL := 'select d from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  d := z_PublicQuery4F(zh_Select_SQL) ;  //***//

  // 得到 参数s值
  zh_Select_SQL := 'select s from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  z_s := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "国家文明"的项目编号为 20
  zg_ai_id := 20 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  x := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "省优文明"的项目编号为 21
  zg_ai_id := 21 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  y := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 条件运算
  s  := (x/a)*b ;
  s1 := (y/c)*d ;

  //showmessage(floattostr(s)+ ','+floattostr(s1)+ ','+floattostr(s2));
  temp_s := s + s1 ;
  //showmessage(floattostr(temp_s));
  if temp_s>z_s then temp_s := z_s ;

  z_s := temp_s ;

  if z_s<0 then z_s := 0 ;

  z_s := StrToFloat(Format('%2.2f', [z_s]));

  // 应该从数据库中得到, "安全文明"的项目编号为7
  zg_ai_id := 7 ;
  // 插入最终结果分数
  zh_Insert_SQL := 'insert into tm_autogetbidlist values('+ IntToStr(z_AutoGet.z_Auto_g_gb_id) + ', ' + IntToStr(zg_ai_id) + ', ' + FloatToStr(z_s) + ')' ;
  zh_PublicInsDelUpdQueryP(zh_Insert_SQL); //*****//
  //
end;


// 3, 业绩
procedure Tzfrm_AutoGetBid.z_TenderachievementP();
var
  a,b,c,d,e,f,s,s1,s2,temp_s: Double;
  x,y,z: Double;
begin
  //
  // 得到参数表名
  zg_ai_id := 6 ;
  z_ParamTabName := 'tm_funcparam' + IntToStr(zg_ai_id) ;
  // 得到 参数a值
  zh_Select_SQL := 'select a from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  a := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数b值
  zh_Select_SQL := 'select b from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  b := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数c值
  zh_Select_SQL := 'select c from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  c := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数d值
  zh_Select_SQL := 'select d from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  d := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数e值
  zh_Select_SQL := 'select e from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  e := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数f值
  zh_Select_SQL := 'select f from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  f := z_PublicQuery4F(zh_Select_SQL) ;  //***//

  // 得到 参数s值
  zh_Select_SQL := 'select s from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  z_s := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "国优面积"的项目编号为 17
  zg_ai_id := 17 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  x := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "省优面积"的项目编号为 18
  zg_ai_id := 18 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  y := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "其他优良面积"的项目编号为 19
  zg_ai_id := 19 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  z := z_PublicQuery4F(zh_Select_SQL) ; //***//


  // 条件运算
  s  := (x/a)*b ;
  s1 := (y/c)*d ;
  s2 := (z/e)*f ;

  //showmessage(floattostr(s)+ ','+floattostr(s1)+ ','+floattostr(s2));
  temp_s := s + s1 + s2 ;
  //showmessage(floattostr(temp_s));
  if temp_s>z_s then temp_s := z_s ;

  z_s := temp_s ;

  if z_s<0 then z_s := 0 ;

  z_s := StrToFloat(Format('%2.2f', [z_s]));

  // 应该从数据库中得到, "业绩"的项目编号为6
  zg_ai_id := 6 ;
  // 插入最终结果分数
  zh_Insert_SQL := 'insert into tm_autogetbidlist values('+ IntToStr(z_AutoGet.z_Auto_g_gb_id) + ', ' + IntToStr(zg_ai_id) + ', ' + FloatToStr(z_s) + ')' ;
  zh_PublicInsDelUpdQueryP(zh_Insert_SQL); //*****//
  //
end;

// 2, 质量
procedure Tzfrm_AutoGetBid.z_TenderQualityP();
var
  a,b,c,d,e,f,g,h,s,s1,s2,temp_s: Double;
  x,y,z,z1,z2,z3: Double;
begin
  //
  s := 0 ;
  s1 := 0 ;
  // 得到参数表名
  zg_ai_id := 5 ;
  z_ParamTabName := 'tm_funcparam' + IntToStr(zg_ai_id) ;
  // 得到 参数a值
  zh_Select_SQL := 'select a from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  a := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数b值
  zh_Select_SQL := 'select b from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  b := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数c值
  zh_Select_SQL := 'select c from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  c := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数d值
  zh_Select_SQL := 'select d from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  d := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数e值
  zh_Select_SQL := 'select e from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  e := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数f值
  zh_Select_SQL := 'select f from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  f := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数g值
  zh_Select_SQL := 'select g from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  g := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数h值
  zh_Select_SQL := 'select h from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  h := z_PublicQuery4F(zh_Select_SQL) ;  //***//
  // 得到 参数s值
  zh_Select_SQL := 'select s from ' + z_ParamTabName + ' where  g_fp_id=' + IntToStr(z_FuncParamPlanI) ;
  z_s := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "验收合格率"的项目编号为 15
  zg_ai_id := 15 ;
  // 得到 参数x值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  x := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "优良品率"的项目编号为 16
  zg_ai_id := 16 ;
  // 得到 参数y值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  y := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "国优面积"的项目编号为 17
  zg_ai_id := 17 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  z1 := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "省优面积"的项目编号为 18
  zg_ai_id := 18 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  z2 := z_PublicQuery4F(zh_Select_SQL) ; //***//

  // 应该从数据库中得到, "其他优良面积"的项目编号为 19
  zg_ai_id := 19 ;
  // 得到 参数z值
  zh_Select_SQL := 'select x from tm_assessdata where (g_ui_id = '+ IntToStr(z_AutoGet.z_Auto_g_ui_id) + ') and (g_ai_id = ' + IntToStr(zg_ai_id) + ')' ;
  z3 := z_PublicQuery4F(zh_Select_SQL) ; //***//
  // 得到 参数z值
  z := z1 + z2 + z3 ;

  // 条件运算
  if x>=a then s := b ;
  if x<=0 then s := 0 ;

  if (y<c) or (z<d) then
  begin
    s1 := 0 ;
    s2 := 0 ;
  end
  else
  begin
    if (y>c) and (z>d) then s1 := e ;
    if ((y-c)/f)>=((z-d)/g) then
      s2 := ((z-d)/g)*h
    else
      s2 := ((y-c)/f)*h ;
  end;
  //showmessage(floattostr(s)+ ','+floattostr(s1)+ ','+floattostr(s2));
  temp_s := s + s1 + s2 ;
  if temp_s>z_s then temp_s := z_s ;

  z_s := temp_s ;
  if z_s<0 then z_s := 0 ;
  //showmessage(floattostr(z_s));
  z_s := StrToFloat(Format('%2.2f', [z_s]));
  //showmessage(floattostr(z_s));
  // 应该从数据库中得到, "质量"的项目编号为 5
  zg_ai_id := 5 ;
  // 插入最终结果分数
  zh_Insert_SQL := 'insert into tm_autogetbidlist values('+ IntToStr(z_AutoGet.z_Auto_g_gb_id) + ', ' + IntToStr(zg_ai_id) + ', ' + FloatToStr(z_s) + ')' ;
  zh_PublicInsDelUpdQueryP(zh_Insert_SQL); //*****//
  //
end;

⌨️ 快捷键说明

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