优化项目管理

This commit is contained in:
2026-09-14 17:30:12 +08:00
parent a26c98b92b
commit 4ab5effce6
10 changed files with 434 additions and 158 deletions
+15
View File
@@ -193,6 +193,17 @@ func (c *BackendCrmContractController) List() {
}
}
}
// 回款逾期日期(取最早,未收齐且已过计划回款日期):合同「逾期」标签与结束日期口径一并参考
if len(list) > 0 {
contractIDs := make([]uint64, 0, len(list))
for i := range list {
contractIDs = append(contractIDs, list[i].ID)
}
overdues := paybackOverdueDateByContracts(tenantID, contractIDs)
for i := range list {
list[i].PaybackOverdueDate = overdues[list[i].ID]
}
}
items := make([]contractResp, 0, len(list))
for i := range list {
items = append(items, buildContractResp(&list[i]))
@@ -303,6 +314,10 @@ func (c *BackendCrmContractController) Detail() {
pipelineErr(&c.Controller, 403, 403, "无权查看该合同数据")
return
}
// 回款逾期日期(取最早,未收齐且已过计划回款日期):合同「逾期」标签与结束日期口径一并参考
if od := paybackOverdueDateByContracts(pipelineTenantID(claims), []uint64{row.ID}); od[row.ID] != "" {
row.PaybackOverdueDate = od[row.ID]
}
pipelineOk(&c.Controller, buildContractResp(&row))
}