| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.service.business.third.model.PageData; |
| | |
| | | |
| | | @Autowired |
| | | private PlatformWmsJobMapper platformWmsJobMapper; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private PlatformWmsDetailMapper platformWmsDetailMapper; |
| | |
| | | if(Objects.isNull(platformWmsJob)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"未查询到运单信息"); |
| | | } |
| | | String codeStr =systemDictDataBiz.queryByCode(Constants.WMS_PARAM, Constants.WMS_IN_REPERTOTY_CODE_LIST).getCode(); |
| | | List<PlatformWmsDetail> platformWmsDetailList = platformWmsDetailMapper.selectList(new QueryWrapper<PlatformWmsDetail>() |
| | | .lambda().eq(PlatformWmsDetail::getJobId,id).eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO)); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformWmsDetailList)){ |
| | | platformWmsJob.setIoQty( |
| | | platformWmsDetailList.stream().map(m->m.getIoQty()).reduce(BigDecimal.ZERO,BigDecimal::add) |
| | | ); |
| | | for(PlatformWmsDetail d :platformWmsDetailList){ |
| | | if(StringUtils.isNotBlank(d.getInRepertotyCode())){ |
| | | //供应商名称 |
| | | d.setInRepertotyName(Constants.getWmsAreasNameByCode(codeStr,d.getInRepertotyCode())); |
| | | } |
| | | } |
| | | //获取所有合同号(去重) |
| | | List<String> ioCodeList = platformWmsDetailList.stream().map(m->m.getContractNum()).distinct().collect(Collectors.toList()); |
| | | Set<String> ioCodeSet = new HashSet<String>(ioCodeList); |