积分排行榜前十展示/根据派出所,日周月展示前15任务
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | return R.data(map); |
| | | } |
| | | |
| | | /** |
| | | * 查询积分榜前十 |
| | | * @return |
| | | */ |
| | | @PostMapping("/order") |
| | | @ApiOperation(value = "排序") |
| | | public R order(){ |
| | | List<Integral> list = integralService.order(); |
| | | return R.data(list); |
| | | } |
| | | } |
| | |
| | | List<IntegralVO> selectIntegralPage(IPage page, IntegralVO integral); |
| | | List<Map<Object, Object>> selectCount(String uid); |
| | | List<Map<Object, Object>> selectList(String uid,String type); |
| | | |
| | | /** |
| | | * 查询积分榜前十 |
| | | * @return |
| | | */ |
| | | List<Integral> order(); |
| | | } |
| | |
| | | and type =2 |
| | | </if> |
| | | </select> |
| | | <select id="order" resultType="org.springblade.modules.integral.entity.Integral"> |
| | | SELECT * |
| | | FROM sys_integral |
| | | ORDER BY integral DESC |
| | | LIMIT 0,10 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | IPage<IntegralVO> selectIntegralPage(IPage<IntegralVO> page, IntegralVO integral); |
| | | List<Map<Object, Object>> selectCount(String uid); |
| | | List<Map<Object, Object>> selectList(String uid,String type); |
| | | |
| | | /** |
| | | * 查询积分榜前十 逆序 |
| | | * @return |
| | | */ |
| | | List<Integral> order(); |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.integral.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.integral.entity.Integral; |
| | | import org.springblade.modules.integral.mapper.IntegralMapper; |
| | | import org.springblade.modules.integral.service.IIntegralService; |
| | | import org.springblade.modules.integral.vo.IntegralVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | return baseMapper.selectList(uid,type); |
| | | } |
| | | |
| | | @Override |
| | | public List<Integral> order() { |
| | | return baseMapper.order(); |
| | | } |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import me.zhyd.oauth.log.Log; |
| | | import org.joda.time.DateTime; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据派出所展示发布数量前十五,根据日周月切换 |
| | | * @param jurisdiction 派出所编号 |
| | | * @param startTime 发布时间 |
| | | * @param period 日(day) 月(week) 年(year) |
| | | * @return |
| | | */ |
| | | @GetMapping("/countTaskByJur") |
| | | @ApiOperation(value = "统计") |
| | | public R countTaskByJur(String jurisdiction, String startTime,String period ){ |
| | | List<Taskqd> list = taskqdService.countTaskByJur(jurisdiction,startTime,period); |
| | | return R.data(list); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.bytedeco.javacpp.presets.opencv_core; |
| | | import org.springblade.modules.task.entity.Task; |
| | | import org.springblade.modules.task.vo.TaskVO; |
| | | import org.springblade.modules.taskqd.entity.Taskqd; |
| | | import org.springblade.modules.taskqd.vo.TaskqdVO; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | List<TaskqdVO> selectLi(String type, String serid,String jurisdiction,String workjurisdiction,String tasktype); |
| | | List<Map<String, Object>> selectNum(String serid,String jurisdiction,String workjurisdiction); |
| | | String querySerid(String rid); |
| | | |
| | | List<Taskqd> countTaskByJur(@Param("jurisdiction") String jurisdiction, @Param("startTime") String startTime,@Param("period") String period); |
| | | } |
| | |
| | | from sys_taskqd |
| | | where id = #{rid} |
| | | </select> |
| | | |
| | | <select id="countTaskByJur" resultType="org.springblade.modules.taskqd.entity.Taskqd"> |
| | | SELECT * |
| | | FROM sys_taskqd qd |
| | | WHERE qd.jurisdiction = #{jurisdiction} |
| | | <choose> |
| | | <when test='period=="day" '> |
| | | AND TO_DAYS(qd.time) = TO_DAYS(#{startTime}) |
| | | </when> |
| | | <when test='period == "week" '> |
| | | AND YEARWEEK(DATE_FORMAT(qd.time,"%Y-%m-%d"),1) = YEARWEEK(#{startTime},1) |
| | | </when> |
| | | <when test='period == "month" '> |
| | | AND DATE_FORMAT(qd.time,"%Y-%m") = DATE_FORMAT(#{startTime},"%Y-%m") |
| | | </when> |
| | | <when test='period == "all" '></when> |
| | | </choose> |
| | | LIMIT 0,15 |
| | | </select> |
| | | </mapper> |
| | |
| | | */ |
| | | package org.springblade.modules.taskqd.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import io.swagger.models.auth.In; |
| | | import org.springblade.modules.task.entity.Task; |
| | | import org.springblade.modules.task.vo.TaskVO; |
| | | import org.springblade.modules.taskqd.entity.Taskqd; |
| | | import org.springblade.modules.taskqd.vo.TaskqdVO; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | List<TaskqdVO> selectLi(String type, String serid,String jurisdiction,String workjurisdiction,String tasktype); |
| | | List<Map<String, Object>> selectNum(String serid,String jurisdiction,String workjurisdiction); |
| | | String querySerid(String rid); |
| | | |
| | | List<Taskqd> countTaskByJur(String jurisdiction, String startTime, String period); |
| | | } |
| | |
| | | import org.springblade.modules.taskqd.vo.TaskqdVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public String querySerid(String rid) { |
| | | return baseMapper.querySerid(rid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Taskqd> countTaskByJur(String jurisdiction, String startTime, String period) { |
| | | return baseMapper.countTaskByJur(jurisdiction,startTime,period); |
| | | } |
| | | } |
| | |
| | | spring: |
| | | redis: |
| | | ##redis 单机环境配置 |
| | | # host: 127.0.0.1 |
| | | # port: 6379 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | |
| | | host: 192.168.90.24 |
| | | port: 6382 |
| | | # host: 192.168.90.24 |
| | | # port: 6382 |
| | | password: |
| | | database: 0 |
| | | ssl: false |
| | |
| | | datasource: |
| | | # MySql |
| | | # |
| | | url: jdbc:mysql://192.168.90.24:2083/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true |
| | | username: root |
| | | password: NCzhba@2022 |
| | | # url: jdbc:mysql://192.168.90.24:2083/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true |
| | | # username: root |
| | | # password: NCzhba@2022 |
| | | |
| | | # url: jdbc:mysql://61.131.136.25:2083/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true |
| | | # username: root |
| | |
| | | # username: root |
| | | # password: ZHba@0112 |
| | | |
| | | # url: jdbc:mysql://36.134.81.48:3306/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true |
| | | # username: root |
| | | # password: jfpt123 |
| | | url: jdbc:mysql://36.134.81.48:3306/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true |
| | | username: root |
| | | password: jfpt123 |
| | | |
| | | |
| | | # PostgreSQL |