| | |
| | | import com.zy.api.enums.OrderType; |
| | | import com.zy.api.enums.OrderWkType; |
| | | import com.zy.api.service.KopenApiService; |
| | | import com.zy.asrs.entity.CheckOrder; |
| | | import com.zy.asrs.entity.CheckOrderDetl; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.enums.CommonEnum; |
| | | import com.zy.asrs.enums.OrderSettle; |
| | | import com.zy.asrs.enums.OrderTypeEnum; |
| | | import com.zy.asrs.service.CheckOrderDetlService; |
| | | import com.zy.asrs.service.CheckOrderService; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.asrs.service.*; |
| | | |
| | | import com.zy.asrs.service.impl.BasAreasServiceImpl; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | private String port; |
| | | @Value("${kopen.prefix}") |
| | | private String prefix; |
| | | @Autowired |
| | | private BasAreasService basAreasService; |
| | | |
| | | |
| | | /** |
| | |
| | | if (!Objects.isNull(code) && code.equals(200)) { |
| | | if (!Objects.isNull(order)) { |
| | | order.setReportOnce(5); |
| | | order.setSettle(6L); |
| | | orderService.updateById(order); |
| | | } |
| | | return XSR.ok("入库单上报完成!!"); |
| | |
| | | if (Objects.isNull(params) || params.isEmpty()) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | |
| | | Set<String> collect = params.stream().map(PageRequestParams::getPro_id).collect(Collectors.toSet()); |
| | | |
| | | Set<String> komccodes = params.stream().map(PageRequestParams::getPro_komcode).collect(Collectors.toSet()); |
| | | |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |
| | | wrapper.in(collect.isEmpty(), "pro_id", collect); |
| | | wrapper.in(komccodes.isEmpty(), "komccode", komccodes); |
| | | |
| | | List<LocDetl> detls = locDetlService.selectList(wrapper); |
| | | List<LocDetl> detls = new ArrayList<>(); |
| | | params.forEach(param -> { |
| | | List<LocDetl> selectList = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("supp_code", param.getPro_id()).eq("matnr", param.getPro_komcode())); |
| | | if (selectList != null && !selectList.isEmpty()) { |
| | | detls.addAll(selectList); |
| | | } |
| | | }); |
| | | |
| | | if (detls == null || detls.isEmpty()) { |
| | | return XSR.ok(); |
| | |
| | | } else { |
| | | locDetlDto.setLock_qty(Integer.parseInt(item.getDiffQty().toString())); |
| | | } |
| | | |
| | | if (item.getBookQty().compareTo(BigDecimal.ZERO) == 0) { |
| | | locDetlDto.setStock_qty(0); |
| | | locDetlDto.setStock_qty(item.getAnfme().intValue()); |
| | | } else { |
| | | locDetlDto.setStock_qty(Integer.parseInt(item.getBookQty().toString())); |
| | | } |
| | | LocDetl barcode = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("barcode", item.getZpallet())); |
| | | if (!Objects.isNull(barcode)) { |
| | | BasAreas areas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("id", barcode.getAreaId())); |
| | | if (!Objects.isNull(areas)) { |
| | | locDetlDto.setLocation_no(areas.getName()); |
| | | } |
| | | } |
| | | locDetlDto |
| | | .setPro_komcode(item.getMatnr()) |
| | | .setPro_id(item.getStandby1()) |