ljm il y a 6 ans
Parent
commit
a0f6874f17

+ 75 - 74
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplier.go

@@ -5,80 +5,81 @@ import (
 )
 
 type OilSupplier struct {
-	Id                 int       `xorm:"not null pk autoincr INT(10)"`
-	SupplierName       string    `xorm:"comment('企业名称') VARCHAR(255)"`
-	OilCertificateNo   string    `xorm:"comment('中石油供应商证书号') VARCHAR(50)"`
-	Grade              string    `xorm:"comment('级别') VARCHAR(2)"`
-	MgrUnit            string    `xorm:"comment('管理单位') VARCHAR(50)"`
-	OperType           string    `xorm:"comment('经营方式') CHAR(1)"`
-	Country            string    `xorm:"comment('国家') VARCHAR(20)"`
-	MaunAgent          string    `xorm:"comment('所代理制造商名称') VARCHAR(100)"`
-	ConstructTeam      string    `xorm:"comment('施工队伍名称') VARCHAR(100)"`
-	CommercialNo       string    `xorm:"comment('工商注册号') VARCHAR(50)"`
-	OrganCode          string    `xorm:"comment('组织机构代码') VARCHAR(50)"`
-	CountryTaxNo       string    `xorm:"comment('税务登记证国税编号') VARCHAR(50)"`
-	LocalTaxNo         string    `xorm:"comment('税务登记证地税编号') VARCHAR(50)"`
-	Address            string    `xorm:"comment('单位地址') VARCHAR(100)"`
-	Province           string    `xorm:"comment('省直辖市') VARCHAR(20)"`
-	City               string    `xorm:"comment('地市区县') VARCHAR(20)"`
-	Street             string    `xorm:"comment('街道') VARCHAR(20)"`
-	HouseNo            string    `xorm:"comment('门牌号') VARCHAR(10)"`
-	ZipCode            string    `xorm:"comment('邮编') VARCHAR(20)"`
-	QualitySystemCert  string    `xorm:"comment('质量管理体系认证情况及认证机构') VARCHAR(200)"`
-	ProductQualityCert string    `xorm:"comment('产品质量认证情况及认证机构') VARCHAR(200)"`
-	MaunLicense        string    `xorm:"comment('生产制造许可证获证情况及编号') VARCHAR(200)"`
-	QualifCert         string    `xorm:"comment('企业资质证书编号') VARCHAR(200)"`
-	QualifCertLevel    string    `xorm:"comment('企业资质证书级别') VARCHAR(10)"`
-	SafetyLicense      string    `xorm:"comment('安全生产许可证') VARCHAR(200)"`
-	TechServiceLic     string    `xorm:"comment('技术服务类准入许可证') VARCHAR(200)"`
-	TjinNotify         string    `xorm:"comment('外地企业进津备案通知书') VARCHAR(50)"`
-	SpecIndustryCert   string    `xorm:"comment('行业特殊要求的认证证书') VARCHAR(200)"`
-	LegalPerson        string    `xorm:"comment('法定代表人姓名') VARCHAR(20)"`
-	CategoryCode       string    `xorm:"comment('行业类别代码') VARCHAR(10)"`
-	CategoryName       string    `xorm:"comment('行业类别名称') VARCHAR(20)"`
-	RegCapital         float32   `xorm:"default 0 comment('注册资本') FLOAT"`
-	Currency           string    `xorm:"comment('币种') VARCHAR(10)"`
-	ContactName        string    `xorm:"comment('联系人姓名') VARCHAR(20)"`
-	CompanyType        string    `xorm:"comment('公司类型') VARCHAR(20)"`
-	SetupTime          string    `xorm:"comment('成立时间') VARCHAR(10)"`
-	DepositBank        string    `xorm:"comment('开户银行') VARCHAR(50)"`
-	BankAccount        string    `xorm:"comment('银行账号') VARCHAR(50)"`
-	Email              string    `xorm:"comment('电子邮箱') VARCHAR(50)"`
-	BankCreditRating   string    `xorm:"comment('银行信用等级') VARCHAR(10)"`
-	Mobile             string    `xorm:"comment('移动电话') VARCHAR(20)"`
-	Telphone           string    `xorm:"comment('固定电话') VARCHAR(20)"`
-	Fax                string    `xorm:"comment('传真') VARCHAR(20)"`
-	CompanyTel         string    `xorm:"comment('公司电话') VARCHAR(20)"`
-	QQ                 string    `xorm:"comment('QQ号码') VARCHAR(20)"`
-	CompanyUrl         string    `xorm:"comment('公司网址') VARCHAR(20)"`
-	SpecSupplier       string    `xorm:"default '0' comment('是否特殊业务供应商(可不招标)') VARCHAR(2)"`
-	SpecTypeCode       string    `xorm:"comment('业务类型(1战略合作,2内部多经,3区域关键,4专业化实施)') VARCHAR(2)"`
-	SpecTypeName       string    `xorm:"comment('业务类型(1战略合作,2内部多经,3区域关键,4专业化实施)') VARCHAR(20)"`
-	WorkerTotal        int       `xorm:"default 0 comment('企业员工总数') INT(10)"`
-	ContractNum        int       `xorm:"default 0 comment('合同化用工数量') INT(10)"`
-	UniversityNum      int       `xorm:"default 0 comment('大学及以上学历人员数量') INT(10)"`
-	TechnicalNum       int       `xorm:"default 0 comment('技术、管理人员数量') INT(10)"`
-	AboveProfNum       int       `xorm:"default 0 comment('高级及以上职称人员数量') INT(10)"`
-	MiddleProfNum      int       `xorm:"default 0 comment('中级职称人员数量') INT(10)"`
-	NationalRegNum     int       `xorm:"default 0 comment('具有国家注册执业资格人员数量') INT(10)"`
-	NationalCertTotal  int       `xorm:"default 0 comment('具有国家注册执业资格证书总数') INT(10)"`
-	DesignerTotal      int       `xorm:"default 0 comment('设计人员总数') INT(10)"`
-	SkillerTotal       int       `xorm:"default 0 comment('技术工人总数') INT(10)"`
-	Remark             string    `xorm:"comment('备注') VARCHAR(500)"`
-	IsDelete           int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
-	CreateOn           time.Time `xorm:"DATETIME"`
-	CreateUserId       int       `xorm:"INT(10)"`
-	CreateBy           string    `xorm:"VARCHAR(50)"`
-	ModifiedOn         time.Time `xorm:"DATETIME"`
-	ModifiedUserId     int       `xorm:"INT(10)"`
-	ModifiedBy         string    `xorm:"VARCHAR(50)"`
+	Id                 int     `xorm:"not null pk autoincr INT(10)"`
+	SupplierName       string  `xorm:"comment('企业名称') VARCHAR(255)"`
+	OilCertificateNo   string  `xorm:"comment('中石油供应商证书号') VARCHAR(50)"`
+	Grade              string  `xorm:"comment('级别') VARCHAR(2)"`
+	MgrUnit            string  `xorm:"comment('管理单位') VARCHAR(50)"`
+	OperType           string  `xorm:"comment('经营方式') CHAR(1)"`
+	Country            string  `xorm:"comment('国家') VARCHAR(20)"`
+	MaunAgent          string  `xorm:"comment('所代理制造商名称') VARCHAR(100)"`
+	ConstructTeam      string  `xorm:"comment('施工队伍名称') VARCHAR(100)"`
+	CommercialNo       string  `xorm:"comment('工商注册号') VARCHAR(50)"`
+	OrganCode          string  `xorm:"comment('组织机构代码') VARCHAR(50)"`
+	CountryTaxNo       string  `xorm:"comment('税务登记证国税编号') VARCHAR(50)"`
+	LocalTaxNo         string  `xorm:"comment('税务登记证地税编号') VARCHAR(50)"`
+	Address            string  `xorm:"comment('单位地址') VARCHAR(100)"`
+	Province           string  `xorm:"comment('省直辖市') VARCHAR(20)"`
+	City               string  `xorm:"comment('地市区县') VARCHAR(20)"`
+	Street             string  `xorm:"comment('街道') VARCHAR(20)"`
+	HouseNo            string  `xorm:"comment('门牌号') VARCHAR(10)"`
+	ZipCode            string  `xorm:"comment('邮编') VARCHAR(20)"`
+	QualitySystemCert  string  `xorm:"comment('质量管理体系认证情况及认证机构') VARCHAR(200)"`
+	ProductQualityCert string  `xorm:"comment('产品质量认证情况及认证机构') VARCHAR(200)"`
+	MaunLicense        string  `xorm:"comment('生产制造许可证获证情况及编号') VARCHAR(200)"`
+	QualifCert         string  `xorm:"comment('企业资质证书编号') VARCHAR(200)"`
+	QualifCertLevel    string  `xorm:"comment('企业资质证书级别') VARCHAR(10)"`
+	SafetyLicense      string  `xorm:"comment('安全生产许可证') VARCHAR(200)"`
+	TechServiceLic     string  `xorm:"comment('技术服务类准入许可证') VARCHAR(200)"`
+	TjinNotify         string  `xorm:"comment('外地企业进津备案通知书') VARCHAR(50)"`
+	SpecIndustryCert   string  `xorm:"comment('行业特殊要求的认证证书') VARCHAR(200)"`
+	LegalPerson        string  `xorm:"comment('法定代表人姓名') VARCHAR(20)"`
+	CategoryCode       string  `xorm:"comment('行业类别代码') VARCHAR(10)"`
+	CategoryName       string  `xorm:"comment('行业类别名称') VARCHAR(20)"`
+	RegCapital         float32 `xorm:"default 0 comment('注册资本') FLOAT"`
+	Currency           string  `xorm:"comment('币种') VARCHAR(10)"`
+	ContactName        string  `xorm:"comment('联系人姓名') VARCHAR(20)"`
+	CompanyType        string  `xorm:"comment('公司类型') VARCHAR(20)"`
+	SetupTime          string  `xorm:"comment('成立时间') VARCHAR(10)"`
+	DepositBank        string  `xorm:"comment('开户银行') VARCHAR(50)"`
+	BankAccount        string  `xorm:"comment('银行账号') VARCHAR(50)"`
+	Email              string  `xorm:"comment('电子邮箱') VARCHAR(50)"`
+	BankCreditRating   string  `xorm:"comment('银行信用等级') VARCHAR(10)"`
+	Mobile             string  `xorm:"comment('移动电话') VARCHAR(20)"`
+	Telphone           string  `xorm:"comment('固定电话') VARCHAR(20)"`
+	Fax                string  `xorm:"comment('传真') VARCHAR(20)"`
+	CompanyTel         string  `xorm:"comment('公司电话') VARCHAR(20)"`
+	QQ                 string  `xorm:"comment('QQ号码') VARCHAR(20)"`
+	CompanyUrl         string  `xorm:"comment('公司网址') VARCHAR(20)"`
+	SpecSupplier       string  `xorm:"default '0' comment('是否特殊业务供应商(可不招标)') VARCHAR(2)"`
+	SpecTypeCode       string  `xorm:"comment('业务类型(1战略合作,2内部多经,3区域关键,4专业化实施)') VARCHAR(2)"`
+	SpecTypeName       string  `xorm:"comment('业务类型(1战略合作,2内部多经,3区域关键,4专业化实施)') VARCHAR(20)"`
+
+	Remark         string    `xorm:"comment('备注') VARCHAR(500)"`
+	IsDelete       int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
+	CreateOn       time.Time `xorm:"DATETIME"`
+	CreateUserId   int       `xorm:"INT(10)"`
+	CreateBy       string    `xorm:"VARCHAR(50)"`
+	ModifiedOn     time.Time `xorm:"DATETIME"`
+	ModifiedUserId int       `xorm:"INT(10)"`
+	ModifiedBy     string    `xorm:"VARCHAR(50)"`
 }
 
 type OilSupplierView struct {
-	OilSupplier		 `xorm:"extends"`
-	CertId           string
-	AccessCardNo     string
-	SupplierTypeCode string
-	SupplierTypeName string
-	Step			 int
-}
+	OilSupplier       `xorm:"extends"`
+	CertId            string
+	AccessCardNo      string
+	SupplierTypeCode  string
+	SupplierTypeName  string
+	Step              int
+	WorkerTotal       int `xorm:"default 0 comment('企业员工总数') INT(10)"`
+	ContractNum       int `xorm:"default 0 comment('合同化用工数量') INT(10)"`
+	UniversityNum     int `xorm:"default 0 comment('大学及以上学历人员数量') INT(10)"`
+	TechnicalNum      int `xorm:"default 0 comment('技术、管理人员数量') INT(10)"`
+	AboveProfNum      int `xorm:"default 0 comment('高级及以上职称人员数量') INT(10)"`
+	MiddleProfNum     int `xorm:"default 0 comment('中级职称人员数量') INT(10)"`
+	NationalRegNum    int `xorm:"default 0 comment('具有国家注册执业资格人员数量') INT(10)"`
+	NationalCertTotal int `xorm:"default 0 comment('具有国家注册执业资格证书总数') INT(10)"`
+	DesignerTotal     int `xorm:"default 0 comment('设计人员总数') INT(10)"`
+	SkillerTotal      int `xorm:"default 0 comment('技术工人总数') INT(10)"`
+}

+ 49 - 39
src/dashoo.cn/backend/api/business/oilsupplier/suppliercert/oilsuppliercert.go

@@ -5,45 +5,55 @@ import (
 )
 
 type OilSupplierCert struct {
-	Id               int       `xorm:"not null pk autoincr INT(10)"`
-	SupplierId       int       `xorm:"not null comment('供方基本信息表主键') INT(10)"`
-	AccessCardNo     string    `xorm:"comment('准入证号') VARCHAR(20)"`
-	SupplierTypeCode string    `xorm:"comment('准入类别代码(1 物资类,2 基建类,3 技术服务类)') VARCHAR(5)"`
-	SupplierTypeName string    `xorm:"comment('准入类别名称(1 物资类,2 基建类,3 技术服务类)') VARCHAR(50)"`
-	RecUnitReason    string    `xorm:"comment('推荐单位的推荐意见') VARCHAR(800)"`
-	RecUnitPerson    string    `xorm:"comment('推荐单位负责人') VARCHAR(20)"`
-	RecDate          time.Time `xorm:"comment('推荐日期') DATETIME"`
-	RecUnitId        string    `xorm:"comment('推荐单位编码') VARCHAR(10)"`
-	RecUnitName      string    `xorm:"comment('推荐单位名称') VARCHAR(50)"`
-	Status           string    `xorm:"not null default '0' comment('状态标识(0未申请,1办理完毕)') VARCHAR(10)"`
-	BackReason       string    `xorm:"comment('退回原因') VARCHAR(50)"`
-	InFlag           string    `xorm:"default '0' comment('准入标识') VARCHAR(10)"`
-	EffectStartTime  time.Time `xorm:"comment('有效期起') DATETIME"`
-	EffectEndTime    time.Time `xorm:"comment('有效期止') DATETIME"`
-	AuditProcessNote string    `xorm:"comment('办理过程备注') VARCHAR(100)"`
-	AuditDate        time.Time `xorm:"comment('审核日期') DATETIME"`
-	PayNotice        string    `xorm:"default '0' comment('交费通知') VARCHAR(2)"`
-	SupplierStatus   string    `xorm:"comment('供应商状态(null:正常,1中止,2终止)') VARCHAR(255)"`
-	MgrType          string    `xorm:"comment('供应商管理类型') VARCHAR(255)"`
-	Type             string    `xorm:"comment('供应商类型') VARCHAR(255)"`
-	MgrUnit          string    `xorm:"comment('管理单位') VARCHAR(255)"`
-	AddinTime        string    `xorm:"comment('准入日期') VARCHAR(255)"`
-	EffectTime       string    `xorm:"comment('生效日期') VARCHAR(255)"`
-	ApplyTime        string    `xorm:"comment('年审到期日期') VARCHAR(255)"`
-	SupplierNo       string    `xorm:"comment('供应商准入证编号') VARCHAR(255)"`
-	MdmFlag          string    `xorm:"default '0' comment('MDM标志') VARCHAR(2)"`
-	InternalFlag     string    `xorm:"comment('国内采购') VARCHAR(255)"`
-	ImportFlag       string    `xorm:"comment('进口采购') VARCHAR(255)"`
-	OutsideFlog      string    `xorm:"comment('境外项目') VARCHAR(255)"`
-	Step		     int       `xorm:"comment('页面上第几步') INT(10)"`
-	Remark           string    `xorm:"comment('备注') VARCHAR(500)"`
-	IsDelete         int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
-	CreateOn         time.Time `xorm:"DATETIME"`
-	CreateUserId     int       `xorm:"INT(10)"`
-	CreateBy         string    `xorm:"VARCHAR(50)"`
-	ModifiedOn       time.Time `xorm:"DATETIME"`
-	ModifiedUserId   int       `xorm:"INT(10)"`
-	ModifiedBy       string    `xorm:"VARCHAR(50)"`
+	Id                int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierId        int       `xorm:"not null comment('供方基本信息表主键') INT(10)"`
+	AccessCardNo      string    `xorm:"comment('准入证号') VARCHAR(20)"`
+	SupplierTypeCode  string    `xorm:"comment('准入类别代码(1 物资类,2 基建类,3 技术服务类)') VARCHAR(5)"`
+	SupplierTypeName  string    `xorm:"comment('准入类别名称(1 物资类,2 基建类,3 技术服务类)') VARCHAR(50)"`
+	RecUnitReason     string    `xorm:"comment('推荐单位的推荐意见') VARCHAR(800)"`
+	RecUnitPerson     string    `xorm:"comment('推荐单位负责人') VARCHAR(20)"`
+	RecDate           time.Time `xorm:"comment('推荐日期') DATETIME"`
+	RecUnitId         string    `xorm:"comment('推荐单位编码') VARCHAR(10)"`
+	RecUnitName       string    `xorm:"comment('推荐单位名称') VARCHAR(50)"`
+	Status            string    `xorm:"not null default '0' comment('状态标识(0未申请,1办理完毕)') VARCHAR(10)"`
+	BackReason        string    `xorm:"comment('退回原因') VARCHAR(50)"`
+	InFlag            string    `xorm:"default '0' comment('准入标识') VARCHAR(10)"`
+	EffectStartTime   time.Time `xorm:"comment('有效期起') DATETIME"`
+	EffectEndTime     time.Time `xorm:"comment('有效期止') DATETIME"`
+	AuditProcessNote  string    `xorm:"comment('办理过程备注') VARCHAR(100)"`
+	AuditDate         time.Time `xorm:"comment('审核日期') DATETIME"`
+	PayNotice         string    `xorm:"default '0' comment('交费通知') VARCHAR(2)"`
+	SupplierStatus    string    `xorm:"comment('供应商状态(null:正常,1中止,2终止)') VARCHAR(255)"`
+	MgrType           string    `xorm:"comment('供应商管理类型') VARCHAR(255)"`
+	Type              string    `xorm:"comment('供应商类型') VARCHAR(255)"`
+	MgrUnit           string    `xorm:"comment('管理单位') VARCHAR(255)"`
+	AddinTime         string    `xorm:"comment('准入日期') VARCHAR(255)"`
+	EffectTime        string    `xorm:"comment('生效日期') VARCHAR(255)"`
+	ApplyTime         string    `xorm:"comment('年审到期日期') VARCHAR(255)"`
+	SupplierNo        string    `xorm:"comment('供应商准入证编号') VARCHAR(255)"`
+	MdmFlag           string    `xorm:"default '0' comment('MDM标志') VARCHAR(2)"`
+	InternalFlag      string    `xorm:"comment('国内采购') VARCHAR(255)"`
+	ImportFlag        string    `xorm:"comment('进口采购') VARCHAR(255)"`
+	OutsideFlog       string    `xorm:"comment('境外项目') VARCHAR(255)"`
+	Step              int       `xorm:"comment('页面上第几步') INT(10)"`
+	Remark            string    `xorm:"comment('备注') VARCHAR(500)"`
+	IsDelete          int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
+	WorkerTotal       int       `xorm:"default 0 comment('企业员工总数') INT(10)"`
+	ContractNum       int       `xorm:"default 0 comment('合同化用工数量') INT(10)"`
+	UniversityNum     int       `xorm:"default 0 comment('大学及以上学历人员数量') INT(10)"`
+	TechnicalNum      int       `xorm:"default 0 comment('技术、管理人员数量') INT(10)"`
+	AboveProfNum      int       `xorm:"default 0 comment('高级及以上职称人员数量') INT(10)"`
+	MiddleProfNum     int       `xorm:"default 0 comment('中级职称人员数量') INT(10)"`
+	NationalRegNum    int       `xorm:"default 0 comment('具有国家注册执业资格人员数量') INT(10)"`
+	NationalCertTotal int       `xorm:"default 0 comment('具有国家注册执业资格证书总数') INT(10)"`
+	DesignerTotal     int       `xorm:"default 0 comment('设计人员总数') INT(10)"`
+	SkillerTotal      int       `xorm:"default 0 comment('技术工人总数') INT(10)"`
+	CreateOn          time.Time `xorm:"DATETIME"`
+	CreateUserId      int       `xorm:"INT(10)"`
+	CreateBy          string    `xorm:"VARCHAR(50)"`
+	ModifiedOn        time.Time `xorm:"DATETIME"`
+	ModifiedUserId    int       `xorm:"INT(10)"`
+	ModifiedBy        string    `xorm:"VARCHAR(50)"`
 }
 
 type OilSupplierVM struct {

+ 8 - 124
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1,17 +1,18 @@
 package oilsupplier
 
 import (
-	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
-	"dashoo.cn/business/userRole"
+	"encoding/json"
+	"strconv"
+	"strings"
+	"time"
+
 	"dashoo.cn/backend/api/business/baseUser"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
 	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/business/userRole"
 	"dashoo.cn/utils"
-	"encoding/json"
 	"github.com/go-xorm/xorm"
-	"strconv"
-	"strings"
-	"time"
 )
 
 type OilSupplierController struct {
@@ -99,282 +100,226 @@ func (this *OilSupplierController) GetEntityList() {
 		where = where + " and Id like '%" + Id + "%'"
 	}
 
-
 	if SupplierName != "" {
 		where = where + " and SupplierName like '%" + SupplierName + "%'"
 	}
 
-
 	if OilCertificateNo != "" {
 		where = where + " and OilCertificateNo like '%" + OilCertificateNo + "%'"
 	}
 
-
 	if Grade != "" {
 		where = where + " and Grade like '%" + Grade + "%'"
 	}
 
-
 	if MgrUnit != "" {
 		where = where + " and MgrUnit like '%" + MgrUnit + "%'"
 	}
 
-
 	if OperType != "" {
 		where = where + " and OperType like '%" + OperType + "%'"
 	}
 
-
 	if Country != "" {
 		where = where + " and Country like '%" + Country + "%'"
 	}
 
-
 	if MaunAgent != "" {
 		where = where + " and MaunAgent like '%" + MaunAgent + "%'"
 	}
 
-
 	if ConstructTeam != "" {
 		where = where + " and ConstructTeam like '%" + ConstructTeam + "%'"
 	}
 
-
 	if CommercialNo != "" {
 		where = where + " and CommercialNo like '%" + CommercialNo + "%'"
 	}
 
-
 	if OrganCode != "" {
 		where = where + " and OrganCode like '%" + OrganCode + "%'"
 	}
 
-
 	if CountryTaxNo != "" {
 		where = where + " and CountryTaxNo like '%" + CountryTaxNo + "%'"
 	}
 
-
 	if LocalTaxNo != "" {
 		where = where + " and LocalTaxNo like '%" + LocalTaxNo + "%'"
 	}
 
-
 	if Address != "" {
 		where = where + " and Address like '%" + Address + "%'"
 	}
 
-
 	if Province != "" {
 		where = where + " and Province like '%" + Province + "%'"
 	}
 
-
 	if City != "" {
 		where = where + " and City like '%" + City + "%'"
 	}
 
-
 	if Street != "" {
 		where = where + " and Street like '%" + Street + "%'"
 	}
 
-
 	if HouseNo != "" {
 		where = where + " and HouseNo like '%" + HouseNo + "%'"
 	}
 
-
 	if ZipCode != "" {
 		where = where + " and ZipCode like '%" + ZipCode + "%'"
 	}
 
-
 	if QualitySystemCert != "" {
 		where = where + " and QualitySystemCert like '%" + QualitySystemCert + "%'"
 	}
 
-
 	if ProductQualityCert != "" {
 		where = where + " and ProductQualityCert like '%" + ProductQualityCert + "%'"
 	}
 
-
 	if MaunLicense != "" {
 		where = where + " and MaunLicense like '%" + MaunLicense + "%'"
 	}
 
-
 	if QualifCert != "" {
 		where = where + " and QualifCert like '%" + QualifCert + "%'"
 	}
 
-
 	if QualifCertLevel != "" {
 		where = where + " and QualifCertLevel like '%" + QualifCertLevel + "%'"
 	}
 
-
 	if SafetyLicense != "" {
 		where = where + " and SafetyLicense like '%" + SafetyLicense + "%'"
 	}
 
-
 	if TechServiceLic != "" {
 		where = where + " and TechServiceLic like '%" + TechServiceLic + "%'"
 	}
 
-
 	if TJInNotify != "" {
 		where = where + " and TJInNotify like '%" + TJInNotify + "%'"
 	}
 
-
 	if SpecIndustryCert != "" {
 		where = where + " and SpecIndustryCert like '%" + SpecIndustryCert + "%'"
 	}
 
-
 	if LegalPerson != "" {
 		where = where + " and LegalPerson like '%" + LegalPerson + "%'"
 	}
 
-
 	if CategoryCode != "" {
 		where = where + " and CategoryCode like '%" + CategoryCode + "%'"
 	}
 
-
 	if CategoryName != "" {
 		where = where + " and CategoryName like '%" + CategoryName + "%'"
 	}
 
-
 	if RegCapital != "" {
 		where = where + " and RegCapital like '%" + RegCapital + "%'"
 	}
 
-
 	if Currency != "" {
 		where = where + " and Currency like '%" + Currency + "%'"
 	}
 
-
 	if ContactName != "" {
 		where = where + " and ContactName like '%" + ContactName + "%'"
 	}
 
-
 	if CompanyType != "" {
 		where = where + " and CompanyType like '%" + CompanyType + "%'"
 	}
 
-
 	if SetupTime != "" {
 		where = where + " and SetupTime like '%" + SetupTime + "%'"
 	}
 
-
 	if DepositBank != "" {
 		where = where + " and DepositBank like '%" + DepositBank + "%'"
 	}
 
-
 	if BankAccount != "" {
 		where = where + " and BankAccount like '%" + BankAccount + "%'"
 	}
 
-
 	if EMail != "" {
 		where = where + " and EMail like '%" + EMail + "%'"
 	}
 
-
 	if BankCreditRating != "" {
 		where = where + " and BankCreditRating like '%" + BankCreditRating + "%'"
 	}
 
-
 	if Mobile != "" {
 		where = where + " and Mobile like '%" + Mobile + "%'"
 	}
 
-
 	if Telphone != "" {
 		where = where + " and Telphone like '%" + Telphone + "%'"
 	}
 
-
 	if Fax != "" {
 		where = where + " and Fax like '%" + Fax + "%'"
 	}
 
-
 	if CompanyTel != "" {
 		where = where + " and CompanyTel like '%" + CompanyTel + "%'"
 	}
 
-
 	if QQ != "" {
 		where = where + " and QQ like '%" + QQ + "%'"
 	}
 
-
 	if CompanyUrl != "" {
 		where = where + " and CompanyUrl like '%" + CompanyUrl + "%'"
 	}
 
-
 	if SpecSupplier != "" {
 		where = where + " and SpecSupplier like '%" + SpecSupplier + "%'"
 	}
 
-
 	if SpecTypeCode != "" {
 		where = where + " and SpecTypeCode like '%" + SpecTypeCode + "%'"
 	}
 
-
 	if SpecTypeName != "" {
 		where = where + " and SpecTypeName like '%" + SpecTypeName + "%'"
 	}
 
-
 	if Remark != "" {
 		where = where + " and Remark like '%" + Remark + "%'"
 	}
 
-
 	if IsDelete != "" {
 		where = where + " and IsDelete like '%" + IsDelete + "%'"
 	}
 
-
 	if CreateUserId != "" {
 		where = where + " and CreateUserId like '%" + CreateUserId + "%'"
 	}
 
-
 	if CreateBy != "" {
 		where = where + " and CreateBy like '%" + CreateBy + "%'"
 	}
 
-
 	if ModifiedOn != "" {
 		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
 	}
 
-
 	if ModifiedUserId != "" {
 		where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
 	}
 
-
 	if ModifiedBy != "" {
 		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
 	}
 
-
 	if CreateOn != "" {
 		dates := strings.Split(CreateOn, ",")
 		if len(dates) == 2 {
@@ -468,252 +413,202 @@ func (this *OilSupplierController) GetJoinCertEntityList() {
 	CreateOn := this.GetString("CreateOn")
 	SupplierTypeCode := this.GetString("SupplierTypeCode")
 
-
 	if Id != "" {
 		where = where + " and a.Id like '%" + Id + "%'"
 	}
 
-
 	if SupplierName != "" {
 		where = where + " and a.SupplierName like '%" + SupplierName + "%'"
 	}
 
-
 	if OilCertificateNo != "" {
 		where = where + " and a.OilCertificateNo like '%" + OilCertificateNo + "%'"
 	}
 
-
 	if Grade != "" {
 		where = where + " and a.Grade like '%" + Grade + "%'"
 	}
 
-
 	if MgrUnit != "" {
 		where = where + " and a.MgrUnit like '%" + MgrUnit + "%'"
 	}
 
-
 	if OperType != "" {
 		where = where + " and a.OperType like '%" + OperType + "%'"
 	}
 
-
 	if Country != "" {
 		where = where + " and a.Country like '%" + Country + "%'"
 	}
 
-
 	if MaunAgent != "" {
 		where = where + " and a.MaunAgent like '%" + MaunAgent + "%'"
 	}
 
-
 	if ConstructTeam != "" {
 		where = where + " and a.ConstructTeam like '%" + ConstructTeam + "%'"
 	}
 
-
 	if CommercialNo != "" {
 		where = where + " and a.CommercialNo like '%" + CommercialNo + "%'"
 	}
 
-
 	if OrganCode != "" {
 		where = where + " and a.OrganCode like '%" + OrganCode + "%'"
 	}
 
-
 	if CountryTaxNo != "" {
 		where = where + " and a.CountryTaxNo like '%" + CountryTaxNo + "%'"
 	}
 
-
 	if LocalTaxNo != "" {
 		where = where + " and a.LocalTaxNo like '%" + LocalTaxNo + "%'"
 	}
 
-
 	if Address != "" {
 		where = where + " and a.Address like '%" + Address + "%'"
 	}
 
-
 	if Province != "" {
 		where = where + " and a.Province like '%" + Province + "%'"
 	}
 
-
 	if City != "" {
 		where = where + " and a.City like '%" + City + "%'"
 	}
 
-
 	if Street != "" {
 		where = where + " and a.Street like '%" + Street + "%'"
 	}
 
-
 	if HouseNo != "" {
 		where = where + " and a.HouseNo like '%" + HouseNo + "%'"
 	}
 
-
 	if ZipCode != "" {
 		where = where + " and a.ZipCode like '%" + ZipCode + "%'"
 	}
 
-
 	if QualitySystemCert != "" {
 		where = where + " and a.QualitySystemCert like '%" + QualitySystemCert + "%'"
 	}
 
-
 	if ProductQualityCert != "" {
 		where = where + " and a.ProductQualityCert like '%" + ProductQualityCert + "%'"
 	}
 
-
 	if MaunLicense != "" {
 		where = where + " and a.MaunLicense like '%" + MaunLicense + "%'"
 	}
 
-
 	if QualifCert != "" {
 		where = where + " and a.QualifCert like '%" + QualifCert + "%'"
 	}
 
-
 	if QualifCertLevel != "" {
 		where = where + " and a.QualifCertLevel like '%" + QualifCertLevel + "%'"
 	}
 
-
 	if SafetyLicense != "" {
 		where = where + " and a.SafetyLicense like '%" + SafetyLicense + "%'"
 	}
 
-
 	if TechServiceLic != "" {
 		where = where + " and a.TechServiceLic like '%" + TechServiceLic + "%'"
 	}
 
-
 	if TJInNotify != "" {
 		where = where + " and a.TJInNotify like '%" + TJInNotify + "%'"
 	}
 
-
 	if SpecIndustryCert != "" {
 		where = where + " and a.SpecIndustryCert like '%" + SpecIndustryCert + "%'"
 	}
 
-
 	if LegalPerson != "" {
 		where = where + " and a.LegalPerson like '%" + LegalPerson + "%'"
 	}
 
-
 	if CategoryCode != "" {
 		where = where + " and a.CategoryCode like '%" + CategoryCode + "%'"
 	}
 
-
 	if CategoryName != "" {
 		where = where + " and a.CategoryName like '%" + CategoryName + "%'"
 	}
 
-
 	if RegCapital != "" {
 		where = where + " and a.RegCapital like '%" + RegCapital + "%'"
 	}
 
-
 	if Currency != "" {
 		where = where + " and a.Currency like '%" + Currency + "%'"
 	}
 
-
 	if ContactName != "" {
 		where = where + " and a.ContactName like '%" + ContactName + "%'"
 	}
 
-
 	if CompanyType != "" {
 		where = where + " and a.CompanyType like '%" + CompanyType + "%'"
 	}
 
-
 	if SetupTime != "" {
 		where = where + " and a.SetupTime like '%" + SetupTime + "%'"
 	}
 
-
 	if DepositBank != "" {
 		where = where + " and a.DepositBank like '%" + DepositBank + "%'"
 	}
 
-
 	if BankAccount != "" {
 		where = where + " and a.BankAccount like '%" + BankAccount + "%'"
 	}
 
-
 	if EMail != "" {
 		where = where + " and a.EMail like '%" + EMail + "%'"
 	}
 
-
 	if BankCreditRating != "" {
 		where = where + " and a.BankCreditRating like '%" + BankCreditRating + "%'"
 	}
 
-
 	if Mobile != "" {
 		where = where + " and a.Mobile like '%" + Mobile + "%'"
 	}
 
-
 	if Telphone != "" {
 		where = where + " and a.Telphone like '%" + Telphone + "%'"
 	}
 
-
 	if Fax != "" {
 		where = where + " and a.Fax like '%" + Fax + "%'"
 	}
 
-
 	if CompanyTel != "" {
 		where = where + " and a.CompanyTel like '%" + CompanyTel + "%'"
 	}
 
-
 	if QQ != "" {
 		where = where + " and a.QQ like '%" + QQ + "%'"
 	}
 
-
 	if CompanyUrl != "" {
 		where = where + " and a.CompanyUrl like '%" + CompanyUrl + "%'"
 	}
 
-
 	if SpecSupplier != "" {
 		where = where + " and a.SpecSupplier like '%" + SpecSupplier + "%'"
 	}
 
-
 	if SpecTypeCode != "" {
 		where = where + " and a.SpecTypeCode like '%" + SpecTypeCode + "%'"
 	}
 
-
 	if SpecTypeName != "" {
 		where = where + " and a.SpecTypeName like '%" + SpecTypeName + "%'"
 	}
 
-
 	if Remark != "" {
 		where = where + " and a.Remark like '%" + Remark + "%'"
 	}
@@ -826,7 +721,7 @@ func (this *OilSupplierController) GetEntityAndCert() {
 	svc.GetEntityByIdBytbl(OilSupplierName, Id, &model)
 
 	var sql string
-	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName, b.Step from ` + OilSupplierName + ` a `
+	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName, b.Step, b.WorkerTotal, b.ContractNum, b.UniversityNum, b.TechnicalNum, b.AboveProfNum, b.MiddleProfNum, b.NationalRegNum, b.NationalCertTotal, b.DesignerTotal, b.SkillerTotal from ` + OilSupplierName + ` a `
 	sql += ` left join ` + OilSupplierCertName + " b on b.SupplierId = a.Id"
 	sql += ` where b.Id ='` + Id + `'`
 	utils.DBE.SQL(sql).Get(&model)
@@ -856,7 +751,6 @@ func (this *OilSupplierController) AddEntity() {
 	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 	//model.OrganizeId, _ = utils.StrTo(this.User.DepartmentId).Int()
 
-
 	defer session.Close()
 	err := session.Begin()
 	_, err = svc.InsertEntityBytbl(OilSupplierName, &model)
@@ -1047,8 +941,6 @@ func (this *OilSupplierController) UpdateEntity() {
 		"ModifiedUserId",
 
 		"ModifiedBy",
-
-
 	}
 	err := svc.UpdateEntityBytbl(OilSupplierName, id, &model, cols)
 	if err == nil {
@@ -1082,7 +974,6 @@ func (this *OilSupplierController) UpdateNumberEntity() {
 		return
 	}
 
-
 	var modelCert suppliercert.OilSupplierCert
 	svcCert := suppliercert.GetOilSupplierCertService(utils.DBE)
 
@@ -1092,8 +983,6 @@ func (this *OilSupplierController) UpdateNumberEntity() {
 	modelCert.ModifiedBy = this.User.Realname
 	modelCert.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
 
-
-
 	colcerts := []string{
 		"Id",
 		"WorkerTotal",
@@ -1106,11 +995,8 @@ func (this *OilSupplierController) UpdateNumberEntity() {
 		"NationalCertTotal",
 		"DesignerTotal",
 		"SkillerTotal",
-
 		"ModifiedOn",
-
 		"ModifiedUserId",
-
 		"ModifiedBy",
 	}
 	if modelCert.Step <= 2 {
@@ -1120,7 +1006,6 @@ func (this *OilSupplierController) UpdateNumberEntity() {
 
 	err := svcCert.UpdateEntityBytbl(OilSupplierCertName, certId, &modelCert, colcerts)
 
-
 	if err == nil {
 		errinfo.Message = "保存成功!"
 		errinfo.Code = 0
@@ -1177,4 +1062,3 @@ func (this *OilSupplierController) StartAudit() {
 	svcFlow := supplier.GetOilSupplierService(utils.DBE)
 	svcFlow.StartAudit()
 }
-

+ 1 - 1
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplier.js

@@ -45,7 +45,7 @@ export default {
       data: formData
     })
   },
-  updateEntityNumber (entityId, formData, myAxios) {
+  updateNumberEntity (entityId, formData, myAxios) {
     return myAxios({
       url: '/supplier/updatenumber/' + entityId,
       method: 'post',

+ 25 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -357,7 +357,7 @@
             <div slot="header" class="clearfix">
               <span>企业人员结构情况</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="updateEntityNumber">保存人员结构情况</el-button>
+                <el-button type="primary" size="mini" @click="updateNumberEntity">保存人员结构情况</el-button>
               </span>
             </div>
 
@@ -609,7 +609,16 @@
           SpecSupplier: '',
           SpecTypeCode: '',
           SpecTypeName: '',
-
+          WorkerTotal: 0,
+          ContractNum: 0,
+          UniversityNum: 0,
+          TechnicalNum: 0,
+          AboveProfNum: 0,
+          MiddleProfNum: 0,
+          NationalRegNum: 0,
+          NationalCertTotal: 0,
+          DesignerTotal: 0,
+          SkillerTotal: 0,
           Remark: '',
           IsDelete: '',
           CreateOn: '',
@@ -664,6 +673,7 @@
       this.serviceId = this.$route.params.opera
       this.certId = this.$route.query.certid
       this.getDictOptions()
+
       if (this.serviceId != 'add' && this.serviceId > 0) {
         this.formData.Id = this.serviceId
         this.initDatas()
@@ -695,6 +705,16 @@
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
             this.formData = res.data
+            this.formDataCert.WorkerTotal = this.formData.WorkerTotal
+            this.formDataCert.ContractNum = this.formData.ContractNum
+            this.formDataCert.UniversityNum = this.formData.UniversityNum
+            this.formDataCert.TechnicalNum = this.formData.TechnicalNum
+            this.formDataCert.AboveProfNum = this.formData.AboveProfNum
+            this.formDataCert.MiddleProfNum = this.formData.MiddleProfNum
+            this.formDataCert.NationalRegNum = this.formData.NationalRegNum
+            this.formDataCert.NationalCertTotal = this.formData.NationalCertTotal
+            this.formDataCert.DesignerTotal = this.formData.DesignerTotal
+            this.formDataCert.SkillerTotal = this.formData.SkillerTotal
           }).catch(err => {
             console.error(err)
           });
@@ -792,12 +812,12 @@
         }
         return true
       },
-
-      updateEntityNumber() {
+      //企业人员结构情况
+      updateNumberEntity() {
         if (!this.CheckCompanyBase()) {
           return false
         }
-        api.updateEntityNumber(this.formData.Id + '_' + this.certId, this.formData, this.$axios).then(res => {
+        api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(res => {
           if (res.data.code === 0) {
             //保存成功后,初始化数据,变成修改
             this.initDatas()