|
@@ -26,11 +26,12 @@ type SupplierPlanSummary struct {
|
|
|
SupplierId primitive.ObjectID
|
|
|
}
|
|
|
type PlanSummary struct {
|
|
|
- Plan *model.ProductPlan
|
|
|
- IsSend, IsAck map[string]bool
|
|
|
- Reviewed map[string]int32
|
|
|
- State map[string]string
|
|
|
- CreateTimes map[string]time.Time
|
|
|
+ Plan *model.ProductPlan
|
|
|
+ IsSend map[string]bool
|
|
|
+ IsAck map[string]*bool
|
|
|
+ Reviewed map[string]int32
|
|
|
+ State map[string]string
|
|
|
+ CreateTimes map[string]time.Time
|
|
|
}
|
|
|
|
|
|
|
|
@@ -178,7 +179,7 @@ func GetPlanStatus(plan *model.ProductPlan, apictx *ApiSession) *PlanSummary {
|
|
|
billStates := map[string]string{}
|
|
|
billIsSend := map[string]bool{}
|
|
|
billReviewed := map[string]int32{}
|
|
|
- billIsAck := map[string]bool{}
|
|
|
+ billIsAck := map[string]*bool{}
|
|
|
billCreateTimes := map[string]time.Time{}
|
|
|
if plan.Pack != nil && plan.Pack.Components != nil {
|
|
|
for _, comp := range plan.Pack.Components {
|
|
@@ -218,10 +219,11 @@ func GetPlanStatus(plan *model.ProductPlan, apictx *ApiSession) *PlanSummary {
|
|
|
billReviewed[stage.BillId] = -1
|
|
|
}
|
|
|
if v, ok := state["isAck"]; ok {
|
|
|
- billIsAck[stage.BillId] = v.(bool)
|
|
|
+ billIsAck[stage.BillId] = v.(*bool)
|
|
|
|
|
|
} else {
|
|
|
- billIsAck[stage.BillId] = false
|
|
|
+ notAck := false
|
|
|
+ billIsAck[stage.BillId] = ¬Ack
|
|
|
}
|
|
|
if v, ok := state["createTime"]; ok {
|
|
|
billCreateTimes[stage.BillId] = v.(primitive.DateTime).Time()
|