dev
parent
f3839eb798
commit
f54734c197
|
|
@ -59,7 +59,7 @@ public class DingsongScale extends AbsScale {
|
|||
ArrayList<String> list = new ArrayList<>();
|
||||
AtomicBoolean run = new AtomicBoolean(true);
|
||||
|
||||
InputStream inputStream = socket.getInputStream();
|
||||
try (InputStream inputStream = socket.getInputStream()) {
|
||||
byte[] clearBuf = new byte[inputStream.available()];
|
||||
inputStream.read(clearBuf);
|
||||
int errCount = 0;
|
||||
|
|
@ -88,7 +88,7 @@ public class DingsongScale extends AbsScale {
|
|||
}
|
||||
|
||||
try {
|
||||
if (Long.parseLong(weight) > 100000) {
|
||||
if (Long.parseLong(weight) < 50 || Long.parseLong(weight) > 100000) {
|
||||
errCount++;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -99,6 +99,9 @@ public class DingsongScale extends AbsScale {
|
|||
// System.out.println("读一次耗时:" + (System.currentTimeMillis() - st) + ", " + Double.parseDouble(flip(weight)));
|
||||
list.add(weight);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
String max = "0";
|
||||
if (list.size() > 0) {
|
||||
|
|
|
|||
|
|
@ -9,14 +9,13 @@ import com.cowr.common.view.Result;
|
|||
import com.cowr.local.ssjygl.devicectrl.common.Const;
|
||||
import com.cowr.local.ssjygl.main.CliCacheData;
|
||||
import com.cowr.local.ssjygl.main.Config;
|
||||
import com.cowr.local.ssjygl.order.LocalOrderService;
|
||||
import com.cowr.local.ssjygl.modifylog.ModifyLogSyncService;
|
||||
import com.cowr.local.ssjygl.ossfilelog.OssfileLogService;
|
||||
import com.cowr.local.ssjygl.synctask.SyncTaskService;
|
||||
import com.cowr.local.ssjygl.system.sysuser.SysuserSyncService;
|
||||
import com.cowr.model.*;
|
||||
import com.cowr.ssjygl.CacheData;
|
||||
import com.cowr.ssjygl.blacklist.BlacklistService;
|
||||
import com.cowr.local.ssjygl.modifylog.ModifyLogSyncService;
|
||||
import com.cowr.ssjygl.order.OrderService;
|
||||
import com.cowr.ssjygl.order.ordercluster.truck.OrderclusterTruckService;
|
||||
import com.cowr.ssjygl.transport.TransportService;
|
||||
|
|
@ -30,7 +29,7 @@ import net.coobird.thumbnailator.Thumbnails;
|
|||
|
||||
import java.io.File;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 该类下会操作 MySQL 数据,需要将修改的数据同步到服务端
|
||||
|
|
@ -361,6 +360,16 @@ public class TransportSyncService {
|
|||
Config.socketio.pubMessage(new Record().set("truck_license", result.getLicense()).set("msg", result.getLicense() + " 未找到入场记录!"));
|
||||
return result;
|
||||
}
|
||||
|
||||
Date intime = transport.getInTime();
|
||||
|
||||
// 水利站是同进同出,进场时间不足 1 分钟,不识别抬杆
|
||||
if (supermarket_id == 9 && (intime != null) && ((System.currentTimeMillis() - intime.getTime()) < (60 * 1000))) {
|
||||
log.error("车辆【" + result.getLicense() + "】入场不到 1 分钟,可能是识别了车尾!");
|
||||
Config.socketio.pubMessage(new Record().set("truck_license", result.getLicense()).set("msg", result.getLicense() + " 入场不到 1 分钟,可能是识别了车尾!"));
|
||||
return result;
|
||||
}
|
||||
|
||||
File uploadfile = null;
|
||||
if (file != null) {
|
||||
String fileuuid = StrKit.getRandomUUID();
|
||||
|
|
|
|||
Loading…
Reference in New Issue