|
|
@@ -826,6 +826,10 @@ func (this *AnnualAuditController) CompanyAuditEntity() {
|
|
|
srv.GetEntityById(annualId, &annualEntity)
|
|
|
//srv.IsSupplierCertCanSubmit(strconv.Itoa(supplierCertEntity.Id), certId) TODO 参数检查
|
|
|
|
|
|
+ if this.User.Realname != annualEntity.CreateBy {
|
|
|
+ panic("只有申请创建人才能提交,当前申请创建人是 " + annualEntity.CreateBy)
|
|
|
+ }
|
|
|
+
|
|
|
//取出企业主表
|
|
|
supplierSvc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
var supplierEntity supplier.OilSupplier
|
|
|
@@ -937,6 +941,10 @@ func (this *AnnualAuditController) SeparateUnitSubmitAuditEntity() {
|
|
|
var supplierEntity supplier.OilSupplier
|
|
|
svc.GetEntityById(auditEntity.SupplierId, &supplierEntity)
|
|
|
|
|
|
+ if this.User.Realname != auditEntity.CreateBy {
|
|
|
+ panic("只有申请创建人才能提交,当前申请创建人是 " + auditEntity.CreateBy)
|
|
|
+ }
|
|
|
+
|
|
|
svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
//启动工作流
|
|
|
businessKey := auditEntity.BusinessKey
|
|
|
@@ -1794,8 +1802,7 @@ func (this *AnnualAuditController) EditQualChange() {
|
|
|
supplierfile.ModifiedUserId, _ = strconv.Atoi(this.User.Id)
|
|
|
supplierfile.ModifiedBy = this.User.Realname
|
|
|
supplierfile.OtherRemark = model.Remark
|
|
|
- svc.UpdateEntityBywheretbl(OilSupplierFileName, &supplierfile, []string{"EffectDate", "FileUrl", "FileName", "ModifiedOn", "ModifiedUserId", "ModifiedBy", "OtherRemark"}, "Id = " + strconv.Itoa(model.Id))
|
|
|
-
|
|
|
+ svc.UpdateEntityBywheretbl(OilSupplierFileName, &supplierfile, []string{"EffectDate", "FileUrl", "FileName", "ModifiedOn", "ModifiedUserId", "ModifiedBy", "OtherRemark"}, "Id = "+strconv.Itoa(model.Id))
|
|
|
|
|
|
var err error
|
|
|
var entity annualaudit.OilAnnualChangeDetail
|
|
|
@@ -1889,7 +1896,7 @@ func (this *AnnualAuditController) DeleteAddFile() {
|
|
|
svc := infochange.GetInfoChangeService(utils.DBE)
|
|
|
|
|
|
var file supplierfile.OilSupplierFile
|
|
|
- has1 := svc.GetEntity(&file, "Id=" + Id)
|
|
|
+ has1 := svc.GetEntity(&file, "Id="+Id)
|
|
|
if !has1 {
|
|
|
errinfo.Message = "删除失败"
|
|
|
errinfo.Code = -1
|
|
|
@@ -1899,11 +1906,11 @@ func (this *AnnualAuditController) DeleteAddFile() {
|
|
|
}
|
|
|
// 如果有正在进行中的流程,不允许删除任何资质
|
|
|
var certList []suppliercert.OilSupplierCert
|
|
|
- svc.GetEntitysByWhere(OilSupplierCertName, "Status > 0 and Status < 8 and SupplierId = " + strconv.Itoa(file.SupplierId), &certList)
|
|
|
+ svc.GetEntitysByWhere(OilSupplierCertName, "Status > 0 and Status < 8 and SupplierId = "+strconv.Itoa(file.SupplierId), &certList)
|
|
|
var appendList suppliercertappend.OilSupplierCertAppend
|
|
|
- svc.GetEntityByWhere(OilSupplierCertAppendName, "Status > 0 and Status < 8 and SupplierId = " + strconv.Itoa(file.SupplierId), &appendList)
|
|
|
+ svc.GetEntityByWhere(OilSupplierCertAppendName, "Status > 0 and Status < 8 and SupplierId = "+strconv.Itoa(file.SupplierId), &appendList)
|
|
|
var infoList infochange.OilInfoChange
|
|
|
- svc.GetEntityByWhere(OilInfoChangeName, "Status > 0 and Status < 8 and SupplierId = " + strconv.Itoa(file.SupplierId), &infoList)
|
|
|
+ svc.GetEntityByWhere(OilInfoChangeName, "Status > 0 and Status < 8 and SupplierId = "+strconv.Itoa(file.SupplierId), &infoList)
|
|
|
if len(certList) > 0 || appendList.Id > 0 || infoList.Id > 0 {
|
|
|
errinfo.Message = "有正在审核中的流程,不允许删除任何资质"
|
|
|
errinfo.Code = -1
|