Commit b955c4ef authored by hezhuozhi's avatar hezhuozhi

27467 人大金仓数据库适配

parent d89e3d63
......@@ -13,8 +13,9 @@ public class OverviewQuestionDto {
private String createDate;
@ApiModelProperty(value = "问题内容")
private String warningContent;
private String content;
@ApiModelProperty(value = "问题内容")
private String content_;
@ApiModelProperty(value = "问题完成情况描述")
private String completionStatusDesc;
......
......@@ -3,8 +3,6 @@ package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.module.jxiop.api.dto.OverviewQuestionDto;
import com.yeejoin.amos.boot.module.jxiop.api.dto.RectificationUnitClassifyTreeDto;
import com.yeejoin.amos.boot.module.jxiop.api.feign.McbWarningFeign;
......@@ -13,7 +11,6 @@ import com.yeejoin.amos.boot.module.jxiop.api.service.IPermissionService;
import com.yeejoin.amos.boot.module.jxiop.biz.mcbwarningmapper.McbWarningMapper;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -75,7 +72,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
*/
@Override
public Page<Map<String, Object>> queryWarningPage(Page<Map<String, Object>> page, Integer processingStatus,
String eventLevel, String createDate,String startTime,String endTime, String warningSourceType,String objectName, String overView) {
String eventLevel, String createDate, String startTime, String endTime, String warningSourceType, String objectName, String overView) {
List<String> projectOrgCodes = this.getProjectOrgCodes();
long start = (page.getCurrent() - 1) * page.getSize();
long size = page.getSize();
......@@ -83,9 +80,14 @@ public class McbWarningServiceImpl implements IMcbWarningService {
projectOrgCodes.add("NULL");
}
List<Map<String, Object>> records = mcbWarningMapper.queryWarningList(start, size, projectOrgCodes,
processingStatus, eventLevel, createDate,startTime,endTime, warningSourceType,objectName, overView);
Long total = mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate,startTime,endTime,
warningSourceType,objectName, overView);
processingStatus, eventLevel, createDate, startTime, endTime, warningSourceType, objectName, overView);
if (CollectionUtil.isNotEmpty(records)) {
for (Map<String, Object> record : records) {
record.put("CONTENT", record.get("CONTENT_"));
}
}
Long total = mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate, startTime, endTime,
warningSourceType, objectName, overView);
page.setRecords(records);
page.setTotal(total);
return page;
......@@ -96,15 +98,20 @@ public class McbWarningServiceImpl implements IMcbWarningService {
List<String> projectOrgCodes = this.getProjectOrgCodes();
if(startTime!=null && startTime != "") {
startTime+= " 00:00:00";
if (startTime != null && startTime != "") {
startTime += " 00:00:00";
}
if(endTime!=null && endTime != "") {
endTime+= " 23:59:59";
if (endTime != null && endTime != "") {
endTime += " 23:59:59";
}
List<OverviewQuestionDto> list = mcbWarningMapper.overviewQuestionList( (current -1) * size, size ,projectOrgCodes, startTime, endTime);
List<OverviewQuestionDto> list = mcbWarningMapper.overviewQuestionList((current - 1) * size, size, projectOrgCodes, startTime, endTime);
if (CollectionUtil.isNotEmpty(list)) {
for (OverviewQuestionDto overviewQuestionDto : list) {
overviewQuestionDto.setContent(overviewQuestionDto.getContent_());
}
}
Integer total = mcbWarningMapper.overviewQuestionListTotal(projectOrgCodes, startTime, endTime);
Page<OverviewQuestionDto> pagenew = new Page<>();
pagenew.setCurrent(current);
......@@ -122,14 +129,14 @@ public class McbWarningServiceImpl implements IMcbWarningService {
* @return 预警信息总数
*/
@Override
public Long queryWarningCount(Integer processingStatus, String eventLevel, String createDate,String startTime,String endTime,
String warningSourceType,String objectName, String overView) {
public Long queryWarningCount(Integer processingStatus, String eventLevel, String createDate, String startTime, String endTime,
String warningSourceType, String objectName, String overView) {
List<String> projectOrgCodes = this.getProjectOrgCodes();
if (projectOrgCodes.isEmpty()) {
projectOrgCodes.add("NULL");
}
return mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate,startTime,endTime,
warningSourceType,objectName,overView);
return mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate, startTime, endTime,
warningSourceType, objectName, overView);
}
/**
......@@ -148,8 +155,13 @@ public class McbWarningServiceImpl implements IMcbWarningService {
projectOrgCodes.add("NULL");
}
List<Map<String, Object>> records = mcbWarningMapper.queryQuestionList(start, offset, projectOrgCodes,
completionStatus,startTime,endTime);
Long total = mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus,startTime,endTime);
completionStatus, startTime, endTime);
if (CollectionUtil.isNotEmpty(records)) {
for (Map<String, Object> record : records) {
record.put("CONTENT", record.get("CONTENT_"));
}
}
Long total = mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus, startTime, endTime);
page.setRecords(records);
page.setTotal(total);
return page;
......@@ -167,7 +179,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
if (projectOrgCodes.isEmpty()) {
projectOrgCodes.add("NULL");
}
return mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus,startTime,endTime);
return mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus, startTime, endTime);
}
/**
......@@ -338,20 +350,19 @@ public class McbWarningServiceImpl implements IMcbWarningService {
return projectOrgCodes;
}
public List<Map<String, Object>> stationOverNum(String sourceAttribution){
public List<Map<String, Object>> stationOverNum(String sourceAttribution) {
return mcbWarningMapper.stationOverNum(sourceAttribution);
}
public Map<String,Object> stationOverTotal(String province, String sourceAttribution){
public Map<String, Object> stationOverTotal(String province, String sourceAttribution) {
Map<String, Object> map = new HashMap<>();
map.put("dayNum",mcbWarningMapper.getDayTotal(province, sourceAttribution));
map.put("monNum",mcbWarningMapper.getMonthTotal(province, sourceAttribution));
map.put("yearNum",mcbWarningMapper.getYearTotal(province, sourceAttribution));
map.put("dayNum", mcbWarningMapper.getDayTotal(province, sourceAttribution));
map.put("monNum", mcbWarningMapper.getMonthTotal(province, sourceAttribution));
map.put("yearNum", mcbWarningMapper.getYearTotal(province, sourceAttribution));
return map;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment