|
|
|
|
@ -6,12 +6,12 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.biutag.supervision.constants.enums.DepartGroupEnum; |
|
|
|
|
import com.biutag.supervision.constants.enums.RepeatEnum; |
|
|
|
|
import com.biutag.supervision.mapper.DataCaseVerifMapper; |
|
|
|
|
import com.biutag.supervision.mapper.DataPetitionComplaintMapper; |
|
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
|
import com.biutag.supervision.pojo.dto.CaseVerifDepart; |
|
|
|
|
import com.biutag.supervision.pojo.entity.DataPetitionComplaint; |
|
|
|
|
import com.biutag.supervision.pojo.vo.RecentMailTrendVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.RecentMailTrendByDayVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.RecentMailTrendByMonthVo; |
|
|
|
|
import com.biutag.supervision.service.DataPetitionComplaintService; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import org.springframework.format.annotation.DateTimeFormat; |
|
|
|
|
@ -80,20 +80,20 @@ public class DataPetitionComplaintViewController {
|
|
|
|
|
/** |
|
|
|
|
* 信访数据大屏信访趋势统计 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/getRecentlyMailTrend") |
|
|
|
|
public Result<JSONObject> getRecentlyMailTrend(@RequestParam Integer sourcesCode, |
|
|
|
|
@GetMapping("/getRecentlyMailTrendByDay") |
|
|
|
|
public Result<JSONObject> getRecentlyMailTrendByDay(@RequestParam Integer sourcesCode, |
|
|
|
|
@RequestParam Integer days, |
|
|
|
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date startTime, |
|
|
|
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime |
|
|
|
|
) { |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
// 库中的数据 2024/10/24 22
|
|
|
|
|
List<RecentMailTrendVo> recentMailTrendVoList = dataPetitionComplaintService.getRecentlyMailTrend(sourcesCode, days, endTime); |
|
|
|
|
List<RecentMailTrendByDayVo> recentMailTrendVoList = dataPetitionComplaintService.getRecentlyMailTrendByDay(sourcesCode, days, endTime); |
|
|
|
|
ArrayList<String> dayList = new ArrayList<>(); |
|
|
|
|
ArrayList<String> totalList = new ArrayList<>(); |
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd"); |
|
|
|
|
LocalDate previousDate = null; |
|
|
|
|
for (RecentMailTrendVo recentMailTrendVo : recentMailTrendVoList) { |
|
|
|
|
for (RecentMailTrendByDayVo recentMailTrendVo : recentMailTrendVoList) { |
|
|
|
|
// 获取当前日期
|
|
|
|
|
LocalDate currentDate = LocalDate.parse(recentMailTrendVo.getDayTime(), formatter); |
|
|
|
|
if (previousDate != null) { |
|
|
|
|
@ -115,4 +115,26 @@ public class DataPetitionComplaintViewController {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getRecentlyMailTrendMonth") |
|
|
|
|
public Result<JSONObject> getRecentlyMailTrendByMonth(@RequestParam Integer sourcesCode, |
|
|
|
|
@RequestParam Integer year |
|
|
|
|
) { |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
List<RecentMailTrendByMonthVo> recentMailTrendVoList = dataPetitionComplaintService.getRecentlyMailTrendByMonth(sourcesCode, String.valueOf(year)); |
|
|
|
|
ArrayList<String> monthList = new ArrayList<>(); |
|
|
|
|
ArrayList<String> totalList = new ArrayList<>(); |
|
|
|
|
for (RecentMailTrendByMonthVo recentMailTrendByMonthVo : recentMailTrendVoList) { |
|
|
|
|
monthList.add(recentMailTrendByMonthVo.getMonthTime().substring(recentMailTrendByMonthVo.getMonthTime().indexOf("-")+1)); |
|
|
|
|
totalList.add(recentMailTrendByMonthVo.getTotal()); |
|
|
|
|
} |
|
|
|
|
jsonObject.fluentPut("monthList", monthList); |
|
|
|
|
jsonObject.fluentPut("totalList", totalList); |
|
|
|
|
return Result.success(jsonObject); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|