|
|
@@ -11,6 +11,7 @@ import (
|
|
|
"lims_adapter/model"
|
|
|
accountModel "lims_adapter/model/account"
|
|
|
"strconv"
|
|
|
+ "strings"
|
|
|
)
|
|
|
|
|
|
// Service 会议室服务
|
|
|
@@ -41,6 +42,21 @@ func (s Service) List(req model.ListReq) ([]accountModel.SettleAccountBill, int
|
|
|
if entity.Status != "" {
|
|
|
where += fmt.Sprintf(" AND Status='%v'", entity.Status)
|
|
|
}
|
|
|
+ if entity.SettleDate != "" {
|
|
|
+ timelist := strings.Split(entity.SettleDate,",")
|
|
|
+ if len(timelist) == 2 {
|
|
|
+ where += fmt.Sprintf(" AND SettleDate>'%v' AND SettleDate<'%v'", timelist[0],timelist[1])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if entity.SettleUser != "" {
|
|
|
+ where += fmt.Sprintf(" AND SettleUser LIKE '%%%v%%'", entity.SettleUser)
|
|
|
+ }
|
|
|
+ if entity.MainUser != "" {
|
|
|
+ where += fmt.Sprintf(" AND MainUser LIKE '%%%v%%'", entity.MainUser)
|
|
|
+ }
|
|
|
+ if entity.StartDate != "" && entity.EndDate != "" {
|
|
|
+ where += fmt.Sprintf(" AND StartDate>'%v' AND EndDate<'%v'", entity.StartDate, entity.EndDate)
|
|
|
+ }
|
|
|
}
|
|
|
entityModel = entityModel.Where(where)
|
|
|
total, err := entityModel.Count()
|