自动化立体仓库 - WMS系统
#
LSH
2023-11-17 b4ffbe0d45e17bd4a4f79c6201e92cc9d3091cb8
src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
@@ -4,8 +4,11 @@
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.LocDetlWarningDTO;
import com.zy.asrs.entity.MatCode;
import com.zy.asrs.mapper.LocDetlMapper;
import com.zy.asrs.service.LocDetlService;
import com.zy.asrs.service.MatCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -16,6 +19,8 @@
    @Autowired
    private LocDetlMapper locDetlMapper;
    @Autowired
    private MatCodeService matCodeService;
    @Override
@@ -30,7 +35,11 @@
        if (qty <= 0) {
            return delete(new EntityWrapper<LocDetl>().eq("loc_no", locNo).eq("mat_no", matNo).eq("supplier",supplier));
        } else {
            int res = baseMapper.updateAnfme(qty, locNo, matNo);
            MatCode matCode = matCodeService.selectById(matNo);
            Double weight = qty*matCode.getWeight()+30;
            Double allQty = qty*matCode.getStr6();
            int res = baseMapper.updateAnfme(qty, locNo, matNo,weight,allQty);
            return res > 0;
        }
    }
@@ -64,8 +73,8 @@
    }
    @Override
    public List<LocDetl> getStockStatisExcel() {
       return this.baseMapper.getStockStatisExcel();
    public List<LocDetl> getStockStatisExcel(LocDetl locDetl) {
       return this.baseMapper.getStockStatisExcel(locDetl);
    }
    /**
@@ -77,4 +86,13 @@
        return locDetlMapper.getStockSum();
    }
    @Override
    public List<LocDetlWarningDTO> selectAllWarning(LocDetlWarningDTO locDetlWarningDTO) {
        return this.baseMapper.selectAllWarning(locDetlWarningDTO);
    }
    @Override
    public int getAllWarningCount(LocDetlWarningDTO locDetlWarningDTO) {
        return this.baseMapper.getAllWarningCount(locDetlWarningDTO);
    }
}