|
@@ -83,7 +83,7 @@ public class SafeTimer {
|
|
billIsolate.getProcessId(), billIsolate.getFarmId(), billIsolate.getIsolateLocation(), billIsolate.getIsolateLocationId(),
|
|
billIsolate.getProcessId(), billIsolate.getFarmId(), billIsolate.getIsolateLocation(), billIsolate.getIsolateLocationId(),
|
|
billIsolate.getVistitType(), billIsolate.getPhone(), billIsolate.getDepartureName(), billIsolate.getDepartureId());
|
|
billIsolate.getVistitType(), billIsolate.getPhone(), billIsolate.getDepartureName(), billIsolate.getDepartureId());
|
|
if (nextId == 0) {
|
|
if (nextId == 0) {
|
|
- if (StringUtils.isBlank(splits[1])) {
|
|
|
|
|
|
+ if (splits.length == 1) {
|
|
baseProcess.setProcessType(1);
|
|
baseProcess.setProcessType(1);
|
|
String[] strings = allLocationId.split(",");
|
|
String[] strings = allLocationId.split(",");
|
|
String ss2 = "";
|
|
String ss2 = "";
|
|
@@ -199,7 +199,15 @@ public class SafeTimer {
|
|
}
|
|
}
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
|
|
Integer locationId = billIsolate.getIsolateLocationId();
|
|
Integer locationId = billIsolate.getIsolateLocationId();
|
|
- int indexOf = allLocationId.indexOf(locationId.toString());//当前位置在所有流程位置中的下标
|
|
|
|
|
|
+ String[] split2 = allLocationId.split(",");
|
|
|
|
+ int a=0;
|
|
|
|
+ for (int i = 0; i < split2.length; i++) {
|
|
|
|
+ if (locationId.toString().equals(split2[i])) {
|
|
|
|
+ a = i + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ int indexOf = 2 * (a - 2);//当前位置在所有流程位置中的下标
|
|
|
|
+
|
|
String substring = baseProcess.getAllLocationStatus().substring(0, indexOf + 3);//截取已经过的位置状态
|
|
String substring = baseProcess.getAllLocationStatus().substring(0, indexOf + 3);//截取已经过的位置状态
|
|
String[] split1 = substring.split(",");
|
|
String[] split1 = substring.split(",");
|
|
String sb2 = "";
|
|
String sb2 = "";
|
|
@@ -212,8 +220,8 @@ public class SafeTimer {
|
|
}
|
|
}
|
|
sb2 = sb2 + baseProcess.getAllLocationStatus().substring(indexOf + 3);
|
|
sb2 = sb2 + baseProcess.getAllLocationStatus().substring(indexOf + 3);
|
|
StringBuilder sb = new StringBuilder(sb2);
|
|
StringBuilder sb = new StringBuilder(sb2);
|
|
- sb.replace(indexOf + 2, indexOf + 3, "2");
|
|
|
|
- sb.replace(indexOf + 4, indexOf + 5, "1");
|
|
|
|
|
|
+ sb.replace(indexOf + 4, indexOf + 5, "2");
|
|
|
|
+ sb.replace(indexOf + 6, indexOf + 7, "1");
|
|
baseProcess.setAllLocationStatus(sb.toString());
|
|
baseProcess.setAllLocationStatus(sb.toString());
|
|
}
|
|
}
|
|
} else if (nextId == 1) {
|
|
} else if (nextId == 1) {
|
|
@@ -371,8 +379,7 @@ public class SafeTimer {
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
String s = "0,1,0,2,0,3,0";
|
|
String s = "0,1,0,2,0,3,0";
|
|
String s1 = "2,2,2,1,0,0,0";
|
|
String s1 = "2,2,2,1,0,0,0";
|
|
- Integer locationId = 2;
|
|
|
|
- int indexOf = s.indexOf(locationId.toString());//当前位置在所有流程位置中的下标
|
|
|
|
|
|
+ int indexOf = s.indexOf("2");//当前位置在所有流程位置中的下标
|
|
System.out.println(indexOf);
|
|
System.out.println(indexOf);
|
|
String substring = s1.substring(0, indexOf + 3);//截取已经过的位置状态
|
|
String substring = s1.substring(0, indexOf + 3);//截取已经过的位置状态
|
|
String[] split1 = substring.split(",");
|
|
String[] split1 = substring.split(",");
|