|
@@ -185,10 +185,14 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
|
|
|
FabricLoss fabricLoss1 = null;
|
|
|
if (syLossReport1 != null){
|
|
|
+
|
|
|
fabricLoss1 = JSON.parseObject(JSON.toJSONString(syLossReport1.getContent()), FabricLoss.class);
|
|
|
syCostAllocation.setFabriccostIncludestax(new BigDecimal(fabricLoss1.getActualMoney()));
|
|
|
syCostAllocation.setFabriccostNotincludestax(new BigDecimal(fabricLoss1.getFabricCostInvoiceList().stream().
|
|
|
filter(item->item.getINoTaxMoney()!=null).mapToDouble(FabricCostInvoice::getINoTaxMoney).sum()));
|
|
|
+
|
|
|
+ syCostAllocation.setFabriccostIncludestaxUsd(syCostAllocation.getFabriccostNotincludestax().divide(syCostAllocation.getExchangeRate(),2,BigDecimal.ROUND_HALF_UP));
|
|
|
+ syCostAllocation.setFabriccostNotincludestaxUsd(syCostAllocation.getFabriccostNotincludestax().divide(syCostAllocation.getExchangeRate(),2,BigDecimal.ROUND_HALF_UP));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -291,23 +295,31 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
Ingredient.setSyRemaining(remaininglist);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(Ingredient.getUsdAmount()!=null){
|
|
|
if(syCostAllocation.getExcipiencostIncludestax()==null){
|
|
|
syCostAllocation.setExcipiencostIncludestax(BigDecimal.ZERO);
|
|
|
+ syCostAllocation.setExcipiencostIncludestaxUsd(BigDecimal.ZERO);
|
|
|
}
|
|
|
syCostAllocation.setExcipiencostIncludestax(Ingredient.getUsdAmount().add(syCostAllocation.getExcipiencostIncludestax()));
|
|
|
+ syCostAllocation.setExcipiencostIncludestaxUsd(syCostAllocation.getExcipiencostIncludestax().divide(syCostAllocation.getExchangeRate(),2,BigDecimal.ROUND_HALF_UP));
|
|
|
+
|
|
|
}else {
|
|
|
syCostAllocation.setExcipiencostIncludestax(BigDecimal.ZERO);
|
|
|
+ syCostAllocation.setExcipiencostIncludestaxUsd(BigDecimal.ZERO);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(Ingredient.getPriceExcludingtax()!=null){
|
|
|
if(syCostAllocation.getExcipiencostNotincludestax()==null){
|
|
|
syCostAllocation.setExcipiencostNotincludestax(BigDecimal.ZERO);
|
|
|
+ syCostAllocation.setExcipiencostNotincludestaxUsd(BigDecimal.ZERO);
|
|
|
}
|
|
|
syCostAllocation.setExcipiencostNotincludestax(Ingredient.getPriceExcludingtax().add(syCostAllocation.getExcipiencostNotincludestax()));
|
|
|
+ syCostAllocation.setExcipiencostNotincludestaxUsd(syCostAllocation.getExcipiencostNotincludestax().divide(syCostAllocation.getExchangeRate(),2,BigDecimal.ROUND_HALF_UP));
|
|
|
+
|
|
|
}else {
|
|
|
syCostAllocation.setExcipiencostNotincludestax(BigDecimal.ZERO);
|
|
|
+ syCostAllocation.setExcipiencostNotincludestaxUsd(BigDecimal.ZERO);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -343,14 +355,17 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
}else {
|
|
|
syCostAllocation.setUsdTotalexportprice(BigDecimal.ZERO);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(ship.getProcessCost()!=null){
|
|
|
if(syCostAllocation.getRmbProcesscost()==null){
|
|
|
syCostAllocation.setRmbProcesscost(BigDecimal.ZERO);
|
|
|
+ syCostAllocation.setUsdProcesscost(BigDecimal.ZERO);
|
|
|
}
|
|
|
syCostAllocation.setRmbProcesscost(ship.getProcessCost().add(syCostAllocation.getRmbProcesscost()));
|
|
|
+ syCostAllocation.setUsdProcesscost(ship.getProcessCostUsd().add(syCostAllocation.getUsdProcesscost()));
|
|
|
}else {
|
|
|
ship.setProcessCost(BigDecimal.ZERO);
|
|
|
+ ship.setProcessCostUsd(BigDecimal.ZERO);
|
|
|
}
|
|
|
}
|
|
|
|