自动化立体仓库 - WMS系统
野心家
2022-11-15 fb20f0cf9bc64c4cd3baf23d6c2b0e6a601d0705
优化出库搜索功能
5个文件已修改
90 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/OutController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocDetlMapper.xml 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/cool.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/order.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/order/order.html 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OutController.java
@@ -147,11 +147,16 @@
        Set<String> exist = new HashSet<>();
        boolean boo=false;
        for (OrderDetl orderDetl : orderDetls) {
            double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty()).orElse(0.0D);
            double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getWorkQty()).orElse(0.0D);
            if (issued <= 0.0D) { continue; }
            List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist);
            if(!Cools.isEmpty(locDetls)){
                boo=true;
            //判断出库数量是否大于要出的物品
                LocDto locDtoo = new LocDto(locDetls.get(0).getLocNo(), locDetls.get(0).getMatnr(), locDetls.get(0).getMaktx(), locDetls.get(0).getBatch(), orderDetl.getOrderNo(),
                        issued >= locDetls.get(0).getAnfme() ? locDetls.get(0).getAnfme() : issued);
@@ -173,8 +178,13 @@
                    exist.add(locDetls.get(0).getLocNo());
                    issued=issued-locDetls.get(0).getAnfme();
                }
                List<LocDetl> locDetlList=locDetlService.queryStockOther(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist,locDetls.get(0).getLocNo());
                }
                List<LocDetl> locDetlList =new ArrayList<>();
                if(boo){
                     locDetlList=locDetlService.queryStockOther(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist,locDetls.get(0).getLocNo());
                }else{
                     locDetlList=locDetlService.queryStockOther(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist,null);
                }
            for (LocDetl locDetl : locDetlList) {
                if (issued > 0) {
                    LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(),
src/main/resources/mapper/LocDetlMapper.xml
@@ -289,72 +289,10 @@
    where 1=1
    and b.loc_sts = 'F'
    and a.matnr=  #{matnr}
    <if test="locNo !=null and locNo !=''">
    and a.loc_no !=  #{locNo}
    <if test="orderNo != null and orderNo != ''">
        and a.order_no = #{orderNo}
    </if>
    <if test="locNos != null and locNos.size > 0">
        and b.loc_no not in
        <foreach item="item" collection="locNos" index="index"  separator="," open="(" close=")">
            #{item}
        </foreach>
    </if>
    order by
    DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme
    desc,
    NEWID(),
    case
    when (left(a.loc_no, 2) = '01') then 0
    when (left(a.loc_no, 2) = '02') then 1
    when (left(a.loc_no, 2) = '03') then 1
    when (left(a.loc_no, 2) = '04') then 0
    when (left(a.loc_no, 2) = '05') then 0
    when (left(a.loc_no, 2) = '06') then 1
    when (left(a.loc_no, 2) = '07') then 1
    when (left(a.loc_no, 2) = '08') then 0
    when (left(a.loc_no, 2) = '09') then 0
    when (left(a.loc_no, 2) = '10') then 1
    when (left(a.loc_no, 2) = '11') then 1
    when (left(a.loc_no, 2) = '12') then 0
    when (left(a.loc_no, 2) = '13') then 0
    when (left(a.loc_no, 2) = '14') then 1
    when (left(a.loc_no, 2) = '15') then 1
    when (left(a.loc_no, 2) = '16') then 0
    when (left(a.loc_no, 2) = '17') then 0
    when (left(a.loc_no, 2) = '18') then 1
    when (left(a.loc_no, 2) = '19') then 1
    when (left(a.loc_no, 2) = '20') then 0
    when (left(a.loc_no, 2) = '21') then 0
    when (left(a.loc_no, 2) = '22') then 1
    when (left(a.loc_no, 2) = '23') then 1
    when (left(a.loc_no, 2) = '24') then 0
    when (left(a.loc_no, 2) = '25') then 0
    when (left(a.loc_no, 2) = '26') then 1
    when (left(a.loc_no, 2) = '27') then 1
    when (left(a.loc_no, 2) = '28') then 0
    when (left(a.loc_no, 2) = '29') then 0
    when (left(a.loc_no, 2) = '30') then 1
    when (left(a.loc_no, 2) = '31') then 1
    when (left(a.loc_no, 2) = '32') then 0
    when (left(a.loc_no, 2) = '33') then 0
    when (left(a.loc_no, 2) = '34') then 1
    when (left(a.loc_no, 2) = '35') then 1
    when (left(a.loc_no, 2) = '36') then 0
    when (left(a.loc_no, 2) = '37') then 0
    when (left(a.loc_no, 2) = '38') then 1
    when (left(a.loc_no, 2) = '39') then 1
    when (left(a.loc_no, 2) = '40') then 0
    when (left(a.loc_no, 2) = '41') then 0
    when (left(a.loc_no, 2) = '42') then 1
    when (left(a.loc_no, 2) = '43') then 1
    when (left(a.loc_no, 2) = '44') then 0
    when (left(a.loc_no, 2) = '45') then 0
    when (left(a.loc_no, 2) = '46') then 1
    when (left(a.loc_no, 2) = '47') then 1
    when (left(a.loc_no, 2) = '48') then 0
    else 0
    end
    desc;
    </select>
    <select id="queryStockAnfme" resultType="java.lang.Double">
        select sum(anfme) as count from man_loc_detl
src/main/webapp/static/js/cool.js
@@ -15,7 +15,9 @@
 */
function autoShow(id) {
    var cac = document.getElementById(id).parentNode;
    console.log(cac);
    var cacw = cac.getElementsByClassName("cool-auto-complete-window")[0];
    console.log(cacw);
    if (cacw.style.display === "none" || cacw.style.display === ""){
        cacw.style.display = "block";
        var cacwi = cacw.getElementsByClassName("cool-auto-complete-window-input")[0];
src/main/webapp/static/js/order/order.js
@@ -31,6 +31,10 @@
            }
        }
    })
    // 渲染表格
    var insTb = table.render({
src/main/webapp/views/order/order.html
@@ -54,6 +54,8 @@
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <select name="settle">