fix: 优化bug
This commit is contained in:
parent
c3dbe858b4
commit
326a397559
@ -1095,6 +1095,9 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
|||||||
"t.WDDT AS wddt, " +
|
"t.WDDT AS wddt, " +
|
||||||
"t.ORDER_INDEX AS orderIndex, " +
|
"t.ORDER_INDEX AS orderIndex, " +
|
||||||
"t.REMARK AS remark, " +
|
"t.REMARK AS remark, " +
|
||||||
|
"t.STINDX AS stindx, " +
|
||||||
|
"t.COENVW_STATE AS coenvwState, " +
|
||||||
|
"CASE t.DVTP WHEN '1' THEN '堤坝式' WHEN '2' THEN '引水式' WHEN '3' THEN '混合式' ELSE '未知' END AS dvtpName, " +
|
||||||
"t.VLSR AS vlsr, " +
|
"t.VLSR AS vlsr, " +
|
||||||
"t.VLSR_TM AS vlsrTm, " +
|
"t.VLSR_TM AS vlsrTm, " +
|
||||||
"t.RECORD_USER AS recordUser, " +
|
"t.RECORD_USER AS recordUser, " +
|
||||||
|
|||||||
@ -3396,8 +3396,8 @@ public class EngEqDataServiceImpl implements EngEqDataService {
|
|||||||
"eng.DTIN AS dtin, " +
|
"eng.DTIN AS dtin, " +
|
||||||
"NVL(hb.ORDER_INDEX, 999999) AS baseStepSort, " +
|
"NVL(hb.ORDER_INDEX, 999999) AS baseStepSort, " +
|
||||||
"NVL(along.ORDER_INDEX, 999999) AS rvcdStepSort, " +
|
"NVL(along.ORDER_INDEX, 999999) AS rvcdStepSort, " +
|
||||||
"NVL(eng.ORDER_INDEX, 999999) AS rstcdStepSort, " +
|
"NVL(c.SORT, 999999) AS rstcdStepSort, " +
|
||||||
"NVL(eng.ORDER_INDEX, 999999) AS siteStepSort " +
|
"NVL(d.SORT, 999999) AS siteStepSort " +
|
||||||
"FROM SD_ENGINFO_B_H eng " +
|
"FROM SD_ENGINFO_B_H eng " +
|
||||||
"INNER JOIN SD_PWR_B_H pbh ON pbh.STCD= eng.STCD " +
|
"INNER JOIN SD_PWR_B_H pbh ON pbh.STCD= eng.STCD " +
|
||||||
"LEFT JOIN SD_RSVRFCCH_B_H rbh ON rbh.STCD= eng.STCD " +
|
"LEFT JOIN SD_RSVRFCCH_B_H rbh ON rbh.STCD= eng.STCD " +
|
||||||
@ -3406,7 +3406,9 @@ public class EngEqDataServiceImpl implements EngEqDataService {
|
|||||||
"LEFT JOIN SD_ADDVCD_DIC ad ON ad.ADDVCD = eng.ADDVCD" +
|
"LEFT JOIN SD_ADDVCD_DIC ad ON ad.ADDVCD = eng.ADDVCD" +
|
||||||
" AND NVL(hbrv.IS_DELETED, 0) = 0 AND NVL(hbrv.ENABLED, 1) = 1 " +
|
" AND NVL(hbrv.IS_DELETED, 0) = 0 AND NVL(hbrv.ENABLED, 1) = 1 " +
|
||||||
"LEFT JOIN SD_RVCD_DIC rv ON rv.RVCD = eng.RVCD " +
|
"LEFT JOIN SD_RVCD_DIC rv ON rv.RVCD = eng.RVCD " +
|
||||||
"LEFT JOIN MS_ALONG_B along ON along.RVCD = eng.HBRVCD AND along.CODE = 'common' AND NVL(along.IS_DELETED, 0) = 0 " +
|
"LEFT JOIN MS_ALONG_B along ON along.BASEID = eng.BASE_ID AND along.CODE = 'common' AND NVL(along.IS_DELETED, 0) = 0 " +
|
||||||
|
"LEFT JOIN (select c.SORT,d.BASEID,d.RVCD,c.STCD from MS_ALONGDET_B c inner join MS_ALONG_B d on c.ALONG_ID=d.ID where c.IS_DELETED=0 and d.IS_DELETED=0 and d.CODE='common') c on c.BASEID=eng.BASE_ID and c.stcd=eng.STCD \n" +
|
||||||
|
"LEFT JOIN (select c.SORT,d.BASEID,d.RVCD,c.STCD from MS_ALONGDET_B c inner join MS_ALONG_B d on c.ALONG_ID=d.ID where c.IS_DELETED=0 and d.IS_DELETED=0 and d.CODE='common') d on d.BASEID=eng.BASE_ID and d.stcd=eng.STCD "+
|
||||||
"WHERE NVL(eng.IS_DELETED, 0) = 0";
|
"WHERE NVL(eng.IS_DELETED, 0) = 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ public interface AlongListMapper extends BaseMapper<SdAlongVO> {
|
|||||||
" and MAB.RVCD=#{rvcd} " +
|
" and MAB.RVCD=#{rvcd} " +
|
||||||
" </if>" +
|
" </if>" +
|
||||||
" <if test='baseId != null and baseId != \"\"'>" +
|
" <if test='baseId != null and baseId != \"\"'>" +
|
||||||
" and MAB.RVCD in (select HBRVCD from SD_HBRV_DIC where IS_DELETED=0 and ENABLED=1 and BASEID=#{baseId}) " +
|
" and MAB.BASEID in (select BASEID from SD_HYDROBASE where IS_DELETED=0 and ENABLED=1 and BASEID=#{baseId}) " +
|
||||||
" </if>" +
|
" </if>" +
|
||||||
" union all " +
|
" union all " +
|
||||||
" select " +
|
" select " +
|
||||||
@ -93,7 +93,7 @@ public interface AlongListMapper extends BaseMapper<SdAlongVO> {
|
|||||||
" and MAB.RVCD=#{rvcd} " +
|
" and MAB.RVCD=#{rvcd} " +
|
||||||
" </if>" +
|
" </if>" +
|
||||||
" <if test='baseId != null and baseId != \"\"'>" +
|
" <if test='baseId != null and baseId != \"\"'>" +
|
||||||
" and MAB.RVCD in (select HBRVCD from SD_HBRV_DIC where IS_DELETED=0 and ENABLED=1 and BASEID=#{baseId}) " +
|
" and MAB.BASEID in (select BASEID from SD_HYDROBASE where IS_DELETED=0 and ENABLED=1 and BASEID=#{baseId}) " +
|
||||||
" </if>" +
|
" </if>" +
|
||||||
") T order by rvcdSort asc, sort asc" +
|
") T order by rvcdSort asc, sort asc" +
|
||||||
"</script>")
|
"</script>")
|
||||||
@ -117,7 +117,7 @@ public interface AlongListMapper extends BaseMapper<SdAlongVO> {
|
|||||||
"and MAB.RVCD=#{rvcd} " +
|
"and MAB.RVCD=#{rvcd} " +
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"<if test='baseId != null and baseId != \"\"'>" +
|
"<if test='baseId != null and baseId != \"\"'>" +
|
||||||
"and MAB.RVCD in (select HBRVCD from SD_HBRV_DIC where IS_DELETED=0 and ENABLED=1 and BASEID=#{baseId}) " +
|
"and MAB.BASEID in (select BASEID from SD_HYDROBASE where IS_DELETED=0 and ENABLED=1 and BASEID=#{baseId}) " +
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"order by MAB.ORDER_INDEX asc, SAD.SORT asc, SWR.TM desc" +
|
"order by MAB.ORDER_INDEX asc, SAD.SORT asc, SWR.TM desc" +
|
||||||
") where ROWNUM=1" +
|
") where ROWNUM=1" +
|
||||||
|
|||||||
@ -1923,7 +1923,7 @@ public class WeFishServiceImpl implements WeFishService {
|
|||||||
List<String> rstcdList,
|
List<String> rstcdList,
|
||||||
Map<String, Object> paramMap) {
|
Map<String, Object> paramMap) {
|
||||||
StringBuilder sql = new StringBuilder();
|
StringBuilder sql = new StringBuilder();
|
||||||
sql.append("SELECT t.HBRVCD AS hbrvcd, t.YR AS yr ")
|
sql.append("SELECT t.BASE_ID AS hbrvcd, t.YR AS yr ")
|
||||||
.append("FROM (")
|
.append("FROM (")
|
||||||
.append("SELECT section.HBRVCD, section.RSTCD, section.BASE_ID, TO_CHAR(we.TM, 'yyyy') AS yr ")
|
.append("SELECT section.HBRVCD, section.RSTCD, section.BASE_ID, TO_CHAR(we.TM, 'yyyy') AS yr ")
|
||||||
.append("FROM SD_WE_B_H section ")
|
.append("FROM SD_WE_B_H section ")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user