|
@@ -912,13 +912,17 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
if (nextId == 0) {
|
|
|
if (splits.length == 1) {
|
|
|
baseProcess.setProcessType(1);
|
|
|
- if (allLocationId.length() > 9) {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
|
|
|
- } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,2,2");
|
|
|
- } else {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2");
|
|
|
+ String[] strings = allLocationId.split(",");
|
|
|
+ String ss2 = "";
|
|
|
+ for (int i = 0; i < strings.length; i++) {
|
|
|
+ strings[i].replaceAll(strings[i], "2");
|
|
|
+ if (i == strings.length - 1) {
|
|
|
+ ss2 = ss2 + strings[i].replaceAll(strings[i], "2");
|
|
|
+ } else {
|
|
|
+ ss2 = strings[i].replaceAll(strings[i], "2") + "," + ss2;
|
|
|
+ }
|
|
|
}
|
|
|
+ baseProcess.setAllLocationStatus(ss2);
|
|
|
} else {
|
|
|
String[] strings = allLocationId.split(",");
|
|
|
Integer index = 0;
|
|
@@ -1021,15 +1025,20 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
inventoryMapper.insert(before);
|
|
|
}
|
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
|
|
|
- if (allLocationId.length() > 9) {
|
|
|
- if (index == 1) {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
|
|
|
+ Integer locationId = billClean.getTestLocationId();
|
|
|
+ int indexOf = allLocationId.indexOf(locationId);//当前位置在所有流程位置中的下标
|
|
|
+ String substring = baseProcess.getAllLocationStatus().substring(0, indexOf + 3);//截取已经过的位置状态
|
|
|
+ String[] split1 = substring.split(",");
|
|
|
+ String sb2 = "";
|
|
|
+ for (int i = 0; i < split1.length; i++) {
|
|
|
+ if (i == split1.length - 1) {
|
|
|
+ sb2 = sb2 + split1[i].replaceAll(split1[i], "2");
|
|
|
} else {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
|
|
|
+ sb2 = split1[i].replaceAll(split1[i], "2") + "," + sb2;
|
|
|
}
|
|
|
- } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,1,0");
|
|
|
}
|
|
|
+ sb2 = sb2 + baseProcess.getAllLocationStatus().substring(indexOf + 3);
|
|
|
+ baseProcess.setAllLocationStatus(sb2);
|
|
|
}
|
|
|
} else if (nextId == 1) {
|
|
|
//新增采样
|
|
@@ -1204,13 +1213,17 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
if (nextId == 0) {
|
|
|
if (splits.length == 1) {
|
|
|
baseProcess.setProcessType(1);
|
|
|
- if (allLocationId.length() > 9) {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
|
|
|
- } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,2,2");
|
|
|
- } else {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2");
|
|
|
+ String[] strings = allLocationId.split(",");
|
|
|
+ String ss2 = "";
|
|
|
+ for (int i = 0; i < strings.length; i++) {
|
|
|
+ strings[i].replaceAll(strings[i], "2");
|
|
|
+ if (i == strings.length - 1) {
|
|
|
+ ss2 = ss2 + strings[i].replaceAll(strings[i], "2");
|
|
|
+ } else {
|
|
|
+ ss2 = strings[i].replaceAll(strings[i], "2") + "," + ss2;
|
|
|
+ }
|
|
|
}
|
|
|
+ baseProcess.setAllLocationStatus(ss2);
|
|
|
} else {
|
|
|
String[] strings = allLocationId.split(",");
|
|
|
Integer index = 0;
|
|
@@ -1313,15 +1326,21 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
inventoryMapper.insert(before);
|
|
|
}
|
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
|
|
|
- if (allLocationId.length() > 9) {
|
|
|
- if (index == 1) {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
|
|
|
+
|
|
|
+ Integer locationId = billClean.getTestLocationId();
|
|
|
+ int indexOf = allLocationId.indexOf(locationId);//当前位置在所有流程位置中的下标
|
|
|
+ String substring = baseProcess.getAllLocationStatus().substring(0, indexOf + 3);//截取已经过的位置状态
|
|
|
+ String[] split1 = substring.split(",");
|
|
|
+ String sb2 = "";
|
|
|
+ for (int i = 0; i < split1.length; i++) {
|
|
|
+ if (i == split1.length - 1) {
|
|
|
+ sb2 = sb2 + split1[i].replaceAll(split1[i], "2");
|
|
|
} else {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
|
|
|
+ sb2 = split1[i].replaceAll(split1[i], "2") + "," + sb2;
|
|
|
}
|
|
|
- } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,1,0");
|
|
|
}
|
|
|
+ sb2 = sb2 + baseProcess.getAllLocationStatus().substring(indexOf + 3);
|
|
|
+ baseProcess.setAllLocationStatus(sb2);
|
|
|
}
|
|
|
} else if (nextId == 1) {
|
|
|
//新增采样
|