Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -30,31 +30,31 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="getBaseLineInfo" resultType="com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO">
|
<select id="getBaseLineInfo" resultType="com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO">
|
||||||
|
|
||||||
|
WITH temp AS(
|
||||||
|
select PQ_USER_LINE_ASS.LINE_INDEX LINE_INDEX,listagg(PQ_USER_LEDGER.CUSTOMER_NAME,';') within GROUP (order by PQ_USER_LEDGER.CUSTOMER_NAME) objName from PQ_USER_LINE_ASS ,PQ_USER_LEDGER where PQ_USER_LINE_ASS.USER_INDEX=PQ_USER_LEDGER.ID group by PQ_USER_LINE_ASS.LINE_INDEX
|
||||||
|
)
|
||||||
select
|
select
|
||||||
PQ_GDINFORMATION.name gdName,
|
PQ_GDINFORMATION.name gdName,
|
||||||
pq_line.GD_INDEX gdIndex,
|
pq_line.GD_INDEX gdIndex,
|
||||||
pq_line.line_index lineId,
|
pq_line.line_index lineId,
|
||||||
pq_line.name lineName,
|
pq_line.name lineName,
|
||||||
PQ_LINEDETAIL.objname objName,
|
|
||||||
PQ_SUBVOLTAGE.SUBV_INDEX busBarId,
|
PQ_SUBVOLTAGE.SUBV_INDEX busBarId,
|
||||||
PQ_SUBVOLTAGE.name busBarName,
|
PQ_SUBVOLTAGE.name busBarName,
|
||||||
pq_device.dev_index devId,
|
pq_device.dev_index devId,
|
||||||
pq_device.name devName,
|
pq_device.name devName,
|
||||||
pq_device.Status runFlag,
|
pq_device.Status runFlag,
|
||||||
PQ_SUBSTATION.sub_index stationId,
|
PQ_SUBSTATION.sub_index stationId,
|
||||||
PQ_SUBSTATION.name stationName
|
PQ_SUBSTATION.name stationName,
|
||||||
|
temp.objName objName
|
||||||
from
|
from
|
||||||
pq_line,
|
pq_line LEFT JOIN PQ_SUBVOLTAGE on pq_line.SUBV_INDEX = PQ_SUBVOLTAGE.SUBV_INDEX
|
||||||
PQ_LINEDETAIL,
|
LEFT JOIN
|
||||||
PQ_SUBVOLTAGE,
|
pq_device on PQ_SUBVOLTAGE.DEV_INDEX = pq_device.DEV_INDEX
|
||||||
pq_device,
|
LEFT JOIN PQ_SUBSTATION on pq_device.SUB_INDEX = PQ_SUBSTATION.SUB_INDEX
|
||||||
PQ_SUBSTATION,
|
LEFT JOIN PQ_GDINFORMATION on pq_line.GD_INDEX =PQ_GDINFORMATION.GD_INDEX
|
||||||
PQ_GDINFORMATION
|
LEFT JOIN temp on temp.LINE_INDEX = pq_line.LINE_INDEX
|
||||||
where pq_line.line_index = PQ_LINEDETAIL.line_index
|
where 1=1
|
||||||
and pq_line.SUBV_INDEX = PQ_SUBVOLTAGE.SUBV_INDEX
|
|
||||||
and PQ_SUBVOLTAGE.DEV_INDEX = pq_device.DEV_INDEX
|
|
||||||
and pq_device.SUB_INDEX = PQ_SUBSTATION.SUB_INDEX
|
|
||||||
and pq_line.GD_INDEX =PQ_GDINFORMATION.GD_INDEX
|
|
||||||
and pq_line.line_index in
|
and pq_line.line_index in
|
||||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.gather.event.devcie.mapper.PqLineMapper;
|
import com.njcn.gather.event.devcie.mapper.PqLineMapper;
|
||||||
import com.njcn.gather.event.devcie.pojo.po.PqLine;
|
import com.njcn.gather.event.devcie.pojo.po.PqLine;
|
||||||
import com.njcn.gather.event.devcie.service.PqLineService;
|
import com.njcn.gather.event.devcie.service.PqLineService;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@@ -27,6 +29,10 @@ public class PqLineServiceImpl extends ServiceImpl<PqLineMapper, PqLine> impleme
|
|||||||
@Override
|
@Override
|
||||||
public List<LedgerBaseInfoDTO> getBaseLineInfo(List<Integer> ids){
|
public List<LedgerBaseInfoDTO> getBaseLineInfo(List<Integer> ids){
|
||||||
List<LedgerBaseInfoDTO> ledgerBaseInfoDTOS = new ArrayList<>();
|
List<LedgerBaseInfoDTO> ledgerBaseInfoDTOS = new ArrayList<>();
|
||||||
|
|
||||||
|
if(CollectionUtils.isEmpty(ids)){
|
||||||
|
return ledgerBaseInfoDTOS;
|
||||||
|
}
|
||||||
if(ids.size()>1000){
|
if(ids.size()>1000){
|
||||||
List<List<Integer>> listIds = CollUtil.split(ids,1000);
|
List<List<Integer>> listIds = CollUtil.split(ids,1000);
|
||||||
for(List<Integer> itemIds : listIds){
|
for(List<Integer> itemIds : listIds){
|
||||||
|
|||||||
Reference in New Issue
Block a user