|
|
@@ -1844,6 +1844,14 @@ func (this *OilSupplierController) CanUpdateSupplier() {
|
|
|
func (this *OilSupplierController) GetAuditerByDept() {
|
|
|
Id := this.Ctx.Input.Param(":deptId")
|
|
|
auditstepcode := this.GetString("auditstepcode")
|
|
|
+
|
|
|
+ var org organize.Base_Organize
|
|
|
+ svc := organize.GetOrganizeService(utils.DBE)
|
|
|
+ has := svc.GetEntityById(Id, &org)
|
|
|
+ ids := Id
|
|
|
+ if has && org.Category == "unit" {
|
|
|
+ ids = svc.GetAllChildById(Id)
|
|
|
+ }
|
|
|
//var auditWorkflow []auditsetting.Base_OilAuditSetting
|
|
|
//rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
|
|
|
//rsvc.GetAuditStepRoleEntity(OilAuditSettingName, Id, workflow.FIRST_TRIAL, &auditWorkflow)
|
|
|
@@ -1858,7 +1866,7 @@ func (this *OilSupplierController) GetAuditerByDept() {
|
|
|
//}
|
|
|
certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
var users []userRole.Base_RoleList
|
|
|
- certSrv.GetAuditUser(Id, auditstepcode, &users)
|
|
|
+ certSrv.GetAuditUser(ids, auditstepcode, &users)
|
|
|
var datainfo ErrorDataInfo
|
|
|
datainfo.Item = users
|
|
|
this.Data["json"] = &datainfo
|
|
|
@@ -1875,10 +1883,13 @@ func (this *OilSupplierController) GetAuditerByFist() {
|
|
|
orgSrv := organize.GetOrganizeService(utils.DBE)
|
|
|
var userentity userRole.Base_User
|
|
|
certSrv.GetEntityById(Id,&userentity)
|
|
|
- comid := orgSrv.GetMyUnitDepartmentId(userentity.Departmentid)
|
|
|
+
|
|
|
+ svc := organize.GetOrganizeService(utils.DBE)
|
|
|
+ unitId := svc.GetMyUnitDepartmentId(userentity.Departmentid)
|
|
|
+ ids := svc.GetAllChildById(unitId)
|
|
|
//depId := strings.Split(userentity.Superior,",")
|
|
|
var users []userRole.Base_RoleList
|
|
|
- certSrv.GetAuditUser(comid, auditstepcode, &users)
|
|
|
+ certSrv.GetAuditUser(ids, auditstepcode, &users)
|
|
|
var datainfo ErrorDataInfo
|
|
|
datainfo.Item = users
|
|
|
this.Data["json"] = &datainfo
|