| | |
| | | package com.mes.edgstoragecage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJAbstractLambdaWrapper; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | |
| | | private HangzhouMesMapper hangzhouMesMapper; |
| | | @Autowired |
| | | private EdgStorageCageDetailsMapper edgStorageCageDetailsMapper; |
| | | |
| | | //获取磨边前缓存理片笼信息 |
| | | //识别 破损/拿走 |
| | | 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> 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") |
| | | 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 map; |
| | | }; |
| | | |
| | | return list; |
| | | } |
| | | //获取 工程下的当前版图 |
| | | @Override |
| | | public List<Map> setEdgStorageInfos(){ |
| | | return hangzhouMesMapper.selectCachInfo(); |
| | | 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; |
| | | }; |
| | | |
| | | |