Explorar el Código

Merge branch 'feature/v4.9.21' of https://jygit.jydev.jianyu360.cn/qmx/jy into dev/v4.9.21_wmh

wenmenghao321 hace 1 año
padre
commit
75387cae48

+ 3 - 0
src/jfw/front/dataExport.go

@@ -348,6 +348,9 @@ func (d *DataExport) CancelOrder() error {
 
 
 // 是否可开票
 // 是否可开票
 func IsAllowInvoice(res map[string]interface{}) bool {
 func IsAllowInvoice(res map[string]interface{}) bool {
+	if util.IntAll(res["applybill_status"]) > 0 {
+		return false
+	}
 	filter := util.ObjToString(res["filter"].(string))
 	filter := util.ObjToString(res["filter"].(string))
 	filter_map := map[string]interface{}{}
 	filter_map := map[string]interface{}{}
 	_ = json.Unmarshal([]byte(filter), &filter_map)
 	_ = json.Unmarshal([]byte(filter), &filter_map)

+ 15 - 1
src/jfw/modules/subscribepay/src/service/invoice.go

@@ -481,7 +481,7 @@ func (this *Invoice) ShowinvoiceList() {
 				isReopen = util.Mysql.Count("invoice_fail_record", map[string]interface{}{
 				isReopen = util.Mysql.Count("invoice_fail_record", map[string]interface{}{
 					"only_Identifying": data["only_Identifying"],
 					"only_Identifying": data["only_Identifying"],
 					"order_code":       order_code,
 					"order_code":       order_code,
-				}) >= config.InvoiceConfig.SubmitNum
+				})+1 >= config.InvoiceConfig.SubmitNum
 			}
 			}
 			data["only_Identifying"] = encrypt.SE.EncodeString(qutil.InterfaceToStr(data["only_Identifying"]))
 			data["only_Identifying"] = encrypt.SE.EncodeString(qutil.InterfaceToStr(data["only_Identifying"]))
 			data["isReopen"] = isReopen
 			data["isReopen"] = isReopen
@@ -1349,6 +1349,15 @@ func (this *Invoice) Invoiceinfo() {
 		}
 		}
 		delete((*status), "d_relation_id")
 		delete((*status), "d_relation_id")
 		(*status)["countdown"] = countdowntime
 		(*status)["countdown"] = countdowntime
+		var isCanInvoic bool
+		create_time, _ := time.ParseInLocation(Date_Full_Layout, qutil.ObjToString((*status)["create_time"]), time.Local)
+		if create_time.Unix() > config.InvoiceConfig.Order_createtime {
+			//剩余可开票金额
+			isCanInvoic = IsAllowInvoice(*status)
+		}
+		(*status)["is_can_invoice"] = isCanInvoic
+		//是否存在可查看发票
+		(*status)["invoice_show"] = len(ShowList(order_code)) > 0
 		this.ServeJson(map[string]interface{}{
 		this.ServeJson(map[string]interface{}{
 			"status": "success",
 			"status": "success",
 			"data":   status,
 			"data":   status,
@@ -1389,6 +1398,9 @@ func LastInvoiceSource(orderCode string) int64 {
 
 
 // 是否可开票
 // 是否可开票
 func IsAllowInvoice(res map[string]interface{}) bool {
 func IsAllowInvoice(res map[string]interface{}) bool {
+	if qutil.IntAll(res["applybill_status"]) > 0 {
+		return false
+	}
 	filter := qutil.ObjToString(res["filter"].(string))
 	filter := qutil.ObjToString(res["filter"].(string))
 	filter_map := map[string]interface{}{}
 	filter_map := map[string]interface{}{}
 	_ = json.Unmarshal([]byte(filter), &filter_map)
 	_ = json.Unmarshal([]byte(filter), &filter_map)
@@ -1764,12 +1776,14 @@ func (this *Invoice) InvoiceQuery() {
 			}
 			}
 		}
 		}
 	}
 	}
+
 	this.ServeJson(NewResult(map[string]interface{}{
 	this.ServeJson(NewResult(map[string]interface{}{
 		"orderCodes":   strings.Join(orderArr, ","),
 		"orderCodes":   strings.Join(orderArr, ","),
 		"money":        money,
 		"money":        money,
 		"invoice":      &invoiceOne,
 		"invoice":      &invoiceOne,
 		"operator":     operator,
 		"operator":     operator,
 		"company_name": companyName,
 		"company_name": companyName,
+		"isFollowWx":   1,
 	}, nil))
 	}, nil))
 }
 }
 
 

+ 15 - 12
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -627,6 +627,19 @@ func (o *OrderListDetails) Datas(sql string, pageNum, pagesize_max int) (haveNex
 					}
 					}
 				}
 				}
 			}
 			}
+			//超时关闭订单
+			create_time_str := qutil.ObjToString(result[i]["create_time"])
+			create_time, _ := time.ParseInLocation(Date_Full_Layout, create_time_str, time.Local)
+
+			//是否满足可开票
+			var isCanInvoic bool
+			if create_time.Unix() > config.InvoiceConfig.Order_createtime {
+				//剩余可开票金额
+				isCanInvoic = IsAllowInvoice(result[i])
+			}
+			result[i]["is_can_invoice"] = isCanInvoic
+			//是否存在可查看发票
+			result[i]["invoice_show"] = len(ShowList(qutil.InterfaceToStr(result[i]["order_code"]))) > 0
 			if qutil.ObjToString(result[i]["pay_way"]) == "transferAccounts" {
 			if qutil.ObjToString(result[i]["pay_way"]) == "transferAccounts" {
 				if qutil.IntAll(result[i]["course_status"]) == 2 || qutil.IntAll(result[i]["course_status"]) == 4 {
 				if qutil.IntAll(result[i]["course_status"]) == 2 || qutil.IntAll(result[i]["course_status"]) == 4 {
 					continue
 					continue
@@ -637,9 +650,7 @@ func (o *OrderListDetails) Datas(sql string, pageNum, pagesize_max int) (haveNex
 				result[i]["userLotteryId"] = encrypt.SE.Encode2Hex(qutil.ObjToString(result[i]["d_relation_id"]))
 				result[i]["userLotteryId"] = encrypt.SE.Encode2Hex(qutil.ObjToString(result[i]["d_relation_id"]))
 			}
 			}
 			delete(result[i], "d_relation_id")
 			delete(result[i], "d_relation_id")
-			//超时关闭订单
-			create_time_str := qutil.ObjToString(result[i]["create_time"])
-			create_time, _ := time.ParseInLocation(Date_Full_Layout, create_time_str, time.Local)
+
 			var create_time_stamp int64 = 0
 			var create_time_stamp int64 = 0
 			order_countdown := config.Config.OrderCountdown //配置文件读取
 			order_countdown := config.Config.OrderCountdown //配置文件读取
 			if strings.Contains(qutil.ObjToString(order_countdown), "h") {
 			if strings.Contains(qutil.ObjToString(order_countdown), "h") {
@@ -663,15 +674,7 @@ func (o *OrderListDetails) Datas(sql string, pageNum, pagesize_max int) (haveNex
 			}
 			}
 			//新增最后开票
 			//新增最后开票
 			//result[i]["source"] = LastInvoiceSource(qutil.InterfaceToStr(result[i]["order_code"])) p537 用户可查看所有发票
 			//result[i]["source"] = LastInvoiceSource(qutil.InterfaceToStr(result[i]["order_code"])) p537 用户可查看所有发票
-			//是否满足可开票
-			var isCanInvoic bool
-			if create_time.Unix() > config.InvoiceConfig.Order_createtime {
-				//剩余可开票金额
-				isCanInvoic = IsAllowInvoice(result[i])
-			}
-			result[i]["is_can_invoice"] = isCanInvoic
-			//是否存在可查看发票
-			result[i]["invoice_show"] = len(ShowList(qutil.InterfaceToStr(result[i]["order_code"]))) > 0
+
 		}
 		}
 	}
 	}
 	haveNextPage = len(result) >= pagesize_max
 	haveNextPage = len(result) >= pagesize_max