| | |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | |
| | | .createTime(LocalDateTime.now()) |
| | | .createUser(loginUser.getUserId()) |
| | | .updateTime(LocalDateTime.now()) |
| | | .boxNum(detail.getBoxNum()) |
| | | .cartonSpecifications(detail.getCartonSpecifications()) |
| | | .dollarPrice(detail.getDollarPrice()) |
| | | .updateUser(loginUser.getUserId()) |
| | | .createBy(procurementDto.getNickName()) |
| | | .productModelId(detail.getProductModelId()); |
| | |
| | | return procurementPageDtoIPage; |
| | | } |
| | | |
| | | public List<Long> listCopyIds(String ids) { |
| | | List<Long> idsSet = new ArrayList<>(); |
| | | String[] split = ids.split(","); |
| | | for (String s : split) { |
| | | idsSet.add(Long.valueOf(s)); |
| | | } |
| | | return idsSet; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ProcurementPageDtoCopy> listPageCopy(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDtoCopy> procurementPageDtoCopyIPage = procurementRecordMapper.listPageCopy(page, procurementDto); |
| | |
| | | dto.setTotalInboundNum(BigDecimal.ZERO); |
| | | continue; |
| | | } |
| | | |
| | | // 计算已出库数量总和,并设置待出库数量 |
| | | BigDecimal totalInboundNum = collect1.stream() |
| | | BigDecimal totalInboundNum = procurementRecords.stream() |
| | | .map(ProcurementRecordOut::getInboundNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | // 出库数量 = 总数量 - 待出库数量 |