切换mysql为达梦数据库-代码审查
1.supervision-boot模块
This commit is contained in:
@@ -14,10 +14,8 @@ import com.njcn.device.pms.pojo.param.*;
|
||||
import com.njcn.device.pms.pojo.po.*;
|
||||
import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService;
|
||||
import com.njcn.device.pms.service.majornetwork.ITerminalLogService;
|
||||
import com.njcn.device.pms.service.majornetwork.ITerminalService;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import io.netty.util.concurrent.FastThreadLocal;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
@@ -25,11 +23,8 @@ import org.aspectj.lang.annotation.*;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.security.auth.Subject;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
SELECT DISTINCT
|
||||
monitor.Org_Id AS orgId,
|
||||
monitor.Org_Name AS orgName,
|
||||
monitor.`Powerr_Id` AS powerId,
|
||||
monitor.`Powerr_Name` AS powerName,
|
||||
monitor.Powerr_Id AS powerId,
|
||||
monitor.Powerr_Name AS powerName,
|
||||
monitor.id AS monitorId,
|
||||
monitor.`Name` AS monitorName,
|
||||
monitor.Name AS monitorName,
|
||||
monitor.Line_Id,
|
||||
monitor.Line_Name,
|
||||
pdm.Monitor_Sort AS monitorSort,
|
||||
@@ -29,8 +29,8 @@
|
||||
((
|
||||
SELECT
|
||||
pm.id,
|
||||
pm.`Name`,
|
||||
pm.`Status`,
|
||||
pm.Name,
|
||||
pm.Status,
|
||||
pm.Org_Id,
|
||||
pm.Org_Name,
|
||||
pm.Powerr_Id,
|
||||
@@ -52,8 +52,8 @@
|
||||
(
|
||||
SELECT
|
||||
ppd.id,
|
||||
ppd.`Name`,
|
||||
ppd.`Status`,
|
||||
ppd.Name,
|
||||
ppd.Status,
|
||||
ppd.Org_Id,
|
||||
ppd.Org_Name,
|
||||
ppd.Power_Station_Id,
|
||||
@@ -66,8 +66,8 @@
|
||||
(
|
||||
SELECT
|
||||
ppc.id,
|
||||
ppc.`Name`,
|
||||
ppc.`Status`,
|
||||
ppc.Name,
|
||||
ppc.Status,
|
||||
ppc.Org_Id,
|
||||
ppc.Org_Name,
|
||||
ppc.Power_Station_Id,
|
||||
@@ -82,8 +82,8 @@
|
||||
(
|
||||
SELECT
|
||||
ppgu.id,
|
||||
ppgu.`Name`,
|
||||
ppgu.`Status`,
|
||||
ppgu.Name,
|
||||
ppgu.Status,
|
||||
ppgu.Org_Id,
|
||||
ppgu.Org_Name,
|
||||
ppgu.Power_Station_Id,
|
||||
@@ -97,8 +97,8 @@
|
||||
)) AS monitor
|
||||
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
||||
WHERE
|
||||
monitor.`Status` = 1
|
||||
AND pdm.`Status` = 1
|
||||
monitor.Status = 1
|
||||
AND pdm.Status = 1
|
||||
AND monitor.Org_Id IN
|
||||
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
||||
#{orgId}
|
||||
@@ -131,17 +131,17 @@
|
||||
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
||||
</if>
|
||||
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
||||
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPwPhotovoltaicMonitorList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
||||
SELECT DISTINCT
|
||||
monitor.Org_Id AS orgId,
|
||||
monitor.Org_Name AS orgName,
|
||||
monitor.`Powerr_Id` AS powerId,
|
||||
monitor.`Powerr_Name` AS powerName,
|
||||
monitor.Powerr_Id AS powerId,
|
||||
monitor.Powerr_Name AS powerName,
|
||||
monitor.id AS monitorId,
|
||||
monitor.`Name` AS monitorName,
|
||||
monitor.Name AS monitorName,
|
||||
monitor.Line_Id,
|
||||
monitor.Line_Name,
|
||||
pdm.Monitor_Sort AS monitorSort,
|
||||
@@ -158,8 +158,8 @@
|
||||
((
|
||||
SELECT
|
||||
pm.id,
|
||||
pm.`Name`,
|
||||
pm.`Status`,
|
||||
pm.Name,
|
||||
pm.Status,
|
||||
pm.Org_Id,
|
||||
pm.Org_Name,
|
||||
pm.Powerr_Id,
|
||||
@@ -180,8 +180,8 @@
|
||||
(
|
||||
SELECT
|
||||
ppd.id,
|
||||
ppd.`Name`,
|
||||
ppd.`Status`,
|
||||
ppd.Name,
|
||||
ppd.Status,
|
||||
ppd.Org_Id,
|
||||
ppd.Org_Name,
|
||||
ppd.Power_Station_Id,
|
||||
@@ -194,8 +194,8 @@
|
||||
) AS monitor
|
||||
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
||||
WHERE
|
||||
monitor.`Status` = 1
|
||||
AND pdm.`Status` = 1
|
||||
monitor.Status = 1
|
||||
AND pdm.Status = 1
|
||||
AND monitor.Org_Id IN
|
||||
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
||||
#{orgId}
|
||||
@@ -228,7 +228,7 @@
|
||||
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
||||
</if>
|
||||
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
||||
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@@ -239,26 +239,26 @@
|
||||
<select id="getPwMonitorName" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
||||
select
|
||||
id as monitorId,
|
||||
`Name` as monitorName
|
||||
Name as monitorName
|
||||
from
|
||||
((
|
||||
SELECT
|
||||
pm.id,
|
||||
pm.`Name`
|
||||
pm.Name
|
||||
FROM
|
||||
pms_monitor AS pm
|
||||
) UNION ALL
|
||||
(
|
||||
SELECT
|
||||
ppd.id,
|
||||
ppd.`Name`
|
||||
ppd.Name
|
||||
FROM
|
||||
pms_power_distributionarea AS ppd
|
||||
) UNION ALL
|
||||
(
|
||||
SELECT
|
||||
ppc.id,
|
||||
ppc.`Name`
|
||||
ppc.Name
|
||||
FROM
|
||||
pms_power_client as ppc
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
(
|
||||
SELECT
|
||||
ppgu.id,
|
||||
ppgu.`Name`
|
||||
ppgu.Name
|
||||
FROM
|
||||
pms_power_generation_user AS ppgu
|
||||
)
|
||||
@@ -280,15 +280,15 @@
|
||||
</if>
|
||||
</where>
|
||||
<if test="name !=null and name != ''">
|
||||
AND `Name` LIKE CONCAT('%',#{name},'%')
|
||||
AND Name LIKE CONCAT('%',#{name},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPwMonitorDataNewList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
||||
SELECT
|
||||
pdm.Org_Id AS orgId,
|
||||
ps.Org_Name AS orgName,
|
||||
pdm.`Power_Station_Id` AS powerId,
|
||||
ps.`Power_Name` AS powerName,
|
||||
pdm.Power_Station_Id AS powerId,
|
||||
ps.Power_Name AS powerName,
|
||||
pdm.Monitor_Id AS monitorId,
|
||||
pdm.Line_Id,
|
||||
pdm.Monitor_Sort AS monitorSort,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
Org_Id as Org_Id ,
|
||||
Voltage_Level as Voltage_Level,
|
||||
1 as If_Power_User,
|
||||
(select sd.id from sys_dict_data sd INNER JOIN sys_dict_type st on st.id=sd.Type_Id where sd.`Code`="Run" and st.`Code`="Line_State") as Monitor_State,
|
||||
(select sd.id from sys_dict_data sd INNER JOIN sys_dict_type st on st.id=sd.Type_Id where sd.Code="Run" and st.Code="Line_State") as Monitor_State,
|
||||
now() as Created_Date,
|
||||
1 as Status,
|
||||
now() as Create_Time,
|
||||
@@ -58,7 +58,7 @@
|
||||
Org_Id as Org_Id ,
|
||||
Voltage_Level as Voltage_Level,
|
||||
1 as If_Power_User,
|
||||
(select sd.id from sys_dict_data sd INNER JOIN sys_dict_type st on st.id=sd.Type_Id where sd.`Code`="Run" and st.`Code`="Line_State") as Monitor_State,
|
||||
(select sd.id from sys_dict_data sd INNER JOIN sys_dict_type st on st.id=sd.Type_Id where sd.Code="Run" and st.Code="Line_State") as Monitor_State,
|
||||
now() as Created_Date,
|
||||
1 as Status,
|
||||
now() as Create_Time,
|
||||
|
||||
@@ -95,14 +95,14 @@
|
||||
pm.Powerr_Id AS powerId,
|
||||
pm.Powerr_Name AS powerName,
|
||||
pm.Id AS monitorId,
|
||||
pm.`Name` AS monitorName,
|
||||
pm.Name AS monitorName,
|
||||
pm.Voltage_Level AS monitorVoltageLevel,
|
||||
pm.Monitor_Type AS monitorType,
|
||||
pm.Monitor_State AS monitorState
|
||||
FROM
|
||||
pms_monitor AS pm
|
||||
WHERE
|
||||
pm.`Status` = 1
|
||||
pm.Status = 1
|
||||
AND pm.Id IN
|
||||
<foreach collection="pmsMonitorInfoParam.monitorIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
@@ -126,7 +126,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pmsMonitorInfoParam.monitorName != null and pmsMonitorInfoParam.monitorName != ''">
|
||||
AND pm.`Name` LIKE CONCAT('%',#{pmsMonitorInfoParam.monitorName},'%')
|
||||
AND pm.Name LIKE CONCAT('%',#{pmsMonitorInfoParam.monitorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getMonitorTerminal" resultType="com.njcn.device.pms.pojo.vo.MonitorVO">
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
pg.id AS generatrixId,
|
||||
pm.Line_Name AS generatrixName,
|
||||
pm.Id AS monitorId,
|
||||
pm.`Name` AS monitorName,
|
||||
pm.Name AS monitorName,
|
||||
pg.Scale AS generatrixVoltageLevel
|
||||
FROM
|
||||
pms_generatrix_wire AS pg
|
||||
LEFT JOIN pms_monitor AS pm ON pm.line_id = pg.id
|
||||
WHERE
|
||||
pm.`Status` = 1
|
||||
AND pg.`Status` =1
|
||||
pm.Status = 1
|
||||
AND pg.Status =1
|
||||
AND pg.id IN
|
||||
<foreach collection="pmsGeneratrixParam.generatrixIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
@@ -54,8 +54,8 @@
|
||||
pms_generatrix_wire AS pg
|
||||
LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id
|
||||
WHERE
|
||||
pg.`Status` = 1
|
||||
AND pss.`Status` = 1
|
||||
pg.Status = 1
|
||||
AND pss.Status = 1
|
||||
<if test="param.powerStationId != null and param.powerStationId !=''">
|
||||
AND pss.Power_Id = #{param.powerStationId}
|
||||
</if>
|
||||
@@ -83,8 +83,8 @@
|
||||
pms_generatrix_wire AS pg
|
||||
LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id
|
||||
WHERE
|
||||
pg.`Status` = 1
|
||||
AND pss.`Status` = 1
|
||||
pg.Status = 1
|
||||
AND pss.Status = 1
|
||||
<if test="param.generatrixIds != null and param.generatrixIds.size() >0 ">
|
||||
AND pg.id IN
|
||||
<foreach collection="param.generatrixIds" item="item" open="(" close=")" separator=",">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<select id="selectPVCapacity" resultType="com.njcn.device.pms.pojo.vo.PVCapacity">
|
||||
SELECT
|
||||
sum( P_Capacity ) AS sumCount,
|
||||
( SELECT sum( `Photovoltaic_Capacity` ) FROM pms_power_distributionarea
|
||||
( SELECT sum( Photovoltaic_Capacity ) FROM pms_power_distributionarea
|
||||
<where>
|
||||
org_id IN
|
||||
<foreach collection="orgIds" item="item" open="(" close=")" separator=",">
|
||||
@@ -15,7 +15,7 @@
|
||||
AND STATUS = 1
|
||||
</where>
|
||||
) AS sumOrgCount,
|
||||
( SELECT sum( `Photovoltaic_Capacity` ) FROM pms_power_distributionarea
|
||||
( SELECT sum( Photovoltaic_Capacity ) FROM pms_power_distributionarea
|
||||
<where>
|
||||
org_id IN
|
||||
<foreach collection="orgIds" item="item" open="(" close=")" separator=",">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<select id="getMonitorInfo" resultType="com.njcn.device.pms.pojo.po.PmsMonitorPO">
|
||||
SELECT
|
||||
id,
|
||||
`Name`,
|
||||
Name,
|
||||
Org_Name AS orgName,
|
||||
Org_Id AS orgId,
|
||||
Operation_Name AS operationName,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<select id="selectList" resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisVO">
|
||||
SELECT
|
||||
pm.Id,
|
||||
pm.`Name`,
|
||||
pm.Name,
|
||||
pm.Org_Name,
|
||||
pm.Org_Id,
|
||||
pm.Powerr_Name,
|
||||
@@ -20,9 +20,9 @@
|
||||
LEFT JOIN pms_statation_stat ps ON pm.Powerr_Id = ps.Power_Id
|
||||
LEFT JOIN pms_special_monitor psm ON pm.Id = psm.id
|
||||
<where>
|
||||
pm.`Status` = 1
|
||||
AND ps.`Status` = 1
|
||||
AND pm.`Monitor_State` = #{status}
|
||||
pm.Status = 1
|
||||
AND ps.Status = 1
|
||||
AND pm.Monitor_State = #{status}
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND pm.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
@@ -99,7 +99,7 @@
|
||||
sum(t.Smelting_Load_Capacity) as capacity4
|
||||
FROM pms_statistics_special_monitor t
|
||||
<where>
|
||||
AND t.`Status` = 1
|
||||
AND t.Status = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
@@ -126,7 +126,7 @@
|
||||
sum(t.Smelting_Load_Capacity) as capacity4
|
||||
FROM pms_statistics_special_monitor t
|
||||
<where>
|
||||
AND t.`Status` = 1
|
||||
AND t.Status = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
@@ -154,7 +154,7 @@
|
||||
sum(t.Smelting_Load_Capacity) as capacity4
|
||||
FROM pms_statistics_special_monitor t
|
||||
<where>
|
||||
AND t.`Status` = 1
|
||||
AND t.Status = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
@@ -185,7 +185,7 @@
|
||||
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisRailwayVO">
|
||||
SELECT
|
||||
DISTINCT pts.Id,
|
||||
pts.`Name`,
|
||||
pts.Name,
|
||||
pts.Org_Name,
|
||||
pts.Railway_Line_Name,
|
||||
pts.Org_Id,
|
||||
@@ -200,8 +200,8 @@
|
||||
LEFT JOIN pms_statation_stat ps ON pts.Power_Id = ps.Power_Id
|
||||
LEFT JOIN pms_traction_station_expand ptse ON ptse.traction_Station_Id = pts.Id
|
||||
<where>
|
||||
pts.`Status` = 1
|
||||
AND ps.`Status` = 1
|
||||
pts.Status = 1
|
||||
AND ps.Status = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND pts.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
pm.Powerr_Name AS powerName,
|
||||
pgw.name AS busBarName,
|
||||
pm.Id AS monitorId,
|
||||
pm.`Name` AS monitorName,
|
||||
pm.Name AS monitorName,
|
||||
pss.Voltage_Level AS powerVoltageLevel
|
||||
FROM
|
||||
pms_monitor AS pm
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<select id="getPmsTractionStationInfo" resultType="com.njcn.device.pms.pojo.dto.PmsTractionStationDTO">
|
||||
SELECT
|
||||
pts.Id AS id,
|
||||
pts.`NAME` AS name,
|
||||
ptse.`railway_type` AS railwayType,
|
||||
pts.NAME AS name,
|
||||
ptse.railway_type AS railwayType,
|
||||
pts.Org_Name AS orgName,
|
||||
pts.Org_Id AS orgId,
|
||||
pts.Operation_Name AS operationName,
|
||||
@@ -24,7 +24,7 @@
|
||||
pts.Created_Date AS createdDate,
|
||||
pts.User_Tag AS userTag,
|
||||
pts.Is_Up_To_Grid AS isUpToGrid,
|
||||
pts.`STATUS` AS `status`,
|
||||
pts.STATUS AS status,
|
||||
pts.Create_By AS createBy,
|
||||
pts.Create_Time AS createTime,
|
||||
pts.Update_By AS updateBy,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
SELECT
|
||||
dev.id as id,
|
||||
dev.pid as pid,
|
||||
dev.NAME as `name`,
|
||||
dev.NAME as name,
|
||||
pd.Run_Flag as devFlag,
|
||||
b.*
|
||||
FROM
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
CONVERT (
|
||||
SUM( real_time )* 100 / SUM( due_time ),
|
||||
DECIMAL ( 15, 2 )) AS integrityRate,
|
||||
sum( real_time ) `realTime`,
|
||||
sum( real_time ) realTime,
|
||||
sum( due_time ) dueTime
|
||||
FROM
|
||||
r_stat_integrity_d
|
||||
|
||||
Reference in New Issue
Block a user