lisai17@sina.com 2020-09-28 22:54:01 +08:00
parent a484efb540
commit b66a75d3a7
5 changed files with 116 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import com.jfinal.plugin.activerecord.IBean;
import com.alibaba.fastjson.annotation.JSONField;
/**
* Generated by COWR Mon Sep 21 22:03:28 CST 2020
* Generated by COWR Mon Sep 28 16:46:22 CST 2020
* TableName: order_temp
* Remarks: -
* PrimaryKey: sn
@ -1068,5 +1068,49 @@ public abstract class BaseOrderTemp<M extends BaseOrderTemp<M>> extends BaseMode
return getStr("invoice_number");
}
/**
* name: invoice_type
* type: INT(10)
* isNullable: YES
* isPrimaryKey: NO
* defaultValue: 1
* @param invoiceType 1.2.
*/
@JSONField(name="invoice_type")
public void setInvoiceType(Integer invoiceType) {
set("invoice_type", invoiceType);
}
/**
* @return invoice_type 1.2.
*/
@JSONField(name="invoice_type")
public Integer getInvoiceType() {
return getInt("invoice_type");
}
/**
* name: invoice_site
* type: INT(10)
* isNullable: YES
* isPrimaryKey: NO
* defaultValue: 1
* @param invoiceSite 1.2.
*/
@JSONField(name="invoice_site")
public void setInvoiceSite(Integer invoiceSite) {
set("invoice_site", invoiceSite);
}
/**
* @return invoice_site 1.2.
*/
@JSONField(name="invoice_site")
public Integer getInvoiceSite() {
return getInt("invoice_site");
}
}

View File

@ -1,11 +1,9 @@
package com.cowr.local.ssjygl.devicectrl.printer;
import com.jfinal.kit.PathKit;
import com.jfinal.log.Log;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellAddress;
import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
import org.apache.poi.xssf.usermodel.XSSFDrawing;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbookFactory;

View File

@ -0,0 +1,65 @@
package com.cowr.local.ssjygl.devicectrl.printer;
import org.apache.poi.ss.util.CellAddress;
import java.util.HashMap;
import java.util.Map;
// 保存预设的发票内容单元格位置
// 结算单
public class JsdCellAddresses {
// 开票时间
public static final CellAddress datetimePrint = makeCellAddress("o8");
// 客户名称
public static final CellAddress clientName = makeCellAddress("e9");
// 净重
public static final CellAddress goodsNetWeight = makeCellAddress("g18");
// 皮重
public static final CellAddress goodsTareWeight = makeCellAddress("g16");
// 毛重
public static final CellAddress goodsGrossWeight = makeCellAddress("g14");
// 商品单价
public static final CellAddress priceGoods = makeCellAddress("i14");
// 商品总价小写
public static final CellAddress priceGoodsTotal = makeCellAddress("m14");
// 商品总价大写
public static final CellAddress priceGoodsTotalUpper = makeCellAddress("m17");
// 备注
public static final CellAddress remark = makeCellAddress("m20");
// 开票人
public static final CellAddress drawer = makeCellAddress("l24");
// 车牌号
public static final CellAddress truckLicense = makeCellAddress("m11");
public static Map<String, CellAddress> addrMap = new HashMap<>();
static {
addrMap.put("datatimePrint", datetimePrint);
addrMap.put("clientName", clientName);
addrMap.put("goodsNetWeight", goodsNetWeight);
addrMap.put("goodsTareWeight", goodsTareWeight);
addrMap.put("goodsGrossWeight", goodsGrossWeight);
addrMap.put("priceGoods", priceGoods);
addrMap.put("priceGoodsTotal", priceGoodsTotal);
addrMap.put("priceGoodsTotalUpper", priceGoodsTotalUpper);
addrMap.put("remark", remark);
addrMap.put("drawer", drawer);
addrMap.put("truck_license", truckLicense);
}
private static CellAddress makeCellAddress(String addr) {
char[] chars = addr.toCharArray();
int column = chars[0] - 97;
int row;
String sub = addr.substring(1, addr.length());
row = Integer.valueOf(sub) - 1;
// if (chars.length == 3) {
// row = 10 + (chars[2] - 48 - 1) * 10;
// } else {
// row = chars[1] - 48 - 1;
// }
return new CellAddress(row, column);
}
}

View File

@ -438,6 +438,12 @@ public class LocalOrderService {
out.put("truck_license", StrUtil.getRecordStr(order, "truck_license"));
out.put("invoice_code", StrUtil.getRecordStr(order, "invoice_code"));
// 开票类型,从订单信息中获取
// 订单中的开票类型在结算时,从客户信息中获取
// 2020-09-28 开专票的单位,先临时开具结算单
// 2020-09-28 在拿到印刷版的结算单前,需要在空白纸上打印完整的结算单信息
out.put("invoice_type", StrUtil.getRecordStr(order, "invoice_type"));
return out;
}