| | |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.controller.params.*; |
| | | import com.vincent.rsf.server.api.controller.erp.params.*; |
| | | import com.vincent.rsf.server.api.entity.dto.*; |
| | | import com.vincent.rsf.server.manager.enums.*; |
| | | import com.vincent.rsf.server.api.service.MobileService; |
| | |
| | | throw new CoolException("数据错误!!"); |
| | | } |
| | | if (!one.getExceStatus().equals(AsnExceStatus.OUT_STOCK_STATUS_TASK_DONE.val)) { |
| | | throw new CoolException("出库单未完成,无法完成收货!!"); |
| | | throw new CoolException("调拔出库单未完成,不可执行收货操作!!"); |
| | | } |
| | | } |
| | | |
| | |
| | | throw new CoolException("数据错误:主单不存在!!"); |
| | | } |
| | | //TODO /**收货数量累加,1. 会出超收情况 2. 会有收货不足情况*/ |
| | | Double rcptedQty = Math.round((wkOrder.getQty() + receiptQty) * 10000) / 10000.0; |
| | | Double rcptedQty = Math.round((wkOrder.getQty() + receiptQty) * 100) / 100.0; |
| | | wkOrder.setQty(rcptedQty).setExceStatus(AsnExceStatus.ASN_EXCE_STATUS_EXCE_ING.val); |
| | | if (!asnOrderMapper.updateById(wkOrder)) { |
| | | throw new CoolException("已收货数量修改失败!!"); |
| | |
| | | throw new CoolException("请输入正确的时间格式!!"); |
| | | } |
| | | |
| | | Double itemRcptQty = Math.round((dto.getReceiptQty() + orderItem.getQty()) * 10000) / 10000.0; |
| | | Double itemRcptQty = Math.round((dto.getReceiptQty() + orderItem.getQty()) * 100) / 100.0; |
| | | Boolean allowOver = false; |
| | | if (!Objects.isNull(config)) { |
| | | if (Boolean.parseBoolean(config.getVal())) { |
| | |
| | | |
| | | if (!Objects.isNull(serviceOne)) { |
| | | item.setId(serviceOne.getId()); |
| | | Double anfme = Math.round((item.getAnfme() + serviceOne.getAnfme()) * 10000) / 10000.0; |
| | | Double anfme = Math.round((item.getAnfme() + serviceOne.getAnfme()) * 100) / 100.0; |
| | | item.setAnfme(anfme); |
| | | } |
| | | |
| | |
| | | Object code = params.get("code"); |
| | | Object matnrCode = params.get("matnrCode"); |
| | | Object asnCode = params.get("asnCode"); |
| | | Object crushNo = params.get("fieldsIndex"); |
| | | Object batch = params.get("batch"); |
| | | String fieldIndex = null; |
| | | if (!Objects.isNull(crushNo)) { |
| | | FieldsItem fieldsItem = fieldsItemService.getOne(new LambdaQueryWrapper<FieldsItem>().eq(FieldsItem::getValue, crushNo).last("Limit 1")); |
| | | |
| | | if (!Objects.isNull(fieldsItem)) { |
| | | fieldIndex = fieldsItem.getUuid(); |
| | | } |
| | | } |
| | | //TODO 后续需根据策略配置,获取组拖数据。如:混装,按批次混装等 |
| | | LambdaQueryWrapper<WarehouseAreasItem> queryWrapper = new LambdaQueryWrapper<WarehouseAreasItem>() |
| | | .or().eq(!Cools.isEmpty(code), WarehouseAreasItem::getTrackCode, code) |
| | | .or().eq(!Cools.isEmpty(batch), WarehouseAreasItem::getSplrBatch, batch) |
| | | .or().eq(!Cools.isEmpty(fieldIndex), WarehouseAreasItem::getFieldsIndex, fieldIndex) |
| | | .or().eq(!Cools.isEmpty(matnrCode), WarehouseAreasItem::getMatnrCode, matnrCode) |
| | | .or().eq(!Cools.isEmpty(asnCode), WarehouseAreasItem::getAsnCode, asnCode); |
| | | List<WarehouseAreasItem> list = warehouseAreasItemService.list(queryWrapper); |
| | | list.removeIf(e -> e.getAnfme() <= e.getWorkQty()); |
| | | list.forEach(item -> { |
| | | Map<String, String> fields = FieldsUtils.getFields(item.getFieldsIndex()); |
| | | item.setExtendFields(fields); |
| | | }); |
| | | |
| | | return R.ok(list); |
| | | } |
| | | |
| | |
| | | if (Objects.isNull(stockItem)) { |
| | | detlsDto.setStockQty(0.0); |
| | | } else { |
| | | Double anfme = Math.round((stockItem.getAnfme() + stockItem.getWorkQty()) * 10000) / 10000.0; |
| | | Double anfme = Math.round((stockItem.getAnfme() + stockItem.getWorkQty()) * 100) / 100.0; |
| | | detlsDto.setStockQty(anfme); |
| | | } |
| | | |