|
|
@@ -420,9 +420,12 @@ func (this *TmpzcgfController) UpdateCertSubclassID() {
|
|
|
var goodsAptitudeClassList []goodsaptitudeclass.OilGoodsAptitudeClass
|
|
|
where := "1=1"
|
|
|
svc.GetEntities(&goodsAptitudeClassList, where)
|
|
|
+ svc.DBE.Query("SET unique_checks=0;")
|
|
|
+ svc.DBE.Query("SET autocommit=0;")
|
|
|
for _, item := range goodsAptitudeClassList {
|
|
|
sql := "UPDATE OilSupplierCertSub SET SubClassId = " + strconv.Itoa(item.Id) + " WHERE SupplierTypeCode = '01' and Code = '" + item.Code + "'"
|
|
|
svc.DBE.Query(sql)
|
|
|
+ svc.DBE.Query("COMMIT;")
|
|
|
}
|
|
|
|
|
|
var basisBuildList []basisbuild.OilBasisBuild
|
|
|
@@ -431,6 +434,7 @@ func (this *TmpzcgfController) UpdateCertSubclassID() {
|
|
|
for _, item := range basisBuildList {
|
|
|
sql := "UPDATE OilSupplierCertSub SET SubClassId = " + strconv.Itoa(item.Id) + " WHERE SupplierTypeCode = '02' and Code = '" + item.Code + "'"
|
|
|
svc.DBE.Query(sql)
|
|
|
+ svc.DBE.Query("COMMIT;")
|
|
|
}
|
|
|
|
|
|
var technologyServiceClassList []technologyserviceclass.OilTechnologyServiceClass
|
|
|
@@ -439,7 +443,10 @@ func (this *TmpzcgfController) UpdateCertSubclassID() {
|
|
|
for _, item := range technologyServiceClassList {
|
|
|
sql := "UPDATE OilSupplierCertSub SET SubClassId = " + strconv.Itoa(item.Id) + " WHERE SupplierTypeCode = '03' and Code = '" + item.Code + "'"
|
|
|
svc.DBE.Query(sql)
|
|
|
+ svc.DBE.Query("COMMIT;")
|
|
|
}
|
|
|
+ svc.DBE.Query("SET autocommit=1;")
|
|
|
+ svc.DBE.Query("SET unique_checks=1;")
|
|
|
|
|
|
// err = session.Commit()
|
|
|
// fmt.Println(err)
|
|
|
@@ -861,18 +868,18 @@ func (this *TmpzcgfController) ClearAll() {
|
|
|
func (this *TmpzcgfController) InsertAll() {
|
|
|
go func() {
|
|
|
//清空所有资质
|
|
|
- this.ClearAll()
|
|
|
-
|
|
|
- this.InsertSupplier()
|
|
|
- this.InsertSupplierCert()
|
|
|
- this.UpdateCertTypeAndInflag()
|
|
|
- this.UpdateSupplierId()
|
|
|
- this.InsertFileName()
|
|
|
- this.InsertCertSub() // 准入
|
|
|
- this.UpdateOilSupplierCertSub()
|
|
|
- this.InsertOilSupplierCertAppend()
|
|
|
- this.UpdateOilSupplierCertAppend()
|
|
|
- this.UpdateOilSupplierCertAppendSub() // 更新增项的准入范围
|
|
|
+ //this.ClearAll()
|
|
|
+ //
|
|
|
+ //this.InsertSupplier()
|
|
|
+ //this.InsertSupplierCert()
|
|
|
+ //this.UpdateCertTypeAndInflag()
|
|
|
+ //this.UpdateSupplierId()
|
|
|
+ //this.InsertFileName()
|
|
|
+ //this.InsertCertSub() // 准入
|
|
|
+ //this.UpdateOilSupplierCertSub()
|
|
|
+ //this.InsertOilSupplierCertAppend()
|
|
|
+ //this.UpdateOilSupplierCertAppend()
|
|
|
+ //this.UpdateOilSupplierCertAppendSub() // 更新增项的准入范围
|
|
|
this.UpdateCertSubclassID()
|
|
|
//this.CapacityExpansion() // 编码扩充 --弃用
|
|
|
//历史数据导入-由于运行到此处中断,上面的代码临时注释
|