|
|
@@ -110,11 +110,16 @@ func (this *OilContractController) GetEntityList() {
|
|
|
PoNumber := this.GetString("PoNumber")
|
|
|
SubPackage := this.GetString("SubPackage")
|
|
|
ImportStatus := this.GetString("ImportStatus")
|
|
|
+ ContractClass := this.GetString("ContractClass")
|
|
|
|
|
|
if Id != "" {
|
|
|
where = where + " and Id like '%" + Id + "%'"
|
|
|
}
|
|
|
|
|
|
+ if ContractClass != "" {
|
|
|
+ where = where + " and ContractClass='" + ContractClass + "' "
|
|
|
+ }
|
|
|
+
|
|
|
if SupplierId != "" {
|
|
|
where = where + " and SupplierId like '%" + SupplierId + "%'"
|
|
|
}
|
|
|
@@ -375,12 +380,17 @@ func (this *OilContractController) GetEntityList() {
|
|
|
}
|
|
|
|
|
|
// 企管法规处可看所有合同, 获取企管法规处人员
|
|
|
- var setting auditsetting.Base_OilAuditSetting
|
|
|
+ var settingReg auditsetting.Base_OilAuditSetting
|
|
|
orgSvc := organize.GetOrganizeService(utils.DBE)
|
|
|
- whereAudit := "AuditStepCode='PROF_REGULATION'"
|
|
|
- orgSvc.GetEntity(&setting, whereAudit)
|
|
|
- res := orgSvc.UserInRoleById(this.User.Id, strconv.Itoa(setting.RoleId))
|
|
|
- if !res {
|
|
|
+ wherePRegAudit := "AuditStepCode='PROF_REGULATION'"
|
|
|
+ orgSvc.GetEntity(&settingReg, wherePRegAudit) // PROF_AUDIT
|
|
|
+ res1 := orgSvc.UserInRoleById(this.User.Id, strconv.Itoa(settingReg.RoleId))
|
|
|
+ // 所有业务处室分办单位可查看所有合同 TODO 待确认
|
|
|
+ var settingProf auditsetting.Base_OilAuditSetting
|
|
|
+ wherePAudit := "AuditStepCode='PROF_RECE'"
|
|
|
+ orgSvc.GetEntity(&settingProf, wherePAudit) // PROF_AUDIT
|
|
|
+ res2 := orgSvc.UserInRoleById(this.User.Id, strconv.Itoa(settingProf.RoleId))
|
|
|
+ if !res1 && !res2 {
|
|
|
where = where + " and SecondUnit= " + strconv.Itoa(this.User.UnitId)
|
|
|
}
|
|
|
|