Browse Source

添加流水号溢出报错的处理

feature_specialship
zhangxin 2 years ago
parent
commit
ca00fc3da2
2 changed files with 7 additions and 2 deletions
  1. +6
    -1
      dao/base/implments/Snr.dao.impl.go
  2. +1
    -1
      services/me/implments/ProductFamily.service.impl.go

+ 6
- 1
dao/base/implments/Snr.dao.impl.go View File

@ -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++ {


+ 1
- 1
services/me/implments/ProductFamily.service.impl.go View File

@ -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)


Loading…
Cancel
Save