瀏覽代碼

物资收费

lining 6 年之前
父節點
當前提交
2fe9a66c0c
共有 1 個文件被更改,包括 17 次插入6 次删除
  1. 17 6
      src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

+ 17 - 6
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -6,6 +6,7 @@ import (
 	msg2 "dashoo.cn/backend/api/business/msg"
 	"dashoo.cn/backend/api/business/oilsupplier/oilcostmanage"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"dashoo.cn/backend/api/business/organize"
 	"dashoo.cn/backend/api/business/paymentinfo"
 	"dashoo.cn/business2/parameter"
@@ -1006,12 +1007,22 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 					payinfo.CreateUserId = supplierCertEntity.CreateUserId
 					payinfo.CreateBy = supplierCertEntity.CreateBy
 					payinfo.CreateOn = time.Now()
-					paysvc.InsertEntity(&payinfo)
-					//发短信
-					toMobile := supplierEntity.Mobile
-					msg:= "您的"+supplierCertEntity.SupplierTypeName + "准入审核通过,请及时确认缴费信息!"
-					msgService := msg2.GetMsgService(utils.DBE)
-					msgService.HandleMsg(toMobile,msg,"3-1",supplierCertEntity.CreateBy,supplierEntity.ContactName,strconv.Itoa(supplierCertEntity.CreateUserId))
+
+					wheresup := " SupplierCertId=" + strconv.Itoa(supplierCertEntity.Id)
+					var sup []suppliercertsub.OilSupplierCertSub
+					total := paysvc.GetPagingEntitiesWithOrder(1,10,"Id",true,&sup,wheresup)
+
+					if supplierCertEntity.SupplierTypeCode == "01" && total <= 50 {
+
+					} else {
+						paysvc.InsertEntity(&payinfo)
+						//发短信
+						toMobile := supplierEntity.Mobile
+						msg:= "您的"+supplierCertEntity.SupplierTypeName + "准入审核通过,请及时确认缴费信息!"
+						msgService := msg2.GetMsgService(utils.DBE)
+						msgService.HandleMsg(toMobile,msg,"3-1",supplierCertEntity.CreateBy,supplierEntity.ContactName,strconv.Itoa(supplierCertEntity.CreateUserId))
+					}
+
 					//paysvc.AddPaymentinfo(supplierCertEntity.SupplierId, supplierCertEntity.Id, Amount, "1")
 					supplierCertEntity.Status = status
 					supplierCertEntity.Step = step