|
@@ -22,14 +22,6 @@ func Report(r *GinRouter) {
|
|
|
r.GET("/report/purchase/download", ReportPurchaseDownload)
|
|
|
}
|
|
|
|
|
|
-type ReportListReq struct {
|
|
|
- SupplierId primitive.ObjectID
|
|
|
- TimeRange []string
|
|
|
- PlanIds []primitive.ObjectID
|
|
|
- Page int64
|
|
|
- Size int64
|
|
|
-}
|
|
|
-
|
|
|
// 加工单
|
|
|
func ReportProduceList(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
// 财务管理】 添加统计报表功能。按 时间范围, 供应商(单选) 包装(多选) 计划(多选) 四个维度进行过滤,形成报表。可以下载
|
|
@@ -38,6 +30,7 @@ func ReportProduceList(c *gin.Context, apictx *ApiSession) (interface{}, error)
|
|
|
query["status"] = "complete"
|
|
|
|
|
|
if _supplierId, ok := query["supplierId"]; ok {
|
|
|
+ delete(query, "supplierId")
|
|
|
supplierId, _ := primitive.ObjectIDFromHex(_supplierId.(string))
|
|
|
if !supplierId.IsZero() {
|
|
|
query["supplierId"] = supplierId
|
|
@@ -80,12 +73,13 @@ func ReportProduceList(c *gin.Context, apictx *ApiSession) (interface{}, error)
|
|
|
|
|
|
// 采购单
|
|
|
func ReportPurchaseList(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
- // 财务管理】 添加统计报表功能。按 时间范围, 供应商(单选) 包装(多选) 计划(多选) 四个维度进行过滤,形成报表。可以下载
|
|
|
+ // 财务管理】 添加统计报表功能。按 时间范围, 供应商(单选) 计划(多选) 四个维度进行过滤,形成报表。可以下载
|
|
|
page, size, query := UtilQueryPageSize(c)
|
|
|
// 条件处理
|
|
|
query["status"] = "complete"
|
|
|
|
|
|
if _supplierId, ok := query["supplierId"]; ok {
|
|
|
+ delete(query, "supplierId")
|
|
|
supplierId, _ := primitive.ObjectIDFromHex(_supplierId.(string))
|
|
|
if !supplierId.IsZero() {
|
|
|
query["supplierId"] = supplierId
|
|
@@ -130,6 +124,7 @@ func ReportProduceDownload(c *gin.Context, apictx *ApiSession) (interface{}, err
|
|
|
query["status"] = "complete"
|
|
|
|
|
|
if _supplierId, ok := query["supplierId"]; ok {
|
|
|
+ delete(query, "supplierId")
|
|
|
supplierId, _ := primitive.ObjectIDFromHex(_supplierId.(string))
|
|
|
if !supplierId.IsZero() {
|
|
|
query["supplierId"] = supplierId
|
|
@@ -252,10 +247,10 @@ func ReportPurchaseDownload(c *gin.Context, apictx *ApiSession) (interface{}, er
|
|
|
query["status"] = "complete"
|
|
|
|
|
|
if _supplierId, ok := query["supplierId"]; ok {
|
|
|
+ delete(query, "supplierId")
|
|
|
supplierId, _ := primitive.ObjectIDFromHex(_supplierId.(string))
|
|
|
if !supplierId.IsZero() {
|
|
|
query["supplierId"] = supplierId
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|