|
|
@@ -222,6 +222,15 @@ func NewOrderSortingEnd(c *gin.Context) { |
|
|
|
e.OutErr(c, 400, e.NewErr(400, "提交失败,请重试")) |
|
|
|
return |
|
|
|
} |
|
|
|
makeRecord := db.GetOrderGoodsMakeStock(sess, utils.StrToInt64(args.Gid), utils.StrToInt64(args.SkuId)) |
|
|
|
makeRecord.WaitSortingNum -= utils.StrToInt(v["num"]) |
|
|
|
makeRecord.SuccessNum += utils.StrToInt(v["num"]) |
|
|
|
_, err = sess.Where("id=?", makeRecord.Id).Cols("success_num,wait_sorting_num").Update(makeRecord) |
|
|
|
if err != nil { |
|
|
|
sess.Rollback() |
|
|
|
e.OutErr(c, 400, e.NewErr(400, "提交失败,请重试")) |
|
|
|
return |
|
|
|
} |
|
|
|
//写入流程记录 |
|
|
|
var recordFlow = &model.OrderGoodsDoingFlow{ |
|
|
|
Num: record.Num, |
|
|
|