|
@@ -249,7 +249,7 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
|
|
size = list.size();
|
|
|
}
|
|
|
|
|
|
- LOGGER.info("查询到的数据长度为: {}, 查询耗时:{}秒", size, (System.currentTimeMillis() - currentTimeMillis) / 1000);
|
|
|
+ LOGGER.info("查询到的数据长度为: {}, 查询耗时:{}秒, 文件:{}", size, (System.currentTimeMillis() - currentTimeMillis) / 1000, filename);
|
|
|
}
|
|
|
|
|
|
try {
|
|
@@ -302,13 +302,17 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
|
|
List<Map<String, Object>> list;
|
|
|
LOGGER.info("开始查询, 线程名称: {}", Thread.currentThread().getName());
|
|
|
long currentTimeMillis = System.currentTimeMillis();
|
|
|
+ String key = RedisKey.ASYNC_DOWNLOAD_YMJZ + username;
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("fileStaticPath", fileStaticPath);
|
|
|
+ jsonObject.put("fileAbsPath", fileAbsPath);
|
|
|
+ redisService.setCacheObject(key, jsonObject);
|
|
|
list = listYmjz(info, columns);
|
|
|
boolean empty = isEmpty(list);
|
|
|
int size = BooleanUtils.isFalse(empty) ? 0 : list.size();
|
|
|
LOGGER.info("查询到的数据长度为: {}, 查询耗时:{}秒", size, (System.currentTimeMillis() - currentTimeMillis) / 1000);
|
|
|
|
|
|
try {
|
|
|
- String key = RedisKey.ASYNC_DOWNLOAD_YMJZ + username;
|
|
|
util.asyncExportExcelCommon(new FileOutputStream(file), list, "sheet1", columns, empty, false);
|
|
|
long timeout = 2L;
|
|
|
if (size > 100000 && size < 500000) {
|
|
@@ -316,11 +320,6 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
|
|
} else if (size > 500000) {
|
|
|
timeout = 10L;
|
|
|
}
|
|
|
-
|
|
|
- JSONObject jsonObject = new JSONObject();
|
|
|
- jsonObject.put("fileStaticPath", fileStaticPath);
|
|
|
- jsonObject.put("fileAbsPath", fileAbsPath);
|
|
|
- redisService.setCacheObject(key, jsonObject, timeout, TimeUnit.MINUTES);
|
|
|
} catch (IOException e) {
|
|
|
LOGGER.error("导出失败", e);
|
|
|
e.printStackTrace();
|
|
@@ -351,6 +350,7 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
|
|
List<Map<String, Object>> list = null;
|
|
|
Map<String, Object> formData = dto.getCondition();
|
|
|
String idCard = (String) formData.get("idCard");
|
|
|
+ String userName = (String) formData.get("userName");
|
|
|
String phoneNum = (String) formData.get("phoneNum");
|
|
|
String jici = (String) formData.get("jici");
|
|
|
String keyIndustries = (String) formData.get("keyIndustries");
|
|
@@ -358,11 +358,14 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
|
|
String vaccinationPlace = (String) formData.get("vaccinationPlace");
|
|
|
String isVaccination = (String) formData.get("isVaccination");
|
|
|
String shouldBe = (String) formData.get("shouldBe");
|
|
|
- String shouldSlow = (String) formData.get("shouldslow");
|
|
|
- long deptId = ((Number) formData.get("deptId")).longValue();
|
|
|
- if (deptId == 0) {
|
|
|
+ String shouldSlow = (String) formData.get("shouldSlow");
|
|
|
+ Integer deptIdTemp = (Integer) formData.get("deptId");
|
|
|
+ Long deptId;
|
|
|
+ if (deptIdTemp == null) {
|
|
|
LoginUser loginUser = redisService.getCacheObject(CacheConstants.LOGIN_TOKEN_KEY + token);
|
|
|
deptId = loginUser.getSysUser().getDeptId();
|
|
|
+ } else {
|
|
|
+ deptId = deptIdTemp.longValue();
|
|
|
}
|
|
|
|
|
|
List<SysDept> sysDepts = remoteDeptService.listChildrenDepts(deptId);
|
|
@@ -378,6 +381,7 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
|
|
condition.setTable(tableName);
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("dept_id", deptIdList);
|
|
|
+ jsonObject.put("is_del", 'N');
|
|
|
if (isNotEmpty(idCard)) {
|
|
|
jsonObject.put("id_card", idCard);
|
|
|
}
|
|
@@ -386,6 +390,10 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
|
|
jsonObject.put("phone_num", phoneNum);
|
|
|
}
|
|
|
|
|
|
+ if (isNotEmpty(userName)) {
|
|
|
+ jsonObject.put("user_name", userName);
|
|
|
+ }
|
|
|
+
|
|
|
if (isNotEmpty(jici)) {
|
|
|
jsonObject.put("jici", jici);
|
|
|
}
|