|
|
@ -8,6 +8,7 @@ import javax.validation.constraints.NotBlank; |
|
|
|
import javax.validation.constraints.Pattern; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@Data |
|
|
|
public class APPayable { |
|
|
@ -113,4 +114,109 @@ public class APPayable { |
|
|
|
@ApiModelProperty("备注") |
|
|
|
private String remarks; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 业务实体类按照模板进行装换 |
|
|
|
* @param params |
|
|
|
* @param readJsonFile |
|
|
|
* @param fEntityDetail_ |
|
|
|
* @param fEntityPlan_ |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static String cloneKingDeeParams(Map<String,Object> params, String readJsonFile, String fEntityDetail_, String fEntityPlan_){ |
|
|
|
readJsonFile = readJsonFile.replace("@KD_Creator", "zs"); |
|
|
|
//单据类型:FBillTypeID (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FBillTypeID", "YFD01_SYS"); |
|
|
|
//业务日期:FDATE (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FDATE", "2022-07-26"); |
|
|
|
//单据状态:FDOCUMENTSTATUS (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FDOCUMENTSTATUS", "Z"); |
|
|
|
//供应商:FSUPPLIERID (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FSUPPLIERID", "010001"); |
|
|
|
//币别:FCURRENCYID (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FCURRENCYID", "PRE001"); |
|
|
|
//付款条件:FPayConditon
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FPayConditon", ""); |
|
|
|
//业务类型:FBUSINESSTYPE (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FBUSINESSTYPE", "CG"); |
|
|
|
//结算组织:FSETTLEORGID (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FSETTLEORGID", "101"); |
|
|
|
//付款组织:FPAYORGID (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FPAYORGID", "101"); |
|
|
|
//采购部门:FPURCHASEDEPTID (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FPURCHASEDEPTID", "01"); |
|
|
|
//作废状态:FCancelStatus (必填项)
|
|
|
|
readJsonFile = readJsonFile.replace("@KD_FCancelStatus", "A"); |
|
|
|
StringBuilder sb=new StringBuilder(); |
|
|
|
for(int i=0;i<1;i++){ |
|
|
|
String fEntityDetail=fEntityDetail_.toString(); |
|
|
|
//物料编码:FMATERIALID
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FMATERIALID", " JX091054"); |
|
|
|
//物料说明:FMaterialDesc
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FMaterialDesc", "X牵引6*4-550超"); |
|
|
|
//计价单位:FPRICEUNITID
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FPRICEUNITID", " liang"); |
|
|
|
//单价:FPrice
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FPrice@", "312500.0"); |
|
|
|
//计价数量:FPriceQty
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FPriceQty", "2.0"); |
|
|
|
//含税单价:FTaxPrice
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FTaxPrice@", "350000.0"); |
|
|
|
//含税净价:FPriceWithTax
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FPriceWithTax", "346500.0"); |
|
|
|
//税率(%):FEntryTaxRate
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FEntryTaxRate", "12.0"); |
|
|
|
//运输编号:F_PMZC_Assistant
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_F_PMZC_Assistant", "1904110789"); |
|
|
|
//物流车辆:F_PMZC_Base
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_F_PMZC_Base", "0001F"); |
|
|
|
//物流项目:F_PMZC_Base1
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_F_PMZC_Base1", "01.001"); |
|
|
|
//折扣率(%):FEntryDiscountRate
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FEntryDiscountRate", "1.0"); |
|
|
|
//折扣额:FDISCOUNTAMOUNTFOR
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FDISCOUNTAMOUNTFOR", "7000.0"); |
|
|
|
//不含税金额:FNoTaxAmountFor_D
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FNoTaxAmountFor_D", "618750.0"); |
|
|
|
//税额:FTAXAMOUNTFOR_D
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FTAXAMOUNTFOR_D", "74250.0"); |
|
|
|
//价税合计:FALLAMOUNTFOR_D
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_F_PMZC_Base1", "693000.0"); |
|
|
|
//库存单位:FStockUnitId
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FStockUnitId", "liang"); |
|
|
|
//库存数量:FStockQty
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FStockQty", "2.0"); |
|
|
|
//库存基本数量:FStockBaseQty
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_F_PMZC_Base1", "2.0"); |
|
|
|
//计价基本分母:FPriceBaseDen
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FPriceBaseDen", "1.0"); |
|
|
|
//库存基本分子:FStockBaseNum
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FStockBaseNum", "1.0"); |
|
|
|
//含税单价:FTaxPrice
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FTaxPrice@", "350000.0"); |
|
|
|
//税率(%):FEntryTaxRate
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FEntryTaxRate", "12.0"); |
|
|
|
//价税合计:FALLAMOUNTFOR_D
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FALLAMOUNTFOR_D", "693000.0"); |
|
|
|
//库存基本数量:FStockBaseQty
|
|
|
|
fEntityDetail = fEntityDetail.replace("@KD_FStockBaseQty", "2.0"); |
|
|
|
sb.append(fEntityDetail).append(","); |
|
|
|
} |
|
|
|
String sbs=sb.substring(0,sb.length()-1); |
|
|
|
readJsonFile=readJsonFile.replace("@KD_FEntityDetail",sbs); |
|
|
|
StringBuilder sb_fEntityPlan=new StringBuilder(); |
|
|
|
for(int i=0;i<1;i++){ |
|
|
|
String fEntityPlan=fEntityPlan_.toString(); |
|
|
|
//应付金额:FPAYAMOUNTFOR
|
|
|
|
fEntityPlan = fEntityPlan.replace("@KD_FPAYAMOUNTFOR", "693000.00"); |
|
|
|
//应付比例(%):FPAYRATE
|
|
|
|
fEntityPlan = fEntityPlan.replace("@KD_FPAYRATE", "100.00000"); |
|
|
|
//表头计划 - 到期日:FENDDATE
|
|
|
|
fEntityPlan = fEntityPlan.replace("@KD_FENDDATE", "2022-07-22 00:00:00"); |
|
|
|
sb_fEntityPlan.append(fEntityPlan).append(","); |
|
|
|
} |
|
|
|
String sb_fEntityPlans=sb_fEntityPlan.substring(0,sb_fEntityPlan.length()-1); |
|
|
|
readJsonFile=readJsonFile.replace("@KD_FEntityPlan",sb_fEntityPlans); |
|
|
|
return readJsonFile; |
|
|
|
} |
|
|
|
} |
|
|
|