Bladeren bron

后:历史数据

dubch 5 jaren geleden
bovenliggende
commit
678ae213a9

+ 3 - 1
src/dashoo.cn/backend/api/business/tmpzcgf/tmpzcgfSession.go

@@ -420,6 +420,8 @@ func (s *TmpzcgtSession) InsertOilSupplierCertSub() error {
 				"from tmp_zengxiang " +
 				"limit " + start + "," +  end
 			_, err = s.DBE.Query(sql)
+			s.UpdateCertSubIsType2()
+			s.UpdateOilSupplierCertSub()
 		}
 	}
 
@@ -454,7 +456,7 @@ func (s *TmpzcgtSession) UpdateCertSubIsType2() error {
 		"b.SupplierId = IFNULL(a.`SupplierId`, 0), " +
 		"b.SupplierCertId = IFNULL(a.`SupplierCertId`, 0), " +
 		"b.SupplierCertAppendId = IFNULL(a.`Id`, 0) " +
-		"where b.Type = '3'"
+		"where b.Type = '3' and (b.SupplierId is null or b.SupplierId = 0)"
 	_, err := s.DBE.Query(sql)
 	return err
 }

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

@@ -873,9 +873,9 @@ func (this *TmpzcgfController) InsertAll() {
 	this.InsertOilSupplierCertAppend()
 	this.UpdateOilSupplierCertAppend()
 	this.InsertOilSupplierCertSub() //插入增项的准入范围
-	this.UpdateCertSubIsType1() // 更新增项的准入范围
+	//this.UpdateCertSubIsType1() // 更新增项的准入范围 在插入调用了
 
-	this.CapacityExpansion() // 编码扩充
+	//this.CapacityExpansion() // 编码扩充  在插入调用了
 	// 历史数据导入-由于运行到此处中断,上面的代码临时注释
 	// this.UpdateCertSubIsType3() // 更新增项的准入范围 弃用 2020年11月26日
 	this.InsterAnnualAudit()