| | |
| | | /** 上报 ERP 重量:称重减固定值,负则按 0 */ |
| | | private static BigDecimal adjustErpReportWeight(BigDecimal scWeight) { |
| | | BigDecimal base = scWeight == null ? BigDecimal.ZERO : scWeight; |
| | | BigDecimal v = base.subtract(new BigDecimal("20")); |
| | | BigDecimal v = base.subtract(new BigDecimal("10")); |
| | | return v.compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO : v; |
| | | } |
| | | private String resolvePalletId(WrkMast wrkMast, List<WrkDetl> wrkDetls) { |
| | |
| | | return total; |
| | | } |
| | | |
| | | private Double sumWeight(List<WrkDetl> wrkDetls) { |
| | | double total = 0D; |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | if (Cools.isEmpty(wrkDetl.getWeight())) { |
| | | continue; |
| | | } |
| | | double qty = Cools.isEmpty(wrkDetl.getAnfme()) ? 1D : wrkDetl.getAnfme(); |
| | | total += wrkDetl.getWeight() * qty; |
| | | } |
| | | return total; |
| | | } |
| | | // private Double sumWeight(List<WrkDetl> wrkDetls) { |
| | | // double total = 0D; |
| | | // for (WrkDetl wrkDetl : wrkDetls) { |
| | | // if (Cools.isEmpty(wrkDetl.getWeight())) { |
| | | // continue; |
| | | // } |
| | | // double qty = Cools.isEmpty(wrkDetl.getAnfme()) ? 1D : wrkDetl.getAnfme(); |
| | | // total += wrkDetl.getWeight() * qty; |
| | | // } |
| | | // return total; |
| | | // } |
| | | |
| | | private Date resolveCreateTime(WrkMast wrkMast) { |
| | | if (!Cools.isEmpty(wrkMast.getCrnEndTime())) { |