| | |
| | | public IPage<SalesLedgerProductionAccountingDto> listPage(Page page, SalesLedgerProductionAccountingDto salesLedgerProductionAccountingDto) { |
| | | IPage<SalesLedgerProductionAccountingDto> list = salesLedgerProductionAccountingMapper.listPage(page, salesLedgerProductionAccountingDto); |
| | | list.getRecords().forEach(item -> { |
| | | String[] split = item.getSpecificationModel().split("\\*"); |
| | | if(split.length == 2 && isNumeric(split[1])){ |
| | | // 计算工资 = 工时定额 * 数量 * 规格 |
| | | item.setWages(item.getWages().multiply(new BigDecimal(split[1]))); |
| | | } |
| | | // 计算工资 = 生产数量 * 产品含税单价 * 提成率,保留三位小数不用四舍五入 |
| | | item.setWages(item.getWages().multiply(item.getTaxInclusiveUnitPrice()).setScale(3, BigDecimal.ROUND_HALF_UP)); |
| | | }); |
| | | return list; |
| | | } |