Bläddra i källkod

Merge branch 'develop' of http://code.dashoo.cn/dashoo/supplier_system into develop

wd 4 år sedan
förälder
incheckning
b501e3a53f

+ 14 - 0
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertcommon/oilsuppliercertCheckStatus.go

@@ -1,9 +1,11 @@
 package suppliercertcommon
 
 import (
+	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
 	"dashoo.cn/backend/api/business/paymentinfo"
 	. "dashoo.cn/backend/api/mydb"
+	"dashoo.cn/utils"
 	"github.com/go-xorm/xorm"
 )
 
@@ -21,6 +23,18 @@ func (s *OilSupplierCertCheckStatus) CheckOilSupplierCertIsNeedPay(certId string
 	var supplierCertEntity suppliercert.OilSupplierCert
 	s.GetEntityById(certId, &supplierCertEntity)
 
+	// 2021年05月11日 企管确认:准入申请,级别为1级的不交费且不考虑准入方式;2级的按原准入方式确定是否收费
+	svcSupplier := supplier.GetOilSupplierService(utils.DBE)
+	var supplierEntity supplier.OilSupplier
+	svcSupplier.GetEntityById(supplierCertEntity.SupplierId, &supplierEntity)
+
+	if supplierEntity.Id == 0 {
+		return 1
+	}
+	if supplierEntity.Grade == "1" {
+		return 2
+	}
+
 	var isPayList []string
 	isPayList = append(isPayList, suppliercert.PINGSHEN)
 	isPayList = append(isPayList, suppliercert.WAIBUSHICHANG)

+ 2 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -827,7 +827,7 @@ func (this *AnnualAuditController) CompanyAuditEntity() {
 	//srv.IsSupplierCertCanSubmit(strconv.Itoa(supplierCertEntity.Id), certId) TODO 参数检查
 
 	if this.User.Realname != annualEntity.CreateBy {
-		panic("只有申请创建人才能提交,当前申请创建人是 " + annualEntity.CreateBy)
+		panic("请联系申请创建人:" + annualEntity.CreateBy + " 予以提交,或删除该申请后重新创建再提交!")
 	}
 
 	//取出企业主表
@@ -942,7 +942,7 @@ func (this *AnnualAuditController) SeparateUnitSubmitAuditEntity() {
 	svc.GetEntityById(auditEntity.SupplierId, &supplierEntity)
 
 	if this.User.Realname != auditEntity.CreateBy {
-		panic("只有申请创建人才能提交,当前申请创建人是 " + auditEntity.CreateBy)
+		panic("请联系申请创建人:" + auditEntity.CreateBy + " 予以提交,或删除该申请后重新创建再提交!")
 	}
 
 	svcActiviti := workflow.GetActivitiService(utils.DBE)

+ 2 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -1624,7 +1624,7 @@ func (this *InfoChangeController) CompanyAuditEntity() {
 	infoSrv.GetEntityById(infoId, &infoChangeEntity)
 
 	if this.User.Realname != infoChangeEntity.CreateBy {
-		panic("只有申请创建人才能提交,当前申请创建人是 " + infoChangeEntity.CreateBy)
+		panic("请联系申请创建人:" + infoChangeEntity.CreateBy + " 予以提交,或删除该申请后重新创建再提交!")
 	}
 
 	// TODO 检查是否可以提交
@@ -1738,7 +1738,7 @@ func (this *InfoChangeController) UnitAuditEntity() {
 	svc.GetEntityById(infoId, &infoChangeEntity)
 
 	if this.User.Realname != infoChangeEntity.CreateBy {
-		panic("只有申请创建人才能提交,当前申请创建人是 " + infoChangeEntity.CreateBy)
+		panic("请联系申请创建人:" + infoChangeEntity.CreateBy + " 予以提交,或删除该申请后重新创建再提交!")
 	}
 
 	// TODO 检查是否可提交

+ 2 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -673,7 +673,7 @@ func (this *OilSupplierCertController) CompanyAuditEntity() {
 	certSrv.IsSupplierCertCanSubmit(strconv.Itoa(supplierCertEntity.SupplierId), certId)
 
 	if this.User.Realname != supplierCertEntity.CreateBy {
-		panic("只有申请创建人才能提交,当前申请创建人是 " + supplierCertEntity.CreateBy)
+		panic("请联系申请创建人:" + supplierCertEntity.CreateBy + " 予以提交,或删除该申请后重新创建再提交!")
 	}
 
 	stepCode := workflow.GetWorkFlowStepCode(supplierCertEntity.SupplierTypeCode)
@@ -792,7 +792,7 @@ func (this *OilSupplierCertController) UnitAuditEntity() {
 	certSrv.GetEntityById(certId, &supplierCertEntity)
 
 	if this.User.Realname != supplierCertEntity.CreateBy {
-		panic("只有申请创建人才能提交,当前申请创建人是 " + supplierCertEntity.CreateBy)
+		panic("请联系申请创建人:" + supplierCertEntity.CreateBy + " 予以提交,或删除该申请后重新创建再提交!")
 	}
 
 	//检查是否可提交

+ 2 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -734,7 +734,7 @@ func (this *OilSupplierCertAppendController) CompanySubmitAuditEntity() {
 	certSrv.GetEntityById(certAppendId, &supplierCertAppendEntity)
 
 	if this.User.Realname != supplierCertAppendEntity.CreateBy {
-		panic("只有申请创建人才能提交,当前申请创建人是 " + supplierCertAppendEntity.CreateBy)
+		panic("请联系申请创建人:" + supplierCertAppendEntity.CreateBy + " 予以提交,或删除该申请后重新创建再提交!")
 	}
 
 	// 检查是否允许提交
@@ -851,7 +851,7 @@ func (this *OilSupplierCertAppendController) SeparateUnitSubmitAuditEntity() {
 	certSrv.GetEntityById(supplierCertAppendEntity.SupplierId, &supplierEntity)
 
 	if this.User.Realname != supplierCertAppendEntity.CreateBy {
-		panic("只有申请创建人才能提交,当前申请创建人是 " + supplierCertAppendEntity.CreateBy)
+		panic("请联系申请创建人:" + supplierCertAppendEntity.CreateBy + " 予以提交,或删除该申请后重新创建再提交!")
 	}
 
 	svcActiviti := workflow.GetActivitiService(utils.DBE)