2
3
Prechádzať zdrojové kódy

后端: 获取缺资质的准入列表

baichengfei 4 rokov pred
rodič
commit
4c4e702bac

+ 21 - 6
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -3806,12 +3806,8 @@ func (this *OilSupplierController) CheckSupplierFileList() {
 	this.ServeJSON()
 }
 
-// @Title 标记缺资质的准入
-// @Description
-// @Success	200	{object} controllers.Request
-// @router /statistic-lack-cert [post]
-func (this *OilSupplierController) GetLackCertList() {
-	var file supplierfile.CheckFile
+func (this *OilSupplierController) markLackCert(file supplierfile.CheckFile) {
+	//var file supplierfile.CheckFile
 	var jsonBlob = this.Ctx.Input.RequestBody
 	json.Unmarshal(jsonBlob, &file)
 	//获取主表信息
@@ -4049,3 +4045,22 @@ func (this *OilSupplierController) GetSupplierCertId() {
 	this.ServeJSON()
 
 }
+
+// @Title 获取缺资质的准入列表
+// @Description
+// @Success 200 {object}
+// @router /lack-cert-list [get]
+func (this *OilSupplierController) GetLackCertList() {
+	certService := suppliercert.GetOilSupplierCertService(utils.DBE)
+	var allCertList []suppliercert.OilSupplierCert
+	where := " Status = '8' or Status = '11' "
+	certService.GetEntitysByWhere(OilSupplierCertName, where, &allCertList)
+	if len(allCertList) > 0 {
+		for _, certEntity := range allCertList {
+			var file supplierfile.CheckFile
+			file.CertId = string(certEntity.Id)
+			// 其他字段值
+			this.markLackCert(file)
+		}
+	}
+}