26 changed files with 1273 additions and 266 deletions
@ -1,86 +0,0 @@ |
|||||||
package com.biutag.supervision.controller.datav; |
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject; |
|
||||||
import com.biutag.supervision.pojo.Result; |
|
||||||
import com.biutag.supervision.util.HttpClientUtil; |
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag; |
|
||||||
import lombok.RequiredArgsConstructor; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||||
import org.springframework.web.bind.annotation.RequestParam; |
|
||||||
import org.springframework.web.bind.annotation.RestController; |
|
||||||
|
|
||||||
import java.util.Date; |
|
||||||
import java.util.HashMap; |
|
||||||
import java.util.Map; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Auther: sh |
|
||||||
* @Date: 2024/11/17 11:04 |
|
||||||
* @Description: |
|
||||||
*/ |
|
||||||
|
|
||||||
|
|
||||||
@Slf4j |
|
||||||
@RestController |
|
||||||
@RequiredArgsConstructor |
|
||||||
@RequestMapping("datav/DSJ") |
|
||||||
public class PoliceComment { |
|
||||||
private final String BASE_URL = ""; |
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/GetDCQK") |
|
||||||
public Result<JSONObject> getDCQK() { |
|
||||||
Map<String, String> params = new HashMap<>(); |
|
||||||
params.put("PeriodId", "6"); |
|
||||||
params.put("PeriodSonID", "-1"); |
|
||||||
params.put("OrgNo", "4304"); |
|
||||||
Map<String, String> header = new HashMap<>(); |
|
||||||
header.put("Content-Type", "application/json"); |
|
||||||
String s = HttpClientUtil.doPost(BASE_URL, params, header); |
|
||||||
JSONObject jsonObject = JSONObject.parseObject(s); |
|
||||||
log.info("返回数据字符串=============" + s); |
|
||||||
log.info("返回数据JSON对象=============" + jsonObject.toJSONString()); |
|
||||||
System.out.println(jsonObject.get("data").toString()); |
|
||||||
return Result.success(jsonObject); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/GetBMYYBQS") |
|
||||||
public Result<JSONObject> getBMYYBQS(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
|
||||||
Map<String, String> params = new HashMap<>(); |
|
||||||
params.put("PeriodId", "6"); |
|
||||||
params.put("OrgNo", "4304"); |
|
||||||
String res = HttpClientUtil.doPost(BASE_URL, params, null); |
|
||||||
log.info("返回GetBMYYBQS数据字符串=============" + res); |
|
||||||
return Result.success(); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/GetZHMYLPM") |
|
||||||
public Result<JSONObject> getGetZHMYLPM(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
|
||||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
|
||||||
Map<String, String> params = new HashMap<>(); |
|
||||||
params.put("PeriodId", "6"); |
|
||||||
String res = HttpClientUtil.doPost(BASE_URL, params, null); |
|
||||||
log.info("返回GetZHMYLPM数据字符串=============" + res); |
|
||||||
return Result.success(); |
|
||||||
} |
|
||||||
|
|
||||||
@GetMapping("/GetRCSQQK") |
|
||||||
public Result<JSONObject> getRCSQQK(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
|
||||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){ |
|
||||||
Map<String, String> params = new HashMap<>(); |
|
||||||
params.put("PeriodId", "6"); |
|
||||||
params.put("PeriodSonID", "-1"); |
|
||||||
params.put("OrgNo", "4304"); |
|
||||||
String res = HttpClientUtil.doPost(BASE_URL, params, null); |
|
||||||
log.info("返回GetRCSQQK数据字符串=============" + res); |
|
||||||
return Result.success(); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@ -0,0 +1,105 @@ |
|||||||
|
package com.biutag.supervision.controller.datav; |
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject; |
||||||
|
import com.biutag.supervision.pojo.Result; |
||||||
|
import com.biutag.supervision.pojo.vo.*; |
||||||
|
import com.biutag.supervision.service.VideoSuperviseService; |
||||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
import org.springframework.stereotype.Controller; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Optional; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: sh |
||||||
|
* @Date: 2024/11/29 09:32 |
||||||
|
* @Description: 视频督察大屏 |
||||||
|
*/ |
||||||
|
@Tag(name = "视频督察大屏", description = "视频督察大屏") |
||||||
|
@RestController |
||||||
|
@RequiredArgsConstructor |
||||||
|
@RequestMapping("datav/videoSupervise") |
||||||
|
public class VideoSuperviseController { |
||||||
|
|
||||||
|
private final VideoSuperviseService videoSuperviseService; |
||||||
|
|
||||||
|
|
||||||
|
//region 左边
|
||||||
|
|
||||||
|
// 获取视频督察大屏问题数排名
|
||||||
|
@Operation(summary = "视频督察大屏问题数排名") |
||||||
|
@GetMapping("/getVideoSuperviseProblemRank") |
||||||
|
public Result<JSONObject> getVideoSuperviseProblemRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
||||||
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
||||||
|
List<OrganizeProblemRankVo> fxsjVideoSuperviseProblemRankList = videoSuperviseService.getVideoSuperviseProblemRank(beginTime, endTime, 3); |
||||||
|
List<OrganizeProblemRankVo> jsdwVideoSuperviseProblemRankList = videoSuperviseService.getVideoSuperviseProblemRank(beginTime, endTime, 4); |
||||||
|
JSONObject data = new JSONObject(); |
||||||
|
data.fluentPut("fxsjVideoSuperviseProblemRankList", fxsjVideoSuperviseProblemRankList); |
||||||
|
data.fluentPut("jsdwVideoSuperviseProblemRankList", jsdwVideoSuperviseProblemRankList); |
||||||
|
return Result.success(data); |
||||||
|
} |
||||||
|
//endregion
|
||||||
|
|
||||||
|
//region 中间
|
||||||
|
|
||||||
|
// 获取视频督察中央数据
|
||||||
|
@Operation(summary = "视频督察大屏中央数据") |
||||||
|
@GetMapping("/getAllVideoSuperviseCount") |
||||||
|
public Result<JSONObject> getAllVideoSuperviseCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
||||||
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
||||||
|
// 获取视频督察中央数据
|
||||||
|
VideoSuperviseCountVo overview = videoSuperviseService.getAllVideoSuperviseCount(beginTime, endTime); |
||||||
|
JSONObject data = new JSONObject().fluentPut("overview", overview); |
||||||
|
return Result.success(data); |
||||||
|
} |
||||||
|
|
||||||
|
// 获取视频督察地图数据
|
||||||
|
@Operation(summary = "视频督察大屏地图数据") |
||||||
|
@GetMapping("/getVideoSuperviseMap") |
||||||
|
public Result<JSONObject> getVideoSuperviseMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
||||||
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
||||||
|
|
||||||
|
// 地图数据
|
||||||
|
List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(videoSuperviseService.getVideoSuperviseMapIconInfo(beginTime, endTime)). |
||||||
|
orElseGet(ArrayList::new); |
||||||
|
JSONObject data = new JSONObject().fluentPut("videoSuperviseMapIconVoList", videoSuperviseMapIconVoList); |
||||||
|
return Result.success(data); |
||||||
|
} |
||||||
|
|
||||||
|
// 获取视频督察大屏中央问题趋势统计
|
||||||
|
@Operation(summary = "数据大屏问题趋势统计") |
||||||
|
@GetMapping("/getVideoSuperviseTrend") |
||||||
|
public Result<JSONObject> getVideoSuperviseTrend(@RequestParam Integer year) { |
||||||
|
List<EchartsVo> videoSuperviseTrendList = videoSuperviseService.getVideoSuperviseTrend(String.valueOf(year)); |
||||||
|
JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseTrendList", videoSuperviseTrendList); |
||||||
|
return Result.success(jsonObject); |
||||||
|
} |
||||||
|
//endregion
|
||||||
|
|
||||||
|
|
||||||
|
// region 右边
|
||||||
|
|
||||||
|
// 问题类型占比
|
||||||
|
@Operation(summary = "数据大屏问题类型占比") |
||||||
|
@GetMapping("/getVideoSuperviseProblemTypeRate") |
||||||
|
public Result<JSONObject> getVideoSuperviseProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
||||||
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
||||||
|
List<EchartsVo> videoSuperviseProblemTypeRate = videoSuperviseService.getVideoSuperviseProblemTypeRate(beginTime, endTime); |
||||||
|
JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseProblemTypeRate", videoSuperviseProblemTypeRate); |
||||||
|
return Result.success(jsonObject); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
// endregion
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,25 @@ |
|||||||
|
package com.biutag.supervision.mapper; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.biutag.supervision.pojo.entity.CountyStreetDept; |
||||||
|
import org.apache.ibatis.annotations.Select; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author 舒云 |
||||||
|
* @description 针对表【county_street_dept(区县管理机构表)】的数据库操作Mapper |
||||||
|
* @createDate 2024-12-03 17:20:39 |
||||||
|
|
||||||
|
*/ |
||||||
|
public interface CountyStreetDeptMapper extends BaseMapper<CountyStreetDept> { |
||||||
|
|
||||||
|
@Select("select * from county_street_dept where pid = #{id}") |
||||||
|
List<CountyStreetDept> props(Integer id); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,92 @@ |
|||||||
|
package com.biutag.supervision.pojo.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
|
||||||
|
/** |
||||||
|
* 区县管理机构表 |
||||||
|
* @TableName county_street_dept |
||||||
|
*/ |
||||||
|
@TableName(value ="county_street_dept") |
||||||
|
@Data |
||||||
|
public class CountyStreetDept implements Serializable { |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@TableId(value = "id", type = IdType.AUTO) |
||||||
|
private Integer id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 父级部门名称 |
||||||
|
*/ |
||||||
|
@TableField(value = "dept_pid_name") |
||||||
|
private String deptPidName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 父级部门id |
||||||
|
*/ |
||||||
|
@TableField(value = "dept_pid") |
||||||
|
private String deptPid; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@TableField(value = "pid") |
||||||
|
private String pid; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@TableField(value = "coordinates") |
||||||
|
private String coordinates; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@TableField(value = "level") |
||||||
|
private String level; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@TableField(value = "name") |
||||||
|
private String name; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@TableField(value = "sort") |
||||||
|
private Integer sort; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@TableField(value = "geometry") |
||||||
|
private String geometry; |
||||||
|
|
||||||
|
/** |
||||||
|
* 所属区域 |
||||||
|
*/ |
||||||
|
@TableField(value = "area_name") |
||||||
|
private String areaName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 部门id |
||||||
|
*/ |
||||||
|
@TableField(value = "dept_id") |
||||||
|
private String deptId; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@TableField(value = "dept_name") |
||||||
|
private String deptName; |
||||||
|
|
||||||
|
@TableField(exist = false) |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
} |
||||||
@ -0,0 +1,22 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: sh |
||||||
|
* @Date: 2024/11/29 18:19 |
||||||
|
* @Description: 案件核查总览统计 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class CaseVerificationCountVo { |
||||||
|
|
||||||
|
private Integer total; // 总案件数
|
||||||
|
private Integer confirmed; // 已查实案件数
|
||||||
|
private Integer dealCasePro; // 查处理案件数
|
||||||
|
private Integer punishPre; // 问责人数
|
||||||
|
private Integer punishOrg; // 问责单位数
|
||||||
|
private Double rate; // 查实率
|
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,21 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: sh |
||||||
|
* @Date: 2024/11/29 19:29 |
||||||
|
* @Description: |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class CaseVerificationMapVo { |
||||||
|
private String name; |
||||||
|
private String departId; |
||||||
|
private Integer total; // 总案件数
|
||||||
|
private Integer confirmed; // 已查实案件数
|
||||||
|
private Integer dealCasePro; // 查处理案件数
|
||||||
|
private Integer punishPre; // 问责人数
|
||||||
|
private Integer punishOrg; // 问责单位数
|
||||||
|
private Double rate; // 查实率
|
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,18 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: sh |
||||||
|
* @Date: 2024/12/2 15:21 |
||||||
|
* @Description: 维权抚慰大屏中央的数据 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class ComfortCountVO { |
||||||
|
private Integer comfortCaseTotal; // 维权案件总数
|
||||||
|
private Integer hurtTotal; // 受侵害人数
|
||||||
|
private Integer comfortTotal; // 抚慰人数
|
||||||
|
private Integer hitTotal; // 打击处理人数
|
||||||
|
private Double comfortMoney; // 抚慰金额
|
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,21 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: sh |
||||||
|
* @Date: 2024/12/3 17:11 |
||||||
|
* @Description: 地图区域json |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class MapAreaVo { |
||||||
|
|
||||||
|
private String type = "FeatureCollection"; |
||||||
|
private String name; |
||||||
|
private Map<String, Object> features; |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
@ -1,21 +0,0 @@ |
|||||||
package com.biutag.supervision.pojo.vo; |
|
||||||
|
|
||||||
import lombok.AllArgsConstructor; |
|
||||||
import lombok.Data; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Auther: sh |
|
||||||
* @Date: 2024/11/17 01:35 |
|
||||||
* @Description: |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@AllArgsConstructor |
|
||||||
public class RankVoSup { |
|
||||||
private String problemNumber; // 问题数
|
|
||||||
private String rectifingNumber; // 整改中
|
|
||||||
private String rectifedNumber; // 已整改
|
|
||||||
private String departNumber; // 部门数
|
|
||||||
private String personNumber; // 人员数
|
|
||||||
private String rectifyRate; // 整改率
|
|
||||||
} |
|
||||||
|
|
||||||
@ -0,0 +1,23 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.Builder; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.NoArgsConstructor; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: sh |
||||||
|
* @Date: 2024/11/29 10:15 |
||||||
|
* @Description: 视频督察中央总览vo |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@AllArgsConstructor |
||||||
|
@NoArgsConstructor |
||||||
|
public class VideoSuperviseCountVo { |
||||||
|
private Integer discoverProblem; |
||||||
|
private Integer changedProblem; |
||||||
|
private Integer relativeOrg; |
||||||
|
private Integer relativePer; |
||||||
|
private Double changedRate; |
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,27 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.Builder; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.NoArgsConstructor; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: sh |
||||||
|
* @Date: 2024/11/29 09:50 |
||||||
|
* @Description: |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@AllArgsConstructor |
||||||
|
@NoArgsConstructor |
||||||
|
@Builder |
||||||
|
public class VideoSuperviseMapIconVo { |
||||||
|
|
||||||
|
private String name; |
||||||
|
private String departId; |
||||||
|
private Integer discoverProblem; |
||||||
|
private Integer changedProblem; |
||||||
|
private Integer relativeOrg; |
||||||
|
private Integer relativePer; |
||||||
|
private Integer changedRate; |
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,68 @@ |
|||||||
|
package com.biutag.supervision.service; |
||||||
|
|
||||||
|
import com.biutag.supervision.mapper.DataCaseVerifMapper; |
||||||
|
import com.biutag.supervision.mapper.NegativeMapper; |
||||||
|
import com.biutag.supervision.pojo.dto.common.PieItem; |
||||||
|
import com.biutag.supervision.pojo.vo.CaseVerificationCountVo; |
||||||
|
import com.biutag.supervision.pojo.vo.CaseVerificationMapVo; |
||||||
|
import com.biutag.supervision.pojo.vo.EchartsVo; |
||||||
|
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Auther: sh |
||||||
|
* @Date: 2024/11/29 15:55 |
||||||
|
* @Description: |
||||||
|
*/ |
||||||
|
@RequiredArgsConstructor |
||||||
|
@Service |
||||||
|
public class CaseVerificationService { |
||||||
|
|
||||||
|
private final NegativeMapper negativeMapper; |
||||||
|
private final DataCaseVerifMapper dataCaseVerifMapper; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId) { |
||||||
|
List<OrganizeProblemRankVo> res = negativeMapper.getCaseVerificationRank(beginTime, endTime, groupId); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<EchartsVo> getCaseVerificationTrend(String year) { |
||||||
|
List<EchartsVo> res = negativeMapper.getCaseVerificationTrend(year); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
public List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime) { |
||||||
|
List<EchartsVo> res = dataCaseVerifMapper.getCaseSourceRate(beginTime, endTime); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
public CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime) { |
||||||
|
CaseVerificationCountVo res = negativeMapper.getAllCaseVerificationCount(beginTime, endTime); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
public List<CaseVerificationMapVo> getCaseVerificationMap(Date beginTime, Date endTime) { |
||||||
|
List<CaseVerificationMapVo> res = negativeMapper.getCaseVerificationMap(beginTime, endTime); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
public List<EchartsVo> getDealSituation(Date beginTime, Date endTime) { |
||||||
|
List<EchartsVo> res = negativeMapper.getDealSituation(beginTime, endTime); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
public List<EchartsVo> getConfinementAndPause(Date beginTime, Date endTime, Integer type) { |
||||||
|
List<EchartsVo> res = negativeMapper.getConfinementAndPause(beginTime,endTime, type); |
||||||
|
return res; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,30 @@ |
|||||||
|
package com.biutag.supervision.service; |
||||||
|
|
||||||
|
|
||||||
|
import com.biutag.supervision.mapper.CountyStreetDeptMapper; |
||||||
|
import com.biutag.supervision.pojo.entity.CountyStreetDept; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author 舒云 |
||||||
|
* @description 针对表【county_street_dept(区县管理机构表)】的数据库操作Service实现 |
||||||
|
* @createDate 2024-12-03 17:20:39 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
@RequiredArgsConstructor |
||||||
|
public class CountyStreetDeptService { |
||||||
|
|
||||||
|
private final CountyStreetDeptMapper countyStreetDeptMapper; |
||||||
|
|
||||||
|
public List<CountyStreetDept> getTest(Integer id) { |
||||||
|
List<CountyStreetDept> res = countyStreetDeptMapper.props(id); |
||||||
|
return res; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,240 @@ |
|||||||
|
package com.biutag.supervision.service; |
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil; |
||||||
|
import cn.hutool.core.util.StrUtil; |
||||||
|
import com.alibaba.fastjson.JSONObject; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import com.biutag.supervision.constants.enums.*; |
||||||
|
import com.biutag.supervision.mapper.DataPetition12337Mapper; |
||||||
|
import com.biutag.supervision.mapper.DataPetitionComplaintMapper; |
||||||
|
import com.biutag.supervision.pojo.dto.*; |
||||||
|
import com.biutag.supervision.pojo.entity.DataPetition12337; |
||||||
|
import com.biutag.supervision.pojo.entity.DataPetitionComplaint; |
||||||
|
import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam; |
||||||
|
import com.biutag.supervision.pojo.vo.RecentMailTrendByDayVo; |
||||||
|
import com.biutag.supervision.pojo.vo.RecentMailTrendByMonthVo; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import org.springframework.beans.BeanUtils; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import java.time.LocalDate; |
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.time.ZoneId; |
||||||
|
import java.time.format.DateTimeFormatter; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@RequiredArgsConstructor |
||||||
|
@Service |
||||||
|
public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, DataPetitionComplaint> { |
||||||
|
|
||||||
|
private final NegativeService negativeService; |
||||||
|
|
||||||
|
private final DataPetitionComplaintMapper dataPetitionComplaintMapper; |
||||||
|
|
||||||
|
private final DataPetition12337Mapper dataPetition12337Mapper; |
||||||
|
|
||||||
|
public Page<DataPetitionComplaint> page(DataPetitionComplaintQueryParam queryParam) { |
||||||
|
LambdaQueryWrapper<DataPetitionComplaint> queryWrapper = new LambdaQueryWrapper<>(); |
||||||
|
queryWrapper.eq(DataPetitionComplaint::getProblemSourcesCode, queryParam.getProblemSourcesCode()) |
||||||
|
.like(StrUtil.isNotBlank(queryParam.getOriginId()), DataPetitionComplaint::getOriginId, queryParam.getOriginId()) |
||||||
|
.like(StrUtil.isNotBlank(queryParam.getThingDesc()), DataPetitionComplaint::getThingDesc, queryParam.getThingDesc()) |
||||||
|
.orderByDesc(DataPetitionComplaint::getCreateTime); |
||||||
|
if (queryParam.getDiscoveryTime().size() == 2) { |
||||||
|
queryWrapper.between(DataPetitionComplaint::getDiscoveryTime, queryParam.getDiscoveryTime().get(0), queryParam.getDiscoveryTime().get(1)); |
||||||
|
} |
||||||
|
if (StrUtil.isNotBlank(queryParam.getResponderKey()) && StrUtil.isNotBlank(queryParam.getResponderValue())) { |
||||||
|
switch (queryParam.getResponderKey()) { |
||||||
|
case "name": |
||||||
|
queryWrapper.like(DataPetitionComplaint::getResponderName, queryParam.getResponderValue()); |
||||||
|
break; |
||||||
|
case "phone": |
||||||
|
queryWrapper.like(DataPetitionComplaint::getResponderPhone, queryParam.getResponderValue()); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
return page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); |
||||||
|
} |
||||||
|
|
||||||
|
public boolean save(DataPetitionComplaintDto dto) { |
||||||
|
DataPetitionComplaint dataPetitionComplaint = new DataPetitionComplaint(); |
||||||
|
BeanUtil.copyProperties(dto, dataPetitionComplaint); |
||||||
|
dataPetitionComplaint.setCreateTime(LocalDateTime.now()); |
||||||
|
dataPetitionComplaint.setUpdateTime(LocalDateTime.now()); |
||||||
|
return save(dataPetitionComplaint); |
||||||
|
} |
||||||
|
|
||||||
|
public boolean save(DataPetitionComplaintAddDto body) { |
||||||
|
LocalDateTime now = LocalDateTime.now(); |
||||||
|
int index = 0; |
||||||
|
for (DataPetitionComplaintImportDto dto : body.getData()) { |
||||||
|
index++; |
||||||
|
boolean exists = exists(new LambdaQueryWrapper<DataPetitionComplaint>().eq(DataPetitionComplaint::getOriginId, dto.getOriginId())); |
||||||
|
// 增量更新
|
||||||
|
if (DataUpdateMethodEnum.incremental.name().equals(body.getDataUpdateMethod()) && exists) { |
||||||
|
throw new RuntimeException(String.format("第%s条数据的信件编号已存在,请核实", index)); |
||||||
|
} |
||||||
|
DataPetitionComplaint data = new DataPetitionComplaint(); |
||||||
|
BeanUtils.copyProperties(dto, data); |
||||||
|
|
||||||
|
data.setCreateTime(now); |
||||||
|
data.setUpdateTime(now); |
||||||
|
data.setProblemSourcesCode(body.getProblemSourcesCode()); |
||||||
|
data.setDistributionState(DistributionStateEnum.UNDISTRIBUTED.getValue()); |
||||||
|
saveOrUpdate(data); |
||||||
|
} |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
public boolean distribution(DataDataPetitionComplainDistribute dataDistribute) { |
||||||
|
dataDistribute.getData().forEach(item -> { |
||||||
|
NegativeDto negativeDto = new NegativeDto(); |
||||||
|
negativeDto.setOriginId(item.getOriginId()); |
||||||
|
negativeDto.setDiscoveryTime(item.getDiscoveryTime()); |
||||||
|
negativeDto.setProblemSourcesCode(item.getProblemSourcesCode()); |
||||||
|
negativeDto.setProblemSources(ProblemSourcesEnum.get(item.getProblemSourcesCode()).getLabel()); |
||||||
|
// negativeDto.setBusinessTypeCode(BusinessTypeEnum.ABWW);
|
||||||
|
// negativeDto.setBusinessTypeName();
|
||||||
|
negativeDto.setResponderName(item.getResponderName()); |
||||||
|
negativeDto.setContactPhone(item.getResponderPhone()); |
||||||
|
negativeDto.setThingDesc(item.getThingDesc()); |
||||||
|
String departId; |
||||||
|
String departName; |
||||||
|
if (StrUtil.isBlank(item.getThirdDepartId())) { |
||||||
|
departId = item.getSecondDepartId(); |
||||||
|
departName = item.getSecondDepartName(); |
||||||
|
} else { |
||||||
|
departId = item.getThirdDepartId(); |
||||||
|
departName = item.getThirdDepartName(); |
||||||
|
} |
||||||
|
negativeDto.setInvolveDepartId(departId); |
||||||
|
negativeDto.setInvolveDepartName(departName); |
||||||
|
negativeDto.setHostLevel(HostLevelEnums.SECOND.getValue()); |
||||||
|
|
||||||
|
negativeDto.setApprovalFlow(dataDistribute.getApprovalFlow()); |
||||||
|
negativeDto.setDepartId(departId); |
||||||
|
negativeDto.setDepartName(departName); |
||||||
|
negativeDto.setTimeLimit(dataDistribute.getTimeLimit()); |
||||||
|
negativeDto.setMaxSignDuration(dataDistribute.getMaxSignDuration()); |
||||||
|
negativeDto.setMaxHandleDuration(dataDistribute.getMaxHandleDuration()); |
||||||
|
negativeDto.setMaxExtensionDuration(dataDistribute.getMaxExtensionDuration()); |
||||||
|
negativeDto.setCaseNumber(item.getOriginId()); |
||||||
|
negativeService.save(negativeDto); |
||||||
|
update(new LambdaUpdateWrapper<DataPetitionComplaint>().eq(DataPetitionComplaint::getOriginId, item.getOriginId()) |
||||||
|
.set(DataPetitionComplaint::getDistributionState, DistributionStateEnum.DISTRIBUTED.getValue())); |
||||||
|
}); |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
//所有分类数据总数
|
||||||
|
public JSONObject allMailCount(Date beginTime, Date endTime) { |
||||||
|
// 国家信访
|
||||||
|
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>(); |
||||||
|
countryQueryWrapper.eq("problem_sources_code", 21); |
||||||
|
countryQueryWrapper.between("discovery_time", beginTime, endTime); |
||||||
|
Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper); |
||||||
|
// 公安部信访
|
||||||
|
QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>(); |
||||||
|
policeQueryWrapper.eq("problem_sources_code", 22); |
||||||
|
policeQueryWrapper.between("discovery_time", beginTime, endTime); |
||||||
|
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper); |
||||||
|
// 12337信访
|
||||||
|
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>(); |
||||||
|
Long total12337 = dataPetition12337Mapper.selectCount(queryWrapper12337); |
||||||
|
// 初访
|
||||||
|
QueryWrapper<DataPetitionComplaint> firstQueryWrapper = new QueryWrapper<>(); |
||||||
|
firstQueryWrapper.eq("initial_petition", 1); |
||||||
|
firstQueryWrapper.between("discovery_time", beginTime, endTime); |
||||||
|
Long firstMail = dataPetitionComplaintMapper.selectCount(firstQueryWrapper); |
||||||
|
// 重访
|
||||||
|
QueryWrapper<DataPetitionComplaint> secondQueryWrapper = new QueryWrapper<>(); |
||||||
|
secondQueryWrapper.eq("initial_petition", 2); |
||||||
|
secondQueryWrapper.between("discovery_time", beginTime, endTime); |
||||||
|
Long secondMail = dataPetitionComplaintMapper.selectCount(secondQueryWrapper); |
||||||
|
// 领导接访
|
||||||
|
QueryWrapper<DataPetitionComplaint> leaderQueryWrapper = new QueryWrapper<>(); |
||||||
|
leaderQueryWrapper.isNotNull("receiving_leader_name"); |
||||||
|
leaderQueryWrapper.between("discovery_time", beginTime, endTime); |
||||||
|
Long leaderReceiveMail = dataPetitionComplaintMapper.selectCount(leaderQueryWrapper); |
||||||
|
// 领导督办
|
||||||
|
QueryWrapper<DataPetitionComplaint> leaderViewQueryWrapper = new QueryWrapper<>(); |
||||||
|
leaderViewQueryWrapper.isNotNull("receiving_leader_name"); |
||||||
|
leaderViewQueryWrapper.between("discovery_time", beginTime, endTime); |
||||||
|
Long leaderViewMail = dataPetitionComplaintMapper.selectCount(leaderViewQueryWrapper); |
||||||
|
// 闹访 1:闹 0:不闹
|
||||||
|
QueryWrapper<DataPetitionComplaint> tangleQueryWrapper = new QueryWrapper<>(); |
||||||
|
tangleQueryWrapper.eq("entanglement_visits", 1); |
||||||
|
tangleQueryWrapper.between("discovery_time", beginTime, endTime); |
||||||
|
Long tangleMail = dataPetitionComplaintMapper.selectCount(tangleQueryWrapper); |
||||||
|
// 集访 1:集 0:不集
|
||||||
|
QueryWrapper<DataPetitionComplaint> massQueryWrapper = new QueryWrapper<>(); |
||||||
|
massQueryWrapper.eq("mass_visits", 1); |
||||||
|
massQueryWrapper.between("discovery_time", beginTime, endTime); |
||||||
|
Long massMail = dataPetitionComplaintMapper.selectCount(massQueryWrapper); |
||||||
|
// 总数
|
||||||
|
long totalMail = countryMail+policeMail+total12337; |
||||||
|
|
||||||
|
JSONObject overview = new JSONObject() |
||||||
|
// 信访总数(起)
|
||||||
|
.fluentPut("total", totalMail) |
||||||
|
// 国家信访
|
||||||
|
.fluentPut("countryMail", countryMail) |
||||||
|
// 公安部信访
|
||||||
|
.fluentPut("policeMail", policeMail) |
||||||
|
// 局长信箱
|
||||||
|
.fluentPut("commissionerMail", 5534) |
||||||
|
// 12337信访
|
||||||
|
.fluentPut("numMail", total12337) |
||||||
|
// 初访;
|
||||||
|
.fluentPut("firstMail", firstMail) |
||||||
|
// 重访
|
||||||
|
.fluentPut("secondMail", secondMail) |
||||||
|
// 领导接访
|
||||||
|
.fluentPut("leaderReceiveMail", leaderReceiveMail) |
||||||
|
// 领导督办
|
||||||
|
.fluentPut("leaderViewMail", leaderViewMail) |
||||||
|
// 闹访问
|
||||||
|
.fluentPut("tangleMail", tangleMail) |
||||||
|
// 集访
|
||||||
|
.fluentPut("massMail", massMail); |
||||||
|
return overview; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
// 初访重访分类数据排行
|
||||||
|
public List<CaseVerifDepart> mailRank(Integer departId, Integer Repeat, Date beginTime, Date endTime) { |
||||||
|
List<CaseVerifDepart> list = dataPetitionComplaintMapper. |
||||||
|
selectDepartStatistic(departId, Repeat, beginTime, endTime); |
||||||
|
return list; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public List<RecentMailTrendByDayVo> getRecentlyMailTrendByDay(Integer sourcesCode, Integer days, Date endTime) { |
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd"); |
||||||
|
// 将 endTime 转换为 LocalDate
|
||||||
|
LocalDate endLocalDate = endTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); |
||||||
|
String currentDay = endLocalDate.format(formatter); // 前端页面的最后查询日期
|
||||||
|
LocalDate frontDateDay = endLocalDate.minusDays(days); // days天前
|
||||||
|
String frontDay = frontDateDay.format(formatter); |
||||||
|
List<RecentMailTrendByDayVo> recentMailTrendVos = |
||||||
|
dataPetitionComplaintMapper.selectRecentlyMailTrendByDay(MailTrendSourcesEnum.getMappedCodeByCode(sourcesCode), frontDay, currentDay); |
||||||
|
return recentMailTrendVos; |
||||||
|
} |
||||||
|
|
||||||
|
// 按月统计信访趋势
|
||||||
|
public List<RecentMailTrendByMonthVo> getRecentlyMailTrendByMonth(Integer sourcesCode, String year) { |
||||||
|
List<RecentMailTrendByMonthVo> recentMailTrendVos = |
||||||
|
dataPetitionComplaintMapper.selectRecentlyMailTrendByMonth(MailTrendSourcesEnum.getMappedCodeByCode(sourcesCode), year); |
||||||
|
return recentMailTrendVos; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public List<RecentMailTrendByMonthVo> getRecentlyMailTrendByMonth12337(String year) { |
||||||
|
List<RecentMailTrendByMonthVo> recentMailTrendVos = |
||||||
|
dataPetition12337Mapper.selectRecentlyMailTrendByMonth12337(year); |
||||||
|
return recentMailTrendVos; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,69 @@ |
|||||||
|
package com.biutag.supervision.service; |
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.biutag.supervision.constants.enums.InspectCaseEnum; |
||||||
|
import com.biutag.supervision.mapper.NegativeMapper; |
||||||
|
import com.biutag.supervision.mapper.NegativeProblemRelationMapper; |
||||||
|
import com.biutag.supervision.mapper.SupDepartMapper; |
||||||
|
import com.biutag.supervision.pojo.Result; |
||||||
|
import com.biutag.supervision.pojo.entity.Negative; |
||||||
|
import com.biutag.supervision.pojo.entity.SupDepart; |
||||||
|
import com.biutag.supervision.pojo.vo.*; |
||||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Optional; |
||||||
|
|
||||||
|
/** |
||||||
|
* 视频督察服务层 |
||||||
|
*/ |
||||||
|
@RequiredArgsConstructor |
||||||
|
@Service |
||||||
|
public class VideoSuperviseService { |
||||||
|
|
||||||
|
private final NegativeMapper negativeMapper; |
||||||
|
|
||||||
|
//region 左边
|
||||||
|
public List<OrganizeProblemRankVo> getVideoSuperviseProblemRank(Date beginTime, Date endTime, Integer groupId) { |
||||||
|
List<OrganizeProblemRankVo> res = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, groupId); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
//endregion
|
||||||
|
|
||||||
|
//region 中间
|
||||||
|
public VideoSuperviseCountVo getAllVideoSuperviseCount(Date beginTime, Date endTime) { |
||||||
|
VideoSuperviseCountVo res = negativeMapper.getAllVideoSuperviseCount(beginTime, endTime); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
public List<VideoSuperviseMapIconVo> getVideoSuperviseMapIconInfo(Date beginTime, Date endTime) { |
||||||
|
List<VideoSuperviseMapIconVo> res = negativeMapper.getVideoSuperviseMapIconInfo(beginTime, endTime); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
public List<EchartsVo> getVideoSuperviseTrend(String year) { |
||||||
|
List<EchartsVo> res = negativeMapper.getVideoSuperviseTrend(year); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
//endregion
|
||||||
|
|
||||||
|
//region
|
||||||
|
|
||||||
|
public List<EchartsVo> getVideoSuperviseProblemTypeRate(Date beginTime, Date endTime) { |
||||||
|
List<EchartsVo> res = negativeMapper.getVideoSuperviseProblemTypeRate(beginTime, endTime); |
||||||
|
return res; |
||||||
|
} |
||||||
|
|
||||||
|
//endregion
|
||||||
|
|
||||||
|
} |
||||||
Loading…
Reference in new issue