| | |
| | | import com.vincent.rsf.server.manager.controller.params.IsptItemsParams; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.enums.QlyIsptResult; |
| | | import com.vincent.rsf.server.manager.mapper.QlyInspectMapper; |
| | | import com.vincent.rsf.server.manager.mapper.QlyIsptItemMapper; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderItemService; |
| | | import com.vincent.rsf.server.manager.service.QlyInspectResultService; |
| | | import com.vincent.rsf.server.manager.service.QlyInspectService; |
| | | import com.vincent.rsf.server.manager.service.QlyIsptItemService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | public class QlyIsptItemServiceImpl extends ServiceImpl<QlyIsptItemMapper, QlyIsptItem> implements QlyIsptItemService { |
| | | |
| | | @Autowired |
| | | private QlyInspectService qlyInspectService; |
| | | private QlyInspectMapper qlyInspectMapper; |
| | | @Autowired |
| | | private AsnOrderItemService asnOrderItemService; |
| | | |
| | | @Autowired |
| | | private QlyInspectResultService qlyInspectResultService; |
| | | @Autowired |
| | | private QlyIsptItemService qlyIsptItemService; |
| | | @Autowired |
| | | private WarehouseAreasItemServiceImpl warehouseAreasItemService; |
| | | @Autowired |
| | |
| | | |
| | | Double isptQty = isptRelt.stream().mapToDouble(QlyInspectResult::getAnfme).sum(); |
| | | |
| | | if (!qlyIsptItemService.update(new LambdaUpdateWrapper<QlyIsptItem>() |
| | | if (!this.update(new LambdaUpdateWrapper<QlyIsptItem>() |
| | | .set(QlyIsptItem::getUpdateBy, loginUserId) |
| | | .set(QlyIsptItem::getAnfme, isptQty) |
| | | .eq(QlyIsptItem::getId, item.getId()))) { |
| | |
| | | .in(QlyInspectResult::getIsptId, isptIds)); |
| | | Double sum = items.stream().mapToDouble(QlyInspectResult::getAnfme).sum(); |
| | | if (sum.compareTo(0.00) > 0) { |
| | | qlyInspectService.update(new LambdaUpdateWrapper<QlyInspect>() |
| | | qlyInspectMapper.update(null, new LambdaUpdateWrapper<QlyInspect>() |
| | | .set(QlyInspect::getIsptQty, sum) |
| | | .set(QlyInspect::getUpdateBy, loginUserId) |
| | | .eq(QlyInspect::getId, isptItem.stream().findFirst().get().getIspectId())); |