|
|
@ -1399,9 +1399,14 @@ func (impl *CustOrderServiceImplement) SelectPic1(user *global.User, dayModel *b |
|
|
|
hourAllUsedTime += usedTime |
|
|
|
} |
|
|
|
currentTime = dayStartTime.Add(time.Hour * time.Duration(hour)) |
|
|
|
for _, productFamilyProductData := range productDataLi { |
|
|
|
|
|
|
|
usedTime := impl.GetUsefulTime(currentTime, productFamilyProductData.LastDoneTime, timeModelList) |
|
|
|
for index, productFamilyProductData := range productDataLi { |
|
|
|
e := productFamilyProductData.LastDoneTime |
|
|
|
if index == len(productDataLi)-1 { |
|
|
|
year, month, day := e.Date() |
|
|
|
h := productFamilyProductData.LastDoneTime.Hour() |
|
|
|
e, _ = time.ParseInLocation(grmi.DateTimeOutFormat, fmt.Sprintf("%d-%2d-%2d %2d:00:00", year, month, day, h+1), utils.TimezoneLocation) |
|
|
|
} |
|
|
|
usedTime := impl.GetUsefulTime(currentTime, e, timeModelList) |
|
|
|
currentTime = productFamilyProductData.LastDoneTime |
|
|
|
meter := productFamilyMeterMap[productFamilyProductData.ProductFamilyId] |
|
|
|
var percent float64 |
|
|
@ -1695,10 +1700,10 @@ func (impl *CustOrderServiceImplement) SelectPic3(user *global.User, DayModelHou |
|
|
|
//判断是否是当前时间
|
|
|
|
if headInfo != nil && headInfo.CurrentTempo != 0 { |
|
|
|
if key != recordKey { |
|
|
|
usedTime := impl.GetUsefulTime(preTime,endTime, timeModelList) |
|
|
|
usedTime := impl.GetUsefulTime(preTime, endTime, timeModelList) |
|
|
|
DashboardData3.CompleteNumber += usedTime / headInfo.CurrentTempo |
|
|
|
} else { |
|
|
|
usedTime := impl.GetUsefulTime(preTime,nowTime, timeModelList) |
|
|
|
usedTime := impl.GetUsefulTime(preTime, nowTime, timeModelList) |
|
|
|
DashboardData3.CompleteNumber += utils.ValueToInt(float64(usedTime/headInfo.CurrentTempo), 0) |
|
|
|
} |
|
|
|
} |
|
|
@ -1727,7 +1732,7 @@ func (impl *CustOrderServiceImplement) SelectPic3(user *global.User, DayModelHou |
|
|
|
if productFamilyProductData.Qty != 0 && usedTime != 0 && hourAllUsedTime != 0 && meter != 0 { |
|
|
|
percent = meter * (float64(usedTime) / float64(hourAllUsedTime)) |
|
|
|
} |
|
|
|
hourPercent += percent/jPHPercent |
|
|
|
hourPercent += percent / jPHPercent |
|
|
|
} |
|
|
|
nowKey := utils.TimeFormat(currentTime, "yyyy-MM-dd HH:mm") |
|
|
|
if headInfo != nil && headInfo.CurrentTempo > 0 && key == recordKey { |
|
|
|