|
|
@@ -13,6 +13,7 @@ import (
|
|
|
"dashoo.cn/business2/areajson"
|
|
|
"dashoo.cn/business2/items"
|
|
|
"dashoo.cn/business2/permission"
|
|
|
+ "dashoo.cn/business3/parameter"
|
|
|
"reflect"
|
|
|
|
|
|
"encoding/json"
|
|
|
@@ -939,31 +940,32 @@ func (this *AnnualAuditController) AnnualAudit() {
|
|
|
step = 2
|
|
|
backstatus = suppliercert.NOPASS_STATUS
|
|
|
} else if list.Status == suppliercert.SECOND_TRIAL_STATUS {
|
|
|
- status = suppliercert.PAYING_AUDIT_STATUS
|
|
|
+ status = suppliercert.CENT_AUDIT_STATUS
|
|
|
step = 2
|
|
|
backstatus = suppliercert.NO_SECOND_TRIAL_STATUS
|
|
|
|
|
|
- //svc := organize.GetOrganizeService(utils.DBE)
|
|
|
- //unitId := svc.GetMyUnitDepartmentId(strconv.Itoa(list.ThirdAudit))
|
|
|
- //var userlist []userRole.Base_User
|
|
|
- //var setting auditsetting.Base_OilAuditSetting
|
|
|
- //usvc := userRole.GetUserService(utils.DBE)
|
|
|
- //where := "AuditStepCode='" + workflow.PROF_RECE + "'"
|
|
|
- //svc.GetEntity(&setting, where)
|
|
|
- //ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
|
|
|
- //tempstr := strings.Join(ids, ",")
|
|
|
- //uids := strings.Replace(tempstr, "uid_", "", -1)
|
|
|
- //uids = strings.Trim(uids, ",")
|
|
|
- //if uids != "" {
|
|
|
- // where := "Id in (" + uids + ")" + " and UnitId=" + unitId
|
|
|
- // svc.GetEntities(&userlist, where)
|
|
|
- //}
|
|
|
- //
|
|
|
- //
|
|
|
- //for _, tmpUser := range userlist {
|
|
|
- // userIds += strconv.Itoa(tmpUser.Id) + ","//strconv.FormatInt(tmpUser.Id, 10) + ","
|
|
|
- //}
|
|
|
- //userIds = strings.Trim(userIds, ",")
|
|
|
+ paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
|
|
|
+ topid := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT")
|
|
|
+
|
|
|
+ var userlist []userRole.Base_User
|
|
|
+ var setting auditsetting.Base_OilAuditSetting
|
|
|
+ usvc := userRole.GetUserService(utils.DBE)
|
|
|
+ where := "AuditStepCode='" + workflow.PROF_REGULATION + "'"
|
|
|
+ usvc.GetEntity(&setting, where)
|
|
|
+
|
|
|
+ ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
|
|
|
+ tempstr := strings.Join(ids, ",")
|
|
|
+ uids := strings.Replace(tempstr, "uid_", "", -1)
|
|
|
+ uids = strings.Trim(uids, ",")
|
|
|
+ if uids != "" {
|
|
|
+ where := "Id in (" + uids + ")" + " and UnitId=" + topid
|
|
|
+ usvc.GetEntities(&userlist, where)
|
|
|
+ }
|
|
|
+ for _, tmpUser := range userlist {
|
|
|
+ userIds += strconv.Itoa(tmpUser.Id) + ","
|
|
|
+ }
|
|
|
+
|
|
|
+ userIds = strings.Trim(userIds, ",")
|
|
|
} else if list.Status == suppliercert.THIRD_TRIAL_STATUS {
|
|
|
userIds = ProfAudit
|
|
|
status = suppliercert.PROF_AUDIT_STATUS
|
|
|
@@ -973,6 +975,10 @@ func (this *AnnualAuditController) AnnualAudit() {
|
|
|
status = suppliercert.PAYING_AUDIT_STATUS
|
|
|
step = 3
|
|
|
backstatus = suppliercert.NO_PROF_AUDIT_STATUS
|
|
|
+ } else if list.Status == suppliercert.CENT_AUDIT_STATUS {
|
|
|
+ status = suppliercert.PAYING_AUDIT_STATUS
|
|
|
+ step = 3
|
|
|
+ backstatus = suppliercert.NO_CENT_AUDIT_STATUS
|
|
|
}
|
|
|
var ActiComplete workflow.ActiCompleteVM
|
|
|
ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
|
|
|
@@ -987,7 +993,7 @@ func (this *AnnualAuditController) AnnualAudit() {
|
|
|
var auditmodel annualaudit.OilAnnualAudit
|
|
|
auditmodel.Status = status
|
|
|
oldaplydate := list.ApplyTime
|
|
|
- if list.Status == suppliercert.SECOND_TRIAL_STATUS {
|
|
|
+ if list.Status == suppliercert.CENT_AUDIT_STATUS {
|
|
|
|
|
|
if certEntity.InStyle == "1" {
|
|
|
var certmodel suppliercert.OilSupplierCert
|