Commit ba63230a authored by 韩桐桐's avatar 韩桐桐

导出调整 + 人员bugfix 29604、29603

parent a5aded56
...@@ -57,7 +57,7 @@ public class JgTableDataExportController extends BaseController { ...@@ -57,7 +57,7 @@ public class JgTableDataExportController extends BaseController {
@RequestParam(value = "ids", required = false) String ids, @RequestParam(value = "ids", required = false) String ids,
@RequestParam(value = "sort", required = false) String sort) { @RequestParam(value = "sort", required = false) String sort) {
String uuid = UUID.randomUUID().toString(); String uuid = UUID.randomUUID().toString();
iJgTableDataExportService.startDownLoadMsg(getSelectedOrgInfo(), uuid); iJgTableDataExportService.startDownLoadMsg("",getSelectedOrgInfo(), uuid);
RequestContextWrapper contextWrapper = RequestContextWrapper.capture(); RequestContextWrapper contextWrapper = RequestContextWrapper.capture();
new Thread(() -> { new Thread(() -> {
contextWrapper.apply(); contextWrapper.apply();
...@@ -197,7 +197,7 @@ public class JgTableDataExportController extends BaseController { ...@@ -197,7 +197,7 @@ public class JgTableDataExportController extends BaseController {
public ResponseModel<String> unregulatedEquipExport(@RequestParam Map<String, Object> map) { public ResponseModel<String> unregulatedEquipExport(@RequestParam Map<String, Object> map) {
RequestContextWrapper contextWrapper = RequestContextWrapper.capture(); RequestContextWrapper contextWrapper = RequestContextWrapper.capture();
String uuid = UUID.randomUUID().toString(); String uuid = UUID.randomUUID().toString();
iJgTableDataExportService.startDownLoadMsg(getSelectedOrgInfo(), uuid); iJgTableDataExportService.startDownLoadMsg("未纳管设备列表数据",getSelectedOrgInfo(), uuid);
new Thread(() -> { new Thread(() -> {
contextWrapper.apply(); contextWrapper.apply();
iJgTableDataExportService.unregulatedEquip(uuid, getSelectedOrgInfo(), map); iJgTableDataExportService.unregulatedEquip(uuid, getSelectedOrgInfo(), map);
...@@ -210,7 +210,7 @@ public class JgTableDataExportController extends BaseController { ...@@ -210,7 +210,7 @@ public class JgTableDataExportController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "已纳管设备列表数据导出", notes = "已纳管设备列表数据导出") @ApiOperation(httpMethod = "GET", value = "已纳管设备列表数据导出", notes = "已纳管设备列表数据导出")
public ResponseModel<String> manageEquipmentExport(@RequestParam Map<String, Object> map) { public ResponseModel<String> manageEquipmentExport(@RequestParam Map<String, Object> map) {
String uuid = UUID.randomUUID().toString(); String uuid = UUID.randomUUID().toString();
iJgTableDataExportService.startDownLoadMsg(getSelectedOrgInfo(), uuid); iJgTableDataExportService.startDownLoadMsg("已纳管设备列表数据",getSelectedOrgInfo(), uuid);
RequestContextWrapper contextWrapper = RequestContextWrapper.capture(); RequestContextWrapper contextWrapper = RequestContextWrapper.capture();
new Thread(() -> { new Thread(() -> {
contextWrapper.apply(); contextWrapper.apply();
...@@ -233,7 +233,7 @@ public class JgTableDataExportController extends BaseController { ...@@ -233,7 +233,7 @@ public class JgTableDataExportController extends BaseController {
public ResponseModel<String> unregulatedPipe(@RequestParam Map<String, String> params, public ResponseModel<String> unregulatedPipe(@RequestParam Map<String, String> params,
@RequestParam(value = "sort", required = false) String sort) { @RequestParam(value = "sort", required = false) String sort) {
String uuid = UUID.randomUUID().toString(); String uuid = UUID.randomUUID().toString();
iJgTableDataExportService.startDownLoadMsg(getSelectedOrgInfo(), uuid); iJgTableDataExportService.startDownLoadMsg("未纳管压力管道列表",getSelectedOrgInfo(), uuid);
RequestContextWrapper contextWrapper = RequestContextWrapper.capture(); RequestContextWrapper contextWrapper = RequestContextWrapper.capture();
new Thread(() -> { new Thread(() -> {
contextWrapper.apply(); contextWrapper.apply();
...@@ -248,7 +248,7 @@ public class JgTableDataExportController extends BaseController { ...@@ -248,7 +248,7 @@ public class JgTableDataExportController extends BaseController {
public ResponseModel<String> managePipe(@RequestParam Map<String, String> params, public ResponseModel<String> managePipe(@RequestParam Map<String, String> params,
@RequestParam(value = "sort", required = false) String sort) { @RequestParam(value = "sort", required = false) String sort) {
String uuid = UUID.randomUUID().toString(); String uuid = UUID.randomUUID().toString();
iJgTableDataExportService.startDownLoadMsg(getSelectedOrgInfo(), uuid); iJgTableDataExportService.startDownLoadMsg("已纳管压力管道列表",getSelectedOrgInfo(), uuid);
RequestContextWrapper contextWrapper = RequestContextWrapper.capture(); RequestContextWrapper contextWrapper = RequestContextWrapper.capture();
new Thread(() -> { new Thread(() -> {
contextWrapper.apply(); contextWrapper.apply();
...@@ -262,7 +262,7 @@ public class JgTableDataExportController extends BaseController { ...@@ -262,7 +262,7 @@ public class JgTableDataExportController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "基础设置-企业信息列表数据导出", notes = "基础设置-企业信息列表数据导出") @ApiOperation(httpMethod = "GET", value = "基础设置-企业信息列表数据导出", notes = "基础设置-企业信息列表数据导出")
public ResponseModel<String> managePipe(String ids, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto) { public ResponseModel<String> managePipe(String ids, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto) {
String uuid = UUID.randomUUID().toString(); String uuid = UUID.randomUUID().toString();
iJgTableDataExportService.startDownLoadMsg(getSelectedOrgInfo(), uuid); iJgTableDataExportService.startDownLoadMsg("企业信息列表",getSelectedOrgInfo(), uuid);
RequestContextWrapper contextWrapper = RequestContextWrapper.capture(); RequestContextWrapper contextWrapper = RequestContextWrapper.capture();
new Thread(() -> { new Thread(() -> {
contextWrapper.apply(); contextWrapper.apply();
...@@ -278,7 +278,7 @@ public class JgTableDataExportController extends BaseController { ...@@ -278,7 +278,7 @@ public class JgTableDataExportController extends BaseController {
@RequestParam(value = "sort", required = false) String sort, @RequestParam(value = "sort", required = false) String sort,
@RequestParam Map<String, String> map) { @RequestParam Map<String, String> map) {
String uuid = UUID.randomUUID().toString(); String uuid = UUID.randomUUID().toString();
iJgTableDataExportService.startDownLoadMsg(getSelectedOrgInfo(), uuid); iJgTableDataExportService.startDownLoadMsg("人员信息列表",getSelectedOrgInfo(), uuid);
RequestContextWrapper contextWrapper = RequestContextWrapper.capture(); RequestContextWrapper contextWrapper = RequestContextWrapper.capture();
new Thread(() -> { new Thread(() -> {
contextWrapper.apply(); contextWrapper.apply();
...@@ -293,7 +293,7 @@ public class JgTableDataExportController extends BaseController { ...@@ -293,7 +293,7 @@ public class JgTableDataExportController extends BaseController {
public ResponseModel<String> userInfoExportWithAdmin(@RequestParam(value = "ids", required = false) String ids, public ResponseModel<String> userInfoExportWithAdmin(@RequestParam(value = "ids", required = false) String ids,
@RequestBody Map<String,String> map) { @RequestBody Map<String,String> map) {
String uuid = UUID.randomUUID().toString(); String uuid = UUID.randomUUID().toString();
iJgTableDataExportService.startDownLoadMsg(getSelectedOrgInfo(), uuid); iJgTableDataExportService.startDownLoadMsg("人员信息列表",getSelectedOrgInfo(), uuid);
RequestContextWrapper contextWrapper = RequestContextWrapper.capture(); RequestContextWrapper contextWrapper = RequestContextWrapper.capture();
new Thread(() -> { new Thread(() -> {
contextWrapper.apply(); contextWrapper.apply();
......
...@@ -15,7 +15,7 @@ import java.util.Map; ...@@ -15,7 +15,7 @@ import java.util.Map;
*/ */
public interface IJgTableDataExportService { public interface IJgTableDataExportService {
void startDownLoadMsg(ReginParams reginParams, String uuid); void startDownLoadMsg(String fileName, ReginParams reginParams, String uuid);
void gen(String jsonName, String voName, String tableName); void gen(String jsonName, String voName, String tableName);
......
...@@ -109,7 +109,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService { ...@@ -109,7 +109,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
private TzsUserInfoMapper tzsUserInfoMapper; private TzsUserInfoMapper tzsUserInfoMapper;
@Autowired @Autowired
private CbDataDictTypeHandler cbDataDictTypeHandler; private CbDataDictTypeHandler cbDataDictTypeHandler;
private final String DOWN_LOAD_START_TEMP = "{\"id\":\"%s\",\"status\":\"starting\"}"; private final String DOWN_LOAD_START_TEMP = "{\"id\":\"%s\",\"status\":\"starting\",\"fileName\":\"%s\",\"time\":\"%s\"}";
private final String BUCKET_NAME = "upload"; private final String BUCKET_NAME = "upload";
private final String UPLOAD_PATH = "/tzs/excelTempFile"; private final String UPLOAD_PATH = "/tzs/excelTempFile";
private final int PAGE_SIZE = 100; private final int PAGE_SIZE = 100;
...@@ -211,9 +211,9 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService { ...@@ -211,9 +211,9 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
* @param reginParams * @param reginParams
* @param uuid * @param uuid
*/ */
public void startDownLoadMsg(ReginParams reginParams, String uuid) { public void startDownLoadMsg(String fileName, ReginParams reginParams, String uuid) {
try { try {
emqKeeper.getMqttClient().publish(String.format(DOWNLOAD_TOPIC, reginParams.getUserModel().getUserId()), String.format(DOWN_LOAD_START_TEMP, uuid).getBytes(StandardCharsets.UTF_8), 2, false); emqKeeper.getMqttClient().publish(String.format(DOWNLOAD_TOPIC, reginParams.getUserModel().getUserId()), String.format(DOWN_LOAD_START_TEMP, uuid, fileName, new Date().getTime()).getBytes(StandardCharsets.UTF_8), 2, false);
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage()); log.error(e.getMessage());
} }
......
...@@ -1733,13 +1733,13 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI ...@@ -1733,13 +1733,13 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if (!subPostDictCodeList.isEmpty()) { if (!subPostDictCodeList.isEmpty()) {
result.addAll(iDataDictionaryService.lambdaQuery() result.addAll(iDataDictionaryService.lambdaQuery()
.in(DataDictionary::getCode, subPostDictCodeList) .in(DataDictionary::getCode, subPostDictCodeList)
.eq(DataDictionary::getType, "QYRYGW") .like(DataDictionary::getType, "QYRYGW")
.orderByAsc(DataDictionary::getSortNum) .orderByAsc(DataDictionary::getSortNum)
.list()); .list());
} else { } else {
result.addAll(iDataDictionaryService.lambdaQuery() result.addAll(iDataDictionaryService.lambdaQuery()
.in(DataDictionary::getParent, postCode) .in(DataDictionary::getParent, postCode)
.eq(DataDictionary::getType, "QYRYGW") .like(DataDictionary::getType, "QYRYGW")
.orderByAsc(DataDictionary::getSortNum) .orderByAsc(DataDictionary::getSortNum)
.list()); .list());
} }
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
"6546": [], "6546": [],
"6547": [], "6547": [],
"6548": [], "6548": [],
"6551": [],
"6616": [], "6616": [],
"6763": [], "6763": [],
"": [] "": []
...@@ -63,7 +62,6 @@ ...@@ -63,7 +62,6 @@
"6546": [], "6546": [],
"6550": [], "6550": [],
"6548": [], "6548": [],
"6551": [],
"6616": [], "6616": [],
"6617": [] "6617": []
} }
......
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