数据分析平台
This commit is contained in:
parent
24f258aa3c
commit
22371c5ea6
@ -313,9 +313,6 @@ func PassProbabilityByFactory(r *request.PassProbabilityByFactory) ([]*model.Lin
|
||||
}
|
||||
month := carbon.Now().SubYear().StartOfMonth().Format("Y-m")
|
||||
for {
|
||||
if month == carbon.Now().EndOfMonth().Format("Y-m") {
|
||||
break
|
||||
}
|
||||
x = append(x, month)
|
||||
if _, ok := factoryMap[month]; !ok {
|
||||
lineY = append(lineY, "")
|
||||
@ -340,6 +337,9 @@ func PassProbabilityByFactory(r *request.PassProbabilityByFactory) ([]*model.Lin
|
||||
histogramY = append(histogramY, factoryMap[month][0])
|
||||
|
||||
}
|
||||
if month == carbon.Now().EndOfMonth().Format("Y-m") {
|
||||
break
|
||||
}
|
||||
month = carbon.Parse(month).AddMonth().Format("Y-m")
|
||||
}
|
||||
lines = append(lines, &model.Line{
|
||||
@ -429,9 +429,6 @@ func FTPassProbabilityByProduct(r *request.PassProbabilityByProduct) (*model.Lin
|
||||
month := carbon.Now().SubYear().AddMonth().Format("Y-m")
|
||||
var testStr, passStr string
|
||||
for {
|
||||
if month == carbon.Now().AddMonth().Format("Y-m") {
|
||||
break
|
||||
}
|
||||
x = append(x, month)
|
||||
if _, ok := productMap[month]; !ok {
|
||||
lineY = append(lineY, "")
|
||||
@ -455,6 +452,9 @@ func FTPassProbabilityByProduct(r *request.PassProbabilityByProduct) (*model.Lin
|
||||
lineY = append(lineY, passProbability.String())
|
||||
histogramY = append(histogramY, productMap[month][0])
|
||||
}
|
||||
if month == carbon.Now().AddMonth().Format("Y-m") {
|
||||
break
|
||||
}
|
||||
month = carbon.Parse(month).AddMonth().Format("Y-m")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user