自动化立体仓库 - WMS系统
#
Junjie
3 天以前 bf45b4a613f0c1fa723e1d03b16cd7d1c79f1f04
src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java
@@ -8,6 +8,7 @@
import com.zy.asrs.mapper.WrkDetlMapper;
import com.zy.asrs.service.MatService;
import com.zy.asrs.service.WrkDetlService;
import com.zy.asrs.utils.MatUtils;
import com.zy.common.model.DetlDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -66,20 +67,8 @@
                return false;
            }
            //更新辅料
            Mat mat = matService.selectByMatnr(matnr);
            if (mat == null) {
                return false;
            }
            //转换关系
            String origin = mat.getOrigin();
            if (Cools.isEmpty(origin)) {
                return true;
            }
            String[] split = origin.split("/");
            //辅单位
            Double weight = (anfme / Double.parseDouble(split[1])) / Double.parseDouble(split[0]);
            //计算辅单位
            Double weight = MatUtils.calcWeight(matnr, anfme);
            return baseMapper.updateWeight(weight, wrkNo, matnr, batch) > 0;
        }
    }
@@ -103,4 +92,9 @@
    public List<WrkDetl> selectAndLogByOrderNoGroupByMatnrOfSum(String orderNo) {
        return this.baseMapper.selectAndLogByOrderNoGroupByMatnrOfSum(orderNo);
    }
    @Override
    public boolean updateBarcode(Integer wrkNo, String barcode) {
        return this.baseMapper.updateBarcode(wrkNo, barcode) > 0;
    }
}