This commit is contained in:
邹宗楠
2025-12-23 15:20:16 +08:00
parent d59afef720
commit 5b239f52d7
7 changed files with 61644 additions and 61340 deletions

View File

@@ -2012,7 +2012,7 @@ func GetAddressRiderInfo(db *DaoDB, address string) ([]*CourierInfo, error) {
return courier, nil
}
func StaticStoreOrderChange(db *DaoDB, storeId []int, start, end time.Time, rank string, offSet, pageSize int) ([]*StoreOrderRank, error) {
func StaticStoreOrderChange(db *DaoDB, storeId []int, start, end time.Time, rank string, offSet, pageSize int) ([]*StoreOrderRank, int, error) {
dailyOrders := `
SELECT
g.jx_store_id,
@@ -2079,10 +2079,22 @@ func StaticStoreOrderChange(db *DaoDB, storeId []int, start, end time.Time, rank
lastSql += " LIMIT ? OFFSET ?"
dailyParam = append(dailyParam, pageSize, offSet)
data := make([]*StoreOrderRank, 0, 0)
if err := GetRows(db, &data, lastSql, dailyParam...); err != nil {
return nil, err
txDB, _ := Begin(db)
defer func() {
if r := recover(); r != nil {
Rollback(db, txDB)
panic(r)
}
}()
defer Commit(db, txDB)
if err := GetRowsTx(txDB, &data, lastSql, dailyParam...); err != nil {
Rollback(db, txDB)
return nil, 0, err
}
return data, nil
totalCount := GetLastTotalRowCount2(db, txDB)
return data, totalCount, nil
}
// StoreOrderRank 门店订单排名

View File

@@ -309,3 +309,7 @@ func (c *PrinterHandler) SetSound(ctx *jxcontext.Context, id1, id2, sound string
}
return err
}
func GetPrintList(printNo, printKey string, status, isOnline int, page, size int) ([]*jxprintapi.PrintList, error) {
return api.JxPrintAPI.GetPrintList(printNo, printKey, status, isOnline, page, size)
}

View File

@@ -10,6 +10,7 @@ import (
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"git.rosy.net.cn/jx-callback/business/jxstore/permission"
"git.rosy.net.cn/jx-callback/business/partner/delivery"
"git.rosy.net.cn/jx-callback/business/partner/printer/jxprint"
"git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
"strings"
"time"
@@ -621,8 +622,8 @@ func (c *OrderController) StoreOrderRank() {
if len(storeIdList) == model.NO {
storeIdList = dataList
}
retVal, err = dao.StaticStoreOrderChange(dao.GetDB(), storeIdList, timeList[0], timeList[1], params.Rank, params.Offset, params.PageSize)
return retVal, "", err
retVal, count, err := dao.StaticStoreOrderChange(dao.GetDB(), storeIdList, timeList[0], timeList[1], params.Rank, params.Offset, params.PageSize)
return map[string]interface{}{"data": retVal, "count": count}, "", err
})
}
@@ -1679,3 +1680,22 @@ func (c *OrderController) QueryUnansweredInvoice() {
return
})
}
// @Title 批量更新店铺开票申请
// @Description 批量更新店铺开票申请
// @Param token header string true "认证token"
// @Param printNo formData string false "打印机编号"
// @Param printKey formData string false "打印机秘钥"
// @Param status formData int false "激活状态[-1关机/0未连接/1开机]"
// @Param isOnline formData int false "在线装填[-1掉线/0未连接/1链接]"
// @Param page formData int true "跳过数据条数"
// @Param size formData int true "每页展示条数"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /QueryJxPrintList [get]
func (c *OrderController) QueryJxPrintList() {
c.callQueryJxPrintList(func(params *tOrderQueryJxPrintListParams) (retVal interface{}, errCode string, err error) {
retVal, err = jxprint.GetPrintList(params.PrintNo, params.PrintKey, params.Status, params.IsOnline, params.Page, params.Size)
return
})
}

View File

@@ -1760,6 +1760,15 @@ func init() {
MethodParams: param.Make(),
Filters: nil,
Params: nil})
// 批量查询京西打印机列表
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
web.ControllerComments{
Method: "QueryJxPrintList",
Router: `/QueryJxPrintList`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
web.ControllerComments{

File diff suppressed because it is too large Load Diff

View File

@@ -12552,6 +12552,71 @@
}
}
},
"/order/QueryJxPrintList": {
"get": {
"tags": [
"order"
],
"description": "批量更新店铺开票申请",
"operationId": "OrderController.批量更新店铺开票申请",
"parameters": [
{
"in": "header",
"name": "token",
"description": "认证token",
"required": true,
"type": "string"
},
{
"in": "formData",
"name": "printNo",
"description": "打印机编号",
"type": "string"
},
{
"in": "formData",
"name": "printKey",
"description": "打印机秘钥",
"type": "string"
},
{
"in": "formData",
"name": "status",
"description": "激活状态[-1关机/0未连接/1开机]",
"type": "integer",
"format": "int64"
},
{
"in": "formData",
"name": "isOnline",
"description": "在线装填[-1掉线/0未连接/1链接]",
"type": "integer",
"format": "int64"
},
{
"in": "formData",
"name": "page",
"description": "跳过数据条数",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "formData",
"name": "size",
"description": "每页展示条数",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "{object} controllers.CallResult"
}
}
}
},
"/order/QueryOrderWaybillFeeInfo": {
"get": {
"tags": [

View File

@@ -8506,6 +8506,51 @@ paths:
responses:
"200":
description: '{object} controllers.CallResult'
/order/QueryJxPrintList:
get:
tags:
- order
description: 批量更新店铺开票申请
operationId: OrderController.批量更新店铺开票申请
parameters:
- in: header
name: token
description: 认证token
required: true
type: string
- in: formData
name: printNo
description: 打印机编号
type: string
- in: formData
name: printKey
description: 打印机秘钥
type: string
- in: formData
name: status
description: 激活状态[-1关机/0未连接/1开机]
type: integer
format: int64
- in: formData
name: isOnline
description: 在线装填[-1掉线/0未连接/1链接]
type: integer
format: int64
- in: formData
name: page
description: 跳过数据条数
required: true
type: integer
format: int64
- in: formData
name: size
description: 每页展示条数
required: true
type: integer
format: int64
responses:
"200":
description: '{object} controllers.CallResult'
/order/QueryOrderWaybillFeeInfo:
get:
tags: