浏览代码

后:批量添加准入范围

dubch 5 年之前
父节点
当前提交
b9d4b59fb9

+ 1 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/paymentinfo.go

@@ -748,7 +748,7 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
 	payBankSvc := paymentbankinfo.GetPaymentSelectService(utils.DBE)
 	payBankSvc.InsertEntity(paymentBankInfo)
 
-	errInfo.Message = "修改成功!"
+	errInfo.Message = "确认成功!"
 	errInfo.Code = 0
 	this.Data["json"] = &errInfo
 	this.ServeJSON()

+ 52 - 7
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -4,6 +4,7 @@ import (
 	"dashoo.cn/backend/api/business/oilsupplier/goodsaptitudeclass"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappendsub"
 	"dashoo.cn/backend/api/business/oilsupplier/supplierpausereason"
 	"dashoo.cn/backend/api/business/oilsupplier/tableheader"
 	"dashoo.cn/backend/api/business/organize"
@@ -414,13 +415,28 @@ func (this *OilSupplierCertSubController) CheckCertSubLost () {
 			var fileist1 supplierfile.OilSupplierFile
 			where1 := " SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "' and NeedFileType = '" + needHeader.FileName + "'"
 			filesvc.GetEntityByWhere(OilSupplierFileName, where1, &fileist1)
-			if !strings.Contains(companyHasHeaders, needHeader.FileName+",") || fileist1.FileName == "" {
-				//缺少的资质
+
+			var filelist2 suppliercertappendsub.OilAppendChangeDetail
+			where2 := " SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "' and NeedFileType = '" +needHeader.FileName + "'"
+			svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService (utils.DBE)
+			svc2.GetEntityByWhere(OilAppendChangeDetailName, where2, &filelist2)
+
+			if !strings.Contains(companyHasHeaders, needHeader.FileName+",") {
 				var tmpLostCert LostCertFiles
 				tmpLostCert.Code = dataother.CheckList[n].Code
 				tmpLostCert.Name = dataother.CheckList[n].Name
 				tmpLostCert.CertFileName = needHeader.FileName
 				lostCertList = append(lostCertList, tmpLostCert)
+			} else {
+				// 1准入 2增项
+				if (fileist1.SupType == 1 && fileist1.FileName == "") || (fileist1.SupType == 2 && filelist2.FileName == "") {
+					//缺少的资质
+					var tmpLostCert LostCertFiles
+					tmpLostCert.Code = dataother.CheckList[n].Code
+					tmpLostCert.Name = dataother.CheckList[n].Name
+					tmpLostCert.CertFileName = needHeader.FileName
+					lostCertList = append(lostCertList, tmpLostCert)
+				}
 			}
 		}
 	}
@@ -637,13 +653,28 @@ func (this *OilSupplierCertSubController) CheckTechCertLost() {
 			var fileist1 supplierfile.OilSupplierFile
 			where1 := " SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "' and NeedFileType = '" + needList[i].FileName + "'"
 			filesvc.GetEntityByWhere(OilSupplierFileName, where1, &fileist1)
-			if !strings.Contains(companyHasHeaders, needList[i].FileName+",") || fileist1.FileName == "" {
-				//缺少的资质
+
+			var filelist2 suppliercertappendsub.OilAppendChangeDetail
+			where2 := " SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "' and NeedFileType = '" + needList[i].FileName + "'"
+			svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService (utils.DBE)
+			svc2.GetEntityByWhere(OilAppendChangeDetailName, where2, &filelist2)
+
+			if !strings.Contains(companyHasHeaders, needList[i].FileName+",") {
 				var tmpLostCert LostCertFiles
 				tmpLostCert.Code = dataother.CheckList[n].Code
 				tmpLostCert.Name = dataother.CheckList[n].Name
 				tmpLostCert.CertFileName = needList[i].FileName
 				lostCertList = append(lostCertList, tmpLostCert)
+			} else {
+				// 1准入 2增项
+				if (fileist1.SupType == 1 && fileist1.FileName == "") || (fileist1.SupType == 2 && filelist2.FileName == "") {
+					//缺少的资质
+					var tmpLostCert LostCertFiles
+					tmpLostCert.Code = dataother.CheckList[n].Code
+					tmpLostCert.Name = dataother.CheckList[n].Name
+					tmpLostCert.CertFileName = needList[i].FileName
+					lostCertList = append(lostCertList, tmpLostCert)
+				}
 			}
 		}
 	}
@@ -806,14 +837,28 @@ func (this *OilSupplierCertSubController) CheckBasisBusinessLost() {
 			var fileist1 supplierfile.OilSupplierFile
 			where1 := " SupplierId = '" + strconv.Itoa(model.SupplierId) + "' and NeedFileType = '" + needList[i].FileName + "'"
 			filesvc.GetEntityByWhere(OilSupplierFileName, where1, &fileist1)
-			if !strings.Contains(companyHasHeaders, needList[i].FileName+",") || fileist1.FileName == "" {
-			//if !strings.Contains(companyHasHeaders, needList[i].FileName+",") {
-				//缺少的资质
+
+			var filelist2 suppliercertappendsub.OilAppendChangeDetail
+			where2 := " SupplierId = '" + strconv.Itoa(model.SupplierId) + "' and NeedFileType = '" + needList[i].FileName + "'"
+			svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService (utils.DBE)
+			svc2.GetEntityByWhere(OilAppendChangeDetailName, where2, &filelist2)
+
+			if !strings.Contains(companyHasHeaders, needList[i].FileName+",") {
 				var tmpLostCert LostCertFiles
 				tmpLostCert.Code = model.Code
 				tmpLostCert.Name = model.Name
 				tmpLostCert.CertFileName = needList[i].FileName
 				lostCertList = append(lostCertList, tmpLostCert)
+			} else {
+				// 1准入 2增项
+				if (fileist1.SupType == 1 && fileist1.FileName == "") || (fileist1.SupType == 2 && filelist2.FileName == "") {
+					//缺少的资质
+					var tmpLostCert LostCertFiles
+					tmpLostCert.Code = model.Code
+					tmpLostCert.Name = model.Name
+					tmpLostCert.CertFileName = needList[i].FileName
+					lostCertList = append(lostCertList, tmpLostCert)
+				}
 			}
 		}
 	}