dev
parent
5831345404
commit
57c96db052
|
|
@ -124,7 +124,7 @@ public class PrepayService {
|
||||||
PrepayCustomer prepayCustomer = PrepayCustomerService.me.getPrepayCustomer(customer.getId());
|
PrepayCustomer prepayCustomer = PrepayCustomerService.me.getPrepayCustomer(customer.getId());
|
||||||
|
|
||||||
if (prepayCustomer == null) {
|
if (prepayCustomer == null) {
|
||||||
log.debug("未找到预付费信息 %s, %s" + customer.getId() + ", " + transport.getSupermarketId());
|
log.error("未找到预付费信息 %s, %s" + customer.getId() + ", " + transport.getSupermarketId());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,14 @@ public class DeviceThread extends Thread {
|
||||||
this.printerMap.get(printerId).print(file);
|
this.printerMap.get(printerId).print(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void showPriceInfo(String which, String truck_license, String weight, String total_price){
|
||||||
|
for (Controller controller : controllers) {
|
||||||
|
if (controller.getWhich().equals(which)) {
|
||||||
|
controller.getLed().setPriceInfo(truck_license, weight, total_price);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Camera getCameraByIp(String ip) {
|
public Camera getCameraByIp(String ip) {
|
||||||
return cameras.get(ip);
|
return cameras.get(ip);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ public class InvoiceInvalidVerifySyncService {
|
||||||
public Result save(InvoiceInvalidVerify model, Sysuser sysuser) {
|
public Result save(InvoiceInvalidVerify model, Sysuser sysuser) {
|
||||||
InvoiceInvalidVerify old = InvoiceInvalidVerify.dao.findFirst(
|
InvoiceInvalidVerify old = InvoiceInvalidVerify.dao.findFirst(
|
||||||
"select * from invoice_invalid_verify t \n" +
|
"select * from invoice_invalid_verify t \n" +
|
||||||
" wheret.invoice_number = ? \n" +
|
" where t.invoice_number = ? \n" +
|
||||||
" and t.invoice_code = ? \n" +
|
" and t.invoice_code = ? \n" +
|
||||||
" and t.state = 1 " +
|
" and t.state = 1 " +
|
||||||
" limit 1", model.getInvoiceNumber(), model.getInvoiceCode());
|
" limit 1", model.getInvoiceNumber(), model.getInvoiceCode());
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,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 = "20201026";
|
public static final String CLINET_VERSION = "20201029";
|
||||||
|
|
||||||
public static String getRootPath() {
|
public static String getRootPath() {
|
||||||
return PathKit.getWebRootPath()
|
return PathKit.getWebRootPath()
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ public class Main {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
log.info("====================================================");
|
log.info("====================================================");
|
||||||
log.info("========= 启动本地服务 ===============");
|
log.info("========= 启动本地服务 ==============");
|
||||||
log.info("========= PID: %s ===============", pid);
|
log.info("========= PID: %s ===============", pid);
|
||||||
|
|
||||||
boolean isprod = Config.isProd();
|
boolean isprod = Config.isProd();
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,14 @@ import com.cowr.local.ssjygl.main.Config;
|
||||||
import com.cowr.model.SyncTask;
|
import com.cowr.model.SyncTask;
|
||||||
import com.cowr.model.Sysuser;
|
import com.cowr.model.Sysuser;
|
||||||
import com.cowr.model.Transport;
|
import com.cowr.model.Transport;
|
||||||
|
import com.cowr.ssjygl.order.ordercluster.OrderclusterService;
|
||||||
import com.jfinal.kit.HttpKit;
|
import com.jfinal.kit.HttpKit;
|
||||||
import com.jfinal.kit.StrKit;
|
import com.jfinal.kit.StrKit;
|
||||||
import com.jfinal.log.Log;
|
import com.jfinal.log.Log;
|
||||||
import com.jfinal.plugin.activerecord.Db;
|
import com.jfinal.plugin.activerecord.Db;
|
||||||
import com.jfinal.plugin.activerecord.Record;
|
import com.jfinal.plugin.activerecord.Record;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
@ -298,6 +300,20 @@ public class TransportDeviceService {
|
||||||
|
|
||||||
boolean ret = TransportSyncService.me.postWeigh(transport, weight, which);
|
boolean ret = TransportSyncService.me.postWeigh(transport, weight, which);
|
||||||
|
|
||||||
|
// 更新成功,并且是出口的情况下,需要更新 LED 显示金额
|
||||||
|
if (ret && which.startsWith(Enums.CtrlFlowEnum.C.name())) {
|
||||||
|
BigDecimal total_price = OrderclusterService.me.getTotalPriceByLicense(transport.getSupermarketId(), transport.getTruckLicense(), weight);
|
||||||
|
|
||||||
|
if (total_price != null) {
|
||||||
|
Config.deviceThread.showPriceInfo(
|
||||||
|
which,
|
||||||
|
transport.getTruckLicense(),
|
||||||
|
String.format("%.2f", weight),
|
||||||
|
String.format("%.2f", total_price)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cmdlog.set("status", ret);
|
cmdlog.set("status", ret);
|
||||||
ActionCmdLogSyncService.me.save(cmdlog.toJson(), sysuser);
|
ActionCmdLogSyncService.me.save(cmdlog.toJson(), sysuser);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue