自动化立体仓库 - WMS系统
#
zjj
2023-09-05 d6220c0485733477a099d67f20ad622c3daad6ef
#
7个文件已修改
63 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/OutController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/ManLocDetlMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/ManLocDetlService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/ManLocDetlServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/LocDto.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ManLocDetlMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/out.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OutController.java
@@ -76,14 +76,14 @@
            double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getWorkQty()).orElse(0.0D);
            if (issued <= 0.0D) { continue; }
            List<LocDetl> locDetls = locDetlService.queryStock2(orderDetl.getMatnr(), orderDetl.getBatch());
            for (LocDetl locDetl : locDetls) {
            List<ManLocDetl> manLocDetls = manLocDetlService.queryStock(orderDetl.getMatnr());
            for (ManLocDetl locDetl : manLocDetls) {
                if (issued > 0) {
                    boolean sign = false;
                    if (issued > locDetl.getAnfme() || locDetl.getAnfme().equals(issued)){
                        sign=true;
                    }
                    LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(),
                    LocDto locDto = new LocDto(locDetl.getHostId(),locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(),
                            sign ? locDetl.getAnfme() : issued);
                    List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(),  sign? 101 : 103);
//                    LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(),
@@ -91,7 +91,6 @@
//                    //速腾只有全板,所以只能101全板出库
//                    List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), 101);
                    locDto.setStaNos(staNos);
                    locDto.setManu(locDetl.getManu());
                    locDtos.add(locDto);
                    exist.add(locDetl.getLocNo());
                    BigDecimal iss=new BigDecimal(Double.toString(issued)).setScale(2,BigDecimal.ROUND_HALF_UP);
@@ -103,7 +102,7 @@
                }
            }
            if (issued > 0) {
                LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued);
                LocDto locDto = new LocDto(null,null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued);
//                LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), 0.0,issued);
                locDto.setLack(Boolean.TRUE);
                locDtos.add(locDto);
@@ -176,8 +175,6 @@
            LocDto locDto = locDtos.get(locDtos.size() - 1 - i);
            if (locDto.getLocNo() == null) {
                is[i][0] = 1;
            } else if (locDto.getManu().equals("立库")){
                is[i][0] = 2;
            } else {
                is[i][0] = 0;
            }
@@ -269,6 +266,7 @@
    private R addPakOUT(LocDto locDto,String uuid){
        ManPakOut manPakOut=new ManPakOut();
        manPakOut.setDocId(locDto.getHostId());
        manPakOut.setWrkNo(locDto.getOrderNo()+"-"+System.currentTimeMillis());
        manPakOut.setWrkSts((long)1);
        manPakOut.setAnfme(locDto.getAnfme());
src/main/java/com/zy/asrs/mapper/ManLocDetlMapper.java
@@ -12,7 +12,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
@Mapper
@Repository
@@ -54,7 +53,7 @@
    // -------------------------------------------------
    List<ManLocDetl> queryStock(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos);
    List<ManLocDetl> queryStock(@Param("matnr")String matnr);
    Double queryStockAnfme(String matnr, String batch);
src/main/java/com/zy/asrs/service/ManLocDetlService.java
@@ -9,7 +9,6 @@
import com.zy.system.entity.User;
import java.util.List;
import java.util.Set;
public interface ManLocDetlService  extends IService<ManLocDetl> {
    Page<ManLocDetl> getPage(Page<ManLocDetl> page);
@@ -44,7 +43,7 @@
    // --------------------------------------------------
    List<ManLocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos);
    List<ManLocDetl> queryStock(String matnr);
    Double queryStockAnfme(String matnr, String batch);
src/main/java/com/zy/asrs/service/impl/ManLocDetlServiceImpl.java
@@ -91,8 +91,8 @@
    }
    @Override
    public List<ManLocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos) {
        return this.baseMapper.queryStock(matnr, batch, orderNo, locNos);
    public List<ManLocDetl> queryStock(String matnr) {
        return this.baseMapper.queryStock(matnr);
    }
    @Override
src/main/java/com/zy/common/model/LocDto.java
@@ -12,6 +12,8 @@
@Data
public class LocDto {
    private Long hostId;
    private String locNo;
    private String matnr;
@@ -39,32 +41,35 @@
    public LocDto() {
    }
    public LocDto(String locNo, String matnr, String batch, Double anfme) {
    public LocDto(Long hostId,String locNo, String matnr, String batch, Double anfme) {
        this.locNo = locNo;
        this.matnr = matnr;
        this.batch = batch;
        this.anfme = anfme;
        this.hostId = hostId;
    }
    public LocDto(String locNo, String matnr, String batch, String orderNo, Double anfme) {
    public LocDto(Long hostId,String locNo, String matnr, String batch, String orderNo, Double anfme) {
        this.locNo = locNo;
        this.matnr = matnr;
        this.batch = batch;
        this.orderNo = orderNo;
        this.anfme = anfme;
        this.hostId = hostId;
    }
    public LocDto(String locNo, String matnr, String maktx, String batch, String orderNo, Double anfme) {
    public LocDto(Long hostId,String locNo, String matnr, String maktx, String batch, String orderNo, Double anfme) {
        this.locNo = locNo;
        this.matnr = matnr;
        this.maktx = maktx;
        this.batch = batch;
        this.orderNo = orderNo;
        this.anfme = anfme;
        this.hostId = hostId;
    }
    public LocDto(String locNo, String matnr, String maktx, String batch, String orderNo, Double anfme, Double needQty) {
    public LocDto(Long hostId,String locNo, String matnr, String maktx, String batch, String orderNo, Double anfme, Double needQty) {
        this.locNo = locNo;
        this.matnr = matnr;
        this.maktx = maktx;
@@ -72,6 +77,7 @@
        this.orderNo = orderNo;
        this.anfme = anfme;
        this.needQty = needQty;
        this.hostId = hostId;
    }
    public String getTitle() {
src/main/resources/mapper/ManLocDetlMapper.xml
@@ -416,6 +416,15 @@
    </select>
    <select id="queryStock"  resultMap="BaseResultMap">
        select a.*
        from asr_loc_detl_merge a
                 left join asr_loc_detl_F_view b on a.loc_no = b.loc_no
        where 1=1
          and b.loc_sts = 'F'
          and a.matnr = #{matnr}
    </select>
    <delete id="deleteDatailed">
        delete from man_loc_detl
        where loc_no = #{locNo}
src/main/webapp/static/js/order/out.js
@@ -35,25 +35,10 @@
            ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160}
            ,{field: 'matnr', align: 'center',title: '商品编码', width: 160}
            ,{field: 'maktx', align: 'center',title: '商品名称', width: 200}
            // ,{field: 'anfme', align: 'center',title: '数量'}
            // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'}
            ,{field: 'anfme', 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}
            ,{field: 'barcode', align: 'center',title: '商品条码', hide: true}
            // ,{field: 'supplier', align: 'center',title: '供应商'}
            // ,{field: 'unitPrice', align: 'center',title: '单价'}
            // ,{field: 'itemNum', align: 'center',title: '品项数'}
            // ,{field: 'count', align: 'center',title: '数量'}
            // ,{field: 'weight', align: 'center',title: '重量'}
            // ,{field: 'status$', align: 'center',title: '状态'}
            // ,{field: 'createBy$', align: 'center',title: '添加人员'}
            // ,{field: 'createTime$', align: 'center',title: '添加时间'}
            // ,{field: 'updateBy$', align: 'center',title: '修改人员'}
            // ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            // ,{field: 'memo', align: 'center',title: '备注'}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 160}
        ]],
        request: {
@@ -160,8 +145,7 @@
                                    // {type: 'checkbox', merge: ['orderNo']},
                                    {field: 'orderNo', title: '单据编号', merge: true, align: 'center'},
                                    {field: 'title', title: '商品', merge: true, align: 'center', width: 350},
                                    {field: 'batch', title: '序列码', align: 'center'},
                                    {field: 'manu', title: '仓库', align: 'center'},
                                    {field: 'hostId', title: 'id', align: 'center'},
                                    // { title: '剩余需求量', align: 'center' , width: 120, toolbar: '#checkNeedQty'},
                                    // {field: 'anfme', title: '实际数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    { title: '出库数量', align: 'center',field: 'anfme', width: 90, style: 'font-weight: bold; color: red'},