| | |
| | | @Select("select count(*) as count from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") |
| | | Integer selectEmptyLocCount(@Param("crnNo") Integer crnNo); |
| | | |
| | | List<LocMast> queryFreeLocMast2(@Param("rows") List<Integer> rows, @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1); |
| | | |
| | | } |
| | |
| | | * 检索可用库位 |
| | | */ |
| | | List<LocMast> queryFreeLocMast(List<Integer> rows, Integer rowsLen, Short locType1); |
| | | List<LocMast> queryFreeLocMast2(List<Integer> rows, Integer rowsLen, Short locType1); |
| | | |
| | | /** |
| | | * 检索可用库位0 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<LocMast> queryFreeLocMast2(List<Integer> rows, Integer rowsLen, Short locType1) { |
| | | return this.baseMapper.queryFreeLocMast(rows, rowsLen, locType1); |
| | | } |
| | | |
| | | @Override |
| | | public LocMast queryFreeLocMast0(Integer row, Short locType1) { |
| | | return this.baseMapper.queryFreeLocMast0(row, locType1); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | int row = getRow(locNo); |
| | | if (row<=4){ |
| | | return defaultIoPri == null ? 300.0D-row*2 : defaultIoPri-row*2; |
| | | }else { |
| | | return defaultIoPri == null ? 300.0D+row*2 : defaultIoPri+row*2; |
| | | } |
| | | // 出库 |
| | | } else { |
| | | List<String> groupOuterLoc = Utils.getGroupOuterLoc(locNo); |
| | |
| | | } |
| | | } |
| | | } |
| | | int row = getRow(locNo); |
| | | if (row<=4){ |
| | | return defaultIoPri == null ? 300.0D+row*2 : defaultIoPri+row*2; |
| | | }else { |
| | | return defaultIoPri == null ? 300.0D-row*2 : defaultIoPri-row*2; |
| | | } |
| | | } |
| | | // 移库 |
| | | } else { |
| | | // @Deprecated |
| | | } |
| | | int row = getRow(locNo); |
| | | if (row<=4){ |
| | | return defaultIoPri == null ? 300.0D+row*2 : defaultIoPri+row*2; |
| | | }else { |
| | | return defaultIoPri == null ? 300.0D+row-2 : defaultIoPri-row*2; |
| | | } |
| | | return 300.0D; |
| | | } |
| | | /** |
| | | * 通过库位号获取 排 |
| | |
| | | public static final List<Integer> SECOND_GROUP_ROW_LIST = new ArrayList<Integer>() {{ |
| | | add(5);add(6);add(7);add(8);add(9);add(10);add(11); |
| | | }}; |
| | | public static final List<Integer> FIRST_GROUP_ROW_LIST2 = new ArrayList<Integer>() {{ |
| | | add(2);add(3);add(4); |
| | | }}; |
| | | public static final List<Integer> SECOND_GROUP_ROW_LIST10 = new ArrayList<Integer>() {{ |
| | | add(5);add(6);add(7);add(8);add(9);add(10); |
| | | }}; |
| | | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | |
| | | } |
| | | } |
| | | } |
| | | if (Cools.isEmpty(locMast)){ |
| | | if (rows.equals(FIRST_GROUP_ROW_LIST)){ |
| | | rows=FIRST_GROUP_ROW_LIST2; |
| | | }else if (rows.equals(SECOND_GROUP_ROW_LIST)){ |
| | | rows=SECOND_GROUP_ROW_LIST10; |
| | | } |
| | | List<LocMast> locMasts1 = locMastService.queryFreeLocMast2(rows, rows.size(), locTypeDto.getLocType1()); |
| | | if (!Cools.isEmpty(locMasts1)) { |
| | | Integer innermostRow = Utils.getInnermostRow(locMasts1.get(0).getLocNo()); |
| | | if (rows.equals(FIRST_GROUP_ROW_LIST2)){ |
| | | innermostRow=innermostRow+1; |
| | | }else if (rows.equals(SECOND_GROUP_ROW_LIST10)){ |
| | | innermostRow=innermostRow-1; |
| | | } |
| | | for (LocMast one : locMasts1) { |
| | | if (one.getRow1().equals(innermostRow)) { |
| | | locMast = one; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 因库位移转、需预留空库位 |
| | | if (!locMastService.checkEmptyCount(locMast, 10)) { |
| | | locMast = null; |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://localhost:1433;databasename=szfzasrs |
| | | url: jdbc:sqlserver://10.10.10.209:1433;databasename=szfzasrs |
| | | username: sa |
| | | # password: Zoneyung@zy56$ |
| | | password: sa@123 |
| | |
| | | order by right(ctn_no, 2) + 0 asc, left(ctn_no, 3) + 0 asc |
| | | ) |
| | | </select> |
| | | <select id="queryFreeLocMast" resultMap="BaseResultMap"> |
| | | select |
| | | * |
| | | from asr_loc_mast |
| | | where 1=1 |
| | | and row1 in |
| | | <foreach item="item" collection="rows" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | and ctn_no = |
| | | ( |
| | | select |
| | | top 1 |
| | | ctn_no |
| | | from ( |
| | | select |
| | | ctn_no, |
| | | count(1) as count |
| | | from asr_loc_mast |
| | | where 1=1 |
| | | and row1 in |
| | | <foreach item="item" collection="rows" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | and loc_no not in ('0100101', '0200101', '0300101', '0400101') |
| | | and (bay1 = 3 or bay1 = 11 or (bay1 = 7 and row1 = 10)) |
| | | and loc_sts = 'O' |
| | | group by ctn_no |
| | | ) a |
| | | where count = #{rowsLen} |
| | | order by right(ctn_no, 2) + 0 asc, left(ctn_no, 3) + 0 asc |
| | | ) |
| | | </select> |
| | | |
| | | <select id="queryFreeLocMast0" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | |
| | | |
| | | var matCols = [ |
| | | {field: 'matnr', align: 'center',title: '物料号', width: 180} |
| | | ,{field: 'name', align: 'center',title: '移动类型'} |
| | | // ,{field: 'maktx', align: 'center',title: '物料号', width: 150} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '批次', hide: false} |
| | | ,{field: 'name', align: 'center',title: '移动类型', hide: true} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称', width: 150} |
| | | ,{field: 'specs', align: 'center',title: '规格', hide: false} |
| | | ,{field: 'model', align: 'center',title: '批次', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '单据时间', hide: false} |
| | | ,{field: 'weight', align: 'center',title: '重量', hide: false} |
| | | ,{field: 'units', align: 'center',title: '包数', hide: false} |
| | | ,{field: 'units', align: 'center',title: '支数', hide: false} |
| | | ,{field: 'origin', align: 'center',title: '物料状态', hide: true} |
| | | |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: false} |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: false} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: false} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |