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