2 Commits

5 changed files with 5 additions and 7 deletions
Split View
  1. +1
    -1
      dao/base/AndonInfo.dao.go
  2. +2
    -2
      dao/base/implments/AndonInfo.dao.impl.go
  3. +1
    -0
      models/view/AndonInfoView.go
  4. +0
    -3
      services/jit/implments/ShipOrder.service.impl.go
  5. +1
    -1
      services/pln/implments/CustOrder.Dashborad.impl.go

+ 1
- 1
dao/base/AndonInfo.dao.go View File

@ -248,7 +248,7 @@ type AndonInfoDAO interface {
* @Date : 2022-01-06 14:56:42
*
******************************************************************************/
SumAndonInfo(startTime, endTime string) (int, error)
SumAndonInfo(GroupLineId, startTime, endTime string) (int, error)
}
/******************************************************************************


+ 2
- 2
dao/base/implments/AndonInfo.dao.impl.go View File

@ -330,10 +330,10 @@ func (impl *AndonInfoDAOImplement) UpdateWhere(predicates []grmi.Predicate, enti
}
//统计安灯时间
func (impl *AndonInfoDAOImplement) SumAndonInfo(startTime, endTime string) (int, error) {
func (impl *AndonInfoDAOImplement) SumAndonInfo(GroupLineId, startTime, endTime string) (int, error) {
entity := view.AndonInfoView{}
_, err := impl.session.Table("AndonInfoView").Select("SUM(AndonTimes) as AndonTimes").Where("PlantNr = ? and CreateTime > ? and CreateTime <= ?", impl.plantNr, startTime, endTime).Get(&entity)
_, err := impl.session.Table("AndonInfoView").Select("SUM(AndonTimes) as AndonTimes").Where("PlantNr = ? and GroupLineId = ? and CreateTime > ? and CreateTime <= ?", impl.plantNr, GroupLineId, startTime, endTime).Get(&entity)
if err != nil {
return 0, grmi.NewDataBaseError(err)
}


+ 1
- 0
models/view/AndonInfoView.go View File

@ -5,6 +5,7 @@ import "LAPP_ACURA_MOM_BACKEND/grmi"
type AndonInfoView struct {
PlantNr string `xorm:"nvarchar(40) 'PlantNr' not null" json:"AndonInfoView-PlantNr"`
WorkLineId string `xorm:"nvarchar(40) 'WorkLineId' not null" json:"AndonInfoView-WorkLineId"`
GroupLineId string `xorm:"nvarchar(40) 'GroupLineId' not null" json:"AndonInfoView-GroupLineId"`
PO string `xorm:"nvarchar(40) 'PO' not null" json:"AndonInfoView-PO"`
WorkPlaceId string `xorm:"nvarchar(40) 'WorkPlaceId' not null" json:"AndonInfoView-WorkPlaceId"`
WorkPlaceNr int `xorm:"int 'WorkPlaceNr' not null" json:"AndonInfoView-WorkPlaceNr"`


+ 0
- 3
services/jit/implments/ShipOrder.service.impl.go View File

@ -2443,9 +2443,6 @@ func (impl *ShipOrderServiceImplement) NewExportShipOrder(user *global.User, ent
}
pos := 0
for rowIndex, row := range output[0] {
if len(row) < 2 {
return fmt.Errorf("文件格式无法解析")
}
if rowIndex == 0 {
entity.ShipOrderId = row[0]
}


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

@ -1459,7 +1459,7 @@ func (impl *CustOrderServiceImplement) SelectOee(user *global.User, dayModel *ba
meta.DownTimeRecord_OpenTime.NewPredicate(grmi.LessOrEqual, endTime.Format(grmi.DateTimeOutFormat)),
}, nil)
andonTimes, err := andInfoDao.SumAndonInfo(startTime.Format(grmi.DateTimeOutFormat), endTime.Format(grmi.DateTimeOutFormat))
andonTimes, err := andInfoDao.SumAndonInfo(workLineId, startTime.Format(grmi.DateTimeOutFormat), endTime.Format(grmi.DateTimeOutFormat))
if err != nil {
glog.InfoExtln("dashboard记录", "err.Error():", err.Error())
return result, grmi.NewBusinessError("查询打包数据失败, 错误:" + err.Error())


Loading…
Cancel
Save