|
@@ -59,12 +59,12 @@ func PurchaseReview(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
}
|
|
|
// 查询单据获取已有的签字
|
|
|
bill := model.PurchaseBill{}
|
|
|
- repo.RepoSeachDoc(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
|
|
|
+ found, _ := repo.RepoSeachDoc(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
|
|
|
CollectName: repo.CollectionBillPurchase,
|
|
|
Query: repo.Map{"_id": id, "reviewed": 1},
|
|
|
}, &bill)
|
|
|
signs := make([]primitive.ObjectID, 0)
|
|
|
- if len(bill.SignUsers) > 0 {
|
|
|
+ if found && len(bill.SignUsers) > 0 {
|
|
|
// 如果自己已存在该集合中了
|
|
|
for _, signUser := range bill.SignUsers {
|
|
|
if signUser == userId {
|