| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.zy.common.properties.SlaveProperties; |
| | |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | |
| | | for (Integer row0 : CommonService.THIRD_GROUP_ROW_LIST) { |
| | | result.add(zerofill(String.valueOf(row0), 2) + locNo.substring(2)); |
| | | } |
| | | Collections.reverse(result); |
| | | return result; |
| | | } |
| | | if (CommonService.FOURTH_GROUP_ROW_LIST.contains(row)) { |
| | |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | |
| | | //通过输送站点号获取提升机号 |
| | | public static Integer stnNoToLiftNo(Integer stnNo) { |
| | | //一号提升机 |
| | | ArrayList<Integer> one = new ArrayList<Integer>(){{ |
| | | add(100);add(101); |
| | | add(200);add(201); |
| | | add(300);add(301); |
| | | }}; |
| | | |
| | | //二号提升机 |
| | | ArrayList<Integer> two = new ArrayList<Integer>(){{ |
| | | add(102);add(103); |
| | | add(202);add(203); |
| | | add(340);add(341); |
| | | }}; |
| | | |
| | | //三号提升机 |
| | | ArrayList<Integer> three = new ArrayList<Integer>(){{ |
| | | add(104);add(105); |
| | | add(204);add(205); |
| | | add(345);add(346); |
| | | }}; |
| | | |
| | | if (one.contains(stnNo)) { |
| | | return 1; |
| | | } else if (two.contains(stnNo)) { |
| | | return 2; |
| | | } else if (three.contains(stnNo)) { |
| | | return 3; |
| | | } |
| | | |
| | | |
| | | return null; |
| | | } |
| | | |
| | | public static void wapperSetCondition(Wrapper wrapper, String column, String condition){ |
| | | if(Cools.isEmpty(condition)){ |
| | | wrapper.andNew().eq(column,"").or().isNull(column); |
| | | }else { |
| | | wrapper.eq(column,condition); |
| | | } |
| | | } |
| | | |
| | | public static void confirmOnlyMat(Wrapper wrapper, String matnr, String csocode, String isoseq){ |
| | | wapperSetCondition(wrapper,"matnr",matnr); |
| | | wapperSetCondition(wrapper,"csocode",csocode); |
| | | wapperSetCondition(wrapper,"isoseq",isoseq); |
| | | } |
| | | |
| | | } |