|
|
@@ -464,10 +464,10 @@ func (this *OilCatalogSubController) AuditEntity() {
|
|
|
var jsonblob = this.Ctx.Input.RequestBody
|
|
|
json.Unmarshal(jsonblob, &dataOther)
|
|
|
|
|
|
- var entity oilcatalogsub.OilCatalogSub
|
|
|
+ var subEntity oilcatalogsub.OilCatalogSub
|
|
|
var catalog oilcatalog.OilCatalog
|
|
|
svc := oilcatalogsub.GetOilCatalogSubService(utils.DBE)
|
|
|
- svc.GetEntityById(Id, &entity)
|
|
|
+ svc.GetEntityById(Id, &subEntity)
|
|
|
|
|
|
var errInfo ErrorDataInfo
|
|
|
defer func() { //finally处理失败的异常
|
|
|
@@ -490,16 +490,16 @@ func (this *OilCatalogSubController) AuditEntity() {
|
|
|
backStatus := "0"
|
|
|
var userIds string
|
|
|
|
|
|
- if entity.Status == oilcatalogsub.FIRST_TRIAL_STATUS {
|
|
|
- userIds = utils.ToStr(entity.SecondAudit)
|
|
|
+ if subEntity.Status == oilcatalogsub.FIRST_TRIAL_STATUS {
|
|
|
+ userIds = utils.ToStr(subEntity.SecondAudit)
|
|
|
status = oilcatalogsub.SECOND_TRIAL_STATUS
|
|
|
backStatus = oilcatalogsub.NOPASS_STATUS
|
|
|
- } else if entity.Status == oilcatalogsub.SECOND_TRIAL_STATUS {
|
|
|
+ } else if subEntity.Status == oilcatalogsub.SECOND_TRIAL_STATUS {
|
|
|
backStatus = oilcatalogsub.NO_SECOND_TRIAL_STATUS
|
|
|
status = oilcatalogsub.CENT_AUDIT_STATUS
|
|
|
|
|
|
paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
|
|
|
- topId := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT")
|
|
|
+ topId := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT") // 企管法规处审核
|
|
|
|
|
|
var userList []userRole.Base_User
|
|
|
var setting auditsetting.Base_OilAuditSetting
|
|
|
@@ -521,7 +521,7 @@ func (this *OilCatalogSubController) AuditEntity() {
|
|
|
|
|
|
userIds = strings.Trim(userIds, ",")
|
|
|
|
|
|
- } else if entity.Status == oilcatalogsub.CENT_AUDIT_STATUS {
|
|
|
+ } else if subEntity.Status == oilcatalogsub.CENT_AUDIT_STATUS {
|
|
|
userIds = this.User.Id
|
|
|
status = oilcatalogsub.ALL_PASE_STATUS
|
|
|
backStatus = oilcatalogsub.NO_CENT_AUDIT_STATUS
|
|
|
@@ -529,8 +529,8 @@ func (this *OilCatalogSubController) AuditEntity() {
|
|
|
|
|
|
svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
var ActiComplete workflow.ActiCompleteVM
|
|
|
- ActiComplete.ProcessKey = entity.ProcessKey
|
|
|
- ActiComplete.BusinessKey = entity.BusinessKey
|
|
|
+ ActiComplete.ProcessKey = subEntity.ProcessKey
|
|
|
+ ActiComplete.BusinessKey = subEntity.BusinessKey
|
|
|
ActiComplete.UserNames = userIds
|
|
|
ActiComplete.UserId = this.User.Id
|
|
|
ActiComplete.Remarks = dataOther.AuditorRemark
|
|
|
@@ -543,19 +543,19 @@ func (this *OilCatalogSubController) AuditEntity() {
|
|
|
if receiveVal == "true" {
|
|
|
// 更新主表状态
|
|
|
|
|
|
- if entity.Status == oilcatalogsub.CENT_AUDIT_STATUS {
|
|
|
+ if subEntity.Status == oilcatalogsub.CENT_AUDIT_STATUS {
|
|
|
catalog.Status = "2"
|
|
|
} else {
|
|
|
catalog.Status = "1"
|
|
|
}
|
|
|
- entity.Status = status
|
|
|
+ subEntity.Status = status
|
|
|
cols := []string{
|
|
|
"Status",
|
|
|
}
|
|
|
- svc.UpdateEntityByIdCols(Id, &entity, cols)
|
|
|
+ svc.UpdateEntityByIdCols(Id, &subEntity, cols)
|
|
|
// 从表状态
|
|
|
|
|
|
- where := "SubId=" + Id + " and CatalogType=" + entity.Type
|
|
|
+ where := "SubId=" + Id + " and CatalogType=" + subEntity.Type
|
|
|
svc.UpdateEntityBywheretbl(OilCatalogName, &catalog, cols, where)
|
|
|
errInfo.Message = "提交成功!"
|
|
|
errInfo.Code = 0
|
|
|
@@ -575,14 +575,14 @@ func (this *OilCatalogSubController) AuditEntity() {
|
|
|
|
|
|
if receiveVal == "true" {
|
|
|
// 更新主表状态
|
|
|
- entity.Status = backStatus
|
|
|
+ subEntity.Status = backStatus
|
|
|
cols := []string{
|
|
|
"Status",
|
|
|
}
|
|
|
- svc.UpdateEntityByIdCols(Id, entity, cols)
|
|
|
+ svc.UpdateEntityByIdCols(Id, subEntity, cols)
|
|
|
// 从表状态
|
|
|
catalog.Status = "0"
|
|
|
- where := "SubId=" + Id + " and CatalogType=" + entity.Type
|
|
|
+ where := "SubId=" + Id + " and CatalogType=" + subEntity.Type
|
|
|
svc.UpdateEntityBywheretbl(OilCatalogName, &catalog, cols, where)
|
|
|
errInfo.Message = "提交成功!"
|
|
|
errInfo.Code = 0
|