扫码问题

dev_2.5_csconfilt
yewj 3 months ago
parent 20514d1e76
commit 2e188d5dd6

@ -503,7 +503,7 @@ public class IoCollectOrderCodeManService extends ServiceImpl<IoCollectOrderCode
}
int myUseCount = calCountUtil.getUseActCount(udiRelevanceResponse);
if (needCount > myUseCount) {
throw new JsonException(500, collectOrderBiz.getCpmctymc() + "扫码数量超出!");
throw new JsonException(502, collectOrderBiz.getCpmctymc() + "扫码数量超出!");
} else {
collectOrderBiz.setSplitUnCheck(true);
if (IntUtil.value(collectSet.getLastCodeSplit())) {
@ -511,7 +511,7 @@ public class IoCollectOrderCodeManService extends ServiceImpl<IoCollectOrderCode
}
}
} else {
throw new JsonException(500, collectOrderBiz.getCpmctymc() + "扫码数量超出!");
throw new JsonException(502, collectOrderBiz.getCpmctymc() + "扫码数量超出!");
}
}

@ -1537,7 +1537,6 @@ public class HeartService {
Date startTime = new Date();
String data = spGetHttp.pullData(exportType);
;
cn.hutool.json.JSONObject obj = JSONUtil.parseObj(data);
Integer code = obj.getInt("code");
if (!code.equals(20000)) {

@ -34,7 +34,6 @@ public class WebSocketComponent implements CommandLineRunner {
SocketMsgService socketMsgService;
@Resource
IoStatOrderService statOrderService;
@ -49,21 +48,20 @@ public class WebSocketComponent implements CommandLineRunner {
SpsWebSocketClient client = new SpsWebSocketClient("ws://" + ip + "/sps/web/sync/2/" + socketToken);
client.setSocketMsgService(socketMsgService);
initConnect(client);
//等待服务端响应
while (!client.getReadyState().equals(ReadyState.OPEN)) {
// log.info("连接中···请稍后");
Thread.sleep(1000);
}
//等待WebSocket服务端响应
String message = null;
while (true) {
while ((message = client.getExcptMessage()) == null) {
log.info("已连接,等待接收数据--------");
Thread.sleep(1000);
if (client.isClosed()) {
initConnect(client);
}
}
log.info("接收到服务端消息:" + message);
if (message.equals(SocketMsgType.DL_ALL_DATA)) {
heartTaskService.pullData(null);
}

@ -124,12 +124,13 @@ public class SyncHeartService {
e.printStackTrace();
log.error(ExceptionUtils.getStackTrace(e));
}
try {
heartService.dlAllDiProducts();
} catch (Exception e) {
e.printStackTrace();
log.error(ExceptionUtils.getStackTrace(e));
}
// 暂时注释掉DI下载
// try {
// heartService.dlAllDiProducts();
// } catch (Exception e) {
// e.printStackTrace();
// log.error(ExceptionUtils.getStackTrace(e));
// }
Arrays.stream(BasicExportTypeEnum.values()).forEach(i -> {
heartService.pullData(i);
});

@ -89,7 +89,6 @@ public class OkHttpCli {
}
}
log.info(sb.toString());
Request request = builder.url(sb.toString()).build();
log.info("do get request and url[{}]", sb.toString());
return execute(request);

Loading…
Cancel
Save