|
|
@ -8,7 +8,6 @@ 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" |
|
|
|
"xorm.io/core" |
|
|
|
) |
|
|
|
|
|
|
@ -346,7 +345,7 @@ func (impl *CustDemandVerHeadDAOImplement) IssueVersion(entity *model.CustDemand |
|
|
|
func (impl *CustDemandVerHeadDAOImplement) IssueGlobalVersion(entity *model.CustDemandVerHead) error { |
|
|
|
entity.PlantNr = impl.plantNr |
|
|
|
entity.LastUser = impl.userid |
|
|
|
_, err := impl.session.Table(impl.meta.TableName).Cols("GlobalPublish,PublishId,PublishNumber").Join("INNER","AP_UserCustlst","AP_UserCustlst.PlantNr = AP_CustDemandVerHead.PlantNr and AP_UserCustlst.CustomerId = AP_CustDemandVerHead.CustomerId").Where("AP_CustDemandVerHead.Status = ? and AP_UserCustlst.UserId = ?",baseModel.STATUS_YES,impl.userid).Update(entity) |
|
|
|
_, err := impl.session.Table(impl.meta.TableName).Cols("GlobalPublish,PublishId,PublishNumber").ID(entity.GetKey()).Update(entity) |
|
|
|
if err != nil { |
|
|
|
return grmi.NewDataBaseError(err) |
|
|
|
} |
|
|
|