huangjiajun před 5 měsíci
rodič
revize
7280876f3c
3 změnil soubory, kde provedl 13 přidání a 5 odebrání
  1. +2
    -2
      app/bigData/svc/svc_data.go
  2. +3
    -1
      app/db/db_order_list.go
  3. +8
    -2
      app/ipad/svc/svc_order.go

+ 2
- 2
app/bigData/svc/svc_data.go Zobrazit soubor

@@ -478,8 +478,8 @@ func NewSortingData(c *gin.Context) []map[string]string {
}
oIds = append(oIds, utils.Int64ToStr(v.Oid))
}
sql := `SELECT SUM(num) as num,SUM(success_num) as success_num,goods_title,sku FROM order_goods WHERE oid in (%s) and goods_type=0 GROUP BY enterprise_id,goods_id,sku_id`
sql = fmt.Sprintf(sql, strings.Join(oIds, ","))
sql := `SELECT SUM(num) as num,SUM(success_num) as success_num,goods_title,sku FROM order_goods WHERE oid in (%s) and make_date=%s and goods_type=0 GROUP BY enterprise_id,goods_id,sku_id`
sql = fmt.Sprintf(sql, strings.Join(oIds, ","), now)
nativeString, err := db.QueryNativeString(engine, sql)
for _, v := range nativeString {
skuData := make([]md2.Sku, 0)


+ 3
- 1
app/db/db_order_list.go Zobrazit soubor

@@ -184,7 +184,9 @@ func GetOrderListOutput(eg *xorm.Engine, param map[string]string) *[]model.Order
func GetOrderListByIpad(eg *xorm.Engine, param map[string]string) (*[]model.Order, int64) {
var order []model.Order
sess := eg.Where("state!=5")

if param["now"] != "" {
sess.And("make_date=?", param["now"])
}
if param["keyword"] != "" {
var data []model.Enterprise
eg.Where("name like ?", "%"+param["keyword"]+"%").Find(&data)


+ 8
- 2
app/ipad/svc/svc_order.go Zobrazit soubor

@@ -2,6 +2,8 @@ package svc

import (
"applet/app/admin/md"
"applet/app/admin/svc/order"
svc2 "applet/app/bigData/svc"
"applet/app/db"
"applet/app/e"
"applet/app/svc"
@@ -17,6 +19,7 @@ func Order(c *gin.Context) {
return
}
eg := db.Db
args["now"] = svc2.CommDate()
data, _ := db.GetOrderListByIpad(eg, args)
list := make([]map[string]string, 0)
if data != nil {
@@ -28,6 +31,9 @@ func Order(c *gin.Context) {
stateArr := []string{"待制作", "制作中", "烘焙中", "分拣中", "已完成", "已取消"}
btnArr := []string{"进入制作", "进入制作", "进入制作", "分拣完成", "查看详情", "已取消"}
for _, v := range *data {
v2 := &v
v2 = order.JudgePackageOrdOrdState(v2)
v = *v2
enterpriseName := ""
_, ok := enterpriseMap[v.EnterpriseId]
if ok {
@@ -102,8 +108,8 @@ func StateOrder(c *gin.Context) {
if goodsMap[v.Gid].ImageList != "" {
utils.Unserialize([]byte(goodsMap[v.Gid].ImageList), &tmpMap)
var imageListUrlTmp []string
for _, v := range tmpMap.([]interface{}) {
imageListUrlTmp = append(imageListUrlTmp, svc.ImageFormatWithBucketNew(scheme, host, subDomain, moreSubDomain, v.(string)))
for _, v1 := range tmpMap.([]interface{}) {
imageListUrlTmp = append(imageListUrlTmp, svc.ImageFormatWithBucketNew(scheme, host, subDomain, moreSubDomain, v1.(string)))
}
if imageListUrlTmp != nil {
tmp["goods_img"] = imageListUrlTmp[0]


Načítá se…
Zrušit
Uložit