| | |
| | | @ApiModelProperty(value = "结束时间") |
| | | private String entryDateEnd; |
| | | |
| | | @ApiModelProperty(value = "含税单价") |
| | | private BigDecimal taxInclusiveUnitPrice; |
| | | |
| | | } |
| | |
| | | private BigDecimal workHours; |
| | | |
| | | /** |
| | | * 提成占比 |
| | | */ |
| | | private BigDecimal unitPrice; |
| | | |
| | | /** |
| | | * 工序 |
| | | */ |
| | | private String process; |
| | |
| | | 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; |
| | | } |
| | |
| | | <select id="listPage" resultType="com.ruoyi.production.dto.SalesLedgerProductionAccountingDto"> |
| | | SELECT |
| | | t4.id, |
| | | t4.finished_num * t4.work_hours as wages, |
| | | t4.finished_num * t4.unit_price as wages, |
| | | t4.scheduling_user_id, |
| | | t4.scheduling_user_name, |
| | | t4.scheduling_date, |
| | |
| | | T1.customer_name, |
| | | t3.product_category, |
| | | t3.specification_model, |
| | | t3.unit |
| | | t3.unit, |
| | | t3.tax_inclusive_unit_price |
| | | FROM |
| | | sales_ledger_production_accounting t4 |
| | | LEFT JOIN sales_ledger T1 ON T1.id = t4.sales_ledger_id |