|
@@ -1264,8 +1264,10 @@ func (d *StaffAssessDao) SearchExecutorAssessBeforeNow(executorId int, companyId |
|
@@ -1264,8 +1264,10 @@ func (d *StaffAssessDao) SearchExecutorAssessBeforeNow(executorId int, companyId |
1264
|
to_char(staff_assess.end_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as end_time,
|
1264
|
to_char(staff_assess.end_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as end_time,
|
1265
|
to_char(staff_assess.begin_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as begin_time
|
1265
|
to_char(staff_assess.begin_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as begin_time
|
1266
|
from staff_assess
|
1266
|
from staff_assess
|
|
|
1267
|
+ join staff_assess_task on staff_assess.staff_assess_task_id = staff_assess_task.id
|
1267
|
WHERE staff_assess.company_id=?
|
1268
|
WHERE staff_assess.company_id=?
|
1268
|
and staff_assess.deleted_at isnull
|
1269
|
and staff_assess.deleted_at isnull
|
|
|
1270
|
+ and staff_assess_task.deleted_at isnull
|
1269
|
and (
|
1271
|
and (
|
1270
|
staff_assess.end_time < now() or staff_assess.status ='completed'
|
1272
|
staff_assess.end_time < now() or staff_assess.status ='completed'
|
1271
|
)
|
1273
|
)
|
|
@@ -1282,11 +1284,13 @@ func (d *StaffAssessDao) SearchExecutorAssessBeforeNow(executorId int, companyId |
|
@@ -1282,11 +1284,13 @@ func (d *StaffAssessDao) SearchExecutorAssessBeforeNow(executorId int, companyId |
1282
|
distinct (staff_assess.cycle_id ,to_char(staff_assess.begin_time at time zone 'PRC','YYYY-MM-DD'))
|
1284
|
distinct (staff_assess.cycle_id ,to_char(staff_assess.begin_time at time zone 'PRC','YYYY-MM-DD'))
|
1283
|
) as cnt
|
1285
|
) as cnt
|
1284
|
from staff_assess
|
1286
|
from staff_assess
|
|
|
1287
|
+ join staff_assess_task on staff_assess.staff_assess_task_id = staff_assess_task.id
|
1285
|
WHERE staff_assess.company_id=?
|
1288
|
WHERE staff_assess.company_id=?
|
1286
|
and staff_assess.deleted_at isnull
|
1289
|
and staff_assess.deleted_at isnull
|
1287
|
and (
|
1290
|
and (
|
1288
|
staff_assess.end_time < now() or staff_assess.status ='completed'
|
1291
|
staff_assess.end_time < now() or staff_assess.status ='completed'
|
1289
|
)
|
1292
|
)
|
|
|
1293
|
+ and staff_assess_task.deleted_at isnull
|
1290
|
and staff_assess.executor ->> 'userId'='?'
|
1294
|
and staff_assess.executor ->> 'userId'='?'
|
1291
|
`
|
1295
|
`
|
1292
|
condition2 := []interface{}{
|
1296
|
condition2 := []interface{}{
|
|
@@ -1317,11 +1321,13 @@ func (d *StaffAssessDao) SearchExecutorAssessAfterNow(executorId int, companyId |
|
@@ -1317,11 +1321,13 @@ func (d *StaffAssessDao) SearchExecutorAssessAfterNow(executorId int, companyId |
1317
|
to_char(staff_assess.end_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as end_time,
|
1321
|
to_char(staff_assess.end_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as end_time,
|
1318
|
to_char(staff_assess.begin_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as begin_time
|
1322
|
to_char(staff_assess.begin_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as begin_time
|
1319
|
from staff_assess
|
1323
|
from staff_assess
|
|
|
1324
|
+ join staff_assess_task on staff_assess.staff_assess_task_id = staff_assess_task.id
|
1320
|
WHERE staff_assess.company_id=?
|
1325
|
WHERE staff_assess.company_id=?
|
1321
|
and staff_assess.deleted_at isnull
|
1326
|
and staff_assess.deleted_at isnull
|
1322
|
and (
|
1327
|
and (
|
1323
|
staff_assess.end_time >= now() and staff_assess.status ='uncompleted'
|
1328
|
staff_assess.end_time >= now() and staff_assess.status ='uncompleted'
|
1324
|
)
|
1329
|
)
|
|
|
1330
|
+ and staff_assess_task.deleted_at isnull
|
1325
|
and staff_assess.executor ->> 'userId'='?'
|
1331
|
and staff_assess.executor ->> 'userId'='?'
|
1326
|
order by begin_day`
|
1332
|
order by begin_day`
|
1327
|
condition1 := []interface{}{
|
1333
|
condition1 := []interface{}{
|