| | |
| | | import com.vincent.rsf.server.manager.controller.dto.LocStockDto; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.enums.*; |
| | | import com.vincent.rsf.server.manager.mapper.MatnrMapper; |
| | | import com.vincent.rsf.server.manager.service.CusItemSyncViewQueryService; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.system.constant.DictTypeCode; |
| | | import com.vincent.rsf.server.system.constant.GlobalConfigCode; |
| | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private MatnrMapper matnrMapper; |
| | | private CusItemSyncViewQueryService cusItemSyncViewQueryService; |
| | | |
| | | /** |
| | | * 云仓改单/取消前:任务明细已关联该单据且主任务未逻辑删除则不允许 |
| | |
| | | return; |
| | | } |
| | | |
| | | List<Map<String, Object>> viewItems = matnrMapper.selectByCusItemSyncView(matnrCodes); |
| | | List<Map<String, Object>> viewItems = cusItemSyncViewQueryService.listByItemNos(matnrCodes); |
| | | Set<String> inView = viewItems == null ? Collections.emptySet() : viewItems.stream() |
| | | .map(r -> StringUtils.trimToNull(Objects.toString(r.get("item_no"), null))) |
| | | .filter(Objects::nonNull) |
| | |
| | | private void syncMatnrNonForceFromView(List<String> matnrCodes, Map<String, SyncOrdersItem> orderItemByCode, Long loginUserId) { |
| | | List<Map<String, Object>> viewItems = null; |
| | | try { |
| | | viewItems = matnrMapper.selectByCusItemSyncView(matnrCodes); |
| | | viewItems = cusItemSyncViewQueryService.listByItemNos(matnrCodes); |
| | | } catch (Exception ex) { |
| | | log.warn("查询 cus_item_sync_view 失败,将仅按物料表校验:{}", ex.getMessage()); |
| | | } |
| | |
| | | } |
| | | Matnr m = matnrService.getOneByCodeAndBatch(code, ""); |
| | | if (m == null) { |
| | | throw new CoolException("视图无该物料且物料表不存在:" + code); |
| | | throw new CoolException("物料不存在:" + code); |
| | | } |
| | | } |
| | | } |