作者 陈志颖

合并分支 'dev' 到 'test'

Dev



查看合并请求 !24
@@ -4,6 +4,7 @@ import ( @@ -4,6 +4,7 @@ import (
4 "fmt" 4 "fmt"
5 "github.com/linmadan/egglib-go/core/application" 5 "github.com/linmadan/egglib-go/core/application"
6 "strconv" 6 "strconv"
  7 + "time"
7 8
8 "github.com/astaxie/beego/logs" 9 "github.com/astaxie/beego/logs"
9 10
@@ -961,6 +962,8 @@ func (service OrderInfoService) ListOrderForExcel(listOrderQuery query.ListOrder @@ -961,6 +962,8 @@ func (service OrderInfoService) ListOrderForExcel(listOrderQuery query.ListOrder
961 } 962 }
962 var resultMaps []map[string]string 963 var resultMaps []map[string]string
963 for i := range ordersData { 964 for i := range ordersData {
  965 + t, _ := time.ParseInLocation("2006-01-02 15:04:05", ordersData[i].SaleDate, time.Local)
  966 + fmt.Print(t, "\n")
964 m := map[string]string{ 967 m := map[string]string{
965 //"num": fmt.Sprint(i + 1), 968 //"num": fmt.Sprint(i + 1),
966 //"order_code": ordersData[i].OrderCode, 969 //"order_code": ordersData[i].OrderCode,
@@ -982,7 +985,7 @@ func (service OrderInfoService) ListOrderForExcel(listOrderQuery query.ListOrder @@ -982,7 +985,7 @@ func (service OrderInfoService) ListOrderForExcel(listOrderQuery query.ListOrder
982 "partner": ordersData[i].PartnerName, 985 "partner": ordersData[i].PartnerName,
983 "update_time": ordersData[i].UpdateTime, 986 "update_time": ordersData[i].UpdateTime,
984 "create_time": ordersData[i].CreateTime, 987 "create_time": ordersData[i].CreateTime,
985 - "saleDate": ordersData[i].SaleDate, 988 + "saleDate": t.Format("2006-01-02"),
986 "orderNum": fmt.Sprint(ordersData[i].PlanOrderCount), 989 "orderNum": fmt.Sprint(ordersData[i].PlanOrderCount),
987 "quantityControl": "", 990 "quantityControl": "",
988 "orderDist": fmt.Sprint(ordersData[i].RegionName), 991 "orderDist": fmt.Sprint(ordersData[i].RegionName),
@@ -751,7 +751,7 @@ func (c *OrderInfoController) DownloadTemplate() { @@ -751,7 +751,7 @@ func (c *OrderInfoController) DownloadTemplate() {
751 } 751 }
752 752
753 // 获取导入模板 753 // 获取导入模板
754 - req := httplib.Get("http://suplus-file-dev.fjmaimaimai.com/upload/file/2021010803305336443.xlsx") 754 + req := httplib.Get("http://suplus-file-dev.fjmaimaimai.com/upload/file/2021020111293523855.xlsx")
755 err = req.ToFile(constant.IMPORT_EXCEL) 755 err = req.ToFile(constant.IMPORT_EXCEL)
756 if err != nil { 756 if err != nil {
757 logs.Error("could not save to file: ", err) 757 logs.Error("could not save to file: ", err)