Browse Source

发布修改

pull/97/head
娄文智 3 years ago
parent
commit
8902c5f598
3 changed files with 11 additions and 6 deletions
  1. +2
    -0
      dao/ap/implments/CustDemandVerDetail.dao.impl.go
  2. +3
    -0
      models/base/Const.go
  3. +6
    -6
      services/ap/implments/CustDemandVerHead.service.impl.go

+ 2
- 0
dao/ap/implments/CustDemandVerDetail.dao.impl.go View File

@ -8,6 +8,7 @@ import (
"leit.com/LAPP_CHEERSSON_BACKEND/grmi"
meta "leit.com/LAPP_CHEERSSON_BACKEND/meta/ap"
model "leit.com/LAPP_CHEERSSON_BACKEND/models/ap"
baseModel "leit.com/LAPP_CHEERSSON_BACKEND/models/base"
"leit.com/LAPP_CHEERSSON_BACKEND/utils"
"strings"
"xorm.io/core"
@ -463,6 +464,7 @@ func (impl *CustDemandVerDetailDAOImplement) SelectDeviationByVersion(version st
******************************************************************************/
func (impl *CustDemandVerDetailDAOImplement) IssueVersion(CustomerId string,VersionId string) error {
entity :=new(model.CustDemandVerDetail)
entity.Status = baseModel.STATUS_INT_YES
_, err := impl.session.Table(impl.meta.TableName).Cols("Status").Where("PlantNr = ? and CustomerId = ? and VersionId = ?",impl.plantNr,CustomerId,VersionId).Update(entity)
if err != nil {
return grmi.NewDataBaseError(err)


+ 3
- 0
models/base/Const.go View File

@ -113,4 +113,7 @@ const (
STATUS_YES = "1"
STATUS_NO = "0"
STATUS_INT_YES = 1
STATUS_INT_NO = 0
)

+ 6
- 6
services/ap/implments/CustDemandVerHead.service.impl.go View File

@ -1026,11 +1026,11 @@ func (impl *CustDemandVerHeadServiceImplement) ImportFile(user *global.User, cus
firstWeek := utils.ZellerFunction2Week(uint16(year), uint16(month), uint16(day))
dayLen := mInfo.WeekDemandDay - firstWeek
nowWeek := utils.WeekByDate(nowDate)
week := utils.WeekByDate(weekDate)
if nowWeek > week {
nowDateTime := utils.GetZeroTime(nowDate)
if nowDateTime.Unix() > weekDate.AddDate(0, 0, dayLen).Unix() {
continue
}
week := utils.WeekByDate(weekDate)
one := model.CustDemandVerDetail{}
one.ArtId = ArtId
one.CustomerId = customerId
@ -1205,11 +1205,11 @@ func (impl *CustDemandVerHeadServiceImplement) BulkImportFile(user *global.User,
firstWeek := utils.ZellerFunction2Week(uint16(year), uint16(month), uint16(day))
dayLen := mInfo.WeekDemandDay - firstWeek
nowWeek := utils.WeekByDate(nowDate)
week := utils.WeekByDate(weekDate)
if nowWeek > week {
nowDateTime := utils.GetZeroTime(nowDate)
if nowDateTime.Unix() > weekDate.AddDate(0, 0, dayLen).Unix() {
continue
}
week := utils.WeekByDate(weekDate)
one := model.CustDemandVerDetail{}
one.ArtId = ArtId
one.CustomerId = customerId


Loading…
Cancel
Save