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