Browse Source

update plan/detail filed billData

animeic 1 year ago
parent
commit
3d1c29f2dc
2 changed files with 9 additions and 1 deletions
  1. 6 1
      boxcost/api/plan.go
  2. 3 0
      boxcost/boxcost.log

+ 6 - 1
boxcost/api/plan.go

@@ -1061,6 +1061,8 @@ func GetProductPlan(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 	billIsSend := map[string]bool{}
 	billReviewed := map[string]int32{}
 	billIsAck := map[string]bool{}
+
+	billData := map[string]interface{}{}
 	if plan.Pack != nil && plan.Pack.Components != nil {
 		for _, comp := range plan.Pack.Components {
 			if comp.Stages != nil {
@@ -1084,8 +1086,10 @@ func GetProductPlan(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 						ok, state := repo.RepoSeachDocMap(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
 							CollectName: collectName,
 							Query:       repo.Map{"_id": stage.BillId},
-							Project:     []string{"status", "isSend", "reviewed", "isAck", "serialNumber", "sendTo", "remark"}})
+							// Project:     []string{"status", "isSend", "reviewed", "isAck", "serialNumber", "sendTo", "remark"}
+						})
 						if ok {
+							billData[stage.BillId] = state
 							billStates[stage.BillId] = state["status"].(string)
 							billSerialNumber[stage.BillId] = state["serialNumber"].(string)
 							if v, ok := state["sendTo"]; ok {
@@ -1126,6 +1130,7 @@ func GetProductPlan(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 		"billIsAck":        billIsAck,
 		"billSerialNumber": billSerialNumber,
 		"billSendTo":       billSendTo,
+		"billData":         billData,
 	}, nil
 }
 

+ 3 - 0
boxcost/boxcost.log

@@ -0,0 +1,3 @@
+{"level":"info","timestamp":"2023-06-14 12:50:44","message":"[error decoding key pack.components.1.stages.1.deliveryTime: parsing time \"2023-06-07 05:26:29.341\" as \"2006-01-02T15:04:05.999Z07:00\": cannot parse \" 05:26:29.341\" as \"T\"]","service_name":"boxcost"}
+{"level":"info","timestamp":"2023-06-14 12:53:15","message":"[error decoding key pack.components.1.stages.1.deliveryTime: parsing time \"2023-06-07 05:26:29.341\" as \"2006-01-02T15:04:05.999Z07:00\": cannot parse \" 05:26:29.341\" as \"T\"]","service_name":"boxcost"}
+{"level":"info","timestamp":"2023-06-14 12:53:59","message":"[error decoding key pack.components.1.stages.1.deliveryTime: parsing time \"2023-06-07 05:26:29.341\" as \"2006-01-02T15:04:05.999Z07:00\": cannot parse \" 05:26:29.341\" as \"T\"]","service_name":"boxcost"}