| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | TaskReportStatistics getStatisticsCount(@Param("userId") Long userId, @Param("houseCode") String houseCode); |
| | | TaskReportStatistics getStatisticsCount(@Param("userId") Long userId, @Param("houseCode") String houseCode, @Param("neiCode") String neiCode); |
| | | |
| | | Integer getStatistics(Long userId,String neiCode); |
| | | |
| | |
| | | |
| | | |
| | | <select id="getStatisticsCount" resultType="org.springblade.modules.task.vo.TaskReportStatistics"> |
| | | SELECT |
| | | COUNT( 1 ) AS total, |
| | | ifnull(SUM( CASE WHEN STATUS = 10 THEN 1 ELSE 0 END ),0) AS handle |
| | | FROM jczz_task_report_for_repairs |
| | | ELECT |
| | | count( 1 ) AS total, |
| | | ifnull( sum( CASE WHEN STATUS = 10 THEN 1 ELSE 0 END ), 0 ) AS handle |
| | | FROM |
| | | jczz_task_report_for_repairs jtrfr |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jtrfr.address_code |
| | | WHERE is_deleted = 0 |
| | | <if test="userId != null"> |
| | | and create_user = #{userId} |
| | |
| | | <if test="houseCode != null and houseCode != ''"> |
| | | and address_code = #{houseCode} |
| | | </if> |
| | | <if test="neiCode != null and neiCode != ''"> |
| | | AND jda.nei_code LIKE concat( #{neiCode}, '%' ) |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public TaskReportStatistics getStatisticsCount(String houseCode) { |
| | | return baseMapper.getStatisticsCount(AuthUtil.getUserId(), houseCode); |
| | | String neiCode = ""; |
| | | Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | if (null != dept) { |
| | | neiCode = dept.getRegionCode(); |
| | | } |
| | | return baseMapper.getStatisticsCount(AuthUtil.getUserId(), houseCode, neiCode); |
| | | } |
| | | |
| | | /** |