dev
parent
8a53bdfcbf
commit
371583720b
|
|
@ -92,7 +92,6 @@ public class LEDThread extends Device implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void screen() {
|
public void screen() {
|
||||||
synchronized (lock) {
|
|
||||||
lock.lock();
|
lock.lock();
|
||||||
try {
|
try {
|
||||||
if (this.license == null) {
|
if (this.license == null) {
|
||||||
|
|
@ -172,7 +171,6 @@ public class LEDThread extends Device implements Runnable {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private static byte[] frameHead = new byte[]{(byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5};
|
private static byte[] frameHead = new byte[]{(byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5, (byte) 0xa5};
|
||||||
private static byte[] packetHead = new byte[]{
|
private static byte[] packetHead = new byte[]{
|
||||||
|
|
@ -289,6 +287,8 @@ public class LEDThread extends Device implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean reconn() {
|
public boolean reconn() {
|
||||||
|
connlock.lock();
|
||||||
|
try {
|
||||||
try {
|
try {
|
||||||
log.debug("销毁LED连接");
|
log.debug("销毁LED连接");
|
||||||
if (socket != null) {
|
if (socket != null) {
|
||||||
|
|
@ -310,8 +310,9 @@ public class LEDThread extends Device implements Runnable {
|
||||||
} else {
|
} else {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
connlock.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
return isConnected();
|
return isConnected();
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ public class Config extends JFinalConfig {
|
||||||
public static DeviceThread deviceThread = new DeviceThread();
|
public static DeviceThread deviceThread = new DeviceThread();
|
||||||
public static SocketIOService socketio = null;
|
public static SocketIOService socketio = null;
|
||||||
private static boolean client_run = true;
|
private static boolean client_run = true;
|
||||||
public static final String CLINET_VERSION = "20201019";
|
public static final String CLINET_VERSION = "20201021";
|
||||||
|
|
||||||
public static String getRootPath() {
|
public static String getRootPath() {
|
||||||
return PathKit.getWebRootPath()
|
return PathKit.getWebRootPath()
|
||||||
|
|
|
||||||
|
|
@ -349,7 +349,11 @@ public class OrderTempSyncService {
|
||||||
order.setProductId(ordercluster.getProductId());
|
order.setProductId(ordercluster.getProductId());
|
||||||
order.setProductName(ordercluster.getProductName());
|
order.setProductName(ordercluster.getProductName());
|
||||||
|
|
||||||
BigDecimal up = null;
|
BigDecimal up = ordercluster.getUnitPrice(); // 集团订单是每天创建的,可以使用集团订单中确定的单价
|
||||||
|
|
||||||
|
if (up == null) {
|
||||||
|
return Result.failedstr("未查到有效的单价信息");
|
||||||
|
}
|
||||||
|
|
||||||
// 客户信息
|
// 客户信息
|
||||||
Customer customer = Customer.dao.findById(ordercluster.getCustomerId());
|
Customer customer = Customer.dao.findById(ordercluster.getCustomerId());
|
||||||
|
|
@ -362,8 +366,6 @@ public class OrderTempSyncService {
|
||||||
order.setCustomerPhone(customer.getPhone());
|
order.setCustomerPhone(customer.getPhone());
|
||||||
order.setCustomerTexpayerName(customer.getTexpayerName());
|
order.setCustomerTexpayerName(customer.getTexpayerName());
|
||||||
order.setCustomerTexpayerNum(customer.getTexpayerNum());
|
order.setCustomerTexpayerNum(customer.getTexpayerNum());
|
||||||
|
|
||||||
up = CustomerSupermarketProductService.me.getUnitPrice(customer.getId(), transport.getSupermarketId(), ordercluster.getProductId());
|
|
||||||
} else {
|
} else {
|
||||||
// 可能是零散购砂客户,没有对应的客户信息记录,但是有客户名称之类的信息
|
// 可能是零散购砂客户,没有对应的客户信息记录,但是有客户名称之类的信息
|
||||||
order.setCustomerId(ordercluster.getCustomerId());
|
order.setCustomerId(ordercluster.getCustomerId());
|
||||||
|
|
@ -374,12 +376,6 @@ public class OrderTempSyncService {
|
||||||
order.setCustomerPhone(ordercluster.getCustomerPhone());
|
order.setCustomerPhone(ordercluster.getCustomerPhone());
|
||||||
order.setCustomerTexpayerName(ordercluster.getCustomerTexpayerName());
|
order.setCustomerTexpayerName(ordercluster.getCustomerTexpayerName());
|
||||||
order.setCustomerTexpayerNum(ordercluster.getCustomerTexpayerNum());
|
order.setCustomerTexpayerNum(ordercluster.getCustomerTexpayerNum());
|
||||||
|
|
||||||
up = SupermarketProductService.me.getUnitPrice(transport.getSupermarketId(), ordercluster.getProductId());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (up == null) {
|
|
||||||
return Result.failedstr("未查到有效的单价信息");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 支付信息
|
// 支付信息
|
||||||
|
|
@ -677,7 +673,8 @@ public class OrderTempSyncService {
|
||||||
transport.setTransCoTexpayerName(ordercluster.getTransCoTexpayerName());
|
transport.setTransCoTexpayerName(ordercluster.getTransCoTexpayerName());
|
||||||
transport.setTransCoTexpayerNum(ordercluster.getTransCoTexpayerNum());
|
transport.setTransCoTexpayerNum(ordercluster.getTransCoTexpayerNum());
|
||||||
|
|
||||||
BigDecimal up = CustomerSupermarketProductService.me.getUnitPrice(customer.getId(), transport.getSupermarketId(), product.getId());
|
// BigDecimal up = CustomerSupermarketProductService.me.getUnitPrice(customer.getId(), transport.getSupermarketId(), product.getId());
|
||||||
|
BigDecimal up = ordercluster.getUnitPrice(); // 集团订单是每天创建的,可以使用集团订单中确定的单价
|
||||||
|
|
||||||
if (up == null) {
|
if (up == null) {
|
||||||
return Result.failedstr("未查到有效的单价信息");
|
return Result.failedstr("未查到有效的单价信息");
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue