|
@@ -114,17 +114,17 @@ public class BaseProcessServiceImpl extends ServiceImpl<BaseProcessMapper, BaseP
|
|
|
baseProcess.setProcessType(3);
|
|
|
String currentFlowId = baseProcess.getCurrentFlowId();
|
|
|
|
|
|
-
|
|
|
- String[] strings = baseProcess.getAllLocationId().split(",");
|
|
|
- String ss2 = "";
|
|
|
- for (int i = 0; i < strings.length; i++) {
|
|
|
- strings[i].replaceAll(strings[i], "4");
|
|
|
- if (i == strings.length - 1) {
|
|
|
- ss2 = ss2 + strings[i].replaceAll(strings[i], "4");
|
|
|
- } else {
|
|
|
- ss2 = strings[i].replaceAll(strings[i], "4") + "," + ss2;
|
|
|
+ int count = 0;
|
|
|
+ char l = '0';
|
|
|
+ for (int i = 0; i < currentFlowId.length(); i++) {
|
|
|
+ if (currentFlowId.charAt(i) == l) {
|
|
|
+ count++;
|
|
|
}
|
|
|
}
|
|
|
+ String allLocationId = baseProcess.getAllLocationStatus();
|
|
|
+ int a = 2 + 4 * (count - 1);
|
|
|
+
|
|
|
+ String ss2=allLocationId.substring(0, a) + '4' + allLocationId.substring(a + 1);
|
|
|
baseProcess.setAllLocationStatus(ss2);
|
|
|
|
|
|
String s = currentFlowId.substring(currentFlowId.length() - 1);
|
|
@@ -214,16 +214,30 @@ public class BaseProcessServiceImpl extends ServiceImpl<BaseProcessMapper, BaseP
|
|
|
public static void main(String[] args) {
|
|
|
String s = "1,2,0";
|
|
|
// System.out.println(s.substring(s.length() - 1));
|
|
|
- String[] strings = s.split(",");
|
|
|
- String ss2 = "";
|
|
|
- for (int i = 0; i < strings.length; i++) {
|
|
|
- strings[i].replaceAll(strings[i], "4");
|
|
|
- if (i == strings.length - 1) {
|
|
|
- ss2 = ss2 + strings[i].replaceAll(strings[i], "4");
|
|
|
- } else {
|
|
|
- ss2 = strings[i].replaceAll(strings[i], "4") + "," + ss2;
|
|
|
+// String[] strings = s.split(",");
|
|
|
+// String ss2 = "";
|
|
|
+ int a = 2;
|
|
|
+ System.out.println(s.substring(0, a) + '4' + s.substring(a + 1));
|
|
|
+
|
|
|
+// for (int i = 0; i < strings.length; i++) {
|
|
|
+// strings[i].replaceAll(strings[i], "4");
|
|
|
+// if (i == strings.length - 1) {
|
|
|
+// ss2 = ss2 + strings[i].replaceAll(strings[i], "4");
|
|
|
+// } else {
|
|
|
+// ss2 = strings[i].replaceAll(strings[i], "4") + "," + ss2;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// System.out.println(ss2);
|
|
|
+
|
|
|
+
|
|
|
+ String fl="0,1,2";
|
|
|
+ int count = 0;
|
|
|
+ char l = '0';
|
|
|
+ for (int i = 0; i < fl.length(); i++) {
|
|
|
+ if (fl.charAt(i) == '0') {
|
|
|
+ count++;
|
|
|
}
|
|
|
}
|
|
|
- System.out.println(ss2);
|
|
|
+ System.out.println(count);
|
|
|
}
|
|
|
}
|