| | |
| | | |
| | | |
| | | /** |
| | | * 查询任务 |
| | | * |
| | | * @param type |
| | | * @param serid |
| | | * 任务查询 |
| | | * @param type 任务状态 0:未开始 1:正在进行 2:已完成 |
| | | * @param serid 用户id |
| | | * @param jurisdiction 辖区id |
| | | * @param workjurisdiction 工作辖区 |
| | | * @param tasktype 任务状态 |
| | | * @return |
| | | */ |
| | | @PostMapping("/selectLi") |
| | | public R selectLi(String type, String serid, String jurisdiction, String workjurisdiction, String tasktype) { |
| | | public R selectLi(Integer type, String serid, String jurisdiction, String workjurisdiction, String tasktype) { |
| | | List<TaskqdVO> list = taskqdService.selectLi(type, serid, jurisdiction, workjurisdiction, tasktype); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Integer nums = list.get(i).getNums(); |
| | |
| | | private String raddress; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | * 任务状态( 0:正在进行、1:已结束、2:任务未开始) |
| | | */ |
| | | @ApiModelProperty(value = "任务类型") |
| | | @ApiModelProperty(value = "任务状态( 0:正在进行、1:已结束、2:任务未开始)") |
| | | private String rtype; |
| | | |
| | | /** |
| | |
| | | List<Map<String, Object>> taskCount(String id,String type); |
| | | List<Map<String, Object>> allTask(); |
| | | List<TaskqdVO> getlist(String id,String type); |
| | | List<TaskqdVO> selectLi(String type, String serid,String jurisdiction,String workjurisdiction,String tasktype); |
| | | |
| | | /** |
| | | * 任务查询 |
| | | * @param type 任务状态 0:未开始 1:正在进行 2:已完成 |
| | | * @param serid 用户id |
| | | * @param jurisdiction 辖区id |
| | | * @param workjurisdiction 工作辖区 |
| | | * @param tasktype 任务状态 |
| | | * @return |
| | | */ |
| | | List<TaskqdVO> selectLi(@Param("type") Integer type, |
| | | @Param("serid")String serid, |
| | | @Param("jurisdiction")String jurisdiction, |
| | | @Param("workjurisdiction")String workjurisdiction, |
| | | @Param("tasktype")String tasktype); |
| | | |
| | | List<Map<String, Object>> selectNum(String serid,String jurisdiction,String workjurisdiction); |
| | | String querySerid(String rid); |
| | | |
| | |
| | | |
| | | <select id="selectLi" resultMap="taskResultMap"> |
| | | SELECT A.*,IFNULL(B.num,0) as nums FROM ( |
| | | select qd.* from sys_taskqd qd LEFT JOIN sys_jurisdiction j ON j.id = qd.jurisdiction where 1=1 AND |
| | | select qd.* from sys_taskqd qd LEFT JOIN sys_jurisdiction j ON j.id = qd.jurisdiction where 1=1 |
| | | <if test="type==0"> |
| | | (qd.rtype = "2" or qd.rtype = "0") AND |
| | | <if test="serid != '1123598821738675201'"> |
| | | find_in_set(#{serid}, serid) and |
| | | AND find_in_set(#{serid}, serid) |
| | | </if> |
| | | qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid |
| | | FROM |
| | | sys_taskfk WHERE 1 = 1 |
| | | <if test="serid != '1123598821738675201'"> |
| | | and serid=#{serid} |
| | | </if> |
| | | GROUP BY hdid,serid) B ON A.id=B.hdid |
| | | AND (qd.rtype = "2" or qd.rtype = "0") |
| | | AND qd.tasktype=#{tasktype} |
| | | ) A LEFT JOIN ( |
| | | SELECT COUNT(*) as num,hdid,serid |
| | | FROM |
| | | sys_taskfk WHERE 1 = 1 |
| | | <if test="serid != '1123598821738675201'"> |
| | | and serid=#{serid} |
| | | </if> |
| | | GROUP BY hdid,serid |
| | | ) B ON A.id=B.hdid |
| | | </if> |
| | | <if test="type==2"> |
| | | qd.rtype = "1" AND |
| | | <if test="serid != '1123598821738675201'"> |
| | | find_in_set(#{serid}, serid) and |
| | | AND find_in_set(#{serid}, serid) |
| | | </if> |
| | | qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid |
| | | AND qd.rtype = "1" |
| | | and qd.tasktype=#{tasktype} |
| | | ) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid |
| | | FROM |
| | | sys_taskfk WHERE 1 = 1 |
| | | <if test="serid != '1123598821738675201'"> |
| | |
| | | GROUP BY hdid,serid) B ON A.id=B.hdid |
| | | </if> |
| | | <if test="type==1"> |
| | | and qd.tasktype=#{tasktype} |
| | | <if test="jurisdiction!='1372091709474910209'"> |
| | | AND qd.rtype = "2" |
| | | <if test="tasktype !=2"> |
| | | qd.jnum!=qd.num AND |
| | | AND qd.jnum!=qd.num |
| | | </if> |
| | | qd.rtype = "2" |
| | | and qd.tasktype=#{tasktype} |
| | | <if test="serid != '1123598821738675201'"> |
| | | and (!find_in_set(#{serid}, serid) OR serid IS NULL ) |
| | | </if> |
| | |
| | | j.parent_id = #{jurisdiction}) or (j.id =#{workjurisdiction} or |
| | | j.parent_id = #{workjurisdiction})) |
| | | </if> |
| | | ) A LEFT JOIN (SELECT |
| | | COUNT(*) |
| | | as num,hdid FROM sys_taskfk GROUP BY hdid) B ON A.id=B.hdid |
| | | ) A LEFT JOIN ( |
| | | SELECT COUNT(*) as num,hdid FROM sys_taskfk GROUP BY hdid |
| | | ) B ON A.id=B.hdid |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | List<Map<String, Object>> taskCount(String id,String type); |
| | | List<Map<String, Object>> allTask(); |
| | | List<TaskqdVO> getlist(String id,String type); |
| | | List<TaskqdVO> selectLi(String type, String serid,String jurisdiction,String workjurisdiction,String tasktype); |
| | | /** |
| | | * 任务查询 |
| | | * @param type 任务状态 0:未开始 1:正在进行 2:已完成 |
| | | * @param serid 用户id |
| | | * @param jurisdiction 辖区id |
| | | * @param workjurisdiction 工作辖区 |
| | | * @param tasktype 任务状态 |
| | | * @return |
| | | */ |
| | | List<TaskqdVO> selectLi(Integer type, String serid,String jurisdiction,String workjurisdiction,String tasktype); |
| | | |
| | | List<Map<String, Object>> selectNum(String serid,String jurisdiction,String workjurisdiction); |
| | | String querySerid(String rid); |
| | | |
| | |
| | | return baseMapper.getlist(id,type); |
| | | } |
| | | |
| | | /** |
| | | * 任务查询 |
| | | * @param type 任务状态 0:未开始 1:正在进行 2:已完成 |
| | | * @param serid 用户id |
| | | * @param jurisdiction 辖区id |
| | | * @param workjurisdiction 工作辖区 |
| | | * @param tasktype 任务状态 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<TaskqdVO> selectLi(String type, String serid,String jurisdiction,String workjurisdiction,String tasktype) { |
| | | public List<TaskqdVO> selectLi(Integer type, String serid,String jurisdiction,String workjurisdiction,String tasktype) { |
| | | return baseMapper.selectLi(type, serid,jurisdiction,workjurisdiction,tasktype); |
| | | } |
| | | |
| | |
| | | # username: root |
| | | # password: ZHba@0112 |
| | | |
| | | url: jdbc:mysql://127.0.0.1:3306/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true |
| | | url: jdbc:mysql://60.220.177.113:3308/jbld?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true |
| | | username: root |
| | | password: HCyj@2022 |
| | | password: Zhba@jc@2023 |
| | | |
| | | |
| | | # PostgreSQL |