|
@@ -489,6 +489,10 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
BigDecimal notincludestaxTotal = BigDecimal.ZERO;
|
|
BigDecimal notincludestaxTotal = BigDecimal.ZERO;
|
|
|
//合计面料成本美元
|
|
//合计面料成本美元
|
|
|
BigDecimal includestaxTotal = BigDecimal.ZERO;
|
|
BigDecimal includestaxTotal = BigDecimal.ZERO;
|
|
|
|
|
+ //汇率
|
|
|
|
|
+ BigDecimal exchangeRate = BigDecimal.ZERO;
|
|
|
|
|
+ //汇率
|
|
|
|
|
+ String signNumUS ="rmb";
|
|
|
System.out.println("fabriccostIncludestaxUsd1\t"+syCostAllocation.getFabriccostIncludestaxUsd());
|
|
System.out.println("fabriccostIncludestaxUsd1\t"+syCostAllocation.getFabriccostIncludestaxUsd());
|
|
|
syCostAllocation.setTaxrate2(new BigDecimal("13"));
|
|
syCostAllocation.setTaxrate2(new BigDecimal("13"));
|
|
|
if(syCostAllocation.getFabriccostIncludestaxUsd()!=null){
|
|
if(syCostAllocation.getFabriccostIncludestaxUsd()!=null){
|
|
@@ -501,9 +505,14 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
|
|
|
|
|
System.out.println("国内加工单\t"+orderType+"\t面料含税成本美元\t"+syCostAllocation.getFabriccostIncludestaxUsd());
|
|
System.out.println("国内加工单\t"+orderType+"\t面料含税成本美元\t"+syCostAllocation.getFabriccostIncludestaxUsd());
|
|
|
System.out.println("fabriccostIncludestax集合\t"+fabriccostIncludestax);
|
|
System.out.println("fabriccostIncludestax集合\t"+fabriccostIncludestax);
|
|
|
|
|
+ System.out.println("人民币\t"+signNumUS);
|
|
|
if(/*!orderType.equals("国外加工单")||*/ /*syCostAllocation.getFabriccostIncludestaxUsd()==null*/ fabriccostIncludestax!=null){
|
|
if(/*!orderType.equals("国外加工单")||*/ /*syCostAllocation.getFabriccostIncludestaxUsd()==null*/ fabriccostIncludestax!=null){
|
|
|
if(fabriccostIncludestax.size()!=0){
|
|
if(fabriccostIncludestax.size()!=0){
|
|
|
for(SyCostAllocation str : fabriccostIncludestax){
|
|
for(SyCostAllocation str : fabriccostIncludestax){
|
|
|
|
|
+ if (str.getExchangeRate().compareTo(str.getExchangeRate2())!=0){
|
|
|
|
|
+ signNumUS="us";
|
|
|
|
|
+ }
|
|
|
|
|
+ System.out.println("美元\t"+signNumUS);
|
|
|
for(SyCostAllocationFabric li:list3){
|
|
for(SyCostAllocationFabric li:list3){
|
|
|
String goodsName=li.getGoodsName();
|
|
String goodsName=li.getGoodsName();
|
|
|
if (goodsName.indexOf("--")!=-1){
|
|
if (goodsName.indexOf("--")!=-1){
|
|
@@ -518,6 +527,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
// System.out.println("getFabriccostIncludestax "+str.getFabriccostIncludestax()+" getFabriccostNotincludestax "+str.getFabriccostNotincludestax()
|
|
// System.out.println("getFabriccostIncludestax "+str.getFabriccostIncludestax()+" getFabriccostNotincludestax "+str.getFabriccostNotincludestax()
|
|
|
// +"getFabriccostIncludestaxUsd"+str.getFabriccostIncludestaxUsd()+" getInvoiceQuantity "+str.getInvoiceQuantity()+" quantity "+quantity);
|
|
// +"getFabriccostIncludestaxUsd"+str.getFabriccostIncludestaxUsd()+" getInvoiceQuantity "+str.getInvoiceQuantity()+" quantity "+quantity);
|
|
|
if (str.getInvoiceQuantity().compareTo(quantity)!=0){
|
|
if (str.getInvoiceQuantity().compareTo(quantity)!=0){
|
|
|
|
|
+ exchangeRate=str.getExchangeRate();//汇率
|
|
|
BigDecimal money = str.getFabriccostIncludestax().divide(str.getInvoiceQuantity(),2,BigDecimal.ROUND_HALF_UP);
|
|
BigDecimal money = str.getFabriccostIncludestax().divide(str.getInvoiceQuantity(),2,BigDecimal.ROUND_HALF_UP);
|
|
|
BigDecimal num = money.multiply(quantity);
|
|
BigDecimal num = money.multiply(quantity);
|
|
|
usageQuantityTotal = usageQuantityTotal.add(num);
|
|
usageQuantityTotal = usageQuantityTotal.add(num);
|
|
@@ -550,17 +560,19 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
}
|
|
}
|
|
|
// System.out.println("面料含税人民币2\t"+usageQuantityTotal.setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
// System.out.println("面料含税人民币2\t"+usageQuantityTotal.setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
// System.out.println("实际总金额2\t"+usageQuantityTotal);
|
|
// System.out.println("实际总金额2\t"+usageQuantityTotal);
|
|
|
-
|
|
|
|
|
|
|
+ System.out.println("人民币面料成本notincludestaxTotal\t"+notincludestaxTotal);
|
|
|
if (syCostAllocation.getFabriccostIncludestax()!=null){
|
|
if (syCostAllocation.getFabriccostIncludestax()!=null){
|
|
|
syCostAllocation.setFabriccostIncludestax(syCostAllocation.getFabriccostIncludestax().add(usageQuantityTotal.setScale(2,BigDecimal.ROUND_HALF_UP)));
|
|
syCostAllocation.setFabriccostIncludestax(syCostAllocation.getFabriccostIncludestax().add(usageQuantityTotal.setScale(2,BigDecimal.ROUND_HALF_UP)));
|
|
|
}else{
|
|
}else{
|
|
|
syCostAllocation.setFabriccostIncludestax(usageQuantityTotal.setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
syCostAllocation.setFabriccostIncludestax(usageQuantityTotal.setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
}
|
|
}
|
|
|
|
|
+ System.out.println("人民币面料成本1\t"+syCostAllocation.getFabriccostNotincludestax());
|
|
|
if (syCostAllocation.getFabriccostNotincludestax()!=null){
|
|
if (syCostAllocation.getFabriccostNotincludestax()!=null){
|
|
|
syCostAllocation.setFabriccostNotincludestax(syCostAllocation.getFabriccostNotincludestax().add(notincludestaxTotal));
|
|
syCostAllocation.setFabriccostNotincludestax(syCostAllocation.getFabriccostNotincludestax().add(notincludestaxTotal));
|
|
|
}else{
|
|
}else{
|
|
|
syCostAllocation.setFabriccostNotincludestax(notincludestaxTotal);
|
|
syCostAllocation.setFabriccostNotincludestax(notincludestaxTotal);
|
|
|
}
|
|
}
|
|
|
|
|
+ System.out.println("人民币面料成本2\t"+syCostAllocation.getFabriccostNotincludestax());
|
|
|
System.out.println("includestaxTotal\t"+includestaxTotal+" getFabriccostIncludestaxUsd "+syCostAllocation.getFabriccostIncludestaxUsd());
|
|
System.out.println("includestaxTotal\t"+includestaxTotal+" getFabriccostIncludestaxUsd "+syCostAllocation.getFabriccostIncludestaxUsd());
|
|
|
if (syCostAllocation.getFabriccostIncludestaxUsd()!=null){
|
|
if (syCostAllocation.getFabriccostIncludestaxUsd()!=null){
|
|
|
syCostAllocation.setFabriccostIncludestaxUsd(syCostAllocation.getFabriccostIncludestaxUsd().add(includestaxTotal));
|
|
syCostAllocation.setFabriccostIncludestaxUsd(syCostAllocation.getFabriccostIncludestaxUsd().add(includestaxTotal));
|
|
@@ -579,6 +591,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ syCostAllocation.setSignNumUS(signNumUS);//标识
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
long startTime3 = System.currentTimeMillis();
|
|
long startTime3 = System.currentTimeMillis();
|