Bladeren bron

TODO: 删除准入范围和资质对应关系表

yuedefeng 5 jaren geleden
bovenliggende
commit
e9e411d82a

+ 3 - 3
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplierService.go

@@ -71,7 +71,7 @@ func (s *OilSupplierService) GetMyPagingEntitiesWithOrderBytbl2(supplierTableNam
 	//获取总记录数
 	sqlCount := `select count(DISTINCT b.Id) from ` + supplierTableName + ` a `
 	sqlCount += ` left join ` + supplierCertTableName + " b on b.SupplierId = a.Id"
-	sqlCount += ` left join ` + "OilSupplierCert2File c on c.SupplierId = a.Id and c.SupplierCertId = b.Id"
+	sqlCount += ` left join ` + "OilSupplierCertSub c on c.SupplierCertId = b.Id"
 	sqlCount += ` where ` + where
 
 	var sql string
@@ -90,14 +90,14 @@ func (s *OilSupplierService) GetMyPagingEntitiesWithOrderBytbl2(supplierTableNam
 	sql += ` b.WorkflowId, b.CreateOn ,b.ProcessKey,b.BusinessKey,b.BackRemark,b.IsRestrict`
 	sql += ` from ` + supplierTableName + ` a `
 	sql += ` left join ` + supplierCertTableName + " b on b.SupplierId = a.Id"
-	sql += ` left join ` + "OilSupplierCert2File c on c.SupplierId = a.Id and c.SupplierCertId = b.Id"
+	sql += ` left join ` + "OilSupplierCertSub c on c.SupplierCertId = b.Id"
 	sql += ` where ` + where
 	if asc {
 		sql += ` order by ` + orderby + ` ASC `
 	} else {
 		sql += ` order by ` + orderby + ` DESC `
 	}
-	if (pageIndex != 0 && itemsPerPage !=0) {
+	if pageIndex != 0 && itemsPerPage !=0 {
 		sql += ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
 	}
 	s.DBE.SQL(sql).Find(entitiesPtr)

+ 3 - 2
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsub.go

@@ -165,7 +165,8 @@ type OilSupplierOpinion struct {
 	ModifiedBy        string    `xorm:"VARCHAR(50)"`
 }
 
-type OilSupplierCert2File struct {
+// TODO: 删除准入范围和资质对应关系表
+/* type OilSupplierCert2File struct {
 	Id               int       `xorm:"not null pk autoincr INT(10)"`
 	SupplierId       int       `xorm:"not null default 0 comment('供方基本信息表主键') INT(10)"`
 	SupplierCertId   int       `xorm:"not null default 0 comment('供方准入证书信息表主键') INT(10)"`
@@ -184,7 +185,7 @@ type OilSupplierCert2File struct {
 	ModifiedOn       time.Time `xorm:"DATETIME"`
 	ModifiedUserId   int       `xorm:"INT(10)"`
 	ModifiedBy       string    `xorm:"VARCHAR(50)"`
-}
+}*/
 
 //对比分析差异表
 type OilCompare struct {

+ 2 - 1
src/dashoo.cn/backend/api/controllers/base.go

@@ -257,7 +257,8 @@ var (
 	OilQualChangeDetailAnnualName            string = "OilQualChangeDetailAnnual"       //年审资质变更表
 	BaseTableHeader                          string = "Base_TableHeader"                //资质配置字典信息表
 	BaseBadRecord                            string = "BadRecord"                       //不良记录表
-	OilSupplierCert2FileName                 string = "OilSupplierCert2File"            // 准入与资质对应关系表
+	// TODO: 删除准入范围和资质对应关系表
+	// OilSupplierCert2FileName                 string = "OilSupplierCert2File"         // 准入与资质对应关系表
 	OilCorporateInfoName                     string = "OilCorporateInfo"                //企业用户注册临时表
 	OilSupplierPauseReasonName               string = "OilSupplierPauseReason"
 	OilPaymentInfoName                       string = "OilPaymentInfo" //交费信息

+ 4 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -2025,8 +2025,10 @@ func (this *InfoChangeController) BusinessDelete(SupplierId string) {
 				svc.DeleteEntityBytbl(OilSupplierFileName, where) //删除第j条资质数据
 
 			}
-			where = " SupplierId=" + strconv.Itoa(datamain.SupplierId) + " and SupplierTypeCode =" + SupplierTypeCode + " and SubClassId=" + strconv.Itoa(subClassId)
-			svc.DeleteEntityBytbl(OilSupplierCert2FileName, where)
+
+			// TODO: 删除准入范围和资质对应关系表
+			/*where = " SupplierId=" + strconv.Itoa(datamain.SupplierId) + " and SupplierTypeCode =" + SupplierTypeCode + " and SubClassId=" + strconv.Itoa(subClassId)
+			svc.DeleteEntityBytbl(OilSupplierCert2FileName, where)*/
 
 			where = " Id= " + Ids[i] + " and SupplierTypeCode =" + SupplierTypeCode
 			svc.DeleteEntityBytbl(OilSupplierCertSubName, where) //删除OilSupplierCertSub单条准入范围

+ 5 - 4
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1,7 +1,6 @@
 package oilsupplier
 
 import (
-	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"dashoo.cn/backend/api/business/oilsupplier/supplierscenefile"
 	"dashoo.cn/backend/api/business/register"
 	"dashoo.cn/business3/parameter"
@@ -1809,14 +1808,16 @@ func (this *OilSupplierController) DeleteAllEntity() {
 	}
 	svc := supplier.GetOilSupplierService(utils.DBE)
 	err := svc.DeleteEntityBytbl(OilSupplierCertName, "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'")
-	err = svc.DeleteEntityBytbl(OilSupplierCert2FileName, "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'")
 	err = svc.DeleteEntityBytbl(OilSupplierFileName, "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'")
 
-	var model1 suppliercertsub.OilSupplierCert2File
+	// TODO: 删除准入范围和资质对应关系表
+	// err = svc.DeleteEntityBytbl(OilSupplierCert2FileName, "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'")
+	/* var model1 suppliercertsub.OilSupplierCert2File
 	count1, _ := svc.GetCount(&model1, "SupplierId="+Id)
 	if count1 == 0 {
 		err = svc.DeleteEntityBytbl(OilSupplierFileName, "SupplierId="+Id)
-	}
+	}*/
+
 	var model2 suppliercert.OilSupplierCert
 	count2, _ := svc.GetCount(&model2, "SupplierId="+Id)
 	if count2 == 0 {

+ 10 - 6
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappendsub.go

@@ -187,7 +187,9 @@ func (this *OilSupplierCertAppendSubController) AddAppendSub() {
 	if !has{
 		//添加到准入分类表中
 		_, err = svc.InsertEntityBytbl(OilSupplierCertSubName, &model)
-		var supplierCertModel suppliercert.OilSupplierCert
+
+		// TODO: 删除准入范围和资质对应关系表
+		/*var supplierCertModel suppliercert.OilSupplierCert
 		svcCert := suppliercert.GetOilSupplierCertService(utils.DBE)
 		svcCert.GetEntityById(model.SupplierCertId, &supplierCertModel)
 
@@ -242,7 +244,7 @@ func (this *OilSupplierCertAppendSubController) AddAppendSub() {
 				cert2File.NeedFileType = needList[i].FileName
 				svc.InsertEntityBytbl(OilSupplierCert2FileName, &cert2File)
 			}
-		}
+		}*/
 	}
 
 	var errinfo ErrorDataInfo
@@ -299,7 +301,8 @@ func (this *OilSupplierCertAppendSubController) AddTechBus() {
 			datamain.Id = 0
 			svc.InsertEntityBytbl(OilSupplierCertSubName, &datamain)
 
-			paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+			// TODO: 删除准入范围和资质对应关系表
+			/*paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
 			filesvc := supplierfile.GetSupplierfileService(utils.DBE)
 			needList := filesvc.GetTechNeedFileList(strconv.Itoa(dataother.CheckList[n].Id))
 
@@ -336,7 +339,7 @@ func (this *OilSupplierCertAppendSubController) AddTechBus() {
 				cert2File.Name = dataother.CheckList[n].Name
 				cert2File.NeedFileType = needList[i].FileName
 				svc.InsertEntityBytbl(OilSupplierCert2FileName, &cert2File)
-			}
+			}*/
 
 		}
 	}
@@ -390,7 +393,8 @@ func (this *OilSupplierCertAppendSubController) AddGoodsBus() {
 			datamain.Id = 0
 			svc.InsertEntityBytbl(OilSupplierCertSubName, &datamain)
 
-			paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+			// TODO: 删除准入范围和资质对应关系表
+			/*paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
 			filesvc := supplierfile.GetSupplierfileService(utils.DBE)
 			needList := filesvc.GetGoodsNeedFileList(dataother.CheckList[n].Id,"2")
 			if supplierCertModel.InStyle == "4" {
@@ -428,7 +432,7 @@ func (this *OilSupplierCertAppendSubController) AddGoodsBus() {
 				cert2File.Name = dataother.CheckList[n].Name
 				cert2File.NeedFileType = needList[i].FileName
 				svc.InsertEntityBytbl(OilSupplierCert2FileName, &cert2File)
-			}
+			}*/
 
 		}
 	}

+ 18 - 10
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -561,8 +561,10 @@ func (this *OilSupplierCertSubController) AddGoodsByFilter() {
 
 			//插入准入范围表
 			svc.InsertEntityBytbl(OilSupplierCertSubName, &datamain)
+
+			// TODO: 删除准入范围和资质对应关系表
 			//插入准入范围所需资质记录表
-			for _, needHeader := range needList {
+			/*for _, needHeader := range needList {
 				if (supplierModel.CredentialFlag == "1" || supplierModel.CredentialFlag == "2") &&
 					strings.Contains(mergerCertSkipField, needHeader.FileName+",") {
 					//三证合一或五证合一的证件,不需要保存
@@ -580,7 +582,7 @@ func (this *OilSupplierCertSubController) AddGoodsByFilter() {
 				cert2File.Name = dataother.CheckList[n].Name
 				cert2File.NeedFileType = needHeader.FileName
 				svc.InsertEntityBytbl(OilSupplierCert2FileName, &cert2File)
-			}
+			}*/
 			vaildCnt++
 		}
 	}
@@ -734,7 +736,8 @@ func (this *OilSupplierCertSubController) AddTechBus() {
 			datamain.Id = 0
 			svc.InsertEntityBytbl(OilSupplierCertSubName, &datamain)
 
-			paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+			// TODO: 删除准入范围和资质对应关系表
+			/*paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
 			filesvc := supplierfile.GetSupplierfileService(utils.DBE)
 			needList := filesvc.GetTechNeedFileList(strconv.Itoa(dataother.CheckList[n].Id))
 
@@ -771,7 +774,7 @@ func (this *OilSupplierCertSubController) AddTechBus() {
 				cert2File.Name = dataother.CheckList[n].Name
 				cert2File.NeedFileType = needList[i].FileName
 				svc.InsertEntityBytbl(OilSupplierCert2FileName, &cert2File)
-			}
+			}*/
 		}
 	}
 
@@ -900,7 +903,8 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 		model.Id = submodel.Id
 	}
 
-	var supplierCertModel suppliercert.OilSupplierCert
+	// TODO: 删除准入范围和资质对应关系表
+	/* var supplierCertModel suppliercert.OilSupplierCert
 	svcCert := suppliercert.GetOilSupplierCertService(utils.DBE)
 	svcCert.GetEntityById(model.SupplierCertId, &supplierCertModel)
 
@@ -956,7 +960,8 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 			svc.InsertEntityBytbl(OilSupplierCert2FileName, &cert2File)
 		}
 
-	}
+	}*/
+
 	var errinfo ErrorDataInfo
 	if err == nil {
 		errinfo.Message = "操作成功!"
@@ -992,9 +997,11 @@ func (this *OilSupplierCertSubController) BusinessDelete() {
 	//根据Id查出OilSupplierCertSub的SubClassId
 	svc := suppliercertsub.GetOilSupplierCertSubService(utils.DBE) //获得数据库引擎
 	where := "delete from " + OilSupplierCertSubName + " where Id in (" + Id + ")" // 没有删除的准入范围
-	whereCert2File := "delete from " + OilSupplierCert2FileName + " where SupplierCertSubId in (" + Id + ")" // 没有删除的准入范围
 	svc.DBE.Exec(where)
-	svc.DBE.Exec(whereCert2File)
+
+	// TODO: 删除准入范围和资质对应关系表
+	/*whereCert2File := "delete from " + OilSupplierCert2FileName + " where SupplierCertSubId in (" + Id + ")" // 没有删除的准入范围
+	svc.DBE.Exec(whereCert2File)*/
 
 	errinfo.Message = "删除成功!"
 	errinfo.Code = 0
@@ -1258,12 +1265,13 @@ func setManufacturerHandler(manufacturerChangeDTO suppliercertsub.ManufacturerCh
 	return invalidCertMsg
 }
 
-type OilSupplierCert2File struct {
+// TODO: 删除准入范围和资质对应关系表
+/* type OilSupplierCert2File struct {
 	Id            int    `json:"not null pk autoincr INT(10)"`
 	certSubId     int    `json:"not null default 0 comment('供方基本信息表主键') INT(10)"`
 	certSubStatus int    `json:"not null default 0 comment('供方准入证书信息表主键') INT(10)"`
 	stopReason    string `json:"not null default '0' comment('准入类别代码(1 物资类,2 基建类,3 技术服务类)') VARCHAR(5)"`
-}
+}*/
 
 type LostCertFiles struct {
 	Code          string

+ 3 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/supplierfile.go

@@ -1,7 +1,6 @@
 package oilsupplier
 
 import (
-	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"dashoo.cn/backend/api/business/oilsupplier/tableheader"
 	"dashoo.cn/business2/parameter"
 	"encoding/json"
@@ -133,7 +132,8 @@ func (this *SupplierfileController) FileList() {
 	}
 	where = where + " and SupType not in (2, 4)"
 
-	SubClassIds := this.GetString("SubClassIds")
+	// TODO: 删除准入范围和资质对应关系表
+	/* SubClassIds := this.GetString("SubClassIds")
 	if SubClassIds!=""{
 		inWhere:="("+SubClassIds+")"
 		sql:=" SupplierId="+SupplierId+" and SubClassId in "+inWhere
@@ -148,7 +148,7 @@ func (this *SupplierfileController) FileList() {
 
 		}
 		where=where +" and NeedFileType in ("+str[0:len(str)-1]+")"
-	}
+	} */
 
 	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo

+ 3 - 2
src/dashoo.cn/backend/api/controllers/tmpzcgf/tmpzcgf.go

@@ -790,8 +790,9 @@ func (this *TmpzcgfController) ClearAll() {
 	sql = "truncate table OilSupplierCert"
 	svc.DBE.Query(sql)
 
-	sql = "truncate table OilSupplierCert2File"
-	svc.DBE.Query(sql)
+	// TODO: 删除准入范围和资质对应关系表
+	/*sql = "truncate table OilSupplierCert2File"
+	svc.DBE.Query(sql)*/
 
 	sql = "truncate table OilSupplierCertAppend"
 	svc.DBE.Query(sql)