Browse Source

库存余额打印标签BUG修改 YT-705

intex
YEJIAXING-PC\lenovo 23 hours ago
parent
commit
586d9e4978
  1. 8
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/packageMassage/PackageController.java

8
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/packageMassage/PackageController.java

@ -554,13 +554,19 @@ public class PackageController {
//打印几页(生成几个包装)
BigDecimal total = printQty.divide(packQty, 2, RoundingMode.HALF_UP);
total = total.setScale(0, RoundingMode.CEILING);
if(packQty.compareTo(printQty)>0){
//如果打印数量小于标包数量,则打印输入的打印数量,例标包数量是3,打印数量是1,则打印一页,数量是1
packQty = printQty;
}
//最后一页中的数量.取余数
BigDecimal remainder = printQty.remainder(packageDO.getQty());
BigDecimal remainder = printQty.remainder(packageDO.getPackQty());
for (int i = 0; i < total.intValue(); i++) {
PackageDO newPackage = new PackageDO();
BeanUtils.copyProperties(packageDO, newPackage);
if (i == total.intValue() - 1 && remainder.compareTo(BigDecimal.ZERO)!=0) {
newPackage.setQty(remainder);
}else {
newPackage.setQty(packQty);
}
String number = serialNumberApi.generateCode(RuleCodeEnum.PACKING_NUMBER.getCode());
newPackage.setId(null);

Loading…
Cancel
Save