6 changed files with 308 additions and 10 deletions
-
178src/main/java/com/gaotao/modules/api/entity/IfsInventoryPartInStock.java
-
9src/main/java/com/gaotao/modules/api/service/IfsApiService.java
-
19src/main/java/com/gaotao/modules/api/service/impl/IfsApiServiceImpl.java
-
101src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java
-
9src/main/java/com/gaotao/modules/other/service/impl/OtherInboundServiceImpl.java
-
2src/main/java/com/gaotao/modules/other/service/impl/OtherOutboundServiceImpl.java
@ -0,0 +1,178 @@ |
|||
package com.gaotao.modules.api.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* IFS库存在库查询响应实体类 |
|||
* |
|||
* @Description 用于接收IFS InventoryPartInStock接口返回的库存数据 |
|||
* @Author AI Assistant |
|||
* @Date 2025/10/11 |
|||
*/ |
|||
@Data |
|||
public class IfsInventoryPartInStock { |
|||
|
|||
@JsonProperty("ActivitySeq") |
|||
private String activitySeq; |
|||
|
|||
@JsonProperty("AvailabilityControlId") |
|||
private String availabilityControlId; |
|||
|
|||
@JsonProperty("AvgUnitTransitCost") |
|||
private String avgUnitTransitCost; |
|||
|
|||
@JsonProperty("BayNo") |
|||
private String bayNo; |
|||
|
|||
@JsonProperty("BinNo") |
|||
private String binNo; |
|||
|
|||
@JsonProperty("CatchQtyInTransit") |
|||
private String catchQtyInTransit; |
|||
|
|||
@JsonProperty("CatchQtyOnhand") |
|||
private String catchQtyOnhand; |
|||
|
|||
@JsonProperty("ConditionCode") |
|||
private String conditionCode; |
|||
|
|||
@JsonProperty("ConfigurationId") |
|||
private String configurationId; |
|||
|
|||
@JsonProperty("Contract") |
|||
private String contract; |
|||
|
|||
@JsonProperty("CountVariance") |
|||
private String countVariance; |
|||
|
|||
@JsonProperty("EngChgLevel") |
|||
private String engChgLevel; |
|||
|
|||
@JsonProperty("ExpirationDate") |
|||
private String expirationDate; |
|||
|
|||
@JsonProperty("FreezeFlag") |
|||
private String freezeFlag; |
|||
|
|||
@JsonProperty("FreezeFlagDb") |
|||
private String freezeFlagDb; |
|||
|
|||
@JsonProperty("HandlingUnitId") |
|||
private String handlingUnitId; |
|||
|
|||
@JsonProperty("LastActivityDate") |
|||
private String lastActivityDate; |
|||
|
|||
@JsonProperty("LastCountDate") |
|||
private String lastCountDate; |
|||
|
|||
@JsonProperty("LocationNo") |
|||
private String locationNo; |
|||
|
|||
@JsonProperty("LocationType") |
|||
private String locationType; |
|||
|
|||
@JsonProperty("LocationTypeDb") |
|||
private String locationTypeDb; |
|||
|
|||
@JsonProperty("LotBatchNo") |
|||
private String lotBatchNo; |
|||
|
|||
@JsonProperty("Objid") |
|||
private String objid; |
|||
|
|||
@JsonProperty("Objkey") |
|||
private String objkey; |
|||
|
|||
@JsonProperty("Objversion") |
|||
private String objversion; |
|||
|
|||
@JsonProperty("OwningCustomerNo") |
|||
private String owningCustomerNo; |
|||
|
|||
@JsonProperty("OwningVendorNo") |
|||
private String owningVendorNo; |
|||
|
|||
@JsonProperty("PartNo") |
|||
private String partNo; |
|||
|
|||
@JsonProperty("PartOwnership") |
|||
private String partOwnership; |
|||
|
|||
@JsonProperty("PartOwnershipDb") |
|||
private String partOwnershipDb; |
|||
|
|||
@JsonProperty("ProjectId") |
|||
private String projectId; |
|||
|
|||
@JsonProperty("QtyInTransit") |
|||
private String qtyInTransit; |
|||
|
|||
@JsonProperty("QtyOnhand") |
|||
private String qtyOnhand; |
|||
|
|||
@JsonProperty("QtyReserved") |
|||
private String qtyReserved; |
|||
|
|||
@JsonProperty("ReceiptDate") |
|||
private String receiptDate; |
|||
|
|||
@JsonProperty("RowNo") |
|||
private String rowNo; |
|||
|
|||
@JsonProperty("SerialNo") |
|||
private String serialNo; |
|||
|
|||
@JsonProperty("Source") |
|||
private String source; |
|||
|
|||
@JsonProperty("TierNo") |
|||
private String tierNo; |
|||
|
|||
@JsonProperty("WaivDevRejNo") |
|||
private String waivDevRejNo; |
|||
|
|||
@JsonProperty("Warehouse") |
|||
private String warehouse; |
|||
|
|||
/** |
|||
* 获取可用库存数量(在库数量 - 预留数量) |
|||
* @return 可用库存数量 |
|||
*/ |
|||
public BigDecimal getAvailableQty() { |
|||
try { |
|||
BigDecimal onhand = new BigDecimal(qtyOnhand != null ? qtyOnhand : "0"); |
|||
BigDecimal reserved = new BigDecimal(qtyReserved != null ? qtyReserved : "0"); |
|||
return onhand.subtract(reserved); |
|||
} catch (NumberFormatException e) { |
|||
return BigDecimal.ZERO; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 获取在库数量 |
|||
* @return 在库数量 |
|||
*/ |
|||
public BigDecimal getQtyOnhandAsBigDecimal() { |
|||
try { |
|||
return new BigDecimal(qtyOnhand != null ? qtyOnhand : "0"); |
|||
} catch (NumberFormatException e) { |
|||
return BigDecimal.ZERO; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 获取预留数量 |
|||
* @return 预留数量 |
|||
*/ |
|||
public BigDecimal getQtyReservedAsBigDecimal() { |
|||
try { |
|||
return new BigDecimal(qtyReserved != null ? qtyReserved : "0"); |
|||
} catch (NumberFormatException e) { |
|||
return BigDecimal.ZERO; |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue