|
@ -91,13 +91,13 @@ public class DataCompleteService extends DataQualityBaseService {
|
|
|
|
|
|
@Override
|
|
|
public List<Map<String, Object>> getOrgDataQuality(Integer dataLevel, String areaCode, String startDate, String endDate) throws Exception {
|
|
|
String end = DateUtil.addDate(1, endDate, DateUtil.DEFAULT_DATE_YMD_FORMAT);
|
|
|
//String end = DateUtil.addDate(1, endDate, DateUtil.DEFAULT_DATE_YMD_FORMAT);
|
|
|
Map<String, Object> resMap = null;
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
|
double totalNum = 0;//平台总数
|
|
|
double totalHospitalNum = 0;//医院总数
|
|
|
//机构数据
|
|
|
List<Map<String, Object>> groupList = dataCorrectService.getOrgDataMap(dataLevel, "event_date", startDate, end, areaCode);
|
|
|
List<Map<String, Object>> groupList = dataCorrectService.getOrgDataMap(dataLevel, "event_date", startDate, endDate, areaCode);
|
|
|
//平台接收数据量
|
|
|
Map<String, Object> platformDataGroup = getPlatformDataGroup(dataLevel, "event_date", startDate, endDate, areaCode);
|
|
|
// 计算
|
|
@ -167,17 +167,17 @@ public class DataCompleteService extends DataQualityBaseService {
|
|
|
//添加标识,标识是机构数据
|
|
|
resMap.put("type", "org_code");
|
|
|
fields.add("org_code");
|
|
|
sql1 = "SELECT count(DISTINCT profile_id) as count ,org_code FROM json_archives/info where pack_type=1 and analyze_status=3 and org_area='" + orgArea + "' and " +
|
|
|
sql1 = "SELECT count(DISTINCT event_no) as count ,org_code FROM json_archives/info where pack_type=1 and analyze_status=3 and org_area='" + orgArea + "' and " +
|
|
|
dateField + ">='" + start + " 00:00:00' and " + dateField + "<='" + end + " 23:59:59' group by org_code";
|
|
|
} else if (StringUtils.isEmpty(orgArea) && (dataLevel == 0 && StringUtils.isEmpty(orgArea))) {
|
|
|
resMap.put("type", "org_area");
|
|
|
fields.add("org_area");
|
|
|
sql1 = "SELECT count(DISTINCT profile_id) as count ,org_area FROM json_archives/info where pack_type=1 and analyze_status=3 and " +
|
|
|
sql1 = "SELECT count(DISTINCT event_no) as count ,org_area FROM json_archives/info where pack_type=1 and analyze_status=3 and " +
|
|
|
dateField + ">='" + start + " 00:00:00' and " + dateField + "<='" + end + " 23:59:59' group by org_area";
|
|
|
} else if (StringUtils.isEmpty(orgArea) && (dataLevel == 1 && StringUtils.isEmpty(orgArea))) {
|
|
|
resMap.put("type", "org_code");
|
|
|
fields.add("org_code");
|
|
|
sql1 = "SELECT count(DISTINCT profile_id) as count ,org_code FROM json_archives/info where pack_type=1 and analyze_status=3 and " +
|
|
|
sql1 = "SELECT count(DISTINCT event_no) as count ,org_code FROM json_archives/info where pack_type=1 and analyze_status=3 and " +
|
|
|
dateField + ">='" + start + " 00:00:00' and " + dateField + "<='" + end + " 23:59:59' group by org_code";
|
|
|
}
|
|
|
|