入库金额数量处理
This commit is contained in:
parent
40767e80dc
commit
7206ba5cea
|
|
@ -93,8 +93,8 @@ public class OtherInApplyPushOtherInConvertPlugin extends AbstractConvertPlugIn
|
||||||
|
|
||||||
String batch = jsonMap.get("batch") != null ? jsonMap.get("batch").toString() : null; // 批次
|
String batch = jsonMap.get("batch") != null ? jsonMap.get("batch").toString() : null; // 批次
|
||||||
String toZone = jsonMap.get("toZone") != null ? jsonMap.get("toZone").toString() : null; // 库区
|
String toZone = jsonMap.get("toZone") != null ? jsonMap.get("toZone").toString() : null; // 库区
|
||||||
DynamicObject bd_warehouse=null;
|
DynamicObject bd_warehouse = null;
|
||||||
if(toZone!=null){
|
if (toZone != null) {
|
||||||
String wareNumber = wareTypeMap.get(toZone);
|
String wareNumber = wareTypeMap.get(toZone);
|
||||||
bd_warehouse = BusinessDataServiceHelper.loadSingle("bd_warehouse", new QFilter[]{new QFilter("number", QCP.equals, wareNumber)});
|
bd_warehouse = BusinessDataServiceHelper.loadSingle("bd_warehouse", new QFilter[]{new QFilter("number", QCP.equals, wareNumber)});
|
||||||
}
|
}
|
||||||
|
|
@ -108,12 +108,12 @@ public class OtherInApplyPushOtherInConvertPlugin extends AbstractConvertPlugIn
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer)});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer)});
|
||||||
|
|
||||||
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
||||||
BigDecimal price = entry.getBigDecimal("price");//不含税单价
|
BigDecimal amount = entry.getBigDecimal("amount");//金额
|
||||||
BigDecimal amount = price.multiply(quantity).divide(qty);//金额
|
amount = amount.multiply(quantity).divide(qty);//金额
|
||||||
// 处理第一次逻辑
|
// 处理第一次逻辑
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
|
|
||||||
entry.set("amount",amount);
|
entry.set("amount", amount);
|
||||||
|
|
||||||
// 第一次直接赋值
|
// 第一次直接赋值
|
||||||
entry.set("qty", quantity);
|
entry.set("qty", quantity);
|
||||||
|
|
@ -122,7 +122,7 @@ public class OtherInApplyPushOtherInConvertPlugin extends AbstractConvertPlugIn
|
||||||
entry.set("producedate", manufactureDate);
|
entry.set("producedate", manufactureDate);
|
||||||
entry.set("expirydate", expirationDate);
|
entry.set("expirydate", expirationDate);
|
||||||
entry.set("lotnumber", batch);
|
entry.set("lotnumber", batch);
|
||||||
if(bd_warehouse!=null){
|
if (bd_warehouse != null) {
|
||||||
entry.set("warehouse", bd_warehouse);
|
entry.set("warehouse", bd_warehouse);
|
||||||
}
|
}
|
||||||
entry.set("tqq9_wmsdetailid", wmsDetailId);
|
entry.set("tqq9_wmsdetailid", wmsDetailId);
|
||||||
|
|
@ -138,14 +138,14 @@ public class OtherInApplyPushOtherInConvertPlugin extends AbstractConvertPlugIn
|
||||||
for (IDataEntityProperty property : properties) {
|
for (IDataEntityProperty property : properties) {
|
||||||
newEntry.set(property.getName(), entry.get(property.getName()));
|
newEntry.set(property.getName(), entry.get(property.getName()));
|
||||||
}
|
}
|
||||||
newEntry.set("amount",amount);
|
newEntry.set("amount", amount);
|
||||||
newEntry.set("qty", quantity);
|
newEntry.set("qty", quantity);
|
||||||
newEntry.set("baseqty", quantity);
|
newEntry.set("baseqty", quantity);
|
||||||
newEntry.set("tqq9_goods", tqq9_goodspackage);
|
newEntry.set("tqq9_goods", tqq9_goodspackage);
|
||||||
newEntry.set("producedate", manufactureDate);
|
newEntry.set("producedate", manufactureDate);
|
||||||
newEntry.set("expirydate", expirationDate);
|
newEntry.set("expirydate", expirationDate);
|
||||||
newEntry.set("lotnumber", batch);
|
newEntry.set("lotnumber", batch);
|
||||||
if(bd_warehouse!=null){
|
if (bd_warehouse != null) {
|
||||||
newEntry.set("warehouse", bd_warehouse);
|
newEntry.set("warehouse", bd_warehouse);
|
||||||
}
|
}
|
||||||
newEntry.set("tqq9_wmsdetailid", wmsDetailId);
|
newEntry.set("tqq9_wmsdetailid", wmsDetailId);
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,8 @@ public class OtherOutApplyPushOtherOutConvertPlugin extends AbstractConvertPlugI
|
||||||
|
|
||||||
String batch = jsonMap.get("batch") != null ? jsonMap.get("batch").toString() : null; // 批次
|
String batch = jsonMap.get("batch") != null ? jsonMap.get("batch").toString() : null; // 批次
|
||||||
String fromZone = jsonMap.get("fromZone") != null ? jsonMap.get("fromZone").toString() : null; // 库区
|
String fromZone = jsonMap.get("fromZone") != null ? jsonMap.get("fromZone").toString() : null; // 库区
|
||||||
DynamicObject bd_warehouse=null;
|
DynamicObject bd_warehouse = null;
|
||||||
if(fromZone!=null){
|
if (fromZone != null) {
|
||||||
String wareNumber = wareTypeMap.get(fromZone);
|
String wareNumber = wareTypeMap.get(fromZone);
|
||||||
bd_warehouse = BusinessDataServiceHelper.loadSingle("bd_warehouse", new QFilter[]{new QFilter("number", QCP.equals, wareNumber)});
|
bd_warehouse = BusinessDataServiceHelper.loadSingle("bd_warehouse", new QFilter[]{new QFilter("number", QCP.equals, wareNumber)});
|
||||||
}
|
}
|
||||||
|
|
@ -108,15 +108,15 @@ public class OtherOutApplyPushOtherOutConvertPlugin extends AbstractConvertPlugI
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer)});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer)});
|
||||||
|
|
||||||
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
||||||
BigDecimal price = entry.getBigDecimal("price");//单价
|
BigDecimal amount = entry.getBigDecimal("amount");//金额
|
||||||
BigDecimal amount = price.multiply(quantity).divide(qty);//金额
|
amount = amount.multiply(quantity).divide(qty);//金额
|
||||||
|
|
||||||
// 处理第一次逻辑
|
// 处理第一次逻辑
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
|
|
||||||
entry.set("amount",amount);
|
entry.set("amount", amount);
|
||||||
entry.set("remainreturnqty",quantity);//未退库数量
|
entry.set("remainreturnqty", quantity);//未退库数量
|
||||||
entry.set("remainreturnbaseqty",quantity);//未退库基本数量
|
entry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
||||||
|
|
||||||
// 第一次直接赋值
|
// 第一次直接赋值
|
||||||
entry.set("qty", quantity);
|
entry.set("qty", quantity);
|
||||||
|
|
@ -125,7 +125,7 @@ public class OtherOutApplyPushOtherOutConvertPlugin extends AbstractConvertPlugI
|
||||||
entry.set("producedate", manufactureDate);
|
entry.set("producedate", manufactureDate);
|
||||||
entry.set("expirydate", expirationDate);
|
entry.set("expirydate", expirationDate);
|
||||||
entry.set("lotnumber", batch);
|
entry.set("lotnumber", batch);
|
||||||
if(bd_warehouse!=null){
|
if (bd_warehouse != null) {
|
||||||
entry.set("warehouse", bd_warehouse);
|
entry.set("warehouse", bd_warehouse);
|
||||||
}
|
}
|
||||||
entry.set("tqq9_wmsdetailid", wmsDetailId);
|
entry.set("tqq9_wmsdetailid", wmsDetailId);
|
||||||
|
|
@ -142,9 +142,9 @@ public class OtherOutApplyPushOtherOutConvertPlugin extends AbstractConvertPlugI
|
||||||
newEntry.set(property.getName(), entry.get(property.getName()));
|
newEntry.set(property.getName(), entry.get(property.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
newEntry.set("amount",amount);
|
newEntry.set("amount", amount);
|
||||||
newEntry.set("remainreturnqty",quantity);//未退库数量
|
newEntry.set("remainreturnqty", quantity);//未退库数量
|
||||||
newEntry.set("remainreturnbaseqty",quantity);//未退库基本数量
|
newEntry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
||||||
|
|
||||||
newEntry.set("qty", quantity);
|
newEntry.set("qty", quantity);
|
||||||
newEntry.set("baseqty", quantity);
|
newEntry.set("baseqty", quantity);
|
||||||
|
|
@ -152,7 +152,7 @@ public class OtherOutApplyPushOtherOutConvertPlugin extends AbstractConvertPlugI
|
||||||
newEntry.set("producedate", manufactureDate);
|
newEntry.set("producedate", manufactureDate);
|
||||||
newEntry.set("expirydate", expirationDate);
|
newEntry.set("expirydate", expirationDate);
|
||||||
newEntry.set("lotnumber", batch);
|
newEntry.set("lotnumber", batch);
|
||||||
if(bd_warehouse!=null){
|
if (bd_warehouse != null) {
|
||||||
newEntry.set("warehouse", bd_warehouse);
|
newEntry.set("warehouse", bd_warehouse);
|
||||||
}
|
}
|
||||||
newEntry.set("tqq9_wmsdetailid", wmsDetailId);
|
newEntry.set("tqq9_wmsdetailid", wmsDetailId);
|
||||||
|
|
|
||||||
|
|
@ -113,10 +113,10 @@ public class PurInConvertPlugin extends AbstractConvertPlugIn implements Plugin
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer)});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer)});
|
||||||
|
|
||||||
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
||||||
BigDecimal priceandtax = entry.getBigDecimal("priceandtax");//含税单价
|
BigDecimal amountandtax = entry.getBigDecimal("amountandtax");//折扣后价税合计
|
||||||
BigDecimal price = entry.getBigDecimal("price");//不含税单价
|
BigDecimal amount = entry.getBigDecimal("amount");//金额
|
||||||
BigDecimal amountandtax = priceandtax.multiply(quantity).divide(qty);//折扣后价税合计
|
amountandtax = amountandtax.multiply(quantity).divide(qty);//折扣后价税合计
|
||||||
BigDecimal amount = price.multiply(quantity).divide(qty);//金额
|
amount = amount.multiply(quantity).divide(qty);//金额
|
||||||
BigDecimal taxamount = amountandtax.subtract(amount);//税额
|
BigDecimal taxamount = amountandtax.subtract(amount);//税额
|
||||||
|
|
||||||
// 处理第一次逻辑
|
// 处理第一次逻辑
|
||||||
|
|
@ -125,9 +125,9 @@ public class PurInConvertPlugin extends AbstractConvertPlugIn implements Plugin
|
||||||
entry.set("taxamount", taxamount);//税额
|
entry.set("taxamount", taxamount);//税额
|
||||||
entry.set("curtaxamount", taxamount);//税额(本位币)
|
entry.set("curtaxamount", taxamount);//税额(本位币)
|
||||||
entry.set("amountandtax", amountandtax);//折扣后价税合计
|
entry.set("amountandtax", amountandtax);//折扣后价税合计
|
||||||
entry.set("curamountandtax",amountandtax);//价税合计(本位币)
|
entry.set("curamountandtax", amountandtax);//价税合计(本位币)
|
||||||
entry.set("amount", amount);//金额
|
entry.set("amount", amount);//金额
|
||||||
entry.set("curamount",amount);//金额(本位币)
|
entry.set("curamount", amount);//金额(本位币)
|
||||||
entry.set("remainreturnqty", quantity);//未退库数量
|
entry.set("remainreturnqty", quantity);//未退库数量
|
||||||
entry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
entry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
||||||
entry.set("remainjoinpriceqty", quantity); //剩余应付数量
|
entry.set("remainjoinpriceqty", quantity); //剩余应付数量
|
||||||
|
|
@ -162,9 +162,9 @@ public class PurInConvertPlugin extends AbstractConvertPlugIn implements Plugin
|
||||||
newEntry.set("taxamount", taxamount);//税额
|
newEntry.set("taxamount", taxamount);//税额
|
||||||
newEntry.set("curtaxamount", taxamount);//税额(本位币)
|
newEntry.set("curtaxamount", taxamount);//税额(本位币)
|
||||||
newEntry.set("amountandtax", amountandtax);//折扣后价税合计
|
newEntry.set("amountandtax", amountandtax);//折扣后价税合计
|
||||||
newEntry.set("curamountandtax",amountandtax);//价税合计(本位币)
|
newEntry.set("curamountandtax", amountandtax);//价税合计(本位币)
|
||||||
newEntry.set("amount", amount);//金额
|
newEntry.set("amount", amount);//金额
|
||||||
newEntry.set("curamount",amount);//金额(本位币)
|
newEntry.set("curamount", amount);//金额(本位币)
|
||||||
newEntry.set("remainreturnqty", quantity);//未退库数量
|
newEntry.set("remainreturnqty", quantity);//未退库数量
|
||||||
newEntry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
newEntry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
||||||
newEntry.set("remainjoinpriceqty", quantity); //剩余应付数量
|
newEntry.set("remainjoinpriceqty", quantity); //剩余应付数量
|
||||||
|
|
|
||||||
|
|
@ -124,23 +124,22 @@ public class YdthPurInConvertPlugin extends AbstractConvertPlugIn implements Plu
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer)});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer)});
|
||||||
|
|
||||||
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
||||||
BigDecimal priceandtax = entry.getBigDecimal("priceandtax");//含税单价
|
BigDecimal amountandtax = entry.getBigDecimal("amountandtax");//折扣后价税合计
|
||||||
BigDecimal price = entry.getBigDecimal("price");//不含税单价
|
BigDecimal amount = entry.getBigDecimal("amount");//金额
|
||||||
BigDecimal amountandtax = priceandtax.multiply(quantity).divide(qty);//折扣后价税合计
|
amountandtax = amountandtax.multiply(quantity).divide(qty);//折扣后价税合计
|
||||||
BigDecimal amount = price.multiply(quantity).divide(qty);//金额
|
amount = amount.multiply(quantity).divide(qty);//金额
|
||||||
BigDecimal taxamount = amountandtax.subtract(amount);//税额
|
BigDecimal taxamount = amountandtax.subtract(amount);//税额
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 处理第一次逻辑
|
// 处理第一次逻辑
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
|
|
||||||
entry.set("taxamount", taxamount);//税额
|
entry.set("taxamount", taxamount);//税额
|
||||||
entry.set("curtaxamount", taxamount);//税额(本位币)
|
entry.set("curtaxamount", taxamount);//税额(本位币)
|
||||||
entry.set("amountandtax", amountandtax);//折扣后价税合计
|
entry.set("amountandtax", amountandtax);//折扣后价税合计
|
||||||
entry.set("curamountandtax",amountandtax);//价税合计(本位币)
|
entry.set("curamountandtax", amountandtax);//价税合计(本位币)
|
||||||
entry.set("amount", amount);//金额
|
entry.set("amount", amount);//金额
|
||||||
entry.set("curamount",amount);//金额(本位币)
|
entry.set("curamount", amount);//金额(本位币)
|
||||||
entry.set("remainreturnqty", quantity);//未退库数量
|
entry.set("remainreturnqty", quantity);//未退库数量
|
||||||
entry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
entry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
||||||
entry.set("remainjoinpriceqty", quantity); //剩余应付数量
|
entry.set("remainjoinpriceqty", quantity); //剩余应付数量
|
||||||
|
|
@ -175,9 +174,9 @@ public class YdthPurInConvertPlugin extends AbstractConvertPlugIn implements Plu
|
||||||
newEntry.set("taxamount", taxamount);//税额
|
newEntry.set("taxamount", taxamount);//税额
|
||||||
newEntry.set("curtaxamount", taxamount);//税额(本位币)
|
newEntry.set("curtaxamount", taxamount);//税额(本位币)
|
||||||
newEntry.set("amountandtax", amountandtax);//折扣后价税合计
|
newEntry.set("amountandtax", amountandtax);//折扣后价税合计
|
||||||
newEntry.set("curamountandtax",amountandtax);//价税合计(本位币)
|
newEntry.set("curamountandtax", amountandtax);//价税合计(本位币)
|
||||||
newEntry.set("amount", amount);//金额
|
newEntry.set("amount", amount);//金额
|
||||||
newEntry.set("curamount",amount);//金额(本位币)
|
newEntry.set("curamount", amount);//金额(本位币)
|
||||||
newEntry.set("remainreturnqty", quantity);//未退库数量
|
newEntry.set("remainreturnqty", quantity);//未退库数量
|
||||||
newEntry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
newEntry.set("remainreturnbaseqty", quantity);//未退库基本数量
|
||||||
newEntry.set("remainjoinpriceqty", quantity); //剩余应付数量
|
newEntry.set("remainjoinpriceqty", quantity); //剩余应付数量
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue