Browse Source

[fix]

修改国税发票对象物料数和数量合计字段类型为int;
修改销售订单对象物料和数量合计字段类型为int;
修改销售出货通知service中合计字段相关语句类型为int;
修改出库单service中合计字段相关语句类型为int;
dev
王晓迪 5 days ago
parent
commit
c8ef763cbd
  1. 12
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java
  2. 12
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java
  3. 16
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java
  4. 14
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java

12
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java

@ -101,11 +101,11 @@ public class FinancialTaxInvoice extends BaseEntity
/** 物料数合计 */ /** 物料数合计 */
@Excel(name = "物料数合计") @Excel(name = "物料数合计")
private Long materialSum; private int materialSum;
/** 数量合计 */ /** 数量合计 */
@Excel(name = "数量合计") @Excel(name = "数量合计")
private Long enterpriseSum; private int enterpriseSum;
/** 不含税总价(RMB) */ /** 不含税总价(RMB) */
@Excel(name = "不含税总价(RMB)") @Excel(name = "不含税总价(RMB)")
@ -399,19 +399,19 @@ public class FinancialTaxInvoice extends BaseEntity
} }
public Long getMaterialSum() { public int getMaterialSum() {
return materialSum; return materialSum;
} }
public void setMaterialSum(Long materialSum) { public void setMaterialSum(int materialSum) {
this.materialSum = materialSum; this.materialSum = materialSum;
} }
public Long getEnterpriseSum() { public int getEnterpriseSum() {
return enterpriseSum; return enterpriseSum;
} }
public void setEnterpriseSum(Long enterpriseSum) { public void setEnterpriseSum(int enterpriseSum) {
this.enterpriseSum = enterpriseSum; this.enterpriseSum = enterpriseSum;
} }

12
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java

@ -74,10 +74,10 @@ public class SysSalesOrder extends BaseEntity {
private String customerPhone; private String customerPhone;
/*物料合计*/ /*物料合计*/
@Excel(name = "物料合计") @Excel(name = "物料合计")
private Long materialSum; private int materialSum;
/*数量合计*/ /*数量合计*/
@Excel(name = "数量合计") @Excel(name = "数量合计")
private Long enterpriseSum; private int enterpriseSum;
/*不含税单价(RMB)*/ /*不含税单价(RMB)*/
@Excel(name = "不含税单价(RMB)") @Excel(name = "不含税单价(RMB)")
private Double noRmbPrice; private Double noRmbPrice;
@ -365,19 +365,19 @@ public class SysSalesOrder extends BaseEntity {
this.customerPhone = customerPhone; this.customerPhone = customerPhone;
} }
public Long getMaterialSum() { public int getMaterialSum() {
return materialSum; return materialSum;
} }
public void setMaterialSum(Long materialSum) { public void setMaterialSum(int materialSum) {
this.materialSum = materialSum; this.materialSum = materialSum;
} }
public Long getEnterpriseSum() { public int getEnterpriseSum() {
return enterpriseSum; return enterpriseSum;
} }
public void setEnterpriseSum(Long enterpriseSum) { public void setEnterpriseSum(int enterpriseSum) {
this.enterpriseSum = enterpriseSum; this.enterpriseSum = enterpriseSum;
} }

16
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java

@ -246,21 +246,21 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
.filter(Objects::nonNull).mapToDouble(SysSalesOrder::getRmbTaxSum).sum(); .filter(Objects::nonNull).mapToDouble(SysSalesOrder::getRmbTaxSum).sum();
// 计算所有订单的物料合计 // 计算所有订单的物料合计
long totalMaterialSum = sysSalesOrders.stream() int totalMaterialSum = sysSalesOrders.stream()
.mapToLong(order -> order.getMaterialSum() != null ? order.getMaterialSum() : 0L) .filter(Objects::nonNull).mapToInt(SysSalesOrder::getMaterialSum).sum();
.sum();
// 计算所有订单的数量合计 // 计算所有订单的数量合计
long totalEnterpriseSum = sysSalesOrders.stream() int totalEnterpriseSum = sysSalesOrders.stream()
.mapToLong(order -> order.getEnterpriseSum() != null ? order.getEnterpriseSum() : 0L) .filter(Objects::nonNull).mapToInt(SysSalesOrder::getEnterpriseSum).sum();
.sum();
// 设置到sysSalesShippingInform对象中 // 设置到sysSalesShippingInform对象中
sysSalesShippingInform.setAllPriceExcludingTaxDollar(BigDecimal.valueOf(totalNoUsdSum)); sysSalesShippingInform.setAllPriceExcludingTaxDollar(BigDecimal.valueOf(totalNoUsdSum));
sysSalesShippingInform.setAllPriceExcludingTaxRmb(BigDecimal.valueOf(totalNoRmbSum)); sysSalesShippingInform.setAllPriceExcludingTaxRmb(BigDecimal.valueOf(totalNoRmbSum));
sysSalesShippingInform.setAllPriceIncludesTax(BigDecimal.valueOf(totalRmbTaxSum)); sysSalesShippingInform.setAllPriceIncludesTax(BigDecimal.valueOf(totalRmbTaxSum));
sysSalesShippingInform.setMaterialSum(Math.toIntExact(totalMaterialSum)); sysSalesShippingInform.setMaterialSum(totalMaterialSum);
sysSalesShippingInform.setEnterpriseSum(Math.toIntExact(totalEnterpriseSum)); sysSalesShippingInform.setEnterpriseSum(totalEnterpriseSum);
sysSalesShippingInform.setCustomerContact(sysSalesOrder.getCustomerDelivery()); sysSalesShippingInform.setCustomerContact(sysSalesOrder.getCustomerDelivery());
sysSalesShippingInform.setContactNumber(sysSalesOrder.getDeliveryPhone()); sysSalesShippingInform.setContactNumber(sysSalesOrder.getDeliveryPhone());

14
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java

@ -1010,14 +1010,14 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
// 计算所有订单的物料合计 // 计算所有订单的物料合计
long totalMaterialSum = sysSalesOrders.stream() int totalMaterialSum = sysSalesOrders.stream()
.mapToLong(order -> order.getMaterialSum() != null ? order.getMaterialSum() : 0L) .filter(Objects::nonNull).mapToInt(SysSalesOrder::getMaterialSum).sum();
.sum();
// 计算所有订单的数量合计
int totalEnterpriseSum = sysSalesOrders.stream()
.filter(Objects::nonNull).mapToInt(SysSalesOrder::getEnterpriseSum).sum();
// 计算所有订单的企业合计
long totalEnterpriseSum = sysSalesOrders.stream()
.mapToLong(order -> order.getEnterpriseSum() != null ? order.getEnterpriseSum() : 0L)
.sum();
//物料合计 //物料合计

Loading…
Cancel
Save