Merge branch 'dev-lzh-0905' into dev
This commit is contained in:
commit
dc7fdc3300
@ -403,9 +403,9 @@ func CreateBundleBalance(data model.BundleBalance) error {
|
|||||||
func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLogPo, total int64, err error) {
|
func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLogPo, total int64, err error) {
|
||||||
session := app.ModuleClients.BundleDB.
|
session := app.ModuleClients.BundleDB.
|
||||||
Table("cast_cost_log ccl").
|
Table("cast_cost_log ccl").
|
||||||
Select("ccl.*,cwl.cost_type").
|
Select("ccl.*,cwe.cost_type").
|
||||||
Joins("left join cast_work_log cwl on cwl.work_uuid = ccl.work_uuid").
|
Joins("left join cast_work_extra cwe on cwe.work_uuid = ccl.work_uuid").
|
||||||
Where("cwl.work_status = 1 and cwl.deleted_at = 0 and ccl.deleted_at = 0")
|
Where("cwe.deleted_at = 0 and ccl.deleted_at = 0")
|
||||||
if req.WorkTitle != "" {
|
if req.WorkTitle != "" {
|
||||||
session = session.Where("ccl.work_title like ?", "%"+req.WorkTitle+"%")
|
session = session.Where("ccl.work_title like ?", "%"+req.WorkTitle+"%")
|
||||||
}
|
}
|
||||||
@ -423,9 +423,9 @@ func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLogPo, to
|
|||||||
}
|
}
|
||||||
if req.CostType != 0 {
|
if req.CostType != 0 {
|
||||||
if req.CostType == 1 {
|
if req.CostType == 1 {
|
||||||
session = session.Where("cwl.cost_type = ?", req.CostType)
|
session = session.Where("cwe.cost_type = ?", req.CostType)
|
||||||
} else {
|
} else {
|
||||||
session = session.Where("cwl.cost_type in ?", []int{3, 2})
|
session = session.Where("cwe.cost_type in ?", []int{3, 2})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if req.User != "" {
|
if req.User != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user