自动化立体仓库 - WMS系统
luxiaotao1123
2022-03-26 3602043d8c79939e1feebb22e4dfcae629d7fde6
#杰克缝纫机立库 【订单出库查询库存】
8个文件已修改
118 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/OutController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/result/StoPreTab.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocDetlMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/LocDetlService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocDetlMapper.xml 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/out.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/orderTable.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OutController.java
@@ -3,7 +3,9 @@
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.common.R;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.OrderDetl;
import com.zy.asrs.service.LocDetlService;
import com.zy.asrs.service.OrderDetlService;
import com.zy.asrs.service.OrderService;
import com.zy.common.web.BaseController;
@@ -25,6 +27,8 @@
    private OrderService orderService;
    @Autowired
    private OrderDetlService orderDetlService;
    @Autowired
    private LocDetlService locDetlService;
    @PostMapping("/out/pakout/preview/auth")
    public R pakoutPreview(@RequestBody List<Long> ids) {
@@ -32,6 +36,10 @@
            return R.parse(BaseRes.PARAM);
        }
        List<OrderDetl> orderDetls = orderDetlService.selectBatchIds(ids);
        for (OrderDetl orderDetl : orderDetls) {
            List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getOrderNo());
        }
        return R.ok().add(orderDetls);
    }
src/main/java/com/zy/asrs/entity/result/StoPreTab.java
@@ -8,8 +8,6 @@
@Data
public class StoPreTab {
    private String title;
    private String matnr;
    private String maktx;
@@ -17,19 +15,5 @@
    private Double anfme;
    private String locNo;
    private Long nodeId;
    private Double total;
    private Double reduce;
    private Double remQty;
    private Boolean prior;
    private String prior$;
    private Integer type;
}
src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
@@ -42,4 +42,9 @@
    List<LocDetl> getAsrsLocDetl(String matnr);
    Integer countLocNoNum(String locNo);
    // -------------------------------------------------
    List<LocDetl> queryStock(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo);
}
src/main/java/com/zy/asrs/service/LocDetlService.java
@@ -33,4 +33,10 @@
    List<LocDetl> getAsrsLocDetl(String matnr);
    Integer countLocNoNum(String locNo);
    // --------------------------------------------------
    List<LocDetl> queryStock(String matnr, String batch, String orderNo);
}
src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
@@ -67,4 +67,9 @@
    public Integer countLocNoNum(String locNo) {
        return this.baseMapper.countLocNoNum(locNo);
    }
    @Override
    public List<LocDetl> queryStock(String matnr, String batch, String orderNo) {
        return this.baseMapper.queryStock(matnr, batch, orderNo);
    }
}
src/main/resources/mapper/LocDetlMapper.xml
@@ -134,4 +134,75 @@
    <select id="countLocNoNum" resultType="integer">
        select count(*) from asr_loc_detl where loc_no = #{loc_no}
    </select>
    <select id="queryStock" resultMap="BaseResultMap">
        select a.*
        from asr_loc_detl a
        left join asr_loc_mast b on a.loc_no = b.loc_no
        where 1=1
        and b.loc_sts = 'F'
        and a.matnr = #{matnr}
        <if test="batch != null and batch != ''">
            and a.batch = #{batch}
        </if>
        <if test="orderNo != null and orderNo != ''">
            and a.orderNo = #{orderNo}
        </if>
        order by
        DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time)
        desc,
        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>
</mapper>
src/main/webapp/static/js/order/out.js
@@ -33,8 +33,9 @@
            ,{field: 'maktx', align: 'center',title: '商品名称', width: 200}
            ,{field: 'batch', align: 'center',title: '批号'}
            ,{field: 'specs', align: 'center',title: '规格'}
            ,{field: 'anfme', align: 'center',title: '数量'}
            ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'}
            // ,{field: 'anfme', align: 'center',title: '数量'}
            // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'}
            ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'}
            // ,{field: 'name', align: 'center',title: '名称'}
            // ,{field: 'model', align: 'center',title: '型号'}
            ,{field: 'unit', align: 'center',title: '单位', hide: true}
src/main/webapp/static/js/orderTable.js
@@ -55,7 +55,7 @@
    /* 表格重置 */
    form.on('submit(originTbReset)', function (data) {
        insTb.reload({where: null});
        insTb2.reload({where: {host_id: null}, page: {curr: 1}});
        insTb2.reload({where: null, page: {curr: 1}});
        return false;
    });