Commit fef7a4231d4e7515b01f0a804f24ee19d8353608
1 parent
a1b32268
app首页统计修改
Showing
3 changed files
with
8 additions
and
7 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/homepage/HomepageSummaryMapper.java
| ... | ... | @@ -13,6 +13,7 @@ import com.zteits.urbanops.module.garden.dal.dataobject.departmentcost.Departmen |
| 13 | 13 | import org.apache.ibatis.annotations.Mapper; |
| 14 | 14 | import org.apache.ibatis.annotations.Param; |
| 15 | 15 | |
| 16 | +import java.time.LocalDateTime; | |
| 16 | 17 | import java.util.List; |
| 17 | 18 | import java.util.Map; |
| 18 | 19 | |
| ... | ... | @@ -137,7 +138,7 @@ public interface HomepageSummaryMapper extends BaseMapperX<DepartmentCostDO> { |
| 137 | 138 | * @param userId |
| 138 | 139 | * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.zteits.urbanops.module.garden.controller.app.homepage.vo.TaskDetailsRspVo> |
| 139 | 140 | */ |
| 140 | - IPage<TaskDetailsRspVo> queryPendingTaskDetails(IPage<TaskDetailsRspVo> page, @Param("roleIds") List<Long> roleIds, @Param("userId") Long userId, @Param("deptId") Long deptId); | |
| 141 | + IPage<TaskDetailsRspVo> queryPendingTaskDetails(IPage<TaskDetailsRspVo> page, @Param("roleIds") List<Long> roleIds, @Param("userId") Long userId, @Param("deptId") Long deptId, @Param("currentDate") LocalDateTime currentDate); | |
| 141 | 142 | |
| 142 | 143 | /** |
| 143 | 144 | * @Author wangqian | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/homepage/HomepageSummaryServiceImpl.java
| ... | ... | @@ -114,7 +114,7 @@ public class HomepageSummaryServiceImpl implements HomepageSummaryService{ |
| 114 | 114 | //待办 |
| 115 | 115 | Long deptId = SecurityFrameworkUtils.getDeptId(); |
| 116 | 116 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 117 | - mpPage = homepageSummaryMapper.queryPendingTaskDetails(mpPage, roleIds, userId, deptId); | |
| 117 | + mpPage = homepageSummaryMapper.queryPendingTaskDetails(mpPage, roleIds, userId, deptId, LocalDateTime.now()); | |
| 118 | 118 | } |
| 119 | 119 | return new PageResult<>(mpPage.getRecords(), mpPage.getTotal()); |
| 120 | 120 | } | ... | ... |
urbanops-module-garden/src/main/resources/mapper/homepage/HomepageSummaryMapper.xml
| ... | ... | @@ -422,8 +422,8 @@ |
| 422 | 422 | inner join garden_inspection_plan_detail c on a.batch_no=c.batch_no |
| 423 | 423 | where a.deleted = b.deleted and a.deleted = 0 |
| 424 | 424 | and c.finish_state = 1 |
| 425 | - and c.begin_time <= NOW() | |
| 426 | - AND c.end_time >= NOW() | |
| 425 | + and c.begin_time <= #{currentDate} | |
| 426 | + AND c.end_time >= #{currentDate} | |
| 427 | 427 | and a.dept_id = #{deptId} |
| 428 | 428 | AND b.role_id IN |
| 429 | 429 | <foreach collection='roleIds' item='roleId' open='(' close=')' separator=','> |
| ... | ... | @@ -433,14 +433,14 @@ |
| 433 | 433 | union all |
| 434 | 434 | |
| 435 | 435 | SELECT |
| 436 | - a.plan_name as taskName,a.begin_time as busiDateTime, null as pressingType | |
| 436 | + a.plan_name as taskName,c.begin_time as busiDateTime, null as pressingType | |
| 437 | 437 | from garden_maintain_plan a |
| 438 | 438 | INNER JOIN garden_maintain_plan_role b on a.batch_no=b.batch_no |
| 439 | 439 | inner join garden_maintain_plan_detail c on a.batch_no=c.batch_no |
| 440 | 440 | where a.deleted=b.deleted and a.deleted = 0 |
| 441 | 441 | and c.finish_state = 1 |
| 442 | - and c.begin_time <= NOW() | |
| 443 | - AND c.end_time >= NOW() | |
| 442 | + and c.begin_time <= #{currentDate} | |
| 443 | + AND c.end_time >= #{currentDate} | |
| 444 | 444 | and a.dept_id = #{deptId} |
| 445 | 445 | AND b.role_id IN |
| 446 | 446 | <foreach collection='roleIds' item='roleId' open='(' close=')' separator=','> | ... | ... |