lisai17@sina.com 2020-09-15 22:25:51 +08:00
parent ecf2bb8a73
commit ce976aec92
6 changed files with 54 additions and 44 deletions

View File

@ -259,7 +259,7 @@ public class PLC extends Device {
PLC plc = new PLC("_plc", "192.168.20.20", 502, com.cowr.local.ssjygl.devicectrl.common.DeviceThread.defaultAddressTable); PLC plc = new PLC("_plc", "192.168.20.20", 502, com.cowr.local.ssjygl.devicectrl.common.DeviceThread.defaultAddressTable);
plc.connect(); plc.connect();
plc.isConnected(); plc.isConnected();
plc.write("rodIn1Up"); plc.write("rodIn2Up");
// plc.write("rodOut2Up"); // plc.write("rodOut2Up");
// plc.write("sensorIn2Reset"); // plc.write("sensorIn2Reset");

View File

@ -8,98 +8,105 @@ import java.util.Map;
// 保存预设的发票内容单元格位置 // 保存预设的发票内容单元格位置
public class CellAddresses { public class CellAddresses {
// 二维码 // 二维码
public static final CellAddress qrcode = makeCellAddress("b1"); // public static final CellAddress qrcode = makeCellAddress("b1");
// 单号 // 单号
public static final CellAddress serial = makeCellAddress("j2"); // public static final CellAddress serial = makeCellAddress("j2");
// 开票时间 // 开票时间
public static final CellAddress datetimePrint = makeCellAddress("m4"); public static final CellAddress datetimePrint = makeCellAddress("n8");
// 客户名称 // 客户名称
public static final CellAddress clientName = makeCellAddress("c6"); public static final CellAddress clientName = makeCellAddress("e9");
// 客户纳税人识别号 // 客户纳税人识别号
public static final CellAddress clientTaxId = makeCellAddress("c7"); public static final CellAddress clientTaxId = makeCellAddress("e10");
// 客户地址、电话 // 客户地址、电话
public static final CellAddress clientContact = makeCellAddress("c8"); public static final CellAddress clientContact = makeCellAddress("e11");
// 客户开户行及账号 // 客户开户行及账号
public static final CellAddress clientBankInfo = makeCellAddress("c9"); public static final CellAddress clientBankInfo = makeCellAddress("e12");
// 运输公司名称及车牌号 // 运输公司名称及车牌号
public static final CellAddress haulerName = makeCellAddress("i7"); // public static final CellAddress haulerName = makeCellAddress("i7");
// 运输公司纳税人识别号 // 运输公司纳税人识别号
public static final CellAddress haulerTaxId = makeCellAddress("i6"); // public static final CellAddress haulerTaxId = makeCellAddress("i6");
// 运输公司地址、电话 // 运输公司地址、电话
public static final CellAddress haulerContact = makeCellAddress("i8"); // public static final CellAddress haulerContact = makeCellAddress("i8");
// 运输公司开户行及账号 // 运输公司开户行及账号
public static final CellAddress haulerBankInfo = makeCellAddress("i9"); // public static final CellAddress haulerBankInfo = makeCellAddress("i9");
// 起点 // 起点
public static final CellAddress origin = makeCellAddress("b10"); // public static final CellAddress origin = makeCellAddress("b10");
// 终点 // 终点
public static final CellAddress dest = makeCellAddress("h10"); // public static final CellAddress dest = makeCellAddress("h10");
// 品名 // 品名
public static final CellAddress goodsName = makeCellAddress("a13"); // public static final CellAddress goodsName = makeCellAddress("a13");
// 净重 // 净重
public static final CellAddress goodsNetWeight = makeCellAddress("e15"); public static final CellAddress goodsNetWeight = makeCellAddress("g18");
// 皮重 // 皮重
public static final CellAddress goodsTareWeight = makeCellAddress("e13"); public static final CellAddress goodsTareWeight = makeCellAddress("g16");
// 毛重 // 毛重
public static final CellAddress goodsGrossWeight = makeCellAddress("e11"); public static final CellAddress goodsGrossWeight = makeCellAddress("g14");
// 运输距离 // 运输距离
public static final CellAddress transDistance = makeCellAddress("e17"); // public static final CellAddress transDistance = makeCellAddress("e17");
// 商品单价 // 商品单价
public static final CellAddress priceGoods = makeCellAddress("h12"); public static final CellAddress priceGoods = makeCellAddress("i14");
// 商品总价小写 // 商品总价小写
public static final CellAddress priceGoodsTotal = makeCellAddress("k11"); public static final CellAddress priceGoodsTotal = makeCellAddress("m14");
// 商品总价大写 // 商品总价大写
public static final CellAddress priceGoodsTotalUpper = makeCellAddress("k13"); public static final CellAddress priceGoodsTotalUpper = makeCellAddress("m17");
// 运输单价 // 运输单价
public static final CellAddress priceTrans = makeCellAddress("h16"); // public static final CellAddress priceTrans = makeCellAddress("h16");
// 运输总价小写 // 运输总价小写
public static final CellAddress priceTransTotal = makeCellAddress("k15"); // public static final CellAddress priceTransTotal = makeCellAddress("k15");
// 运输总价大写 // 运输总价大写
public static final CellAddress priceTransTotalUpper = makeCellAddress("k17"); // public static final CellAddress priceTransTotalUpper = makeCellAddress("k17");
// 销售方 // 销售方
public static final CellAddress vendor = makeCellAddress("c19"); public static final CellAddress vendor = makeCellAddress("e20");
// 销售方纳税人识别号 // 销售方纳税人识别号
public static final CellAddress vendorTaxId = makeCellAddress("c21"); public static final CellAddress vendorTaxId = makeCellAddress("e21");
// 备注 // 备注
public static final CellAddress remark = makeCellAddress("h19"); public static final CellAddress remark = makeCellAddress("m20");
// 开票人 // 开票人
public static final CellAddress drawer = makeCellAddress("g23"); public static final CellAddress drawer = makeCellAddress("l24");
// 配送公司 // 配送公司
public static final CellAddress haulerCo = makeCellAddress("k23"); // public static final CellAddress haulerCo = makeCellAddress("k23");
// 车牌号
public static final CellAddress truckLicense = makeCellAddress("m11");
// 发票号码
public static final CellAddress invoiceCode = makeCellAddress("o5");
public static Map<String, CellAddress> addrMap = new HashMap<>(); public static Map<String, CellAddress> addrMap = new HashMap<>();
static { static {
// addrMap.put("serial", serial); // addrMap.put("serial", serial);
addrMap.put("qrcode", qrcode); // addrMap.put("qrcode", qrcode);
addrMap.put("datatimePrint", datetimePrint); addrMap.put("datatimePrint", datetimePrint);
addrMap.put("clientName", clientName); addrMap.put("clientName", clientName);
addrMap.put("clientTaxId", clientTaxId); addrMap.put("clientTaxId", clientTaxId);
addrMap.put("clientContact", clientContact); addrMap.put("clientContact", clientContact);
addrMap.put("clientBankInfo", clientBankInfo); addrMap.put("clientBankInfo", clientBankInfo);
addrMap.put("haulerName", haulerName); // addrMap.put("haulerName", haulerName);
addrMap.put("haulerTaxId", haulerTaxId); // addrMap.put("haulerTaxId", haulerTaxId);
addrMap.put("haulerContact", haulerContact); // addrMap.put("haulerContact", haulerContact);
addrMap.put("haulerBankInfo", haulerBankInfo); // addrMap.put("haulerBankInfo", haulerBankInfo);
addrMap.put("origin", origin); // addrMap.put("origin", origin);
addrMap.put("dest", dest); // addrMap.put("dest", dest);
addrMap.put("goodsName", goodsName); // addrMap.put("goodsName", goodsName);
addrMap.put("goodsNetWeight", goodsNetWeight); addrMap.put("goodsNetWeight", goodsNetWeight);
addrMap.put("goodsTareWeight", goodsTareWeight); addrMap.put("goodsTareWeight", goodsTareWeight);
addrMap.put("goodsGrossWeight", goodsGrossWeight); addrMap.put("goodsGrossWeight", goodsGrossWeight);
addrMap.put("transDistance", transDistance); // addrMap.put("transDistance", transDistance);
addrMap.put("priceGoods", priceGoods); addrMap.put("priceGoods", priceGoods);
addrMap.put("priceGoodsTotal", priceGoodsTotal); addrMap.put("priceGoodsTotal", priceGoodsTotal);
addrMap.put("priceGoodsTotalUpper", priceGoodsTotalUpper); addrMap.put("priceGoodsTotalUpper", priceGoodsTotalUpper);
addrMap.put("priceTrans", priceTrans); // addrMap.put("priceTrans", priceTrans);
addrMap.put("priceTransTotal", priceTransTotal); // addrMap.put("priceTransTotal", priceTransTotal);
addrMap.put("priceTransTotalUpper", priceTransTotalUpper); // addrMap.put("priceTransTotalUpper", priceTransTotalUpper);
addrMap.put("vendor", vendor); addrMap.put("vendor", vendor);
addrMap.put("vendorTaxId", vendorTaxId); addrMap.put("vendorTaxId", vendorTaxId);
addrMap.put("remark", remark); addrMap.put("remark", remark);
addrMap.put("drawer", drawer); addrMap.put("drawer", drawer);
addrMap.put("haulerCo", haulerCo); addrMap.put("truck_license", truckLicense);
addrMap.put("invoice_code", invoiceCode);
// addrMap.put("haulerCo", haulerCo);
} }
private static CellAddress makeCellAddress(String addr) { private static CellAddress makeCellAddress(String addr) {

View File

@ -434,6 +434,9 @@ public class OrderService {
out.put("remark", remark); out.put("remark", remark);
out.put("drawer", StrUtil.getRecordStr(order, "settlement_user_name")); out.put("drawer", StrUtil.getRecordStr(order, "settlement_user_name"));
out.put("truck_license", StrUtil.getRecordStr(order, "truck_license"));
out.put("invoice_code", StrUtil.getRecordStr(order, "invoice_code"));
return out; return out;
} }

View File

@ -288,7 +288,7 @@ public class Config extends JFinalConfig {
// 根据 Linux 上的运行目录,判断当前连接那个数据库 // 根据 Linux 上的运行目录,判断当前连接那个数据库
// 这边将 生产 环境运行目录写死,只有在这个目录下运行时,才算 生产 环境 // 这边将 生产 环境运行目录写死,只有在这个目录下运行时,才算 生产 环境
String path = PathKit.getWebRootPath(); String path = PathKit.getWebRootPath();
String linux_dev_dir = "/home/admin123456/ssjygl_hzq/ssjygl-service-release"; String linux_dev_dir = "/home/lisai/ssjygl-xsx/ssjygl-xsx-service/ssjygl-xsx-service/target/ssjygl-xsx-service-release";
log.debug("path:" + path); log.debug("path:" + path);