| | |
| | | package com.mes.edgstoragecage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageDetailsMapper; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | |
| | | public class EdgStorageCageDetailsServiceImpl extends ServiceImpl<EdgStorageCageDetailsMapper, EdgStorageCageDetails> implements EdgStorageCageDetailsService { |
| | | //获取全部数据 |
| | | @Autowired |
| | | private HangzhouMesMapper hangzhouMesMapper; |
| | | @Autowired |
| | | private EdgStorageCageDetailsMapper edgStorageCageDetailsMapper; |
| | | |
| | | //获取磨边前缓存理片笼信息 |
| | | @Override |
| | | public List<Map> getEdgStorageInfos() { |
| | | List<Map> map = edgStorageCageDetailsMapper.selectJoinList( |
| | | Map.class, new MPJQueryWrapper<EdgStorageCage>().selectAll(EdgStorageCage.class) |
| | | .select("a.c", "a.d") |
| | | .leftJoin("ab a on t.id=a.id") |
| | | .le("a.id", "1") |
| | | ); |
| | | return map; |
| | | //识别 破损/拿走 |
| | | public boolean identWorn(String glassid, int ControlsId) { |
| | | List<EdgStorageCageDetails> edgStorageCageDetails = edgStorageCageDetailsMapper.selectList(new QueryWrapper<EdgStorageCageDetails>().eq("glassid", glassid)); |
| | | if (edgStorageCageDetails.size() == 1) { |
| | | edgStorageCageDetailsMapper.update(edgStorageCageDetails.get(0), new QueryWrapper<EdgStorageCageDetails>().eq("glassid", glassid)); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | ; |
| | | |
| | | //获取 切割当前版图 |
| | | @Override |
| | | public List<Map> setEdgStorageInfos() { |
| | | return hangzhouMesMapper.selectCachInfo(); |
| | | public List<Map> selectCutTerritory() { |
| | | List<Map> list = edgStorageCageDetailsMapper.selectJoinList( |
| | | Map.class, new MPJQueryWrapper<EdgStorageCageDetails>().selectAll(EdgStorageCageDetails.class) |
| | | .select("escd.glass_id", "escd.flow_card_id", "escd.width", "escd.height") |
| | | .leftJoin("glass_info gi on t.layout_sequence=gi.pattern_sequence and t.engineering_id=gi.engineer_id") |
| | | .leftJoin("edg_storage_cage_details escd on gi.id=escd.glass_id") |
| | | .eq("state", 1) |
| | | .orderByAsc("t.layout_sequence") |
| | | ); |
| | | return list; |
| | | } |
| | | |
| | | //获取 工程下的当前版图 |
| | | @Override |
| | | public List<Map> selectCurrentCutTerritory(String current) { |
| | | List<Map> list = edgStorageCageDetailsMapper.selectJoinList( |
| | | Map.class, new MPJQueryWrapper<EdgStorageCageDetails>().selectAll(EdgStorageCageDetails.class) |
| | | .select("escd.glass_id", "escd.flow_card_id", "escd.width", "escd.height") |
| | | .leftJoin("glass_info gi on t.layout_sequence=gi.pattern_sequence and t.engineering_id=gi.engineer_id") |
| | | .leftJoin("edg_storage_cage_details escd on gi.id=escd.glass_id") |
| | | .eq("t.engineering_id", current) |
| | | .orderByAsc("t.layout_sequence") |
| | | ); |
| | | return list; |
| | | } |
| | | |
| | | ; |