|
@@ -128,15 +128,22 @@ func CreateProduceBill(c *gin.Context, apictx *ApiSession) (interface{}, error)
|
|
|
// 制单人数据
|
|
|
userId, _ := primitive.ObjectIDFromHex(apictx.User.Parent)
|
|
|
fmt.Println("userId:", apictx.User.Parent)
|
|
|
+ userInfo := &model.UserSmaple{}
|
|
|
if !userId.IsZero() {
|
|
|
user, err := getUserById(apictx, userId)
|
|
|
+ userInfo = user
|
|
|
if err == nil {
|
|
|
bill.UserName = user.Name
|
|
|
bill.UserId = userId
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- result, err := repo.RepoAddDoc(ctx, repo.CollectionBillProduce, &bill)
|
|
|
+ result, err := repo.RepoAddDoc1(ctx, repo.CollectionBillProduce, &bill, &repo.RecordLogReq{
|
|
|
+ Path: c.Request.URL.Path,
|
|
|
+ UserInfo: userInfo,
|
|
|
+ TargetId: "",
|
|
|
+ Type: "created",
|
|
|
+ })
|
|
|
return result, err
|
|
|
}
|
|
|
|