|
|
@ -774,7 +774,7 @@ func (impl *CustDemandVerHeadServiceImplement) Select(user *global.User, urlPara |
|
|
|
* @Reference leit.com/LAPP_CHEERSSON_BACKEND/services/ap/CustDemandVerHeadService.SelectData |
|
|
|
* |
|
|
|
******************************************************************************/ |
|
|
|
func (impl *CustDemandVerHeadServiceImplement) SelectData(user *global.User, urlParameters map[string]string, grouptype string,customerId string, versionId string, artId string, status string, Valid bool) (grmi.PagingResult, error) { |
|
|
|
func (impl *CustDemandVerHeadServiceImplement) SelectData(user *global.User, urlParameters map[string]string, grouptype string, customerId string, versionId string, artId string, status string, Valid bool) (grmi.PagingResult, error) { |
|
|
|
|
|
|
|
grmi.Log(user, "/services/ap/implments/CustDemandVerHead.service.impl.go", "SelectCustDemandVerHead", "查询CustDemandVerHead") |
|
|
|
|
|
|
@ -788,11 +788,11 @@ func (impl *CustDemandVerHeadServiceImplement) SelectData(user *global.User, url |
|
|
|
condition := DefaultConditionOfCustDemandVerHeadAndPaging |
|
|
|
condition.Fill(urlParameters) |
|
|
|
|
|
|
|
result, err := dao.SelectData(condition.Paging,grouptype, customerId, versionId, artId, status, Valid) |
|
|
|
result, err := dao.SelectData(condition.Paging, grouptype, customerId, versionId, artId, status, Valid) |
|
|
|
if err != nil { |
|
|
|
return grmi.EmptyPagingResult, err |
|
|
|
} |
|
|
|
result.Count, err = dao.SelectDataCount(grouptype,customerId, versionId, artId, status, Valid) |
|
|
|
result.Count, err = dao.SelectDataCount(grouptype, customerId, versionId, artId, status, Valid) |
|
|
|
if err != nil { |
|
|
|
return grmi.EmptyPagingResult, err |
|
|
|
} |
|
|
@ -3348,17 +3348,27 @@ func (impl *CustDemandVerHeadServiceImplement) RemoveIssueGlobalAllVersion(user |
|
|
|
if isErp { |
|
|
|
return errors.New(fmt.Sprintf("当前周%s已经同步ERP,不可以反全局发布!", nowVersionId)) |
|
|
|
} |
|
|
|
for _, v := range issueData { |
|
|
|
ids := "" |
|
|
|
for k, v := range issueData { |
|
|
|
entity := new(model.CustDemandVerHead) |
|
|
|
entity.CustomerId = v.CustomerId |
|
|
|
entity.VersionId = v.VersionId |
|
|
|
entity.PublishStatus = baseModel.STATUS_INT_NO |
|
|
|
err = dao.IssueGlobalVersion(entity) |
|
|
|
if k > 0 { |
|
|
|
ids += "," |
|
|
|
} |
|
|
|
ids += v.PublishId |
|
|
|
if err != nil { |
|
|
|
session.Rollback() |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
err = utilService.PlnForecastInit().DeleteForecast(ids) |
|
|
|
if err != nil { |
|
|
|
_ = session.Rollback() |
|
|
|
return err |
|
|
|
} |
|
|
|
err = session.Commit() |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|