Pārlūkot izejas kodu

bug修改

Signed-off-by: lijunqing <lijunqing@dashoo.cn>
lijunqing 6 gadi atpakaļ
vecāks
revīzija
bc1d4bcbd9

+ 18 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -1,6 +1,7 @@
 package oilsupplier
 
 import (
+	msg2 "dashoo.cn/backend/api/business/msg"
 	"dashoo.cn/backend/api/business/audithistory"
 	"dashoo.cn/backend/api/business/baseUser"
 	"dashoo.cn/backend/api/business/oilsupplier/infochange"
@@ -645,6 +646,10 @@ func (this *AnnualAuditController) AnnualAudit() {
 	var list annualaudit.OilAnnualAudit
 	where := " Id = '" + strconv.Itoa(dataother.AnnualId) + "'"
 	svc.GetEntityByWhere(""+OilAnnualAuditName, where, &list)
+
+	var supplierEntity supplier.OilSupplier
+	wheresup := "Id=" + strconv.Itoa(list.SupplierId)
+	svc.GetEntity(&supplierEntity, wheresup)
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
 	//审核状态判断进行的操作
 	step := 2
@@ -741,6 +746,19 @@ func (this *AnnualAuditController) AnnualAudit() {
 			payinfo.CreateBy = list.CreateBy
 			payinfo.CreateOn = time.Now()
 			paysvc.InsertEntity(&payinfo)
+			//发短信
+			toMobile := supplierEntity.Mobile
+			bFlag:=""
+			if list.SupplierTypeName == "01"{
+				bFlag="物资类"
+			}else if list.SupplierTypeName == "02"{
+				bFlag="基建类"
+			}else{
+				bFlag="技术服务类"
+			}
+			msg:= "您的"+ bFlag + "年审审核通过,请及时确认缴费信息!"
+			msgService := msg2.GetMsgService(utils.DBE)
+			msgService.HandleMsg(toMobile,msg,"4-1",list.CreateBy,supplierEntity.ContactName,strconv.Itoa(list.CreateUserId))
 		}else {
 			auditmodel.ApplyTime = oldaplydate
 		}