登录用户部门排序问题
This commit is contained in:
@@ -26,4 +26,6 @@ public class BaseVO implements Serializable {
|
||||
@ApiModelProperty("父节点id")
|
||||
private String pid;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ public class MonitorPointController extends BaseController {
|
||||
* @author zbj
|
||||
* @date 2022/7/28
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
|
||||
/*@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
|
||||
@PostMapping("/downloadMonitorEventWaveFile")
|
||||
@ApiOperation("监测点事件波形下载")
|
||||
@ApiImplicitParam(name = "waveFileParam", value = "波形下载参数", required = true)
|
||||
@@ -214,6 +214,6 @@ public class MonitorPointController extends BaseController {
|
||||
String methodDescribe = getMethodDescribe("downloadMonitorEventWaveFile");
|
||||
HttpServletResponse resp = eventAnalysisService.downloadMonitorEventWaveFile(waveFileParam, response);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resp, methodDescribe);
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public interface EventAnalysisService {
|
||||
* @author zbj
|
||||
* @date 2022/7/28
|
||||
*/
|
||||
HttpServletResponse downloadMonitorEventWaveFile(WaveFileParam waveFileParam, HttpServletResponse response) throws Exception;
|
||||
//HttpServletResponse downloadMonitorEventWaveFile(WaveFileParam waveFileParam, HttpServletResponse response) throws Exception;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1815,7 +1815,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
* @author zbj
|
||||
* @date 2022/7/28
|
||||
*/
|
||||
@Override
|
||||
/* @Override
|
||||
public HttpServletResponse downloadMonitorEventWaveFile(WaveFileParam waveFileParam, HttpServletResponse response) throws Exception {
|
||||
List<String> lineId = waveFileParam.getLineId();
|
||||
List<String> timeId = waveFileParam.getTimeId();
|
||||
@@ -1872,7 +1872,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
delFile(zipPath);
|
||||
deleteDirectoryLegacyIO(new File(generalInfo.getBusinessTempPath() + File.separator + "comtrade"));
|
||||
return response;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 复制保存文件
|
||||
|
||||
@@ -252,7 +252,6 @@ public class TransientServiceImpl implements TransientService {
|
||||
|
||||
@Override
|
||||
public void downloadWaveFile(List<String> eventIds, HttpServletResponse response) {
|
||||
|
||||
copyTempData(eventIds);
|
||||
zipCompress(new File(generalInfo.getBusinessTempPath() + File.separator + "comtrade"));
|
||||
String zipPath = generalInfo.getBusinessTempPath() + File.separator + "comtrade.zip";
|
||||
@@ -419,17 +418,18 @@ public class TransientServiceImpl implements TransientService {
|
||||
* 复制保存文件
|
||||
*/
|
||||
public void copyTempData(List<String> eventIds) {
|
||||
|
||||
|
||||
for (int i = 0; i < eventIds.size(); i++) {
|
||||
List<RmpEventDetailPO> rmpEventDetailPOList = eventDetailService.listByIds(eventIds);
|
||||
List<RmpEventDetailPO> nullWave = rmpEventDetailPOList.stream().filter(item->Objects.isNull(item.getWavePath())).collect(Collectors.toList());
|
||||
if(nullWave.size()!=0){
|
||||
throw new BusinessException("请选择存在波形的事件导出!");
|
||||
}
|
||||
if (CollUtil.isNotEmpty(rmpEventDetailPOList)) {
|
||||
for (int i = 0; i < rmpEventDetailPOList.size(); i++) {
|
||||
//根据监测点id获取监测点详情
|
||||
|
||||
RmpEventDetailPO rmpEventDetailPO = eventDetailService.getById(eventIds.get(i));
|
||||
if (Objects.nonNull(rmpEventDetailPO)) {
|
||||
LineDetailDataVO lineDetailData = lineFeignClient.getLineDetailData(rmpEventDetailPO.getMeasurementPointId()).getData();
|
||||
LineDetailDataVO lineDetailData = lineFeignClient.getLineDetailData(rmpEventDetailPOList.get(i).getMeasurementPointId()).getData();
|
||||
if (Objects.nonNull(lineDetailData)) {
|
||||
String ip = lineDetailData.getIp();
|
||||
String waveName = rmpEventDetailPO.getWavePath();
|
||||
String waveName = rmpEventDetailPOList.get(i).getWavePath();
|
||||
if (StrUtil.isBlank(ip) && StrUtil.isBlank(waveName)) {
|
||||
throw new BusinessException(EventResponseEnum.EVENT_NOT_FOUND);
|
||||
}
|
||||
@@ -488,7 +488,6 @@ public class TransientServiceImpl implements TransientService {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.user.pojo.vo;
|
||||
import com.njcn.web.pojo.vo.BaseVO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -12,6 +13,7 @@ import java.util.List;
|
||||
* @date 2022年04月15日 11:28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeptAllTreeVO extends BaseVO {
|
||||
|
||||
@ApiModelProperty("子节点详细信息")
|
||||
|
||||
@@ -60,29 +60,26 @@
|
||||
SELECT
|
||||
T3.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@codes AS _ids,
|
||||
(
|
||||
SELECT @codes := GROUP_CONCAT( id ) FROM sys_dept WHERE FIND_IN_SET( pid, @codes ) ) AS T1
|
||||
FROM
|
||||
sys_dept s,
|
||||
( SELECT @codes := #{id} ) T4
|
||||
WHERE
|
||||
@codes IS NOT NULL
|
||||
<if test="type != null">
|
||||
AND s.type in
|
||||
<foreach collection="type" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
) T2,
|
||||
sys_dept T3,
|
||||
sys_area T5
|
||||
WHERE
|
||||
FIND_IN_SET( T3.id, T2._ids )
|
||||
FIND_IN_SET( #{id}, T3.pids )
|
||||
and t3.type in
|
||||
<foreach collection="type" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND t3.area = t5.id
|
||||
AND t3.State = 1
|
||||
UNION
|
||||
SELECT
|
||||
T3.*
|
||||
FROM
|
||||
sys_dept T3,
|
||||
sys_area T5
|
||||
WHERE
|
||||
t3.area = t5.id
|
||||
and T3.id = #{id}
|
||||
AND t3.State = 1
|
||||
</select>
|
||||
|
||||
<select id="deptArea" resultType="String">
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -319,7 +320,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
return allDept.stream().filter(dept -> dept.getPid().equals(deptFirst.getId()))
|
||||
.peek(deptVo -> {
|
||||
deptVo.setChildren(getChildrens(deptVo, allDept));
|
||||
}).collect(Collectors.toList());
|
||||
}).sorted(Comparator.comparing(DeptAllTreeVO::getSort)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user