| | |
| | | |
| | | List<AgvLocDetl> getStockStatis1(Map<String, Object> map); |
| | | |
| | | |
| | | Integer getStockStatisCount(Map<String, Object> map); |
| | | |
| | | @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where b.loc_sts = 'F' and a.matnr = #{matnr} AND a.three_code = #{threeCode}") |
| | |
| | | |
| | | |
| | | @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where b.floor = 1 AND a.matnr = #{matnr} AND a.three_code = #{threeCode} AND a.process_sts != 1 AND (b.loc_sts = 'F' or b.loc_sts = 'R')") |
| | | Double selectSumAnfmeByMatnr2(@Param("matnr") String matnr,@Param("threeCode") String threeCode,@Param("floor") Integer floor); |
| | | Double selectSumAnfmeByMatnr22(@Param("matnr") String matnr,@Param("threeCode") String threeCode,@Param("floor") Integer floor); |
| | | |
| | | @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where (b.loc_sts = 'F' or b.loc_sts = 'R') AND b.floor != 2 AND a.matnr = #{matnr} AND a.three_code = #{threeCode} AND a.process_sts != 1") |
| | | Double selectSumAnfmeByMatnr3(@Param("matnr") String matnr,@Param("threeCode") String threeCode,@Param("floor") Integer floor); |
| | |
| | | |
| | | @Override |
| | | public Double getSumAnfmeDb(String matnr, String threeCode, Integer floor) { |
| | | return this.baseMapper.selectSumAnfmeByMatnr2(matnr, threeCode, floor); |
| | | return this.baseMapper.selectSumAnfmeByMatnr22(matnr, threeCode, floor); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.AgvLocMast; |
| | | import com.zy.asrs.entity.AgvLocRule; |
| | | import com.zy.asrs.mapper.AgvLocMastMapper; |
| | |
| | | @Override |
| | | public AgvLocMast selectEmptyZpallet(int type, int floor) { |
| | | |
| | | return this.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_sts","D").eq("loc_type2",type).eq("floor",floor)); |
| | | return this.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_sts","D").eq("loc_type2",type).eq("floor",floor).orderBy("lev1",true)); |
| | | |
| | | } |
| | | |
| | |
| | | // TODO: 四期 |
| | | List<AgvWrkDetl> agvWrkDetls = agvWrkDetlService.selectList(new EntityWrapper<AgvWrkDetl>().eq("supp_code", param.getBarcode())); |
| | | String factory = param.getFactory(); |
| | | AgvLocMast newLocMast = agvCommonService.getLocByLocRule(3, 1, factory); |
| | | AgvLocMast newLocMast = agvCommonService.getLocByLocRule(3, 1, factory,false); |
| | | if (newLocMast == null) { |
| | | throw new CoolException("无可用库位"); |
| | | } |
| | |
| | | // //agvLocMast = agvCommonService.getLocNo(locType,agvBasDevp.getFloor(),false,false); |
| | | // } |
| | | // } |
| | | agvLocMast = agvCommonService.getLocByLocRule(3, 1, code); |
| | | agvLocMast = agvCommonService.getLocByLocRule(3, 1, code,false); |
| | | |
| | | |
| | | String devNo = agvBasDevp.getDevNo(); |
| | |
| | | } else if (sourceLocNo.endsWith("01F1") && !locNo.startsWith("YZ") && locNo.endsWith("F4")) { |
| | | // 从吸塑一楼的库位到吸塑二楼的点位上 |
| | | return true; |
| | | }else if (sourceLocNo.endsWith("02F1") && !locNo.startsWith("YZ") && locNo.endsWith("F1")) { |
| | | // 从吸塑er楼的kuwei到吸塑一楼的dianwei |
| | | return true; |
| | | } |
| | | } else { |
| | | if (sourceLocNo.endsWith("F4") && locNo.startsWith("YZ") && locNo.endsWith("01F2")) { |
| | |
| | | } else if (sourceLocNo.endsWith("F4") && locNo.startsWith("YZ") && locNo.endsWith("01F1")) { |
| | | // 从吸塑二楼的点位到吸塑一楼的库位 |
| | | return true; |
| | | }else if (sourceLocNo.endsWith("F1") && locNo.startsWith("YZ") && locNo.endsWith("02F1")) { |
| | | // 从吸塑二楼的点位到吸塑一楼的库位 |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | |
| | | boolean flag = false; |
| | | if (config != null && !Cools.isEmpty(config.getValue())) { |
| | | try { |
| | | |
| | | // 判断是否在执行时间内 |
| | | ProcesTimeData procesTimeData = JSONObject.parseObject(config.getValue(), ProcesTimeData.class); |
| | | if (procesTimeData != null && config.getStatus() == 1 && TimeUtils.between(procesTimeData)) { |
| | |
| | | try { |
| | | autoMoveHandler.autoEmptyBack4(agvLocMast); |
| | | } catch (Exception e) { |
| | | log.error("库位号" + agvLocMast.getLocNo() + "空板自动回库 库位-接驳点 库位-吸塑车间,处理失败:===》异常原因:" + e.getMessage()); |
| | | //log.error("库位号" + agvLocMast.getLocNo() + "空板自动回库 库位-接驳点 库位-吸塑车间,处理失败:===》异常原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | } else { |
| | | try { |
| | | autoMoveHandler.autoEmptyBack4(agvLocMast); |
| | | } catch (Exception e) { |
| | | log.error("库位号" + agvLocMast.getLocNo() + "空板自动回库 库位-接驳点 库位-吸塑车间,处理失败:===》异常原因:" + e.getMessage()); |
| | | //log.error("库位号" + agvLocMast.getLocNo() + "空板自动回库 库位-接驳点 库位-吸塑车间,处理失败:===》异常原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.constant.AsrsConstants; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.MesBuyPakinReportParam; |
| | | import com.zy.asrs.entity.param.MesOrderReportParam; |
| | |
| | | //目标站点 |
| | | if (agvWrkMast.getLocNo().startsWith("QO") && agvWrkMast.getLocNo().endsWith("F4") && Integer.valueOf(agvWrkMast.getBarcode().substring(0, 2)) == 30) { |
| | | if (!agvWrkMast.getSourceLocNo().endsWith("02F1")) { |
| | | AgvLocMast locByFloor = agvCommonService.getLocByFloor(3, 1); |
| | | AgvLocMast locByFloor = agvCommonService.getLocByLocRule(3, 1, AsrsConstants.ERCHANG,true); |
| | | if (locByFloor != null) { |
| | | AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMast.getSourceLocNo()); |
| | | agvLocMast.setLocSts("O"); |
| | | agvLocMast.setModiTime(now); |
| | | agvLocMastService.updateById(agvLocMast); |
| | | wrkMast.setLocNo(locByFloor.getLocNo()); |
| | | } else { |
| | | wrkMast.setLocNo(agvWrkMast.getSourceLocNo()); |
| | |
| | | } else { |
| | | wrkMast.setLocNo(agvWrkMast.getSourceLocNo()); |
| | | } |
| | | |
| | | //wrkMast.setLocNo(agvWrkMast.getSourceLocNo()); |
| | | |
| | | //货架编码 |
| | | wrkMast.setBarcode(agvWrkMast.getBarcode()); |
| | |
| | | if (!agvWrkMastService.insertByIncrease(wrkMast)) { |
| | | throw new CoolException("保存工作档失败"); |
| | | } |
| | | AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMast.getSourceLocNo()); |
| | | AgvLocMast agvLocMast = agvLocMastService.selectById(wrkMast.getLocNo()); |
| | | agvLocMast.setLocSts("S"); |
| | | agvLocMast.setModiTime(now); |
| | | agvLocMastService.updateById(agvLocMast); |
| | |
| | | /** |
| | | * 库位规则查找 |
| | | */ |
| | | public AgvLocMast getLocByLocRule(int type, int floor, String factory) { |
| | | public synchronized AgvLocMast getLocByLocRule(int type, int floor, String factory, boolean flag) { |
| | | |
| | | try { |
| | | EntityWrapper<AgvLocMast> wrapper = new EntityWrapper<>(); |
| | |
| | | //B是二厂,G是三厂 |
| | | switch (factory) { |
| | | case "B": |
| | | wrapper.eq("floor", floor).orderBy("lev1", false); |
| | | wrapper.eq("floor", floor).orderBy("lev1", false).orderBy("row1", flag); |
| | | break; |
| | | case "G": |
| | | wrapper.eq("floor", floor).orderBy("lev1", true); |
| | |
| | | } catch (Exception e) { |
| | | throw new CoolException("搜索库位时,未找到可入库库位。"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | #url: jdbc:sqlserver://127.0.0.1:1433;databasename=phyzasrs |
| | | url: jdbc:sqlserver://192.168.108:248;databasename=phyzasrs |
| | | url: jdbc:sqlserver://192.168.108.248;databasename=phyzasrs |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |