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 = "物料数合计")
private Long materialSum;
private int materialSum;
/** 数量合计 */
@Excel(name = "数量合计")
private Long enterpriseSum;
private int enterpriseSum;
/** 不含税总价(RMB) */
@Excel(name = "不含税总价(RMB)")
@ -399,19 +399,19 @@ public class FinancialTaxInvoice extends BaseEntity
}
public Long getMaterialSum() {
public int getMaterialSum() {
return materialSum;
}
public void setMaterialSum(Long materialSum) {
public void setMaterialSum(int materialSum) {
this.materialSum = materialSum;
}
public Long getEnterpriseSum() {
public int getEnterpriseSum() {
return enterpriseSum;
}
public void setEnterpriseSum(Long enterpriseSum) {
public void setEnterpriseSum(int 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;
/*物料合计*/
@Excel(name = "物料合计")
private Long materialSum;
private int materialSum;
/*数量合计*/
@Excel(name = "数量合计")
private Long enterpriseSum;
private int enterpriseSum;
/*不含税单价(RMB)*/
@Excel(name = "不含税单价(RMB)")
private Double noRmbPrice;
@ -365,19 +365,19 @@ public class SysSalesOrder extends BaseEntity {
this.customerPhone = customerPhone;
}
public Long getMaterialSum() {
public int getMaterialSum() {
return materialSum;
}
public void setMaterialSum(Long materialSum) {
public void setMaterialSum(int materialSum) {
this.materialSum = materialSum;
}
public Long getEnterpriseSum() {
public int getEnterpriseSum() {
return enterpriseSum;
}
public void setEnterpriseSum(Long enterpriseSum) {
public void setEnterpriseSum(int 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();
// 计算所有订单的物料合计
long totalMaterialSum = sysSalesOrders.stream()
.mapToLong(order -> order.getMaterialSum() != null ? order.getMaterialSum() : 0L)
.sum();
int totalMaterialSum = sysSalesOrders.stream()
.filter(Objects::nonNull).mapToInt(SysSalesOrder::getMaterialSum).sum();
// 计算所有订单的数量合计
long totalEnterpriseSum = sysSalesOrders.stream()
.mapToLong(order -> order.getEnterpriseSum() != null ? order.getEnterpriseSum() : 0L)
.sum();
int totalEnterpriseSum = sysSalesOrders.stream()
.filter(Objects::nonNull).mapToInt(SysSalesOrder::getEnterpriseSum).sum();
// 设置到sysSalesShippingInform对象中
sysSalesShippingInform.setAllPriceExcludingTaxDollar(BigDecimal.valueOf(totalNoUsdSum));
sysSalesShippingInform.setAllPriceExcludingTaxRmb(BigDecimal.valueOf(totalNoRmbSum));
sysSalesShippingInform.setAllPriceIncludesTax(BigDecimal.valueOf(totalRmbTaxSum));
sysSalesShippingInform.setMaterialSum(Math.toIntExact(totalMaterialSum));
sysSalesShippingInform.setEnterpriseSum(Math.toIntExact(totalEnterpriseSum));
sysSalesShippingInform.setMaterialSum(totalMaterialSum);
sysSalesShippingInform.setEnterpriseSum(totalEnterpriseSum);
sysSalesShippingInform.setCustomerContact(sysSalesOrder.getCustomerDelivery());
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()
.mapToLong(order -> order.getMaterialSum() != null ? order.getMaterialSum() : 0L)
.sum();
int totalMaterialSum = sysSalesOrders.stream()
.filter(Objects::nonNull).mapToInt(SysSalesOrder::getMaterialSum).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