|
|
@ -1,6 +1,8 @@ |
|
|
|
package com.ruoyi.purchase.domain; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
|
|
@ -17,6 +19,7 @@ import com.ruoyi.common.core.domain.BaseEntity; |
|
|
|
public class PurchasePlanChild extends BaseEntity |
|
|
|
{ |
|
|
|
private static final long serialVersionUID = 1L; |
|
|
|
public List<PurchaseQuoteChild> parseSupplierMaterialCombinations; |
|
|
|
|
|
|
|
/** 采购计划物料清单索引 */ |
|
|
|
private Long purchasePlanChildId; |
|
|
@ -83,10 +86,30 @@ public class PurchasePlanChild extends BaseEntity |
|
|
|
|
|
|
|
/** 删除标志 */ |
|
|
|
private String delFlag; |
|
|
|
/** 关联供应商编号 */ |
|
|
|
private String supplierCodes; |
|
|
|
/** 关联采购报价单编号 */ |
|
|
|
private String correlationCodes; |
|
|
|
|
|
|
|
private List<PurchaseQuoteChild> purchaseQuoteChildList; |
|
|
|
private List<PurchaseQuoteChild> purchaseSupplierList; |
|
|
|
|
|
|
|
public void setPurchasePlanChildId(Long purchasePlanChildId) |
|
|
|
public String getSupplierCodes() { |
|
|
|
return supplierCodes; |
|
|
|
} |
|
|
|
|
|
|
|
public void setSupplierCodes(String supplierCodes) { |
|
|
|
this.supplierCodes = supplierCodes; |
|
|
|
} |
|
|
|
|
|
|
|
public String getCorrelationCodes() { |
|
|
|
return correlationCodes; |
|
|
|
} |
|
|
|
|
|
|
|
public void setCorrelationCodes(String correlationCodes) { |
|
|
|
this.correlationCodes = correlationCodes; |
|
|
|
} |
|
|
|
|
|
|
|
public void setPurchasePlanChildId(Long purchasePlanChildId) |
|
|
|
{ |
|
|
|
this.purchasePlanChildId = purchasePlanChildId; |
|
|
|
} |
|
|
@ -233,12 +256,12 @@ public class PurchasePlanChild extends BaseEntity |
|
|
|
this.supplierName = supplierName; |
|
|
|
} |
|
|
|
|
|
|
|
public List<PurchaseQuoteChild> getPurchaseQuoteChildList() { |
|
|
|
return purchaseQuoteChildList; |
|
|
|
public List<PurchaseQuoteChild> getPurchaseSupplierList() { |
|
|
|
return purchaseSupplierList; |
|
|
|
} |
|
|
|
|
|
|
|
public void setPurchaseQuoteChildList(List<PurchaseQuoteChild> purchaseQuoteChildList) { |
|
|
|
this.purchaseQuoteChildList = purchaseQuoteChildList; |
|
|
|
public void setPurchaseSupplierList(List<PurchaseQuoteChild> purchaseSupplierList) { |
|
|
|
this.purchaseSupplierList = purchaseSupplierList; |
|
|
|
} |
|
|
|
|
|
|
|
public String getUseStatus() |
|
|
@ -264,6 +287,31 @@ public class PurchasePlanChild extends BaseEntity |
|
|
|
return delFlag; |
|
|
|
} |
|
|
|
|
|
|
|
public List<PurchaseQuoteChild> parseSupplierMaterialCombinations(String combinations) { |
|
|
|
if (combinations == null || combinations.isEmpty()) { |
|
|
|
return Collections.emptyList(); |
|
|
|
} |
|
|
|
//materialCode|purchaseQuoteCode|supplierCode|supplierName|materialName|materialNoRmb|materialRmb
|
|
|
|
/* 1. 料号 | 2. 供应商报价编号 | 3. 供应商编号 | 4.供应商名称 | 5. 物料名称 | 6. 物料含税单价(RMB) | 7. 物料不含税单价(RMB) */ |
|
|
|
List<PurchaseQuoteChild> purchaseSupplierList = new ArrayList<>(); |
|
|
|
String[] split = combinations.split(","); |
|
|
|
for (int i = 0; i < split.length; i++) { |
|
|
|
String[] split1 = split[i].split("\\|"); |
|
|
|
if (split1.length != 7) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
PurchaseQuoteChild purchaseQuoteChild = new PurchaseQuoteChild(); |
|
|
|
purchaseQuoteChild.setMaterialCode(split1[0]); |
|
|
|
purchaseQuoteChild.setPurchaseQuoteCode(split1[1]); |
|
|
|
purchaseQuoteChild.setSupplierCode(split1[2]); |
|
|
|
purchaseQuoteChild.setSupplierName(split1[3]); |
|
|
|
purchaseQuoteChild.setMaterialName(split1[4]); |
|
|
|
purchaseQuoteChild.setMaterialNoRmb(BigDecimal.valueOf(Float.parseFloat(split1[5]))); |
|
|
|
purchaseQuoteChild.setMaterialRmb(BigDecimal.valueOf(Float.parseFloat(split1[6]))); |
|
|
|
purchaseSupplierList.add(purchaseQuoteChild); |
|
|
|
} |
|
|
|
return purchaseSupplierList; |
|
|
|
} |
|
|
|
@Override |
|
|
|
public String toString() { |
|
|
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|
|
|