|
@@ -988,6 +988,7 @@ func GetProductPlan(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
}
|
|
|
|
|
|
billStates := map[string]string{}
|
|
|
+ billIsSend := map[string]bool{}
|
|
|
if plan.Pack != nil && plan.Pack.Components != nil {
|
|
|
for _, comp := range plan.Pack.Components {
|
|
|
if comp.Stages != nil {
|
|
@@ -1008,9 +1009,19 @@ func GetProductPlan(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
collectName = repo.CollectionBillProduct
|
|
|
}
|
|
|
|
|
|
- ok, state := repo.RepoSeachDocMap(apictx.CreateRepoCtx(), &repo.DocSearchOptions{CollectName: collectName, Query: repo.Map{"_id": stage.BillId}, Project: []string{"status"}})
|
|
|
+ ok, state := repo.RepoSeachDocMap(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
|
|
|
+ CollectName: collectName,
|
|
|
+ Query: repo.Map{"_id": stage.BillId},
|
|
|
+ Project: []string{"status", "isSend", "serialNumber", "remark"}})
|
|
|
if ok {
|
|
|
billStates[stage.BillId] = state["status"].(string)
|
|
|
+ if v, ok := state["isSend"]; ok {
|
|
|
+ billIsSend[stage.BillId] = v.(bool)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ billIsSend[stage.BillId] = false
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1022,6 +1033,7 @@ func GetProductPlan(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
return map[string]interface{}{
|
|
|
"plan": plan,
|
|
|
"billStates": billStates,
|
|
|
+ "billIsSend": billIsSend,
|
|
|
}, nil
|
|
|
}
|
|
|
|