From 007677980299dea55fbb554520bb248895d59736 Mon Sep 17 00:00:00 2001 From: zhangxin Date: Fri, 29 Apr 2022 15:40:09 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9dashboard=E5=9B=BE?= =?UTF-8?q?=E4=BE=8B1=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/pln/implments/CustOrder.service.impl.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/services/pln/implments/CustOrder.service.impl.go b/services/pln/implments/CustOrder.service.impl.go index 7d70552..89d8613 100644 --- a/services/pln/implments/CustOrder.service.impl.go +++ b/services/pln/implments/CustOrder.service.impl.go @@ -3126,7 +3126,7 @@ func (impl *CustOrderServiceImplement) SelectPic1(user *global.User, dayModel *b productFamilyRelateMap := make(map[string]map[string]interface{}) productFamilyMeterMap := make(map[string]float64) now := time.Now() - //now, _ := time.ParseInLocation(grmi.DateTimeOutFormat, "2022-03-30 23:00:00", utils.TimezoneLocation) + //now, _ := time.ParseInLocation(grmi.DateTimeOutFormat, "2022-04-28 23:00:00", utils.TimezoneLocation) endTime := now.Format(grmi.DateOutFormat) + " 23:59:59" todayStart := now.Format(grmi.DateOutFormat) + " 00:00:00" dateTimeLi := make([]int, 0, now.Hour()) @@ -3283,8 +3283,11 @@ func (impl *CustOrderServiceImplement) SelectPic1(user *global.User, dayModel *b } } displayHourLi := make([]string, 0, len(productFamilyAccomplishMap)) - for hour, _ := range productFamilyAccomplishMap { - displayHourLi = append(displayHourLi, strconv.Itoa(hour)+"时") + for hour := 0; hour < 24; hour++ { + _, exist := productFamilyAccomplishMap[hour] + if exist { + displayHourLi = append(displayHourLi, strconv.Itoa(hour)+"时") + } } result = model.CutLine1{ TimeLi: displayHourLi, @@ -3317,7 +3320,8 @@ func (impl *CustOrderServiceImplement) SelectPic1(user *global.User, dayModel *b meter := productFamilyMeterMap[productFamilyProductData.ProductFamilyId] var percent float64 if productFamilyProductData.Qty != 0 && usedTime != 0 && hourAllUsedTime != 0 { - percent = meter / (float64(usedTime) / float64(productFamilyProductData.Qty)) * (float64(usedTime) / float64(hourAllUsedTime)) + percent = float64(productFamilyProductData.Qty) / (meter * (float64(usedTime) / float64(hourAllUsedTime))) + //percent = meter / (float64(usedTime) / float64(productFamilyProductData.Qty)) * (float64(usedTime) / float64(hourAllUsedTime)) } hourPercent += percent } From f34d40a5b9ac6f3475eb83326c808ebe9417eeab Mon Sep 17 00:00:00 2001 From: zhangxin Date: Mon, 16 May 2022 15:59:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9E=E7=95=AA?= =?UTF-8?q?=E5=8F=B7=E8=A7=A3=E6=9E=90=E8=BF=9E=E7=BB=AD=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../implments/ToyotaCalloff.service.impl.go | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/services/pln/implments/ToyotaCalloff.service.impl.go b/services/pln/implments/ToyotaCalloff.service.impl.go index d452cbd..d8ddb34 100644 --- a/services/pln/implments/ToyotaCalloff.service.impl.go +++ b/services/pln/implments/ToyotaCalloff.service.impl.go @@ -628,23 +628,21 @@ func (impl *ToyotaCalloffServiceImplement) ParseCallOffData(user *global.User, p log.Error("解析CallOff数据,删除已存在的错误数据失败, error:" + err.Error()) return } - if callOffData.CheckSequence != needParseSeq { - if callOffData.CheckSequence != needParseSeq+1 || (needParseSeq == 999 && callOffData.CheckSequence != 0) { - callOffError := model.ToyotaCallOffErrorLst{ - DemandId: callOffData.DemandId, - Pos: 1, - ErrorType: model.ERROR_TYPE_HINT, - ErrorInfo: "连番号不连续,当前需要解析连番号为:" + strconv.Itoa(needParseSeq) + ", 该连番号为:" + strconv.Itoa(callOffData.CheckSequence), - ErrorStatus: model.ERROR_STATUS_ON, - } - err = callOffErrDao.InsertOne(&callOffError) - if err != nil { - _ = session.Rollback() - log.Error("解析CallOff数据, 写入错误信息失败, error:" + err.Error()) - return - } - break + if callOffData.CheckSequence != needParseSeq && needParseSeq != -1 { + callOffError := model.ToyotaCallOffErrorLst{ + DemandId: callOffData.DemandId, + Pos: 1, + ErrorType: model.ERROR_TYPE_HINT, + ErrorInfo: "连番号不连续,当前需要解析连番号为:" + strconv.Itoa(needParseSeq) + ", 该连番号为:" + strconv.Itoa(callOffData.CheckSequence), + ErrorStatus: model.ERROR_STATUS_ON, } + err = callOffErrDao.InsertOne(&callOffError) + if err != nil { + _ = session.Rollback() + log.Error("解析CallOff数据, 写入错误信息失败, error:" + err.Error()) + return + } + break } needParseSeq = callOffData.CheckSequence + 1 From b2930d708ab4388f57cb61bb743b4953a6e15c6c Mon Sep 17 00:00:00 2001 From: zhangxin Date: Mon, 16 May 2022 17:28:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E5=8D=95=E6=95=B0=E9=87=8F=E4=B8=8D=E5=90=88=E8=A7=84=E7=9A=84?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/jit/implments/PackOrderToPLC.service.impl.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/jit/implments/PackOrderToPLC.service.impl.go b/services/jit/implments/PackOrderToPLC.service.impl.go index 31ae9bf..8f44515 100644 --- a/services/jit/implments/PackOrderToPLC.service.impl.go +++ b/services/jit/implments/PackOrderToPLC.service.impl.go @@ -930,6 +930,7 @@ func (impl *PackOrderServiceImplement) ReadPLCBackFlushData(user *global.User) { } return } + return } if len(packOrderLi) > 1 { log.Error("该RFID绑定多个包装单, RFID:"+seatStr, "任务ID:"+taskId) @@ -985,6 +986,7 @@ func (impl *PackOrderServiceImplement) ReadPLCBackFlushData(user *global.User) { } return } + return } packOrder := packOrderLi[0] packOrderStatus, err := packOrderStatusDao.SelectOne(packOrder.PackOrderId)