|
|
@@ -2,7 +2,6 @@ package oilsupplier
|
|
|
|
|
|
import (
|
|
|
"dashoo.cn/backend/api/business/workflow"
|
|
|
- "dashoo.cn/business/parameter"
|
|
|
"encoding/json"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
@@ -629,10 +628,13 @@ func (this *OilSupplierController) GetJoinCertEntityList() {
|
|
|
}
|
|
|
|
|
|
//企业用户只看自己的数据记录
|
|
|
- parameterSvc := baseparameter.GetBaseparameterService(utils.DBE) //取出外部门ID
|
|
|
+ /*parameterSvc := baseparameter.GetBaseparameterService(utils.DBE) //取出外部门ID
|
|
|
extOrganizeId := parameterSvc.GetBaseparameterMessage("GFGL", "paramset", "ExtOrganizeId")
|
|
|
if extOrganizeId == this.User.DepartmentId {
|
|
|
where = where + " and a.CreateUserId = '" + this.User.Id + "'"
|
|
|
+ }*/
|
|
|
+ if this.User.IsCompanyUser == 1 {
|
|
|
+ where = where + " and a.CreateUserId = '" + this.User.Id + "'"
|
|
|
}
|
|
|
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
@@ -1029,7 +1031,7 @@ func (this *OilSupplierController) AddEntity() {
|
|
|
json.Unmarshal(jsonBlob, &model)
|
|
|
json.Unmarshal(jsonBlob, &modelCertVM)
|
|
|
serviceCert := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
- canApply := serviceCert.IsCanApplyByExtOrganizeUser(modelCertVM.SupplierTypeCode, this.User.DepartmentId, this.User.Id)
|
|
|
+ canApply := serviceCert.IsCanApplyByExtOrganizeUser(modelCertVM.SupplierTypeCode, this.User.DepartmentId, this.User.Id, this.User.IsCompanyUser)
|
|
|
var errinfo ErrorDataInfo
|
|
|
if !canApply {
|
|
|
errinfo.Message = "添加失败!供方用户只能申请一次"
|
|
|
@@ -1374,7 +1376,7 @@ func (this *OilSupplierController) IsCanApply() {
|
|
|
}
|
|
|
|
|
|
svc := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
- canApply := svc.IsCanApplyByExtOrganizeUser(Type, this.User.DepartmentId, this.User.Id)
|
|
|
+ canApply := svc.IsCanApplyByExtOrganizeUser(Type, this.User.DepartmentId, this.User.Id, this.User.IsCompanyUser)
|
|
|
|
|
|
if canApply {
|
|
|
errinfo.Message = "无申请记录,可以申请"
|