Merge branch 'dev-lzh-0905' into dev

This commit is contained in:
lzh 2025-10-22 16:13:44 +08:00
commit dc7fdc3300

View File

@ -403,9 +403,9 @@ func CreateBundleBalance(data model.BundleBalance) error {
func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLogPo, total int64, err error) {
session := app.ModuleClients.BundleDB.
Table("cast_cost_log ccl").
Select("ccl.*,cwl.cost_type").
Joins("left join cast_work_log cwl on cwl.work_uuid = ccl.work_uuid").
Where("cwl.work_status = 1 and cwl.deleted_at = 0 and ccl.deleted_at = 0")
Select("ccl.*,cwe.cost_type").
Joins("left join cast_work_extra cwe on cwe.work_uuid = ccl.work_uuid").
Where("cwe.deleted_at = 0 and ccl.deleted_at = 0")
if 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 == 1 {
session = session.Where("cwl.cost_type = ?", req.CostType)
session = session.Where("cwe.cost_type = ?", req.CostType)
} else {
session = session.Where("cwl.cost_type in ?", []int{3, 2})
session = session.Where("cwe.cost_type in ?", []int{3, 2})
}
}
if req.User != "" {