|
@@ -787,14 +787,14 @@ public class DataDownloadController {
|
|
newTitle[0] = "被试ID";
|
|
newTitle[0] = "被试ID";
|
|
newTitle[1] = "姓名";
|
|
newTitle[1] = "姓名";
|
|
newTitle[2] = "年龄";
|
|
newTitle[2] = "年龄";
|
|
- newTitle[3] = "单位名称旅";
|
|
|
|
|
|
+ /* newTitle[3] = "单位名称旅";
|
|
newTitle[4] = "单位名称大队";
|
|
newTitle[4] = "单位名称大队";
|
|
newTitle[5] = "飞行等级";
|
|
newTitle[5] = "飞行等级";
|
|
newTitle[6] = "现飞机型";
|
|
newTitle[6] = "现飞机型";
|
|
newTitle[7] = "任务序次";
|
|
newTitle[7] = "任务序次";
|
|
newTitle[8] = "测试时间";
|
|
newTitle[8] = "测试时间";
|
|
newTitle[9] = "职业";
|
|
newTitle[9] = "职业";
|
|
- newTitle[10] = "军衔";
|
|
|
|
|
|
+ newTitle[10] = "军衔";*/
|
|
/*newTitle[0] = "姓名";
|
|
/*newTitle[0] = "姓名";
|
|
newTitle[1] = "性别";
|
|
newTitle[1] = "性别";
|
|
newTitle[2] = "职业";
|
|
newTitle[2] = "职业";
|
|
@@ -815,14 +815,14 @@ public class DataDownloadController {
|
|
oldTitle[0] = "被试ID";
|
|
oldTitle[0] = "被试ID";
|
|
oldTitle[1] = "姓名";
|
|
oldTitle[1] = "姓名";
|
|
oldTitle[2] = "年龄";
|
|
oldTitle[2] = "年龄";
|
|
- oldTitle[3] = "单位名称旅";
|
|
|
|
|
|
+ /*oldTitle[3] = "单位名称旅";
|
|
oldTitle[4] = "单位名称大队";
|
|
oldTitle[4] = "单位名称大队";
|
|
oldTitle[5] = "飞行等级";
|
|
oldTitle[5] = "飞行等级";
|
|
oldTitle[6] = "现飞机型";
|
|
oldTitle[6] = "现飞机型";
|
|
oldTitle[7] = "任务序次";
|
|
oldTitle[7] = "任务序次";
|
|
oldTitle[8] = "测试时间";
|
|
oldTitle[8] = "测试时间";
|
|
oldTitle[9] = "职业";
|
|
oldTitle[9] = "职业";
|
|
- oldTitle[10] = "军衔";
|
|
|
|
|
|
+ oldTitle[10] = "军衔";*/
|
|
/*oldTitle[0] = "姓名";
|
|
/*oldTitle[0] = "姓名";
|
|
oldTitle[1] = "性别";
|
|
oldTitle[1] = "性别";
|
|
oldTitle[2] = "职业";
|
|
oldTitle[2] = "职业";
|
|
@@ -1035,14 +1035,14 @@ public class DataDownloadController {
|
|
newTitle[0] = "被试ID";
|
|
newTitle[0] = "被试ID";
|
|
newTitle[1] = "姓名";
|
|
newTitle[1] = "姓名";
|
|
newTitle[2] = "年龄";
|
|
newTitle[2] = "年龄";
|
|
- newTitle[3] = "单位名称旅";
|
|
|
|
|
|
+ /* newTitle[3] = "单位名称旅";
|
|
newTitle[4] = "单位名称大队";
|
|
newTitle[4] = "单位名称大队";
|
|
newTitle[5] = "飞行等级";
|
|
newTitle[5] = "飞行等级";
|
|
newTitle[6] = "现飞机型";
|
|
newTitle[6] = "现飞机型";
|
|
newTitle[7] = "任务序次";
|
|
newTitle[7] = "任务序次";
|
|
newTitle[8] = "测试时间";
|
|
newTitle[8] = "测试时间";
|
|
newTitle[9] = "职业";
|
|
newTitle[9] = "职业";
|
|
- newTitle[10] = "军衔";
|
|
|
|
|
|
+ newTitle[10] = "军衔";*/
|
|
for (int x = 0; x < splits.length; x++) {
|
|
for (int x = 0; x < splits.length; x++) {
|
|
String[] a = splits[x].split(":");
|
|
String[] a = splits[x].split(":");
|
|
newTitle[x + 11] = a[0];
|
|
newTitle[x + 11] = a[0];
|
|
@@ -1056,7 +1056,7 @@ public class DataDownloadController {
|
|
oldTitle[0] = "被试ID";
|
|
oldTitle[0] = "被试ID";
|
|
oldTitle[1] = "姓名";
|
|
oldTitle[1] = "姓名";
|
|
oldTitle[2] = "年龄";
|
|
oldTitle[2] = "年龄";
|
|
- oldTitle[3] = "单位名称旅";
|
|
|
|
|
|
+ /*oldTitle[3] = "单位名称旅";
|
|
oldTitle[4] = "单位名称大队";
|
|
oldTitle[4] = "单位名称大队";
|
|
oldTitle[5] = "飞行等级";
|
|
oldTitle[5] = "飞行等级";
|
|
oldTitle[6] = "现飞机型";
|
|
oldTitle[6] = "现飞机型";
|
|
@@ -1064,7 +1064,7 @@ public class DataDownloadController {
|
|
oldTitle[8] = "测试时间";
|
|
oldTitle[8] = "测试时间";
|
|
|
|
|
|
oldTitle[9] = "职业";
|
|
oldTitle[9] = "职业";
|
|
- oldTitle[10] = "军衔";
|
|
|
|
|
|
+ oldTitle[10] = "军衔";*/
|
|
for (int y = 0; y < splits.length; y++) {
|
|
for (int y = 0; y < splits.length; y++) {
|
|
String[] a = splits[y].split(":");
|
|
String[] a = splits[y].split(":");
|
|
oldTitle[y + 11] = a[0];
|
|
oldTitle[y + 11] = a[0];
|
|
@@ -1897,12 +1897,12 @@ public class DataDownloadController {
|
|
Row row = null;
|
|
Row row = null;
|
|
//获取用户属性信息
|
|
//获取用户属性信息
|
|
List<String> userIdList = institutionUserRecordingList.stream().map(item -> item.getUserId()).collect(Collectors.toList());
|
|
List<String> userIdList = institutionUserRecordingList.stream().map(item -> item.getUserId()).collect(Collectors.toList());
|
|
- List<UserAttributeEntity> userAttributeList = userAttributeService.findListByUserIdListAndStatus(userIdList, Constant.TEST_PLAN_STATUS_STOP);
|
|
|
|
|
|
+ //List<UserAttributeEntity> userAttributeList = userAttributeService.findListByUserIdListAndStatus(userIdList, Constant.TEST_PLAN_STATUS_STOP);
|
|
|
|
|
|
int size = institutionUserRecordingList.size();
|
|
int size = institutionUserRecordingList.size();
|
|
for (int i = 0; i < size; i++) {
|
|
for (int i = 0; i < size; i++) {
|
|
InstitutionRecordingUsersDTO institutionRecordingUsersDTO = institutionUserRecordingList.get(institutionUserRecordingList.size() - i - 1);
|
|
InstitutionRecordingUsersDTO institutionRecordingUsersDTO = institutionUserRecordingList.get(institutionUserRecordingList.size() - i - 1);
|
|
- UserAttributeEntity userAttribute = userAttributeList.stream().filter(att -> institutionRecordingUsersDTO.getUserId().equals(att.getUserId())).findFirst().orElse(null);
|
|
|
|
|
|
+ //UserAttributeEntity userAttribute = userAttributeList.stream().filter(att -> institutionRecordingUsersDTO.getUserId().equals(att.getUserId())).findFirst().orElse(null);
|
|
String testResultls = institutionRecordingUsersDTO.getTestResults();
|
|
String testResultls = institutionRecordingUsersDTO.getTestResults();
|
|
String[] splitl = testResultls.split(";");
|
|
String[] splitl = testResultls.split(";");
|
|
if (testResultls.contains("version")) {
|
|
if (testResultls.contains("version")) {
|
|
@@ -1914,40 +1914,8 @@ public class DataDownloadController {
|
|
for (int y = 0; y < colValue.length; y++) {
|
|
for (int y = 0; y < colValue.length; y++) {
|
|
testResultl += colName[y] + ":" + colValue[y] + ";";
|
|
testResultl += colName[y] + ":" + colValue[y] + ";";
|
|
}
|
|
}
|
|
- /*for (int x = 0; x < splitl.length; x++) {
|
|
|
|
- if (Arrays.toString(splitl).contains("columnValue")) {
|
|
|
|
- if (splitl[x].contains("columnValue")) {
|
|
|
|
- JSONArray tableModule = JSONObject.parseObject(institutionRecordingUsersDTO.getTestResult()).getJSONArray("tableModule");
|
|
|
|
- JSONArray columnValues = tableModule.getJSONObject(0).getJSONArray("columnValue");
|
|
|
|
- String[] colName = columnValues.getString(0).split(";");
|
|
|
|
- String[] colValue = columnValues.getString(1).split(";");
|
|
|
|
- for (int y = 0; y < colName.length; y++) {
|
|
|
|
- testResultl += colName[y] + ":" + colValue[y] + ";";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if (splitl[x].contains("totalScoreDesc")) {
|
|
|
|
- String b = splitl[x];
|
|
|
|
- JSONArray totalScores = JSONArray.parseArray(b.replace("totalScore:", ""));
|
|
|
|
- JSONObject totalScore = totalScores.getJSONObject(0);
|
|
|
|
- testResultl += "总分:" + totalScore.getString("totalScore") + ";总分结论:" + totalScore.getString("totalScoreDesc") + ";";
|
|
|
|
- }
|
|
|
|
- if (splitl[x].contains("Describe")) {
|
|
|
|
- String b = splitl[x];
|
|
|
|
- JSONArray dimensions = JSONArray.parseArray(b.replace("dimensions:", ""));
|
|
|
|
- for (int y = 0; y < dimensions.size(); y++) {
|
|
|
|
- JSONObject dimension = dimensions.getJSONObject(y);
|
|
|
|
- testResultl += dimension.getString("name") + ":" + dimension.getString("score") + ";"
|
|
|
|
- + dimension.getString("name") + "结论:" + dimension.getString("Describe") + ";";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }*/
|
|
|
|
splitl = testResultl.split(";");
|
|
splitl = testResultl.split(";");
|
|
- //continue;
|
|
|
|
- }/*else {
|
|
|
|
- splitl = testResultls.split(";");
|
|
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
//创建list.size()行数据
|
|
//创建list.size()行数据
|
|
row = downSheet.createRow(i + 1);
|
|
row = downSheet.createRow(i + 1);
|
|
|
|
|
|
@@ -1964,33 +1932,33 @@ public class DataDownloadController {
|
|
cell2.setCellValue(institutionRecordingUsersDTO.getAge());
|
|
cell2.setCellValue(institutionRecordingUsersDTO.getAge());
|
|
cell2.setCellStyle(style);
|
|
cell2.setCellStyle(style);
|
|
|
|
|
|
- String brigade = "";//所在旅
|
|
|
|
|
|
+ /* String brigade = "";//所在旅
|
|
String detachment = "";//所在大队
|
|
String detachment = "";//所在大队
|
|
String fightRegistration = "";//飞行等级
|
|
String fightRegistration = "";//飞行等级
|
|
- /* String flightDuration = "";//总飞行时长
|
|
|
|
|
|
+ *//* String flightDuration = "";//总飞行时长
|
|
String currentTypeFlightDuration = "";//现机型飞行时长
|
|
String currentTypeFlightDuration = "";//现机型飞行时长
|
|
- String flyingModels = "";//飞过机型*/
|
|
|
|
- String currentFlyingModels = "";//当前机型
|
|
|
|
- if (userAttribute != null) {
|
|
|
|
|
|
+ String flyingModels = "";//飞过机型*//*
|
|
|
|
+ String currentFlyingModels = "";//当前机型*/
|
|
|
|
+ /* if (userAttribute != null) {
|
|
brigade = userAttribute.getBrigade();
|
|
brigade = userAttribute.getBrigade();
|
|
detachment = userAttribute.getDetachment();
|
|
detachment = userAttribute.getDetachment();
|
|
fightRegistration = userAttribute.getFightRegistration();
|
|
fightRegistration = userAttribute.getFightRegistration();
|
|
- /*flightDuration = userAttribute.getFlightDuration();
|
|
|
|
- currentTypeFlightDuration = userAttribute.getCurrentTypeFlightDuration();*/
|
|
|
|
|
|
+ *//*flightDuration = userAttribute.getFlightDuration();
|
|
|
|
+ currentTypeFlightDuration = userAttribute.getCurrentTypeFlightDuration();*//*
|
|
|
|
|
|
List<String> flyingModelList = JSON.parseArray(userAttribute.getFlyingModels(), String.class);
|
|
List<String> flyingModelList = JSON.parseArray(userAttribute.getFlyingModels(), String.class);
|
|
- /* if (!flyingModelList.isEmpty()) {
|
|
|
|
|
|
+ *//* if (!flyingModelList.isEmpty()) {
|
|
flyingModels = String.join(",", flyingModelList);
|
|
flyingModels = String.join(",", flyingModelList);
|
|
- }*/
|
|
|
|
|
|
+ }*//*
|
|
|
|
|
|
List<String> currentFlyingModelList = JSON.parseArray(userAttribute.getCurrentFlyingModels(), String.class);
|
|
List<String> currentFlyingModelList = JSON.parseArray(userAttribute.getCurrentFlyingModels(), String.class);
|
|
if (!currentFlyingModelList.isEmpty()) {
|
|
if (!currentFlyingModelList.isEmpty()) {
|
|
currentFlyingModels = String.join(",", currentFlyingModelList);
|
|
currentFlyingModels = String.join(",", currentFlyingModelList);
|
|
}
|
|
}
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
- Cell cell3 = row.createCell(3);
|
|
|
|
|
|
+ /* Cell cell3 = row.createCell(3);
|
|
cell3.setCellValue(brigade);
|
|
cell3.setCellValue(brigade);
|
|
cell3.setCellStyle(style);
|
|
cell3.setCellStyle(style);
|
|
|
|
|
|
@@ -2020,12 +1988,12 @@ public class DataDownloadController {
|
|
|
|
|
|
Cell cell10 = row.createCell(10);
|
|
Cell cell10 = row.createCell(10);
|
|
cell10.setCellValue(institutionRecordingUsersDTO.getMilitary());
|
|
cell10.setCellValue(institutionRecordingUsersDTO.getMilitary());
|
|
- cell10.setCellStyle(style);
|
|
|
|
|
|
+ cell10.setCellStyle(style);*/
|
|
|
|
|
|
|
|
|
|
for (int z = 0; z < splitl.length; z++) {
|
|
for (int z = 0; z < splitl.length; z++) {
|
|
String[] a = splitl[z].split(":");
|
|
String[] a = splitl[z].split(":");
|
|
- Cell rowCell = row.createCell(z + 11);
|
|
|
|
|
|
+ Cell rowCell = row.createCell(z + 3);
|
|
if (a.length < 2) {
|
|
if (a.length < 2) {
|
|
rowCell.setCellValue("无");
|
|
rowCell.setCellValue("无");
|
|
} else {
|
|
} else {
|
|
@@ -2112,7 +2080,7 @@ public class DataDownloadController {
|
|
map.put("姓名", user.getPetName());
|
|
map.put("姓名", user.getPetName());
|
|
map.put("性别", "0".equals(user.getGender()) ? "男" : "女");
|
|
map.put("性别", "0".equals(user.getGender()) ? "男" : "女");
|
|
map.put("年龄", user.getAge());
|
|
map.put("年龄", user.getAge());
|
|
- UserAttributeEntity userAttribute = userAttributeList.stream().filter(att -> user.getId().equals(att.getUserId())).findFirst().orElse(null);
|
|
|
|
|
|
+ /*UserAttributeEntity userAttribute = userAttributeList.stream().filter(att -> user.getId().equals(att.getUserId())).findFirst().orElse(null);
|
|
String brigade = "";//所在旅
|
|
String brigade = "";//所在旅
|
|
String detachment = "";//所在大队
|
|
String detachment = "";//所在大队
|
|
String fightRegistration = "";//飞行等级
|
|
String fightRegistration = "";//飞行等级
|
|
@@ -2146,7 +2114,7 @@ public class DataDownloadController {
|
|
map.put("现机型飞行时长", currentTypeFlightDuration);
|
|
map.put("现机型飞行时长", currentTypeFlightDuration);
|
|
map.put("飞过机型", flyingModels);
|
|
map.put("飞过机型", flyingModels);
|
|
map.put("职业", user.getProfession());
|
|
map.put("职业", user.getProfession());
|
|
- map.put("军衔", user.getMilitary());
|
|
|
|
|
|
+ map.put("军衔", user.getMilitary());*/
|
|
List<UserRecordEntity> matchUserRecordList = userRecordList.stream().filter(rec -> user.getPhone().equals(rec.getPhone())).collect(Collectors.toList());
|
|
List<UserRecordEntity> matchUserRecordList = userRecordList.stream().filter(rec -> user.getPhone().equals(rec.getPhone())).collect(Collectors.toList());
|
|
if (matchUserRecordList.isEmpty()) {
|
|
if (matchUserRecordList.isEmpty()) {
|
|
continue;
|
|
continue;
|
|
@@ -2197,7 +2165,7 @@ public class DataDownloadController {
|
|
titleList.add("姓名");
|
|
titleList.add("姓名");
|
|
titleList.add("性别");
|
|
titleList.add("性别");
|
|
titleList.add("年龄");
|
|
titleList.add("年龄");
|
|
- titleList.add("单位名称旅");
|
|
|
|
|
|
+ /*titleList.add("单位名称旅");
|
|
titleList.add("单位名称大队");
|
|
titleList.add("单位名称大队");
|
|
titleList.add("飞行等级");
|
|
titleList.add("飞行等级");
|
|
titleList.add("现飞机型");
|
|
titleList.add("现飞机型");
|
|
@@ -2205,7 +2173,7 @@ public class DataDownloadController {
|
|
titleList.add("现机型飞行时长");
|
|
titleList.add("现机型飞行时长");
|
|
titleList.add("飞过机型");
|
|
titleList.add("飞过机型");
|
|
titleList.add("职业");
|
|
titleList.add("职业");
|
|
- titleList.add("军衔");
|
|
|
|
|
|
+ titleList.add("军衔");*/
|
|
List<UserRecordEntity> userRecordList = userRecordService.getListByInstitutionNo(institutionNo);
|
|
List<UserRecordEntity> userRecordList = userRecordService.getListByInstitutionNo(institutionNo);
|
|
for (UserRecordEntity record : userRecordList) {
|
|
for (UserRecordEntity record : userRecordList) {
|
|
if (Constant.DEFAULT_VALUE_ZERO.equals(record.getType())) {
|
|
if (Constant.DEFAULT_VALUE_ZERO.equals(record.getType())) {
|