| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.controller.params.TaskInParam; |
| | | import com.vincent.rsf.server.api.controller.erp.params.TaskInParam; |
| | | import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto; |
| | | import com.vincent.rsf.server.api.service.WcsService; |
| | | import com.vincent.rsf.server.api.utils.LocUtils; |
| | | import com.vincent.rsf.server.common.constant.Constants; |
| | | import com.vincent.rsf.server.manager.controller.params.CheckLocQueryParams; |
| | | import com.vincent.rsf.server.manager.controller.params.LocToTaskParams; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.enums.*; |
| | |
| | | private OutStockService outStockService; |
| | | @Autowired |
| | | private WaveService waveService; |
| | | @Autowired |
| | | private BasStationService basStationService; |
| | | |
| | | |
| | | /** |
| | |
| | | if (Objects.isNull(map.getItems()) || map.getItems().isEmpty()) { |
| | | throw new CoolException("明细不能为空!"); |
| | | } |
| | | |
| | | String siteNo = map.getSiteNo(); |
| | | List<LocItem> items = map.getItems(); |
| | | Map<Long, List<LocItem>> listMap = items.stream().collect(Collectors.groupingBy(LocItem::getLocId)); |
| | |
| | | .setCreateTime(new Date()) |
| | | .setUpdateTime(new Date()) |
| | | .setTaskStatus(TaskStsType.GENERATE_OUT.id) |
| | | .setBarcode(loc.getBarcode()); |
| | | .setBarcode(loc.getBarcode()) |
| | | .setMemo(map.getMemo()); |
| | | |
| | | List<LocItem> locItems = this.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, key)); |
| | | if (locItems.isEmpty()) { |
| | |
| | | } else if (map.getType().equals(Constants.TASK_TYPE_OUT_CHECK)) { |
| | | //盘点出库 |
| | | DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() |
| | | .eq(DeviceSite::getChannel, loc.getChannel()) |
| | | .eq(!Objects.isNull(loc.getChannel()), DeviceSite::getChannel, loc.getChannel()) |
| | | .eq(DeviceSite::getSite, siteNo) |
| | | .eq(DeviceSite::getType, TaskType.TASK_TYPE_CHECK_OUT.type)); |
| | | if (Objects.isNull(deviceSite)) { |
| | |
| | | TaskInParam param = new TaskInParam(); |
| | | param.setIoType(TaskType.TASK_TYPE_OUT.type) |
| | | .setOrgLoc(map.getOrgLoc()) |
| | | .setSourceStaNo(Integer.parseInt(deviceSite.getSite())) |
| | | .setSourceStaNo(deviceSite.getSite()) |
| | | .setLocType1(Integer.parseInt(orgLoc.getType()) |
| | | ); |
| | | InTaskMsgDto locNo; |
| | |
| | | .setSort(Constants.TASK_SORT_DEFAULT_VALUE) |
| | | .setUpdateTime(new Date()) |
| | | .setTaskStatus(TaskStsType.GENERATE_IN.id) |
| | | .setBarcode(orgLoc.getBarcode()); |
| | | .setBarcode(orgLoc.getBarcode()) |
| | | .setMemo(map.getMemo()); |
| | | |
| | | if (!taskService.save(task)) { |
| | | throw new CoolException("新建移库任务失败!!"); |
| | |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public List<LocItem> listByMatnr(List<String> matnr) { |
| | | public List<LocItem> listByMatnr(CheckLocQueryParams matnr) { |
| | | LambdaQueryWrapper<LocItem> wrapper = new LambdaQueryWrapper<LocItem>() |
| | | .in(!matnr.isEmpty(), LocItem::getMatnrCode, matnr); |
| | | return this.baseMapper.listByMatnr(LocStsType.LOC_STS_TYPE_F.type, wrapper); |
| | | .eq(StringUtils.isNotBlank(matnr.getLocCode()), LocItem::getLocCode, matnr.getLocCode()) |
| | | // .eq(StringUtils.isNotBlank(matnr.getChannel()), LocItem::getChannel, matnr.getChannel()) |
| | | .in(!matnr.getMatnrCode().isEmpty(), LocItem::getMatnrCode, matnr.getMatnrCode()); |
| | | return this.baseMapper.listByMatnr(LocStsType.LOC_STS_TYPE_F.type, matnr.getChannel(), wrapper); |
| | | } |
| | | } |