| | |
| | | public Result<List<HollowBigStorageAndDetailsDTO>> queryHollowBigStorageCageDetail(@RequestBody HollowBigStorageDetailsQueryVO query) { |
| | | return Result.build(200, "查询成功", hollowBigStorageCageService.queryHollowBigStorageCageDetail(query)); |
| | | } |
| | | |
| | | @ApiOperation("复位:重置理片笼基础信息1、清除笼内状态为0的脏数据;2将空格子的尺寸置为初始尺寸 3、将不在笼内的流程卡的关系表重置") |
| | | @PostMapping("/resetCage") |
| | | public Result<Boolean> resetCage() { |
| | | return Result.build(200, "重置成功", hollowBigStorageCageService.resetCage()); |
| | | } |
| | | } |
| | | |
| | |
| | | void updateDeviceIdBySlot(@Param("list") List<Integer> slotList); |
| | | |
| | | List<HollowBigStorageCageDetails> queryPairGlassList(@Param("flowCardId")String flowCardId, @Param("totalLayer")Integer totalLayer, @Param("totalPairQuantity")Integer totalPairQuantity,@Param("isOut") Integer isOut); |
| | | |
| | | List<FlowCardVirtualSlotDTO> queryFlowCardIdsAndLayer(); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | Boolean updateHollowStorageCageDisabled(int slot, int enableState); |
| | | |
| | | List<FlowCardVirtualSlotDTO> queryFlowCardIdsAndLayer(); |
| | | } |
| | | |
| | |
| | | Map<Integer, List<HollowBigStorageCage>> queryHollowbigStorageCageDetail(); |
| | | |
| | | List<Map<String, Object>> selectBigStorageCageUsage(); |
| | | |
| | | /** |
| | | * 复位:重置理片笼基础信息1、清除笼内状态为0的脏数据;2将空格子的尺寸置为初始尺寸 3、将不在笼内的流程卡的关系表重置 |
| | | * @return |
| | | */ |
| | | Boolean resetCage(); |
| | | } |
| | | |
| | |
| | | .eq(HollowBigStorageCage::getSlot, slot)); |
| | | } |
| | | |
| | | @Override |
| | | public List<FlowCardVirtualSlotDTO> queryFlowCardIdsAndLayer() { |
| | | return baseMapper.queryFlowCardIdsAndLayer(); |
| | | } |
| | | |
| | | private List<HollowBigStorageAndDetailsDTO> hollowBigStorageCageDetailsChild(String glassId, Integer deviceId, Integer slot, int state) { |
| | | //将对应格子号的玻璃id置为101 |
| | | this.update(new LambdaUpdateWrapper<HollowBigStorageCageDetails>() |
| | |
| | | package com.mes.hollow.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.hollow.entity.HollowBigStorageCage; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.dto.FlowCardVirtualSlotDTO; |
| | | import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.mapper.HollowBigStorageCageMapper; |
| | | import com.mes.hollow.mapper.HollowGlassRelationInfoMapper; |
| | | import com.mes.hollow.service.HollowBigStorageCageDetailsService; |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | |
| | | |
| | | @Value("${mes.slotWidth}") |
| | | private Integer slotWidth; |
| | | |
| | | @Resource |
| | | private HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService; |
| | | @Resource |
| | | private HollowGlassRelationInfoMapper hollowGlassRelationInfoMapper; |
| | | |
| | | @Override |
| | | public List<HollowBigStorageAndDetailsDTO> queryHollowBigStorageCageDetail(HollowBigStorageDetailsQueryVO query) { |
| | | MPJLambdaWrapper<HollowBigStorageCage> wrapper = new MPJLambdaWrapper<>(); |
| | |
| | | .groupBy("device_id"); |
| | | return baseMapper.selectMaps(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean resetCage() { |
| | | // 复位:重置理片笼基础信息1、清除笼内状态为0的脏数据; |
| | | hollowBigStorageCageDetailsService.remove(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_NEW)); |
| | | // 2将空格子的尺寸置为初始尺寸 |
| | | this.update(new LambdaUpdateWrapper<HollowBigStorageCage>() |
| | | .set(HollowBigStorageCage::getRemainWidth, slotWidth) |
| | | .notIn(HollowBigStorageCage::getSlot, "select distinct slot from hollow_big_storage_cage_details where state in( 100 , 102 , 103 ,104)")); |
| | | // 3、将不在笼内的流程卡的关系表重置 |
| | | // 仅获取理片笼内的流程卡信息避免玻璃 |
| | | List<FlowCardVirtualSlotDTO> list = hollowBigStorageCageDetailsService.queryFlowCardIdsAndLayer(); |
| | | for (FlowCardVirtualSlotDTO item : list) { |
| | | hollowGlassRelationInfoMapper.clearDirtyFlowCardData(item.getFlowCardId(), item.getLayer()); |
| | | } |
| | | return Boolean.TRUE; |
| | | } |
| | | } |
| | | |
| | |
| | | <select id="hollowIsAll" resultMap="baseMap"> |
| | | WITH sum_flow_layer_count AS ( SELECT flow_card_id, layer, min( films_id ) AS films_id, min(thickness) as |
| | | thickness,count(*) AS sum_count FROM hollow_glass_relation_info GROUP BY flow_card_id, layer ), |
| | | real_flow_layer_count AS ( SELECT flow_card_id, layer, count(*) AS real_count, count(distinct slot) as slot_count FROM |
| | | real_flow_layer_count AS ( SELECT flow_card_id, layer, count(*) AS real_count, count(distinct slot) as |
| | | slot_count FROM |
| | | hollow_big_storage_cage_details t WHERE state = 100 GROUP BY flow_card_id, layer ), |
| | | damage_flow_layer_count AS ( SELECT process_id AS flow_card_id, technology_number AS layer, count(*) as |
| | | damage_count FROM damage where type in(8,9) GROUP BY process_id, technology_number ), |
| | |
| | | </select> |
| | | <select id="queryHollowbigStorageCageDetail" resultType="com.mes.base.entity.vo.BigStorageVO"> |
| | | select hbsc.device_id, hbsc.slot, count(hbscd.glass_id) as count |
| | | from hollow_big_storage_cage hbsc left join hollow_big_storage_cage_details hbscd |
| | | on hbsc.slot=hbscd.slot and hbscd.state in (100, 102, 103, 104) |
| | | from hollow_big_storage_cage hbsc |
| | | left join hollow_big_storage_cage_details hbscd |
| | | on hbsc.slot = hbscd.slot and hbscd.state in (100, 102, 103, 104) |
| | | group by hbsc.device_id, hbsc.slot |
| | | order by hbsc.device_id, hbsc.slot |
| | | </select> |
| | |
| | | inner join hollow_sequence_temp t1 on t.hollow_sequence = t1.hollow_sequence |
| | | ORDER BY t.hollow_sequence |
| | | </select> |
| | | <select id="queryFlowCardIdsAndLayer" resultType="com.mes.hollow.entity.dto.FlowCardVirtualSlotDTO"> |
| | | select flow_card_id, layer |
| | | from hollow_big_storage_cage_details |
| | | where state in (100, 102, 103, 104) |
| | | group by flow_card_id, layer |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <update id="clearDirtyFlowCardData"> |
| | | update hollow_glass_relation_info |
| | | set glass_id = null, |
| | | tempering_layout_id = null, |
| | | set glass_id = null, |
| | | tempering_layout_id = null, |
| | | tempering_feed_sequence = null, |
| | | engineer_id = null, |
| | | state = 0 |
| | | engineer_id = null, |
| | | state = 0 |
| | | where flow_card_id = #{flowCardId} |
| | | and layer = #{layer} |
| | | and glass_id not in ( |
| | | select glass_id |
| | | from hollow_big_storage_cage_details |
| | | where flow_card_id = #{flowCardId} and layer = #{layer} and state = 100 |
| | | where flow_card_id = #{flowCardId} |
| | | and layer = #{layer} |
| | | and state in (100, 102, 103, 104) |
| | | ) |
| | | </update> |
| | | </mapper> |