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.connect();
plc.isConnected();
plc.write("rodIn1Up");
plc.write("rodIn2Up");
// plc.write("rodOut2Up");
// plc.write("sensorIn2Reset");

View File

@ -8,98 +8,105 @@ import java.util.Map;
// 保存预设的发票内容单元格位置
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<>();
static {
// addrMap.put("serial", serial);
addrMap.put("qrcode", qrcode);
// addrMap.put("qrcode", qrcode);
addrMap.put("datatimePrint", datetimePrint);
addrMap.put("clientName", clientName);
addrMap.put("clientTaxId", clientTaxId);
addrMap.put("clientContact", clientContact);
addrMap.put("clientBankInfo", clientBankInfo);
addrMap.put("haulerName", haulerName);
addrMap.put("haulerTaxId", haulerTaxId);
addrMap.put("haulerContact", haulerContact);
addrMap.put("haulerBankInfo", haulerBankInfo);
addrMap.put("origin", origin);
addrMap.put("dest", dest);
addrMap.put("goodsName", goodsName);
// addrMap.put("haulerName", haulerName);
// addrMap.put("haulerTaxId", haulerTaxId);
// addrMap.put("haulerContact", haulerContact);
// addrMap.put("haulerBankInfo", haulerBankInfo);
// addrMap.put("origin", origin);
// addrMap.put("dest", dest);
// addrMap.put("goodsName", goodsName);
addrMap.put("goodsNetWeight", goodsNetWeight);
addrMap.put("goodsTareWeight", goodsTareWeight);
addrMap.put("goodsGrossWeight", goodsGrossWeight);
addrMap.put("transDistance", transDistance);
// addrMap.put("transDistance", transDistance);
addrMap.put("priceGoods", priceGoods);
addrMap.put("priceGoodsTotal", priceGoodsTotal);
addrMap.put("priceGoodsTotalUpper", priceGoodsTotalUpper);
addrMap.put("priceTrans", priceTrans);
addrMap.put("priceTransTotal", priceTransTotal);
addrMap.put("priceTransTotalUpper", priceTransTotalUpper);
// addrMap.put("priceTrans", priceTrans);
// addrMap.put("priceTransTotal", priceTransTotal);
// addrMap.put("priceTransTotalUpper", priceTransTotalUpper);
addrMap.put("vendor", vendor);
addrMap.put("vendorTaxId", vendorTaxId);
addrMap.put("remark", remark);
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) {

View File

@ -434,6 +434,9 @@ public class OrderService {
out.put("remark", remark);
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;
}

View File

@ -288,7 +288,7 @@ public class Config extends JFinalConfig {
// 根据 Linux 上的运行目录,判断当前连接那个数据库
// 这边将 生产 环境运行目录写死,只有在这个目录下运行时,才算 生产 环境
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);