WH01243 4 tahun lalu
induk
melakukan
7b9a20ba6e
1 mengubah file dengan 12 tambahan dan 8 penghapusan
  1. 12 8
      invoice/src/service/InvoiceService.go

+ 12 - 8
invoice/src/service/InvoiceService.go

@@ -60,7 +60,7 @@ func (u *InvoiceService) InvoiceAdd(solgan *entity.Invoice, resType string, isLo
 		if isLoop == 0 {
 			arr := strings.Split(entity.WarningEmail, ",")
 			for _, value := range arr {
-				util.SendPdf(value, true, solgan.OrderCode)
+				util.SendPdf(value, true, solgan.OrderCode,"发票开具时服务出现问题")
 			}
 			solgan.ResType = resType
 			solgan.IsRed = isRed
@@ -128,7 +128,7 @@ func (u *InvoiceService) InvoiceDownload(swno string, saleTax string, isRed stri
 		if isLoop == 0 {
 			arr := strings.Split(entity.WarningEmail, ",")
 			for _, value := range arr {
-				util.SendPdf(value, true, orderCode)
+				util.SendPdf(value, true, orderCode,"发票下载时服务出现问题")
 			}
 			solgan := entity.Invoice{
 				Swno:    swno,
@@ -170,6 +170,10 @@ func (u *InvoiceService) InvoiceDownload(swno string, saleTax string, isRed stri
 		}
 		return nil, 2, dat.ReturnMsg.Msg
 	} else {
+		arr := strings.Split(entity.WarningEmail, ",")
+		for _, value := range arr {
+			util.SendPdf(value, true, swno,"发票下载时出现问题")
+		}
 		return nil, 1, dat.ReturnMsg.Msg
 	}
 }
@@ -236,7 +240,7 @@ func (u *InvoiceService) InvoiceRedSubmit(fpdm string, fphm string,orderCode str
 		if isLoop == 0 {
 			arr := strings.Split(entity.WarningEmail, ",")
 			for _, value := range arr {
-				util.SendPdf(value, true,solgan.OrderCode)
+				util.SendPdf(value, true,solgan.OrderCode,"发票退票时服务出现问题")
 			}
 			u.OpeningTimer(solgan)
 		}
@@ -368,7 +372,7 @@ func (u *InvoiceService) Timer(swno string, saleTax string, isRed string, isfeed
 			if numb == entity.Frequency {
 				arr := strings.Split(entity.WarningEmail, ",")
 				for _, value := range arr {
-					util.SendPdf(value, false,orderCode)
+					util.SendPdf(value, false,orderCode,"排队中签章失败定时任务出现问题")
 				}
 				numb++
 			}
@@ -394,12 +398,12 @@ func (u *InvoiceService) Timer(swno string, saleTax string, isRed string, isfeed
 					util.Loger.Println("删除:", "流水号:", "fp_"+swno)
 					c.Stop()
 				}
-
 			} else {
 				redis.Del(core.GetConfiguration().Redis.Modules, "fp_"+swno)
 				c.Stop()
 			}
-		} else if (numb == 1) {
+		} else {
+			util.Callback(swno, saleTax,"", "", "", changed, isRed, resType, "true","",orderCode)
 			c.Stop()
 		}
 	})
@@ -516,7 +520,6 @@ func (u *InvoiceService) OpeningTimer(solgan *entity.Invoice) {
 				util.Loger.Println("删除:", "发票号码:", "xx_"+solgan.Yfphm)
 				redis.Del(core.GetConfiguration().Redis.Modules, "xx_"+solgan.Yfphm)
 				util.Callback(solgan.Swno, solgan.SaleTax, solgan.Yfpdm, solgan.Yfphm, "", solgan.Changed, solgan.IsRed, solgan.ResType, "true",solgan.Model,solgan.OrderCode)
-
 				c.Stop()
 			}
 		case "3":
@@ -527,8 +530,9 @@ func (u *InvoiceService) OpeningTimer(solgan *entity.Invoice) {
 				util.Loger.Println("删除:", "流水号:", "xx_"+solgan.Swno)
 				redis.Del(core.GetConfiguration().Redis.Modules, "xx_"+solgan.Swno)
 				util.Callback(solgan.Swno, solgan.SaleTax, solgan.Yfpdm, solgan.Yfphm, "", solgan.Changed, solgan.IsRed, solgan.ResType, "true",solgan.Model,solgan.OrderCode)
-
 				c.Stop()
+			}else{
+
 			}
 		}
 		/*if (numb == 0) {