票据新增结算重量列

dev
徐杰盟 2024-01-08 13:57:52 +08:00
parent 1e6ff6923e
commit 042c1ce8bc
4 changed files with 29 additions and 3 deletions

View File

@ -57,10 +57,15 @@ public class CellAddresses {
// public static final CellAddress priceTransTotal = makeCellAddress("k15");
// 运输总价大写
// public static final CellAddress priceTransTotalUpper = makeCellAddress("k17");
// 结算吨位(吨) 2024年1月8日 新增
public static final CellAddress goodsSetWeight = makeCellAddress("g20");
// 销售方
public static final CellAddress vendor = makeCellAddress("e20");
// public static final CellAddress vendor = makeCellAddress("e20");
public static final CellAddress vendor = makeCellAddress("e21");
// 销售方纳税人识别号
public static final CellAddress vendorTaxId = makeCellAddress("e21");
// public static final CellAddress vendorTaxId = makeCellAddress("e21");
public static final CellAddress vendorTaxId = makeCellAddress("e22");
// 备注
public static final CellAddress remark = makeCellAddress("m20");
// 开票人
@ -99,6 +104,7 @@ public class CellAddresses {
// addrMap.put("priceTrans", priceTrans);
// addrMap.put("priceTransTotal", priceTransTotal);
// addrMap.put("priceTransTotalUpper", priceTransTotalUpper);
addrMap.put("goodsSetWeight", goodsSetWeight);
addrMap.put("vendor", vendor);
addrMap.put("vendorTaxId", vendorTaxId);
addrMap.put("remark", remark);

View File

@ -137,6 +137,8 @@ public class ExcelHelper {
private String priceTransTotal;
//运输总价大写
private String priceTransTotalUpper;
//结算吨位(吨)
private String balance;
//销售方
private String vendor;
//销售方纳税人识别号

View File

@ -201,7 +201,8 @@ public class LocalOrderService {
return null;
}
// 结算重量
String goodsSetWeight = "";
String goodsNetWeight = "";
String goodsTareWeight = "";
String goodsGrossWeight = "";
@ -229,6 +230,9 @@ public class LocalOrderService {
goodsTareWeight = String.format("%.2f", first_weight); // 皮重
goodsGrossWeight = String.format("%.2f", second_weight); // 毛重
goodsSetWeight = goodsNetWeight;
goodsNetWeight = String.format("%.2f", second_weight.subtract(first_weight)); // 计算净重
clientName = StrUtil.getRecordStr(order, "customer_texpayer_name");
if (StrKit.isBlank(clientName)) {
@ -278,6 +282,10 @@ public class LocalOrderService {
goodsTareWeight = String.format("%.2f", second_weight); // 皮重
goodsGrossWeight = String.format("%.2f", first_weight); // 毛重
goodsSetWeight = goodsNetWeight;
goodsNetWeight = String.format("%.2f", second_weight.subtract(first_weight)); // 计算净重
Sandfarm sandfarm = Sandfarm.dao.findById(order.get("sandfarm_id"));
if (sandfarm == null) {
@ -335,6 +343,9 @@ public class LocalOrderService {
goodsTareWeight = String.format("%." + decimal + "f", first_weight); // 皮重
goodsGrossWeight = String.format("%." + decimal + "f", second_weight); // 毛重
goodsSetWeight = goodsNetWeight;
goodsNetWeight = String.format("%.2f", second_weight.subtract(first_weight)); // 计算净重
clientName = StrUtil.getRecordStr(order, "customer_texpayer_name");
if (StrKit.isBlank(clientName)) {
@ -389,6 +400,9 @@ public class LocalOrderService {
goodsTareWeight = String.format("%.2f", second_weight); // 皮重
goodsGrossWeight = String.format("%.2f", first_weight); // 毛重
goodsSetWeight = goodsNetWeight;
goodsNetWeight = String.format("%.2f", second_weight.subtract(first_weight)); // 计算净重
Supermarket supermarket = Supermarket.dao.findById(order.get("supermarket_id"));
if (supermarket == null) {
@ -405,6 +419,9 @@ public class LocalOrderService {
goodsTareWeight = String.format("%.2f", second_weight); // 皮重
goodsGrossWeight = String.format("%.2f", first_weight); // 毛重
goodsSetWeight = goodsNetWeight;
goodsNetWeight = String.format("%.2f", second_weight.subtract(first_weight)); // 计算净重
Purchase purchase = Purchase.dao.findById(order.get("purchase_id"));
if (purchase == null) {
@ -455,6 +472,7 @@ public class LocalOrderService {
out.put("origin", origin);
out.put("dest", dest);
out.put("goodsName", StrUtil.getRecordStr(order, "product_name"));
out.put("goodsSetWeight", goodsSetWeight);
out.put("goodsNetWeight", goodsNetWeight);
out.put("transDistance", transDistance);
out.put("priceGoods", priceGoods);