掰片查询修改为查卧式理片数据,钢化查询界面添加显示更多信息,去除重复玻璃id不能连续扫码限制,人工下片添加判断是否超尺寸
| | |
| | | now:'当前页显示', |
| | | tit:'条数据', |
| | | temperingqueries:'钢化查询', |
| | | specifytempering:'指定钢化', |
| | | specifytempering:'指定一炉', |
| | | specifyengineerid:'指定工程', |
| | | projectnumber:'工程号', |
| | | layoutnumber:'钢化版图号', |
| | | numberglasses:'玻璃数量', |
| | |
| | | :data="tableDatagh" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="engineer_id" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="150"/> |
| | | <el-table-column prop="tempering_layout_id" fixed align="center" :label="$t('searchOrder.layoutnumber')" min-width="120" /> |
| | | <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" min-width="150" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="150"> |
| | | <el-table-column prop="count2" align="center" :label="$t('总数量')" min-width="150" /> |
| | | <el-table-column prop="count1" align="center" :label="$t('笼子内数量')" min-width="150" /> |
| | | <el-table-column prop="count3" align="center" :label="$t('缺少数量')" min-width="150" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="250"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifytempering') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifyengineerid') }}</el-button> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | |
| | | * A09出片目标位置 d02卧转立 钢化出片 3001 |
| | | * A10出片目标位置 d05卧转立 人工出片 3002 |
| | | */ |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3002; |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3001; |
| | | public static final Integer ARTIFICIAL_OUT_TARGET_POSITION = 3002; |
| | | |
| | | /** |
| | |
| | | import com.github.yulichang.query.MPJLambdaQueryWrapper; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.mapper.DamageMapper; |
| | |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageMapper; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | |
| | | |
| | | @Autowired |
| | | EdgGlassTaskInfoService edgGlassTaskInfoService; |
| | | |
| | | @Autowired |
| | | BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | // |
| | | // @Override |
| | | // public boolean identWorn(Map<String, Object> arguments) { |
| | |
| | | */ |
| | | @Override |
| | | public List<List<Map<String, Object>>> selectCurrentCutTerritory(String current) { |
| | | //大理片笼进过的玻璃 |
| | | Map<String, BigStorageCageDetails> mapBigCage=bigStorageCageDetailsService.list( |
| | | new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getEngineerId,current) |
| | | .gt(BigStorageCageDetails::getState,Const.GLASS_STATE_NEW) |
| | | ).stream().collect(Collectors.toMap(BigStorageCageDetails::getGlassId,BigStorageCageDetails->BigStorageCageDetails,(V1,V2)->V2));; |
| | | |
| | | //结果 |
| | | List<Map<String, Object>> resultCutTerritory=new ArrayList<>(); |
| | |
| | | Map<String, EdgStorageCageDetails> edgMaps=baseMapper.selectList(new MPJLambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .selectAll(EdgStorageCageDetails.class) |
| | | .eq(EdgStorageCageDetails::getEngineerId,current) |
| | | .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | ).stream().collect(Collectors.toMap(EdgStorageCageDetails::getGlassId,EdgStorageCageDetails->EdgStorageCageDetails,(V1,V2)->V2)); |
| | | |
| | | Map<String, Damage> damageMaps=damageMapper.selectList(new MPJLambdaQueryWrapper<Damage>() |
| | |
| | | if(damageMaps.get(item.get("glass_id"))!=null){ |
| | | //log.info("玻璃已破损/拿走-----内容:{}",damageMaps.get(item.get("glass_id"))); |
| | | item.put("glass_state",damageMaps.get(item.get("glass_id")).getStatus()); |
| | | }else if(mapBigCage.get(item.get("glass_id"))!=null){ |
| | | //进过大理片笼 |
| | | item.put("glass_state",98); |
| | | }else if(edgMaps.get(item.get("glass_id"))!=null){ |
| | | item.put("glass_state",edgMaps.get(item.get("glass_id")).getState()); |
| | | }else{ |
| | |
| | | } |
| | | Map<String, List<Map<String, Object>>> groupBy=resultCutTerritory.stream().collect(Collectors.groupingBy(item->item.get("stock_id").toString())); |
| | | // List<List<Map<String, Object>>> Result=groupBy.values().stream().collect(Collectors.toList()); |
| | | return new ArrayList<>(groupBy.values()); |
| | | int count=1; |
| | | List<List<Map<String, Object>>> result=new ArrayList<>(); |
| | | for (String item : groupBy.keySet()) { |
| | | String key=count+""; |
| | | if(key!=null){ |
| | | result.add(groupBy.get(key)); |
| | | } |
| | | count++; |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | |
| | | enabled: false |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | mes: |
| | | threshold: 3 |
| | | ratio: 10 |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param state |
| | | */ |
| | | void updateBySlot(@Param(value = "list") List<UpdateBigStorageCageDTO> glassList, @Param(value = "state") int state); |
| | | |
| | | List<Map<String, Object>> selectTemperingGlassCount(); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectTemperingGlass() { |
| | | QueryWrapper<BigStorageCageDetails> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("engineer_id,tempering_layout_id,count(*) as count") |
| | | .in("state", Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL) |
| | | .groupBy("engineer_id,tempering_layout_id") |
| | | .orderByAsc("engineer_id") |
| | | .orderByAsc("tempering_layout_id"); |
| | | List<Map<String, Object>> TemperingGlass = baseMapper.selectMaps(wrapper); |
| | | return TemperingGlass; |
| | | List<Map<String, Object>> temperingGlass = baseMapper.selectTemperingGlassCount(); |
| | | return temperingGlass; |
| | | } |
| | | |
| | | @Override |
| | |
| | | judgeGlassTypeStatus(d01Id, Const.A09_OUT_TARGET_POSITION, mesD01Address); |
| | | edgGlassTaskInfoService.update(new LambdaUpdateWrapper<EdgGlassTaskInfo>() |
| | | .set(EdgGlassTaskInfo::getStatus, Const.EDG_GLASS_SUCCESS).eq(EdgGlassTaskInfo::getGlassId, d01Id)); |
| | | d01GlassId = d01Id; |
| | | // d01GlassId = d01Id; |
| | | } |
| | | } |
| | | // 状态为0不操作(D01送片,0不操作,1允许送片),请求字为1, 卧转立未启动 |
| | |
| | | judgeGlassTypeStatus(d04Id, Const.A10_OUT_TARGET_POSITION, mesD04Address); |
| | | edgGlassTaskInfoService.update(new LambdaUpdateWrapper<EdgGlassTaskInfo>() |
| | | .set(EdgGlassTaskInfo::getStatus, Const.EDG_GLASS_SUCCESS).eq(EdgGlassTaskInfo::getGlassId, d04Id)); |
| | | d04GlassId = d04Id; |
| | | // d04GlassId = d04Id; |
| | | } |
| | | } |
| | | Date endDate = new Date(); |
| | |
| | | minCount: 20 |
| | | carWidth: 5000 #大车宽度 |
| | | slotWidth: 5000 #大车宽度 |
| | | inCarMaxSize: 1 #进片大车最大存放玻璃数量 |
| | | inCarMaxSize: 0 #进片大车最大存放玻璃数量 |
| | | outCarMaxSize: 2 #出片大车最大存放玻璃数量 |
| | | glassGap: 350 #玻璃间距 |
| | | xMaxSize: 2800 |
| | |
| | | ) |
| | | </where> |
| | | </update> |
| | | |
| | | <select id="selectTemperingGlassCount" resultType="java.util.Map"> |
| | | select a.engineer_id,a.tempering_layout_id,count2,count1,count2-count1 as count3 from |
| | | (select engineer_id,tempering_layout_id,count(*) as count1 from big_storage_cage_details where state=100 group by engineer_id,tempering_layout_id) as a |
| | | left join |
| | | (select engineer_id,tempering_layout_id,count(*) as count2 from glass_info group by engineer_id,tempering_layout_id) as b |
| | | on a.engineer_id=b.engineer_id and a.tempering_layout_id=b.tempering_layout_id |
| | | order by a.engineer_id,a.tempering_layout_id |
| | | </select> |
| | | </mapper> |
| | |
| | | @PostMapping("/updateTemperingState") //钢化后显示出炉的版图信息 |
| | | public Result <Integer> updateTemperingState(@RequestBody Damage damage) { |
| | | if(damage.getStatus()>5) { |
| | | damage.setType(damage.getStatus()); |
| | | damage.setStatus(1); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | TemperingGlassInfo temperingGlassInfo=new TemperingGlassInfo(); |
| | | temperingGlassInfo.setState(damage.getStatus()); |
| | | temperingGlassInfo.setState(damage.getType()); |
| | | temperingGlassInfo.setGlassId(damage.getGlassId()); |
| | | int result=temperingGlassInfoService.updateTemperingState(temperingGlassInfo); |
| | | return Result.build(200, "破损成功", result); |
| | |
| | | //将任务插入理片笼详情表 |
| | | DownStorageCageDetails downStorageCageDetails = new DownStorageCageDetails(); |
| | | BeanUtils.copyProperties(glassInfo, downStorageCageDetails); |
| | | //当需要合并落架时不绑定层号 |
| | | if(glassInfo.getCombine()==0){ |
| | | downStorageCageDetails.setLayer(null); |
| | | } |
| | | downStorageCageDetails.setState(Const.GLASS_STATE_IN); |
| | | downStorageCageDetails.setSlot(nearestEmpty.getSlot()); |
| | | downStorageCageDetails.setDeviceId(nearestEmpty.getDeviceId()); |
| | |
| | | if (StringUtils.isNotBlank(glassId)) { |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId)); |
| | | BeanUtils.copyProperties(glassInfo, cageDetails); |
| | | //当需要合并落架时不绑定层号 |
| | | if(glassInfo.getCombine()==0){ |
| | | cageDetails.setLayer(null); |
| | | } |
| | | //获取当前笼子空格信息 |
| | | DownStorageCage empty = downStorageCageService.selectCacheEmpty(Integer.parseInt(currentSlot), Boolean.TRUE); |
| | | cageDetails.setSlot(empty.getSlot()); |
| | |
| | | return Boolean.FALSE; |
| | | } |
| | | } else { |
| | | DownWorkstation workstation = downWorkstationService.getOne(new LambdaUpdateWrapper<DownWorkstation>() |
| | | .eq(DownWorkstation::getFlowCardId, downStorageCageDetails.getFlowCardId()).eq(DownWorkstation::getLayer, downStorageCageDetails.getLayer())); |
| | | endCell = workstation.getWorkstationId(); |
| | | if (downStorageCageDetails.getWidth() > maxWidth || downStorageCageDetails.getHeight() > maxHeight) { |
| | | endCell = Const.G13_WORK_STATION; |
| | | } else { |
| | | DownWorkstation workstation = downWorkstationService.getOne(new LambdaUpdateWrapper<DownWorkstation>() |
| | | .eq(DownWorkstation::getFlowCardId, downStorageCageDetails.getFlowCardId()).eq(DownWorkstation::getLayer, downStorageCageDetails.getLayer())); |
| | | endCell = workstation.getWorkstationId(); |
| | | } |
| | | } |
| | | //更新落架玻璃数量 |
| | | if (endCell == Const.G13_WORK_STATION) { |