This commit is contained in:
苏尹岚
2020-12-24 14:30:27 +08:00
parent f71a758cc0
commit ccac6319a1
4 changed files with 38 additions and 15 deletions

View File

@@ -302,10 +302,10 @@ func AcceptJob(ctx *jxcontext.Context, jobID, dropShippingDeliveryID, dropShippi
if num > 0 {
return 0, errCode, fmt.Errorf("您还有此任务未完成,请完成后再接取!")
}
// num, err = checkJobOrders(db, "= "+utils.Int2Str(model.JobOrderStatusAuditUnPass), userID, utils.ZeroTimeValue, utils.ZeroTimeValue)
// if num > 0 {
// return fmt.Errorf("您还有此任务未审核通过记录,可直接在未审核中重新提交!")
// }
num, err = checkJobOrders(db, jobID, "= "+utils.Int2Str(model.JobOrderStatusAuditUnPass), userID, utils.ZeroTimeValue, utils.ZeroTimeValue)
if num > 0 {
return 0, errCode, fmt.Errorf("您还有此任务未审核通过记录,可直接在未审核中重新提交!")
}
switch job.LimitCountType {
case model.JobLimitCountTypePO:
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)
}
func GetDeliveryDetail(ctx *jxcontext.Context, vendorWaybillID string) (result interface{}, err error) {
//如果是京东快递
if strings.Contains(vendorWaybillID, "JDVD") {
return api.JdEclpAPI.QueryDynamicTraceInfo(vendorWaybillID)
} else {
//如果是一件代发
}
return result, err
func GetDeliveryDetail(ctx *jxcontext.Context, vendorWaybillID string) (queryDynamicTraceInfo []*jdeclpapi.QueryDynamicTraceInfoResult, err error) {
return api.JdEclpAPI.QueryDynamicTraceInfo(vendorWaybillID)
}
func GetAllDeliveryDetail(ctx *jxcontext.Context, vendorWaybillID, comType string) (a string, err error) {
return a, err
}
func CheckJdDeliveryWeight(ctx *jxcontext.Context) (err error) {

View File

@@ -190,7 +190,8 @@ type JobOrder struct {
DropShippingAutoAddress string `json:"dropShippingAutoAddress"`
DropShippingCityCode int `json:"dropShippingCityCode"`
DropShippingDistrictCode int `json:"dropShippingDistrictCode"`
VendorWaybillID string `json:"vendorWaybillID"` //运单号
VendorWaybillID string `json:"vendorWaybillID"` //运单号
WaybillInfo string `orm:"type(text)" json:"waybillInfo"` //物流信息
}
func (v *JobOrder) TableIndex() [][]string {

View File

@@ -303,8 +303,8 @@ func (c *JobController) GetJdDelivery() {
})
}
// @Title 查询快递物流信息
// @Description 查询快递物流信息
// @Title 查询京东快递物流信息
// @Description 查询京东快递物流信息
// @Param token header string true "认证token"
// @Param vendorWaybillID query string false "运单号"
// @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 京东快递物流超重验证
// @Description 京东快递物流超重验证
// @Param token header string true "认证token"

View File

@@ -385,6 +385,15 @@ func init() {
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.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.ControllerComments{
Method: "GetCoordinateFromAddress",