智慧梁场修改
This commit is contained in:
parent
63c1a71a9f
commit
dd10536a21
@ -13,12 +13,20 @@
|
||||
</collection>
|
||||
</resultMap>
|
||||
<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
|
||||
left join smart_beam_field_production_line_to_make_beam_pedestal mb
|
||||
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_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}
|
||||
order by sbfpl.id desc,mb.process_sort
|
||||
group by bp.id
|
||||
order by sbfpl.id desc, mb.process_sort
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -8,7 +8,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
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.SmartBeamFieldMakeBeamPedestal;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldProductionLine;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldProductionLineToMakeBeamPedestal;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamMapper;
|
||||
@ -108,7 +110,14 @@ public class SmartBeamFieldProductionLineServiceImpl extends ServiceImpl<SmartBe
|
||||
|
||||
@Override
|
||||
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
|
||||
|
||||
@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
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.SmartBeamFieldSaveBeamPedestal;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamMapper;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamToSaveBeamPedestalMapper;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldSaveBeamDistrictMapper;
|
||||
@ -81,11 +83,13 @@ public class SmartBeamFieldSaveBeamDistrictServiceImpl extends ServiceImpl<Smart
|
||||
|
||||
@Override
|
||||
public boolean delete(String id) {
|
||||
List<SmartBeamFieldBeam> beamList = smartBeamFieldBeamMapper.selectList(new LambdaQueryWrapper<SmartBeamFieldBeam>()
|
||||
.eq(SmartBeamFieldBeam::getSmartBeamFieldBridgeSectionId, id));
|
||||
for (SmartBeamFieldBeam beam : beamList) {
|
||||
smartBeamFieldSaveBeamPedestalService.delete(String.valueOf(beam.getId()));
|
||||
|
||||
List<SmartBeamFieldSaveBeamPedestal> pedestals = smartBeamFieldSaveBeamPedestalMapper.selectList(new LambdaQueryWrapper<SmartBeamFieldSaveBeamPedestal>()
|
||||
.eq(SmartBeamFieldSaveBeamPedestal::getSmartBeamFieldSaveBeamDistrictId, id));
|
||||
smartBeamFieldSaveBeamPedestalMapper.delete(new LambdaQueryWrapper<SmartBeamFieldSaveBeamPedestal>()
|
||||
.eq(SmartBeamFieldSaveBeamPedestal::getSmartBeamFieldSaveBeamDistrictId, id));
|
||||
for (SmartBeamFieldSaveBeamPedestal pedestal : pedestals) {
|
||||
smartBeamFieldBeamToSaveBeamPedestalMapper.delete(new LambdaQueryWrapper<SmartBeamFieldBeamToSaveBeamPedestal>()
|
||||
.eq(SmartBeamFieldBeamToSaveBeamPedestal::getSmartBeamFieldSaveBeamPedestalId, pedestal.getId()));
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
return true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user