diff --git a/dao/base/implments/Snr.dao.impl.go b/dao/base/implments/Snr.dao.impl.go index 7fa2920..3ecca42 100644 --- a/dao/base/implments/Snr.dao.impl.go +++ b/dao/base/implments/Snr.dao.impl.go @@ -609,7 +609,9 @@ func (impl *SnrDAOImplement) GetSessionNextSnr(user *global.User, session *xorm. nextsnr = snrtab.NextNr } } - + if nextsnr > snrtab.EndNr { + return "", grmi.NewBusinessError("流水号越界") + } // 组合返回值 layout = []byte(snrtab.Identifierlayout) for i = 0; i < len(layout); i++ { @@ -958,6 +960,9 @@ func (impl *SnrDAOImplement) GetNextSnrWithTime(snr string, t time.Time) (return if err != nil { return "", err } + if nextSnr > snrData.EndNr { + return "", grmi.NewBusinessError("流水号越界") + } // 组合返回值 layout := []byte(snrData.Identifierlayout) for i := 0; i < len(layout); i++ { diff --git a/services/me/implments/ProductFamily.service.impl.go b/services/me/implments/ProductFamily.service.impl.go index db550ee..7c78796 100644 --- a/services/me/implments/ProductFamily.service.impl.go +++ b/services/me/implments/ProductFamily.service.impl.go @@ -487,7 +487,7 @@ func (impl *ProductFamilyServiceImplement) GeneratePackTemplate(user *global.Use packTemplateLst := jitModel.PackTemplateItemLst{ PackTemplateId: productFamilyId, Pos: index + 1, - PartId: product.PartId, + PartId: product.ProductId, PlanQty: product.PackOrderItemSize, } templateLstLi = append(templateLstLi, packTemplateLst)