diff --git a/services/pln/implments/CustOrder.Dashborad.impl.go b/services/pln/implments/CustOrder.Dashborad.impl.go index 918ad31..7cbf2c1 100644 --- a/services/pln/implments/CustOrder.Dashborad.impl.go +++ b/services/pln/implments/CustOrder.Dashborad.impl.go @@ -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 { diff --git a/services/qm/implments/ReclinerReclst.service.impl.go b/services/qm/implments/ReclinerReclst.service.impl.go index 8c88d5c..a6f09d8 100644 --- a/services/qm/implments/ReclinerReclst.service.impl.go +++ b/services/qm/implments/ReclinerReclst.service.impl.go @@ -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 }