Browse Source

改进dashboard

pull/220/head
娄文智 2 years ago
parent
commit
32d398dd04
2 changed files with 3 additions and 7 deletions
  1. +1
    -5
      services/pln/implments/CustOrder.Dashborad.impl.go
  2. +2
    -2
      services/qm/implments/ReclinerReclst.service.impl.go

+ 1
- 5
services/pln/implments/CustOrder.Dashborad.impl.go View File

@ -20,7 +20,6 @@ import (
"LAPP_ACURA_MOM_BACKEND/utils"
"container/list"
"errors"
"sort"
"strconv"
"sync"
"time"
@ -1219,9 +1218,7 @@ func (impl *CustOrderServiceImplement) SelectPic3(user *global.User, DayModelHou
usefulPackOrderLi = append(usefulPackOrderLi, packOrder)
}
}
sort.Slice(usefulPackOrderLi, func(i, j int) bool {
return usefulPackOrderLi[i].CloseTime.Restore().Unix() < usefulPackOrderLi[j].CloseTime.Restore().Unix()
})
custOrderMap := make(map[string]model.CustOrder)
displayHourMap := make(map[int]interface{})
displayHourProductMap := make(map[int][]model.HourProductData)
@ -1301,7 +1298,6 @@ func (impl *CustOrderServiceImplement) SelectPic3(user *global.User, DayModelHou
for _, data := range hourData {
productDataLi = append(productDataLi, data)
}
impl.QuickSortProductData(productDataLi)
currentTime := todayStartTime.Add(time.Hour * time.Duration(hour))
var hourAllUsedTime int
for _, productFamilyProductData := range productDataLi {


+ 2
- 2
services/qm/implments/ReclinerReclst.service.impl.go View File

@ -174,8 +174,8 @@ func (impl *ReclinerReclstServiceImplement) AddPrinterInfo(user *global.User, en
if record == nil {
return grmi.NewBusinessError("不存在指定记录!")
}
entity.Status = "N"
err = dao.UpdateOne(entity)
record.Status = "N"
err = dao.UpdateOne(record)
if err != nil {
return err
}


Loading…
Cancel
Save