智慧梁场修改
This commit is contained in:
parent
63c1a71a9f
commit
dd10536a21
@ -13,12 +13,20 @@
|
|||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="queryById" resultMap="getProductionLineAndMakeBeamPedestals">
|
<select id="queryById" resultMap="getProductionLineAndMakeBeamPedestals">
|
||||||
select sbfpl.*, mb.smart_beam_field_make_beam_pedestal_id, mb.process_sort, bp.*
|
select sbfpl.*,
|
||||||
|
mb.smart_beam_field_make_beam_pedestal_id,
|
||||||
|
mb.process_sort,
|
||||||
|
bp.*,
|
||||||
|
group_concat(sbfp.process_name) pedestalProcess
|
||||||
from smart_beam_field_production_line sbfpl
|
from smart_beam_field_production_line sbfpl
|
||||||
left join smart_beam_field_production_line_to_make_beam_pedestal mb
|
left join smart_beam_field_production_line_to_make_beam_pedestal mb
|
||||||
on mb.smart_beam_field_production_line_id = sbfpl.id
|
on mb.smart_beam_field_production_line_id = sbfpl.id
|
||||||
left join smart_beam_field_make_beam_pedestal bp on mb.smart_beam_field_make_beam_pedestal_id = bp.id
|
left join smart_beam_field_make_beam_pedestal bp on mb.smart_beam_field_make_beam_pedestal_id = bp.id
|
||||||
|
left join smart_beam_field_make_beam_pedestal_to_process sbfmbptp
|
||||||
|
on bp.id = sbfmbptp.smart_beam_field_make_beam_pedestal_id
|
||||||
|
left join smart_beam_field_process sbfp on sbfmbptp.smart_beam_field_process_id = sbfp.id
|
||||||
where sbfpl.id = #{id}
|
where sbfpl.id = #{id}
|
||||||
order by sbfpl.id desc,mb.process_sort
|
group by bp.id
|
||||||
|
order by sbfpl.id desc, mb.process_sort
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -8,7 +8,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import com.zhgd.xmgl.enums.ParamEnum;
|
||||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeam;
|
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeam;
|
||||||
|
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldMakeBeamPedestal;
|
||||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldProductionLine;
|
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldProductionLine;
|
||||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldProductionLineToMakeBeamPedestal;
|
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldProductionLineToMakeBeamPedestal;
|
||||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamMapper;
|
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamMapper;
|
||||||
@ -108,7 +110,14 @@ public class SmartBeamFieldProductionLineServiceImpl extends ServiceImpl<SmartBe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SmartBeamFieldProductionLine queryById(String id) {
|
public SmartBeamFieldProductionLine queryById(String id) {
|
||||||
return baseMapper.queryById(id);
|
SmartBeamFieldProductionLine line = baseMapper.queryById(id);
|
||||||
|
List<SmartBeamFieldMakeBeamPedestal> beamPedestalList = line.getMakeBeamPedestals();
|
||||||
|
if (CollUtil.isNotEmpty(beamPedestalList)) {
|
||||||
|
for (SmartBeamFieldMakeBeamPedestal pedestal : beamPedestalList) {
|
||||||
|
pedestal.setPedestalTypeName(ParamEnum.getStr(ParamEnum.SmartBeamFieldMakeBeamPedestalPedestalTypeEnum.values(), pedestal.getPedestalType()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeam;
|
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeam;
|
||||||
|
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeamToSaveBeamPedestal;
|
||||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldSaveBeamDistrict;
|
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldSaveBeamDistrict;
|
||||||
|
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldSaveBeamPedestal;
|
||||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamMapper;
|
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamMapper;
|
||||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamToSaveBeamPedestalMapper;
|
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamToSaveBeamPedestalMapper;
|
||||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldSaveBeamDistrictMapper;
|
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldSaveBeamDistrictMapper;
|
||||||
@ -81,11 +83,13 @@ public class SmartBeamFieldSaveBeamDistrictServiceImpl extends ServiceImpl<Smart
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean delete(String id) {
|
public boolean delete(String id) {
|
||||||
List<SmartBeamFieldBeam> beamList = smartBeamFieldBeamMapper.selectList(new LambdaQueryWrapper<SmartBeamFieldBeam>()
|
List<SmartBeamFieldSaveBeamPedestal> pedestals = smartBeamFieldSaveBeamPedestalMapper.selectList(new LambdaQueryWrapper<SmartBeamFieldSaveBeamPedestal>()
|
||||||
.eq(SmartBeamFieldBeam::getSmartBeamFieldBridgeSectionId, id));
|
.eq(SmartBeamFieldSaveBeamPedestal::getSmartBeamFieldSaveBeamDistrictId, id));
|
||||||
for (SmartBeamFieldBeam beam : beamList) {
|
smartBeamFieldSaveBeamPedestalMapper.delete(new LambdaQueryWrapper<SmartBeamFieldSaveBeamPedestal>()
|
||||||
smartBeamFieldSaveBeamPedestalService.delete(String.valueOf(beam.getId()));
|
.eq(SmartBeamFieldSaveBeamPedestal::getSmartBeamFieldSaveBeamDistrictId, id));
|
||||||
|
for (SmartBeamFieldSaveBeamPedestal pedestal : pedestals) {
|
||||||
|
smartBeamFieldBeamToSaveBeamPedestalMapper.delete(new LambdaQueryWrapper<SmartBeamFieldBeamToSaveBeamPedestal>()
|
||||||
|
.eq(SmartBeamFieldBeamToSaveBeamPedestal::getSmartBeamFieldSaveBeamPedestalId, pedestal.getId()));
|
||||||
}
|
}
|
||||||
baseMapper.deleteById(id);
|
baseMapper.deleteById(id);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user