diff --git a/app/ipad/svc/svc_order_make.go b/app/ipad/svc/svc_order_make.go index 59861d6..e0173e0 100644 --- a/app/ipad/svc/svc_order_make.go +++ b/app/ipad/svc/svc_order_make.go @@ -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,