|
|
@@ -3,7 +3,6 @@ package tmpzcgf
|
|
|
import (
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/goodsaptitudeclass"
|
|
|
"fmt"
|
|
|
- "strconv"
|
|
|
"time"
|
|
|
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/infochange"
|
|
|
@@ -674,11 +673,18 @@ func (this *TmpzcgfController) CapacityExpansion() {
|
|
|
wheresup := " SupplierTypeCode='01' and LENGTH(CODE) < 8 "
|
|
|
svc.GetEntities(&supplierCertSubList, wheresup)
|
|
|
// 准入项
|
|
|
- for _, supplierCertSub := range supplierCertSubList {
|
|
|
+ totalLen := len(supplierCertSubList)
|
|
|
+ for certSubIdx, supplierCertSub := range supplierCertSubList {
|
|
|
+
|
|
|
var goodsAptitudeClassList []goodsaptitudeclass.OilGoodsAptitudeClass
|
|
|
whereclass := "Code like '" + supplierCertSub.Code + "%' and LENGTH(CODE) = 8"
|
|
|
svc.GetEntities(&goodsAptitudeClassList, whereclass)
|
|
|
|
|
|
+ totalClassLen := len(goodsAptitudeClassList)
|
|
|
+ elapsed1 := time.Since(t)
|
|
|
+ fmt.Sprintf("编码扩充总条数:%d, 当前序号:%d, 编码条数:%d, 总计时间:%s \n",
|
|
|
+ totalLen, certSubIdx, totalClassLen, elapsed1)
|
|
|
+
|
|
|
// 扩充的编码
|
|
|
var entityList []suppliercertsub.OilSupplierCertSub
|
|
|
for classIdx, goodsAptitudeClass := range goodsAptitudeClassList {
|
|
|
@@ -704,11 +710,9 @@ func (this *TmpzcgfController) CapacityExpansion() {
|
|
|
entityList = append(entityList, entity)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- wheredel := "Id = " + strconv.Itoa(supplierCertSub.Id)
|
|
|
- svc.DeleteEntityBytbl(OilSupplierCertSubName, wheredel)
|
|
|
-
|
|
|
}
|
|
|
+ // wheredel := "Id = " + strconv.Itoa(supplierCertSub.Id)
|
|
|
+ svc.DeleteEntityBytbl(OilSupplierCertSubName, wheresup)
|
|
|
|
|
|
elapsed := time.Since(t)
|
|
|
fmt.Println(elapsed)
|