|
|
@ -652,4 +652,43 @@ func RegisterSelectShipOrderWithStatus(party router.Party, path string, method f |
|
|
|
} |
|
|
|
supports.Ok(ctx, supports.OptionSuccess, result) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
|
* |
|
|
|
* @Function Name : RegisterSelectShipOrderBySerialOrderId |
|
|
|
*----------------------------------------------------------------------------- |
|
|
|
* |
|
|
|
* @Description : 通过工单查询发运单 |
|
|
|
* |
|
|
|
* @Function Parameters : 路由分组 |
|
|
|
* |
|
|
|
* @Function Parameters : 路径 |
|
|
|
* |
|
|
|
* @Function Parameters : 实际处理请求的方法 |
|
|
|
* |
|
|
|
* @Author : zhangxin |
|
|
|
* |
|
|
|
* @Date : 2022-03-09 |
|
|
|
* |
|
|
|
******************************************************************************/ |
|
|
|
func RegisterSelectShipOrderBySerialOrderId(party router.Party, path string, method func(*global.User, string) ([]model.ShipOrder, error)) { |
|
|
|
|
|
|
|
party.Get(path, func(ctx iris.Context) { |
|
|
|
user, ok := jwts.ParseToken(ctx) |
|
|
|
if !ok { |
|
|
|
return |
|
|
|
} |
|
|
|
serialOrderId := ctx.URLParam("serialOrderId") |
|
|
|
if serialOrderId == "" { |
|
|
|
supports.Error(ctx, iris.StatusBadRequest, "未获取到工单条码", nil) |
|
|
|
return |
|
|
|
} |
|
|
|
result, err := method(user, serialOrderId) |
|
|
|
if err != nil { |
|
|
|
supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) |
|
|
|
return |
|
|
|
} |
|
|
|
supports.Ok(ctx, supports.OptionSuccess, result) |
|
|
|
}) |
|
|
|
} |