| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:41 |
| | |
| | | @Override |
| | | 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){ |
| | | // 计算工资 = 工时定额 * 数量 * 规格 |
| | | item.setWages(item.getWages().multiply(new BigDecimal(split[1]))); |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | } |