aa
This commit is contained in:
@@ -302,10 +302,10 @@ func AcceptJob(ctx *jxcontext.Context, jobID, dropShippingDeliveryID, dropShippi
|
|||||||
if num > 0 {
|
if num > 0 {
|
||||||
return 0, errCode, fmt.Errorf("您还有此任务未完成,请完成后再接取!")
|
return 0, errCode, fmt.Errorf("您还有此任务未完成,请完成后再接取!")
|
||||||
}
|
}
|
||||||
// num, err = checkJobOrders(db, "= "+utils.Int2Str(model.JobOrderStatusAuditUnPass), userID, utils.ZeroTimeValue, utils.ZeroTimeValue)
|
num, err = checkJobOrders(db, jobID, "= "+utils.Int2Str(model.JobOrderStatusAuditUnPass), userID, utils.ZeroTimeValue, utils.ZeroTimeValue)
|
||||||
// if num > 0 {
|
if num > 0 {
|
||||||
// return fmt.Errorf("您还有此任务未审核通过记录,可直接在未审核中重新提交!")
|
return 0, errCode, fmt.Errorf("您还有此任务未审核通过记录,可直接在未审核中重新提交!")
|
||||||
// }
|
}
|
||||||
switch job.LimitCountType {
|
switch job.LimitCountType {
|
||||||
case model.JobLimitCountTypePO:
|
case model.JobLimitCountTypePO:
|
||||||
num, err = checkJobOrders(db, jobID, "<> "+utils.Int2Str(model.JobOrderStatusCancel), userID, utils.ZeroTimeValue, utils.ZeroTimeValue)
|
num, err = checkJobOrders(db, jobID, "<> "+utils.Int2Str(model.JobOrderStatusCancel), userID, utils.ZeroTimeValue, utils.ZeroTimeValue)
|
||||||
@@ -1159,14 +1159,12 @@ func GetJdDelivery(ctx *jxcontext.Context, status int, fromTime, toTime string,
|
|||||||
return dao.GetDeliveryOrders(db, []string{ctx.GetUserID()}, statuss, utils.Str2Time(fromTime), utils.Str2Time(toTime), pageSize, offset)
|
return dao.GetDeliveryOrders(db, []string{ctx.GetUserID()}, statuss, utils.Str2Time(fromTime), utils.Str2Time(toTime), pageSize, offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetDeliveryDetail(ctx *jxcontext.Context, vendorWaybillID string) (result interface{}, err error) {
|
func GetDeliveryDetail(ctx *jxcontext.Context, vendorWaybillID string) (queryDynamicTraceInfo []*jdeclpapi.QueryDynamicTraceInfoResult, err error) {
|
||||||
//如果是京东快递
|
return api.JdEclpAPI.QueryDynamicTraceInfo(vendorWaybillID)
|
||||||
if strings.Contains(vendorWaybillID, "JDVD") {
|
}
|
||||||
return api.JdEclpAPI.QueryDynamicTraceInfo(vendorWaybillID)
|
|
||||||
} else {
|
func GetAllDeliveryDetail(ctx *jxcontext.Context, vendorWaybillID, comType string) (a string, err error) {
|
||||||
//如果是一件代发
|
return a, err
|
||||||
}
|
|
||||||
return result, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func CheckJdDeliveryWeight(ctx *jxcontext.Context) (err error) {
|
func CheckJdDeliveryWeight(ctx *jxcontext.Context) (err error) {
|
||||||
|
|||||||
@@ -190,7 +190,8 @@ type JobOrder struct {
|
|||||||
DropShippingAutoAddress string `json:"dropShippingAutoAddress"`
|
DropShippingAutoAddress string `json:"dropShippingAutoAddress"`
|
||||||
DropShippingCityCode int `json:"dropShippingCityCode"`
|
DropShippingCityCode int `json:"dropShippingCityCode"`
|
||||||
DropShippingDistrictCode int `json:"dropShippingDistrictCode"`
|
DropShippingDistrictCode int `json:"dropShippingDistrictCode"`
|
||||||
VendorWaybillID string `json:"vendorWaybillID"` //运单号
|
VendorWaybillID string `json:"vendorWaybillID"` //运单号
|
||||||
|
WaybillInfo string `orm:"type(text)" json:"waybillInfo"` //物流信息
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *JobOrder) TableIndex() [][]string {
|
func (v *JobOrder) TableIndex() [][]string {
|
||||||
|
|||||||
@@ -303,8 +303,8 @@ func (c *JobController) GetJdDelivery() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Title 查询快递物流信息
|
// @Title 查询京东快递物流信息
|
||||||
// @Description 查询快递物流信息
|
// @Description 查询京东快递物流信息
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
// @Param vendorWaybillID query string false "运单号"
|
// @Param vendorWaybillID query string false "运单号"
|
||||||
// @Success 200 {object} controllers.CallResult
|
// @Success 200 {object} controllers.CallResult
|
||||||
@@ -317,6 +317,21 @@ func (c *JobController) GetDeliveryDetail() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 查询所有快递物流信息 (txcloud购买)
|
||||||
|
// @Description 查询所有快递物流信息
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param vendorWaybillID query string false "运单号"
|
||||||
|
// @Param comType query string false "快递公司编码"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /GetAllDeliveryDetail [get]
|
||||||
|
func (c *JobController) GetAllDeliveryDetail() {
|
||||||
|
c.callGetAllDeliveryDetail(func(params *tJobGetAllDeliveryDetailParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
retVal, err = cms.GetAllDeliveryDetail(params.Ctx, params.VendorWaybillID, params.ComType)
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// @Title 京东快递物流超重验证
|
// @Title 京东快递物流超重验证
|
||||||
// @Description 京东快递物流超重验证
|
// @Description 京东快递物流超重验证
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
|
|||||||
@@ -385,6 +385,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
|
||||||
|
beego.ControllerComments{
|
||||||
|
Method: "GetAllDeliveryDetail",
|
||||||
|
Router: `/GetAllDeliveryDetail`,
|
||||||
|
AllowHTTPMethods: []string{"get"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "GetCoordinateFromAddress",
|
Method: "GetCoordinateFromAddress",
|
||||||
|
|||||||
Reference in New Issue
Block a user