Commit c7d2e3b71aa757b61b7bedbf0e4047784c1acd97
1 parent
bd9b73f2
app首页统计修改
Showing
1 changed file
with
3 additions
and
6 deletions
urbanops-module-garden/src/main/resources/mapper/homepage/HomepageSummaryMapper.xml
| ... | ... | @@ -545,11 +545,8 @@ |
| 545 | 545 | <select id="countWorkOrderCompleted" resultType="com.zteits.urbanops.module.garden.controller.app.homepage.vo.CommonTaskStatusVo" > |
| 546 | 546 | select t.userId,count(*) AS totalCount |
| 547 | 547 | FROM ( |
| 548 | - select t.ASSIGNEE_ as userId, | |
| 549 | - ROW_NUMBER() OVER ( | |
| 550 | - PARTITION BY m.order_no | |
| 551 | - ORDER BY t.START_TIME_ DESC, t.ID_ DESC | |
| 552 | - ) AS rn | |
| 548 | + select | |
| 549 | + m.order_no,t.ASSIGNEE_ as userId | |
| 553 | 550 | FROM act_hi_taskinst t |
| 554 | 551 | LEFT JOIN workorder_main_info m ON t.PROC_INST_ID_ = m.process_instance_id AND m.deleted = 0 |
| 555 | 552 | WHERE t.state_ ='completed' |
| ... | ... | @@ -559,8 +556,8 @@ |
| 559 | 556 | <if test="endTime != null and endTime != ''"> |
| 560 | 557 | and t.END_TIME_ <= #{endTime} |
| 561 | 558 | </if> |
| 559 | + group by m.order_no,t.ASSIGNEE_ | |
| 562 | 560 | ) t |
| 563 | - WHERE t.rn = 1 | |
| 564 | 561 | group by t.userId |
| 565 | 562 | </select> |
| 566 | 563 | </mapper> | ... | ... |