| | |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.controller.erp.params.*; |
| | | import com.vincent.rsf.server.api.controller.erp.params.dto.CheckDiffDto; |
| | | import com.vincent.rsf.server.api.controller.erp.params.dto.TransferInfoDto; |
| | | import com.vincent.rsf.server.api.controller.erp.params.dto.WkOrderDto; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.controller.dto.LocStockDto; |
| | |
| | | import com.vincent.rsf.server.manager.enums.*; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.manager.service.impl.MatnrServiceImpl; |
| | | import com.vincent.rsf.server.manager.service.impl.TransferItemServiceImpl; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.entity.Fields; |
| | | import com.vincent.rsf.server.system.service.FieldsItemService; |
| | |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import com.vincent.rsf.server.api.service.ReceiveMsgService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private FieldsService fieldsService; |
| | | @Autowired |
| | | private FieldsItemService fieldsItemService; |
| | | @Autowired |
| | | private MatnrGroupService matnrGroupService; |
| | | @Autowired |
| | | private MatnrServiceImpl matnrService; |
| | |
| | | private DeliveryItemService deliveryItemService; |
| | | @Autowired |
| | | private LocService locService; |
| | | @Autowired |
| | | private LocItemService locItemService; |
| | | @Autowired |
| | | private WarehouseAreasService warehouseAreasService; |
| | | @Autowired |
| | |
| | | private ReviseLogService reviseLogService; |
| | | @Autowired |
| | | private ReviseLogItemService reviseLogItemService; |
| | | @Autowired |
| | | private CheckDiffService checkDiffService; |
| | | @Autowired |
| | | private CheckDiffItemService checkDiffItemService; |
| | | |
| | | |
| | | /** |
| | |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | @Transactional(timeout = 60,rollbackFor = Exception.class) |
| | | @Transactional(timeout = 60, rollbackFor = Exception.class) |
| | | public boolean syncPurchasee(List<OrderParams> orders) { |
| | | if (orders.isEmpty()) { |
| | | throw new CoolException("单据内容不能为空!!"); |
| | |
| | | wkorderDto.setTransfer(transfer).setItems(orderItems); |
| | | return R.ok().add(wkorderDto); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/8/22 |
| | | * @description: 盘点差异单同步 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | @Transactional(timeout = 60, rollbackFor = Exception.class) |
| | | public R syncCheckDiffs(SyncCheckDiffParams syncParams) { |
| | | List<CheckDiff> diffs = checkDiffService.list(new LambdaQueryWrapper<CheckDiff>() |
| | | .eq(CheckDiff::getExceStatus, CheckExceStatus.CHECK_ORDER_STATUS_EXCE_DONE.val) |
| | | .in(CheckDiff::getOrderCode, syncParams.getDiffCode())); |
| | | if (diffs.isEmpty()) { |
| | | return R.ok(); |
| | | } |
| | | List<CheckDiffDto> dtos = new ArrayList<>(); |
| | | diffs.forEach(check -> { |
| | | CheckDiffDto dto = new CheckDiffDto(); |
| | | BeanUtils.copyProperties(check, dto); |
| | | List<CheckDiffItem> items = checkDiffItemService.list(new LambdaQueryWrapper<CheckDiffItem>().eq(CheckDiffItem::getCheckId, check.getId())); |
| | | dto.setItems(items); |
| | | dtos.add(dto); |
| | | }); |
| | | |
| | | return R.ok().add(dtos); |
| | | } |
| | | } |