diff --git a/services/ap/implments/Balance.service.impl.go b/services/ap/implments/Balance.service.impl.go index a051de6..b826b67 100644 --- a/services/ap/implments/Balance.service.impl.go +++ b/services/ap/implments/Balance.service.impl.go @@ -2932,26 +2932,26 @@ func (impl *BalanceServiceImplement) PublishMpsPlan(user *global.User, version s planOrderList = append(planOrderList, planOrder) } - if info.OutSourcingQty-info.OriginOutSourcingQty > 0 { - date := info.DemandDate - if !utils.WeekDayMondayZeroTs(info.DemandDate.Restore()).Before(utils.WeekDayMondayZeroTs(time.Now())) { - date = grmi.Date(time.Now()) - } - IndependentDemandQty := model.ArticleIndependentDemand{ - PlantNr: user.PlantNr, - ArtId: info.ArtId, - DemandKey: info.DemandKey, - VersionNr: data_PlanOrderVersion.VersionNr, - ProjectId: info.ProjectId, - CustomerId: info.CustomerId, - DemandDate: date, - DemandYear: info.DemandYear, - DemandWeek: info.DemandWeek, - DemandMonth: info.DemandMonth, - DemandQty: info.OutSourcingQty - info.OriginOutSourcingQty, - } - IndependentDemandQtyList = append(IndependentDemandQtyList, IndependentDemandQty) - } + //if info.OutSourcingQty-info.OriginOutSourcingQty > 0 { + // date := info.DemandDate + // if !utils.WeekDayMondayZeroTs(info.DemandDate.Restore()).Before(utils.WeekDayMondayZeroTs(time.Now())) { + // date = grmi.Date(time.Now()) + // } + // IndependentDemandQty := model.ArticleIndependentDemand{ + // PlantNr: user.PlantNr, + // ArtId: info.ArtId, + // DemandKey: info.DemandKey, + // VersionNr: data_PlanOrderVersion.VersionNr, + // ProjectId: info.ProjectId, + // CustomerId: info.CustomerId, + // DemandDate: date, + // DemandYear: info.DemandYear, + // DemandWeek: info.DemandWeek, + // DemandMonth: info.DemandMonth, + // DemandQty: info.OutSourcingQty - info.OriginOutSourcingQty, + // } + // IndependentDemandQtyList = append(IndependentDemandQtyList, IndependentDemandQty) + //} // 已发布 info.Status = 2 info.PublishedVersionNr = version