|
|
@@ -53,6 +53,7 @@ import (
|
|
|
"dashoo.cn/backend/api/business/limsreportnobeampumpingunits"
|
|
|
. "dashoo.cn/backend/api/controllers"
|
|
|
"dashoo.cn/utils"
|
|
|
+ myorganize "dashoo.cn/backend/api/business/organize"
|
|
|
)
|
|
|
|
|
|
type CreateReportController struct {
|
|
|
@@ -349,24 +350,36 @@ func (this *CreateReportController) GetReportEntrustList() {
|
|
|
ProjectTypeId := this.GetString("ProjectTypeId")
|
|
|
orderby := "a.Id desc"
|
|
|
|
|
|
- userSvc := userRole.GetUserService(utils.DBE)
|
|
|
- organizeSvc := organize.GetOrganizeService(utils.DBE)
|
|
|
- departList := organizeSvc.GetChildByTopId(this.User.DepartmentId)
|
|
|
+ //userSvc := userRole.GetUserService(utils.DBE)
|
|
|
+ //organizeSvc := organize.GetOrganizeService(utils.DBE)
|
|
|
+ //departList := organizeSvc.GetChildByTopId(this.User.DepartmentId)
|
|
|
//取出当前部门及下级部门的所有用户列表
|
|
|
- var subUserList []userRole.Base_User
|
|
|
- whereUser := " 1=1 "
|
|
|
- whereUser += " and DepartmentId in (" + departList + ")"
|
|
|
- userSvc.GetEntities(&subUserList, whereUser)
|
|
|
- var userIds string
|
|
|
+ //var subUserList []userRole.Base_User
|
|
|
+ //whereUser := " 1=1 "
|
|
|
+ //whereUser += " and DepartmentId in (" + departList + ")"
|
|
|
+ //userSvc.GetEntities(&subUserList, whereUser)
|
|
|
+ //var userIds string
|
|
|
+ //
|
|
|
+ //for _, tmpUser := range subUserList {
|
|
|
+ // userIds += strconv.Itoa(tmpUser.Id) + ","
|
|
|
+ //}
|
|
|
+ //userIds = strings.Trim(userIds, ",")
|
|
|
|
|
|
- for _, tmpUser := range subUserList {
|
|
|
+ svc := myorganize.GetOrganizeService(utils.DBE)
|
|
|
+ unitThirdId := svc.GetMyUnitThirdDepartmentId(this.User.DepartmentId)
|
|
|
+
|
|
|
+ var userlist []userRole.Base_User
|
|
|
+ whereuser := "UnitThirdId=" + unitThirdId
|
|
|
+ svc.GetEntities(&userlist, whereuser)
|
|
|
+ userIds := ""
|
|
|
+ for _, tmpUser := range userlist {
|
|
|
userIds += strconv.Itoa(tmpUser.Id) + ","
|
|
|
}
|
|
|
userIds = strings.Trim(userIds, ",")
|
|
|
|
|
|
where := " 1=1 "
|
|
|
where += " and a.CreateUserId in (" + userIds + ")"
|
|
|
- where += " AND c.CheckStatus = 4 and (a.ReportStatus = 0 or a.ReportStatus is NULL) and c.CreateReportStatus = 0 "
|
|
|
+ where += " AND c.CheckStatus = 6 and (a.ReportStatus = 0 or a.ReportStatus is NULL) and c.CreateReportStatus = 0 "
|
|
|
|
|
|
if entrustno != "" {
|
|
|
where = where + " and a.EntrustNo like '%" + entrustno + "%'"
|
|
|
@@ -395,8 +408,8 @@ func (this *CreateReportController) GetReportEntrustList() {
|
|
|
}
|
|
|
}
|
|
|
var list []limscreatereport.DataEntryEntrustModel
|
|
|
- svc := limscreatereport.GetCreateReportService(utils.DBE)
|
|
|
- total, list := svc.GetDataEntryEntrust(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where)
|
|
|
+ svclims := limscreatereport.GetCreateReportService(utils.DBE)
|
|
|
+ total, list := svclims.GetDataEntryEntrust(this.User.AccCode+LimsDateEntryName, this.User.AccCode+LimsTaskBalanceName, this.User.AccCode+LimsEntrustMainName, page.CurrentPage, page.Size, orderby, where)
|
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = list
|
|
|
datainfo.CurrentItemCount = total
|