Explorar o código

fix(未出账单): 生成帐单后,未出账单不显示明细

likai %!s(int64=4) %!d(string=hai) anos
pai
achega
d0e65a9abf

+ 1 - 0
model/account/settle_account_main.go

@@ -38,6 +38,7 @@ type SettleAccountMainReq struct {
 	ActualStartDate string `json:"actualStartDate"`
 	ActualEndDate string `json:"actualEndDate"`
 	SearchType       string `json:"searchType"` // 1 查询全部;2 查询主用户;3或其他 查询从用户
+	NotInBill       string `json:"notInBill"`  // 1 未出账单 其他 全部
 }
 
 type AccountMainConfirmReq struct {

+ 3 - 0
service/settle_account_main/settle_account_main.go

@@ -104,6 +104,9 @@ func (s Service) List(req model.ListReq, user request.UserInfo) ([]accountModel.
 				where += fmt.Sprintf(" AND VerificationDate>='%v' AND VerificationDate<='%v'", timelist[0],timelist[1])
 			}
 		}
+		if entity.NotInBill == "1" {
+			where += fmt.Sprintf(" AND (SettleStatus='0' OR Status='0')")
+		}
 	}
 	entityModel = entityModel.Where(where)
 	total, err := entityModel.Count()