|
@@ -133,6 +133,7 @@ public class CommSendService {
|
|
return arE3;
|
|
return arE3;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ s = simService.uniqueBySimNum(simNum);
|
|
// todo: aj改造
|
|
// todo: aj改造
|
|
readOneSimAtLastByDebug(s);
|
|
readOneSimAtLastByDebug(s);
|
|
return AjaxResult.success("成功读取!");
|
|
return AjaxResult.success("成功读取!");
|
|
@@ -254,13 +255,18 @@ public class CommSendService {
|
|
* @param s
|
|
* @param s
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public AjaxResult checkOneSimStateActive(final Sim s) {
|
|
|
|
|
|
+ public AjaxResult checkOneSimStateActive(Sim s) {
|
|
|
|
+ long simId = s.getSimId();
|
|
|
|
+ // 这句可能会调整模拟器状态
|
|
checkOneSimState(s, true);
|
|
checkOneSimState(s, true);
|
|
|
|
+ //
|
|
|
|
+ s = simService.selectSimBySimId(simId);
|
|
// 如果模拟器离线
|
|
// 如果模拟器离线
|
|
- if (s == null || !Sim.State.ONLINE.equals(s.getSimState())) {
|
|
|
|
|
|
+ if (s != null && Sim.State.ONLINE.equals(s.getSimState())) {
|
|
|
|
+ return AjaxResult.success();
|
|
|
|
+ } else {
|
|
return AjaxResult.error("未连接模拟器,请检查连接!");
|
|
return AjaxResult.error("未连接模拟器,请检查连接!");
|
|
}
|
|
}
|
|
- return AjaxResult.success();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -415,21 +421,22 @@ public class CommSendService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public AjaxResult debugClearAllFaultBySimNum(final String simNum) {
|
|
public AjaxResult debugClearAllFaultBySimNum(final String simNum) {
|
|
- Sim s = simService.uniqueBySimNum(simNum);
|
|
|
|
|
|
+ Sim s1 = simService.uniqueBySimNum(simNum);
|
|
{
|
|
{
|
|
- AjaxResult arE3 = checkOneSimStateActive(s);
|
|
|
|
|
|
+ AjaxResult arE3 = checkOneSimStateActive(s1);
|
|
if (arE3.isError()) {
|
|
if (arE3.isError()) {
|
|
return arE3;
|
|
return arE3;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (s == null) {
|
|
|
|
|
|
+ s1 = simService.uniqueBySimNum(simNum);
|
|
|
|
+ if (s1 == null) {
|
|
return AjaxResult.error("清除失败,对应simNum模拟器不存在!");
|
|
return AjaxResult.error("清除失败,对应simNum模拟器不存在!");
|
|
}
|
|
}
|
|
- if (!Sim.State.ONLINE.equals(s.getSimState())) {
|
|
|
|
|
|
+ if (!Sim.State.ONLINE.equals(s1.getSimState())) {
|
|
return AjaxResult.error("清除失败,模拟器尚未在线!");
|
|
return AjaxResult.error("清除失败,模拟器尚未在线!");
|
|
}
|
|
}
|
|
List<SimMsg> list = new ArrayList<>();
|
|
List<SimMsg> list = new ArrayList<>();
|
|
- for (String b : getGZBWBySimType(s.getSimType())) {
|
|
|
|
|
|
+ for (String b : getGZBWBySimType(s1.getSimType())) {
|
|
SimMsg sm = debugClearOneFault(simNum, b);
|
|
SimMsg sm = debugClearOneFault(simNum, b);
|
|
list.add(sm);
|
|
list.add(sm);
|
|
if (sm != null && !sm.getOk()) {
|
|
if (sm != null && !sm.getOk()) {
|
|
@@ -528,6 +535,7 @@ public class CommSendService {
|
|
// 打开socket
|
|
// 打开socket
|
|
{
|
|
{
|
|
AjaxResult ar1 = openSocket();
|
|
AjaxResult ar1 = openSocket();
|
|
|
|
+ l.info("ar1 = {}", ar1);
|
|
if (ar1.isError()) {
|
|
if (ar1.isError()) {
|
|
return ar1;
|
|
return ar1;
|
|
}
|
|
}
|
|
@@ -539,6 +547,7 @@ public class CommSendService {
|
|
return arE3;
|
|
return arE3;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ s = simService.uniqueBySimNum(simNum);
|
|
// Step 2
|
|
// Step 2
|
|
// msg判断,是否含有"故障部位"字符串
|
|
// msg判断,是否含有"故障部位"字符串
|
|
{
|
|
{
|