|
@@ -60,6 +60,8 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
wfNames = workflow.OIL_DAILY_CONTRACT_EVALUATION
|
|
wfNames = workflow.OIL_DAILY_CONTRACT_EVALUATION
|
|
|
} else if stype == "11" {
|
|
} else if stype == "11" {
|
|
|
wfNames = workflow.OIL_ANNUAL_CONTRACT_EVALUATION
|
|
wfNames = workflow.OIL_ANNUAL_CONTRACT_EVALUATION
|
|
|
|
|
+ } else if stype == "12" {
|
|
|
|
|
+ wfNames = workflow.OIL_DAILY_CONTRACT_EVA_BY_BUSINESS
|
|
|
}
|
|
}
|
|
|
var todoliststemp []todolist.TodoList
|
|
var todoliststemp []todolist.TodoList
|
|
|
|
|
|
|
@@ -71,15 +73,15 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
myTasksRetWithTimes = pagingResult.TaskList
|
|
myTasksRetWithTimes = pagingResult.TaskList
|
|
|
|
|
|
|
|
var jzpsCount int64 = 0 // 准入集中评审的数量
|
|
var jzpsCount int64 = 0 // 准入集中评审的数量
|
|
|
- for _,item := range myTasksRetWithTimes {
|
|
|
|
|
|
|
+ for _, item := range myTasksRetWithTimes {
|
|
|
wfName := strings.Split(item.ProcessDefinitionId, ":")[0]
|
|
wfName := strings.Split(item.ProcessDefinitionId, ":")[0]
|
|
|
if (item.TaskName == "集中评审") && (wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY) {
|
|
if (item.TaskName == "集中评审") && (wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY) {
|
|
|
- jzpsCount ++
|
|
|
|
|
|
|
+ jzpsCount++
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
pagingResult.Total = pagingResult.Total - jzpsCount
|
|
pagingResult.Total = pagingResult.Total - jzpsCount
|
|
|
//取出各种类型的ID
|
|
//取出各种类型的ID
|
|
|
- for _,item := range myTasksRetWithTimes {
|
|
|
|
|
|
|
+ for _, item := range myTasksRetWithTimes {
|
|
|
idx := strings.Index(item.BusinessKey, "-")
|
|
idx := strings.Index(item.BusinessKey, "-")
|
|
|
id := item.BusinessKey
|
|
id := item.BusinessKey
|
|
|
if idx >= 0 {
|
|
if idx >= 0 {
|
|
@@ -98,9 +100,9 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
where = where + " and b.Id = '" + id + "'"
|
|
where = where + " and b.Id = '" + id + "'"
|
|
|
var todo todolist.TodoList
|
|
var todo todolist.TodoList
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName, &todo, where)
|
|
|
|
|
|
|
+ has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName, &todo, where)
|
|
|
if has {
|
|
if has {
|
|
|
- todo.Type = todolist.SUPPLIER
|
|
|
|
|
|
|
+ todo.Type = todolist.SUPPLIER
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.CreateTime = item.CreateTime
|
|
todo.CreateTime = item.CreateTime
|
|
|
todo.TaskName = item.TaskName
|
|
todo.TaskName = item.TaskName
|
|
@@ -113,7 +115,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
var todo todolist.TodoList
|
|
var todo todolist.TodoList
|
|
|
var certAppend suppliercertappend.OilSupplierCertAppend
|
|
var certAppend suppliercertappend.OilSupplierCertAppend
|
|
|
svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
- has :=svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName, &todo, where)
|
|
|
|
|
|
|
+ has := svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName, &todo, where)
|
|
|
svcapp.GetEntityById(id, &certAppend)
|
|
svcapp.GetEntityById(id, &certAppend)
|
|
|
if has {
|
|
if has {
|
|
|
todo.Id = certAppend.Id
|
|
todo.Id = certAppend.Id
|
|
@@ -160,7 +162,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.SupplierName = listInfo.SupplierName
|
|
todo.SupplierName = listInfo.SupplierName
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.TaskName = item.TaskName
|
|
todo.TaskName = item.TaskName
|
|
|
- todo.SupplierTypeCode = todolist.INFOCHANGE// listInfo.SupplierTypeName
|
|
|
|
|
|
|
+ todo.SupplierTypeCode = todolist.INFOCHANGE // listInfo.SupplierTypeName
|
|
|
todo.Status = listInfo.Status
|
|
todo.Status = listInfo.Status
|
|
|
todo.CreateTime = item.CreateTime
|
|
todo.CreateTime = item.CreateTime
|
|
|
todoliststemp = append(todoliststemp, todo)
|
|
todoliststemp = append(todoliststemp, todo)
|
|
@@ -207,7 +209,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
has = regsvc.GetEntityById(id, &listinfo)
|
|
has = regsvc.GetEntityById(id, &listinfo)
|
|
|
if has {
|
|
if has {
|
|
|
var list oilcatalog.OilCatalog
|
|
var list oilcatalog.OilCatalog
|
|
|
- regsvc.GetEntity(&list, "SubId=" + strconv.Itoa(listinfo.Id))
|
|
|
|
|
|
|
+ regsvc.GetEntity(&list, "SubId="+strconv.Itoa(listinfo.Id))
|
|
|
todo.Id = listinfo.Id
|
|
todo.Id = listinfo.Id
|
|
|
todo.Type = todolist.INCOME
|
|
todo.Type = todolist.INCOME
|
|
|
todo.SupplierName = list.CompanyName
|
|
todo.SupplierName = list.CompanyName
|
|
@@ -215,7 +217,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.TaskName = item.TaskName
|
|
todo.TaskName = item.TaskName
|
|
|
if listinfo.Type == "6" {
|
|
if listinfo.Type == "6" {
|
|
|
todo.SupplierTypeCode = todolist.INCOME + "-6"
|
|
todo.SupplierTypeCode = todolist.INCOME + "-6"
|
|
|
- } else if listinfo.Type == "7" {
|
|
|
|
|
|
|
+ } else if listinfo.Type == "7" {
|
|
|
todo.SupplierTypeCode = todolist.INCOME + "-7"
|
|
todo.SupplierTypeCode = todolist.INCOME + "-7"
|
|
|
}
|
|
}
|
|
|
todo.Status = listinfo.Status
|
|
todo.Status = listinfo.Status
|
|
@@ -260,6 +262,26 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.Status = contractSumEntity.Status
|
|
todo.Status = contractSumEntity.Status
|
|
|
todoliststemp = append(todoliststemp, todo)
|
|
todoliststemp = append(todoliststemp, todo)
|
|
|
}
|
|
}
|
|
|
|
|
+ } else if wfName == workflow.OIL_DAILY_CONTRACT_EVA_BY_BUSINESS {
|
|
|
|
|
+ // 专业处室提交的合同日常评审
|
|
|
|
|
+ var todo todolist.TodoList
|
|
|
|
|
+ conRev := contractReview.GetOilContractReviewService(utils.DBE)
|
|
|
|
|
+ var contractReviewEntity contractReview.OilContractReview
|
|
|
|
|
+ has = conRev.GetEntityById(id, &contractReviewEntity)
|
|
|
|
|
+ contractSvc := contract.GetOilContractService(utils.DBE)
|
|
|
|
|
+ var contractEntity contract.OilContract
|
|
|
|
|
+ contractSvc.GetEntityById(contractReviewEntity.ContractId, &contractEntity)
|
|
|
|
|
+ if has {
|
|
|
|
|
+ todo.Id = contractReviewEntity.Id
|
|
|
|
|
+ todo.Type = todolist.DAILY_BUSINESS
|
|
|
|
|
+ todo.TaskName = item.TaskName
|
|
|
|
|
+ todo.UserName = this.User.Realname
|
|
|
|
|
+ todo.CreateTime = item.CreateTime
|
|
|
|
|
+ todo.SupplierTypeCode = contractEntity.ContractClass
|
|
|
|
|
+ todo.SupplierName = contractEntity.SupplierName
|
|
|
|
|
+ todo.Status = contractReviewEntity.Status
|
|
|
|
|
+ todoliststemp = append(todoliststemp, todo)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -270,12 +292,12 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
var minDate time.Time
|
|
var minDate time.Time
|
|
|
var maxDate time.Time
|
|
var maxDate time.Time
|
|
|
if len(dates) == 2 {
|
|
if len(dates) == 2 {
|
|
|
- minDate,_ = utils.TimeParse(dates[0], "2006-01-02 15:04")
|
|
|
|
|
- maxDate,_ = utils.TimeParse(dates[1], "2006-01-02 15:04")
|
|
|
|
|
|
|
+ minDate, _ = utils.TimeParse(dates[0], "2006-01-02 15:04")
|
|
|
|
|
+ maxDate, _ = utils.TimeParse(dates[1], "2006-01-02 15:04")
|
|
|
}
|
|
}
|
|
|
for i := 0; i < len(todoliststemp); i++ {
|
|
for i := 0; i < len(todoliststemp); i++ {
|
|
|
- fmt.Println(minDate.Unix()*1000, "==",maxDate.Unix()*1000)
|
|
|
|
|
- fmt.Println(todoliststemp[i].CreateTime, "==",todoliststemp[i].CreateTime)
|
|
|
|
|
|
|
+ fmt.Println(minDate.Unix()*1000, "==", maxDate.Unix()*1000)
|
|
|
|
|
+ fmt.Println(todoliststemp[i].CreateTime, "==", todoliststemp[i].CreateTime)
|
|
|
if todoliststemp[i].CreateTime > minDate.Unix()*1000 && todoliststemp[i].CreateTime < maxDate.Unix()*1000 {
|
|
if todoliststemp[i].CreateTime > minDate.Unix()*1000 && todoliststemp[i].CreateTime < maxDate.Unix()*1000 {
|
|
|
todolists = append(todolists, todoliststemp[i])
|
|
todolists = append(todolists, todoliststemp[i])
|
|
|
}
|
|
}
|
|
@@ -339,7 +361,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
myTasksRetWithTimes = pagingResult.TaskList
|
|
myTasksRetWithTimes = pagingResult.TaskList
|
|
|
|
|
|
|
|
//取出各种类型的ID
|
|
//取出各种类型的ID
|
|
|
- for _,item := range myTasksRetWithTimes {
|
|
|
|
|
|
|
+ for _, item := range myTasksRetWithTimes {
|
|
|
idx := strings.Index(item.BusinessKey, "-")
|
|
idx := strings.Index(item.BusinessKey, "-")
|
|
|
id := item.BusinessKey
|
|
id := item.BusinessKey
|
|
|
if idx >= 0 {
|
|
if idx >= 0 {
|
|
@@ -354,9 +376,9 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
where = where + " and b.Id = '" + id + "'"
|
|
where = where + " and b.Id = '" + id + "'"
|
|
|
var todo todolist.TodoList
|
|
var todo todolist.TodoList
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName, &todo, where)
|
|
|
|
|
|
|
+ has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName, &todo, where)
|
|
|
if has {
|
|
if has {
|
|
|
- todo.Type = todolist.SUPPLIER
|
|
|
|
|
|
|
+ todo.Type = todolist.SUPPLIER
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.CreateTime = item.CreateTime
|
|
todo.CreateTime = item.CreateTime
|
|
|
todo.TaskName = item.TaskName
|
|
todo.TaskName = item.TaskName
|
|
@@ -369,7 +391,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
where = where + " and b.Id = '" + id + "'"
|
|
where = where + " and b.Id = '" + id + "'"
|
|
|
var todo todolist.TodoList
|
|
var todo todolist.TodoList
|
|
|
svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
- has :=svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName, &todo, where)
|
|
|
|
|
|
|
+ has := svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName, &todo, where)
|
|
|
if has {
|
|
if has {
|
|
|
todo.TaskName = item.TaskName
|
|
todo.TaskName = item.TaskName
|
|
|
todo.Type = todolist.CERTAPPEND
|
|
todo.Type = todolist.CERTAPPEND
|
|
@@ -463,7 +485,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
has = regsvc.GetEntityById(id, &listinfo)
|
|
has = regsvc.GetEntityById(id, &listinfo)
|
|
|
if has {
|
|
if has {
|
|
|
var list oilcatalog.OilCatalog
|
|
var list oilcatalog.OilCatalog
|
|
|
- regsvc.GetEntity(&list, "SubId=" + strconv.Itoa(listinfo.Id))
|
|
|
|
|
|
|
+ regsvc.GetEntity(&list, "SubId="+strconv.Itoa(listinfo.Id))
|
|
|
todo.Id = listinfo.Id
|
|
todo.Id = listinfo.Id
|
|
|
todo.Type = todolist.INCOME
|
|
todo.Type = todolist.INCOME
|
|
|
todo.SupplierName = list.CompanyName
|
|
todo.SupplierName = list.CompanyName
|
|
@@ -471,7 +493,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.TaskName = item.TaskName
|
|
todo.TaskName = item.TaskName
|
|
|
if listinfo.Type == "6" {
|
|
if listinfo.Type == "6" {
|
|
|
todo.SupplierTypeCode = todolist.INCOME + "-6"
|
|
todo.SupplierTypeCode = todolist.INCOME + "-6"
|
|
|
- } else if listinfo.Type == "7" {
|
|
|
|
|
|
|
+ } else if listinfo.Type == "7" {
|
|
|
todo.SupplierTypeCode = todolist.INCOME + "-7"
|
|
todo.SupplierTypeCode = todolist.INCOME + "-7"
|
|
|
}
|
|
}
|
|
|
todo.Status = listinfo.Status
|
|
todo.Status = listinfo.Status
|
|
@@ -526,8 +548,8 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
var minDate time.Time
|
|
var minDate time.Time
|
|
|
var maxDate time.Time
|
|
var maxDate time.Time
|
|
|
if len(dates) == 2 {
|
|
if len(dates) == 2 {
|
|
|
- minDate,_ = utils.TimeParse(dates[0], "2006-01-02 15:04")
|
|
|
|
|
- maxDate,_ = utils.TimeParse(dates[1], "2006-01-02 15:04")
|
|
|
|
|
|
|
+ minDate, _ = utils.TimeParse(dates[0], "2006-01-02 15:04")
|
|
|
|
|
+ maxDate, _ = utils.TimeParse(dates[1], "2006-01-02 15:04")
|
|
|
}
|
|
}
|
|
|
for i := 0; i < len(todoliststemp); i++ {
|
|
for i := 0; i < len(todoliststemp); i++ {
|
|
|
if todoliststemp[i].CreateTime > minDate.Unix()*1000 && todoliststemp[i].CreateTime < maxDate.Unix()*1000 {
|
|
if todoliststemp[i].CreateTime > minDate.Unix()*1000 && todoliststemp[i].CreateTime < maxDate.Unix()*1000 {
|