liding
2025-05-19 53bdb26a0ae994418e92d93aab23d6f5e7225f37
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -14,6 +14,7 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
/**
@@ -83,6 +84,7 @@
    /**
     * 查询销售台账不分页
     *
     * @param salesLedgerDto
     * @return
     */
@@ -103,4 +105,25 @@
        }
        return toAjax(commonFileService.deleteSalesLedgerByIds(ids));
    }
    /**
     * 本月销售合同金额
     */
    @GetMapping("/getContractAmount")
    public AjaxResult getContractAmount() {
        try {
            BigDecimal amount = salesLedgerService.getContractAmount();
            return AjaxResult.success(amount != null ? amount : BigDecimal.ZERO);
        } catch (Exception e) {
            return AjaxResult.error("获取合同金额失败:" + e.getMessage());
        }
    }
    /**
     * 客户合同金额TOP5统计
     */
    @GetMapping("/getTopFiveList")
    public AjaxResult getTopFiveList() {
        return AjaxResult.success(salesLedgerService.getTopFiveList());
    }
}