|
@@ -45,7 +45,11 @@ type WaybillController struct {
|
|
|
// @Summary 获取运单列表
|
|
|
// @Description 获取运单列表
|
|
|
// @Tags 运单
|
|
|
-// @Param no query string false "运单号"
|
|
|
+// @Param waybillNo query string false "运单号"
|
|
|
+// @Param orderNo query string false "订单号"
|
|
|
+// @Param status query int false "状态"
|
|
|
+// @Param orderStartTime query string false "下单开始时间"
|
|
|
+// @Param orderEndTime query string false "下单结束时间"
|
|
|
// @Param pageSize query int false "页条数"
|
|
|
// @Param page query int false "页码"
|
|
|
// @Success 200 {object} response.Response{data=response.Page{list=[]model.Waybill}} "{"code": 200, "data": [...]}"
|
|
@@ -91,15 +95,15 @@ func (e WaybillController) GetPage(c *gin.Context) {
|
|
|
e.PageOK(list, int(count), req.GetPageIndex(), req.GetPageSize(), "查询成功")
|
|
|
}
|
|
|
|
|
|
-// GetPage 获取运单列表
|
|
|
-// @Summary 获取运单列表
|
|
|
-// @Description 获取运单列表
|
|
|
+// Export 导出运单列表
|
|
|
+// @Summary 导出运单列表
|
|
|
+// @Description 导出运单列表
|
|
|
// @Tags 运单
|
|
|
-// @Param no query string false "运单号"
|
|
|
+// @Param waybillNo query string false "运单号"
|
|
|
// @Param pageSize query int false "页条数"
|
|
|
// @Param page query int false "页码"
|
|
|
// @Success 200 {object} response.Response{data=response.Page{list=[]model.Waybill}} "{"code": 200, "data": [...]}"
|
|
|
-// @Router /api/waybill [get]
|
|
|
+// @Router /api/waybill/export [get]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) Export(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -190,11 +194,11 @@ func (e WaybillController) Export(c *gin.Context) {
|
|
|
// @Summary 首页统计
|
|
|
// @Description 首页统计
|
|
|
// @Tags 运单
|
|
|
-// @Param no query string false "运单号"
|
|
|
-// @Param pageSize query int false "页条数"
|
|
|
-// @Param page query int false "页码"
|
|
|
+// @Param data body dto.WaybillStatsReq true "data"
|
|
|
+// @Param date query string true "日期"
|
|
|
+// @Param type query string true "类型 month-月 year-年"
|
|
|
// @Success 200 {object} response.Response{data=response.Page{list=[]model.Waybill}} "{"code": 200, "data": [...]}"
|
|
|
-// @Router /api/waybill [get]
|
|
|
+// @Router /api/waybill/home [get]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) Home(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -229,15 +233,13 @@ func (e WaybillController) Home(c *gin.Context) {
|
|
|
e.OK(res, "查询成功")
|
|
|
}
|
|
|
|
|
|
-// Home 用户运单数量统计
|
|
|
+// UserStats 用户运单数量统计
|
|
|
// @Summary 首页统计
|
|
|
// @Description 首页统计
|
|
|
// @Tags 运单
|
|
|
-// @Param no query string false "运单号"
|
|
|
-// @Param pageSize query int false "页条数"
|
|
|
-// @Param page query int false "页码"
|
|
|
+// @Param data body dto.WaybillUserStatsReq true "data"
|
|
|
// @Success 200 {object} response.Response{data=response.Page{list=[]model.Waybill}} "{"code": 200, "data": [...]}"
|
|
|
-// @Router /api/waybill [get]
|
|
|
+// @Router /api/waybill/user-stats [post]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) UserStats(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -288,11 +290,10 @@ func (e WaybillController) UserStats(c *gin.Context) {
|
|
|
// @Summary 获取运单列表
|
|
|
// @Description 获取运单列表
|
|
|
// @Tags 运单
|
|
|
-// @Param no query string false "运单号"
|
|
|
-// @Param pageSize query int false "页条数"
|
|
|
-// @Param page query int false "页码"
|
|
|
+// @Param waybillNo query string false "运单号"
|
|
|
+// @Param status query int false "状态"
|
|
|
// @Success 200 {object} response.Response{data=response.Page{list=[]model.Waybill}} "{"code": 200, "data": [...]}"
|
|
|
-// @Router /api/waybill [get]
|
|
|
+// @Router /api/waybill/applet [get]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) GetAppletPage(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -325,7 +326,8 @@ func (e WaybillController) GetAppletPage(c *gin.Context) {
|
|
|
// @Summary 获取app运单统计数量
|
|
|
// @Description 获取app运单统计数量
|
|
|
// @Tags 运单
|
|
|
-// @Param no query string false "运单号"
|
|
|
+// @Param waybillNo query string false "运单号"
|
|
|
+// @Param status query int false "状态"
|
|
|
// @Success 200 {object} response.Response{data=response.Page{list=[]model.Waybill}} "{"code": 200, "data": [...]}"
|
|
|
// @Router /api/waybill/applet-count [get]
|
|
|
// @Security Bearer
|
|
@@ -431,7 +433,7 @@ func (e WaybillController) Get(c *gin.Context) {
|
|
|
// @Summary 通过id获取运单
|
|
|
// @Description 通过id获取运单
|
|
|
// @Tags 运单
|
|
|
-// @Param id path string true "运单id"
|
|
|
+// @Param waybillNo path string true "运单编号-必填"
|
|
|
// @Success 200 {object} response.Response{data=model.Waybill} "{"code": 200, "data": [...]}"
|
|
|
// @Router /api/waybill/no [get]
|
|
|
// @Security Bearer
|
|
@@ -493,7 +495,7 @@ func (e WaybillController) Insert(c *gin.Context) {
|
|
|
e.Error(500, err, err.Error())
|
|
|
return
|
|
|
}
|
|
|
- e.OK(req.GetId(), "创建成功")
|
|
|
+ e.OK(req.GetId(), "添加成功")
|
|
|
}
|
|
|
|
|
|
// UpdateStatus 修改运单状态
|
|
@@ -505,7 +507,7 @@ func (e WaybillController) Insert(c *gin.Context) {
|
|
|
// @Param data body dto.WaybillUpdateStatusReq true "body"
|
|
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
|
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
|
|
-// @Router /api/waybill [put]
|
|
|
+// @Router /api/waybill/update-status [put]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) UpdateStatus(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -528,7 +530,7 @@ func (e WaybillController) UpdateStatus(c *gin.Context) {
|
|
|
e.Error(500, err, err.Error())
|
|
|
return
|
|
|
}
|
|
|
- e.OK(req.GetId(), "更新成功")
|
|
|
+ e.OK(req.GetId(), "修改成功")
|
|
|
}
|
|
|
|
|
|
// Update 修改运单
|
|
@@ -563,7 +565,7 @@ func (e WaybillController) Update(c *gin.Context) {
|
|
|
e.Error(500, err, err.Error())
|
|
|
return
|
|
|
}
|
|
|
- e.OK(req.GetId(), "更新成功")
|
|
|
+ e.OK(req.GetId(), "修改成功")
|
|
|
}
|
|
|
|
|
|
// Delivery 派单
|
|
@@ -575,7 +577,7 @@ func (e WaybillController) Update(c *gin.Context) {
|
|
|
// @Param data body dto.WaybillDeliveryReq true "body"
|
|
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
|
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
|
|
-// @Router /api/waybill [put]
|
|
|
+// @Router /api/waybill/delivery [put]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) Delivery(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -671,7 +673,7 @@ func (e WaybillController) Delete(c *gin.Context) {
|
|
|
// @Param data body dto.WaybillInOutReq true "body"
|
|
|
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
|
|
|
// @Success 200 {string} string "{"code": -1, "message": "删除失败"}"
|
|
|
-// @Router /api/waybill/car-out [post]
|
|
|
+// @Router /api/waybill/receipt [post]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) Receipt(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -706,7 +708,7 @@ func (e WaybillController) Receipt(c *gin.Context) {
|
|
|
// @Param data body dto.WaybillReceiptReq true "body"
|
|
|
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
|
|
|
// @Success 200 {string} string "{"code": -1, "message": "删除失败"}"
|
|
|
-// @Router /api/waybill/car-out [post]
|
|
|
+// @Router /api/waybill/customer/receipt [post]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) CustomerReceipt(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -736,7 +738,11 @@ func (e WaybillController) CustomerReceipt(c *gin.Context) {
|
|
|
// @Summary 获取客户运单列表
|
|
|
// @Description 获取客户运单列表
|
|
|
// @Tags 运单
|
|
|
-// @Param no query string false "运单号"
|
|
|
+// @Param waybillNo query string false "运单号"
|
|
|
+// @Param orderNo query string false "订单号"
|
|
|
+// @Param status query int false "状态"
|
|
|
+// @Param orderStartTime query string false "下单开始时间"
|
|
|
+// @Param orderEndTime query string false "下单结束时间"
|
|
|
// @Param pageSize query int false "页条数"
|
|
|
// @Param page query int false "页码"
|
|
|
// @Success 200 {object} response.Response{data=response.Page{list=[]model.Waybill}} "{"code": 200, "data": [...]}"
|
|
@@ -770,6 +776,20 @@ func (e WaybillController) GetCustomerPage(c *gin.Context) {
|
|
|
e.PageOK(list, int(count), req.GetPageIndex(), req.GetPageSize(), "查询成功")
|
|
|
}
|
|
|
|
|
|
+// CustomerExport 导出客户运单列表
|
|
|
+// @Summary 导出客户运单列表
|
|
|
+// @Description 导出客户运单列表
|
|
|
+// @Tags 运单
|
|
|
+// @Param waybillNo query string false "运单号"
|
|
|
+// @Param orderNo query string false "订单号"
|
|
|
+// @Param status query int false "状态"
|
|
|
+// @Param orderStartTime query string false "下单开始时间"
|
|
|
+// @Param orderEndTime query string false "下单结束时间"
|
|
|
+// @Param pageSize query int false "页条数"
|
|
|
+// @Param page query int false "页码"
|
|
|
+// @Success 200 {object} response.Response{data=response.Page{list=[]model.Waybill}} "{"code": 200, "data": [...]}"
|
|
|
+// @Router /api/waybill/customer/export [get]
|
|
|
+// @Security Bearer
|
|
|
func (e WaybillController) CustomerExport(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
|
req := dto.WaybillGetCustomerPageReq{}
|
|
@@ -905,7 +925,7 @@ func (e WaybillController) CustomerInsert(c *gin.Context) {
|
|
|
e.Error(500, err, err.Error())
|
|
|
return
|
|
|
}
|
|
|
- e.OK(req.GetId(), "创建成功")
|
|
|
+ e.OK(req.GetId(), "添加成功")
|
|
|
}
|
|
|
|
|
|
// Import 导入运单
|
|
@@ -914,7 +934,7 @@ func (e WaybillController) CustomerInsert(c *gin.Context) {
|
|
|
// @Tags 运单
|
|
|
// @Accept application/json
|
|
|
// @Product application/json
|
|
|
-// @Param data body dto.WaybillInsertReq true "data"
|
|
|
+// @Param data body dto.WaybillImportReq true "data"
|
|
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
|
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
|
|
// @Router /api/waybill/import [post]
|
|
@@ -1021,10 +1041,9 @@ func (e WaybillController) Import(c *gin.Context) {
|
|
|
// @Tags 运单
|
|
|
// @Accept application/json
|
|
|
// @Product application/json
|
|
|
-// @Param data body dto.WaybillInsertReq true "data"
|
|
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
|
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
|
|
-// @Router /api/waybill/export-template [post]
|
|
|
+// @Router /api/waybill/export-template [get]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) ExportTemplate(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -1064,10 +1083,10 @@ func (e WaybillController) ExportTemplate(c *gin.Context) {
|
|
|
// @Tags 运单
|
|
|
// @Accept application/json
|
|
|
// @Product application/json
|
|
|
-// @Param data body dto.WaybillInsertReq true "data"
|
|
|
+// @Param data body dto.WaybillGetByWaybillPdfReq true "data"
|
|
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
|
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
|
|
-// @Router /api/waybill/temperature-pdf [post]
|
|
|
+// @Router /api/waybill/temperature-pdf [get]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) TemperaturePDF(c *gin.Context) {
|
|
|
s := service.Waybill{}
|