|
@@ -305,7 +305,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
Page<BillPcr> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
Page<BillPcr> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
BaseLocation baseLocation = locationMapper.selectById(TokenSign.getWorkIdByJwtToken(httpServletRequest));
|
|
BaseLocation baseLocation = locationMapper.selectById(TokenSign.getWorkIdByJwtToken(httpServletRequest));
|
|
QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
|
|
- queryWrapper.eq("test_location_id",baseLocation.getId()).orderByDesc("sub_date");
|
|
|
|
|
|
+ queryWrapper.eq("test_location_id", baseLocation.getId()).orderByDesc("sub_date");
|
|
if ("0".equals(type)) {
|
|
if ("0".equals(type)) {
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3);
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3);
|
|
}
|
|
}
|
|
@@ -319,7 +319,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
queryWrapper.in("bill_status", 2, 3);
|
|
queryWrapper.in("bill_status", 2, 3);
|
|
}
|
|
}
|
|
QueryWrapper<BillPcr> queryWrapper2 = new QueryWrapper<>();
|
|
QueryWrapper<BillPcr> queryWrapper2 = new QueryWrapper<>();
|
|
- queryWrapper2.eq("test_location_id",baseLocation.getId()).orderByDesc("sub_date");
|
|
|
|
|
|
+ queryWrapper2.eq("test_location_id", baseLocation.getId()).orderByDesc("sub_date");
|
|
queryWrapper2.eq("bill_status", 0);
|
|
queryWrapper2.eq("bill_status", 0);
|
|
return new Result(ResultCode.SUCCESS, pcrMapper.selectPage(page, queryWrapper), pcrMapper.selectCount(queryWrapper2));
|
|
return new Result(ResultCode.SUCCESS, pcrMapper.selectPage(page, queryWrapper), pcrMapper.selectCount(queryWrapper2));
|
|
}
|
|
}
|
|
@@ -418,13 +418,17 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
if (nextId == 0) {
|
|
if (nextId == 0) {
|
|
if (split.length == 1) {
|
|
if (split.length == 1) {
|
|
baseProcess.setProcessType(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 {
|
|
} else {
|
|
String[] strings = allLocationId.split(",");
|
|
String[] strings = allLocationId.split(",");
|
|
Integer index = 0;
|
|
Integer index = 0;
|
|
@@ -513,8 +517,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
before.setRemark(billPcr.getRemark());
|
|
before.setRemark(billPcr.getRemark());
|
|
}
|
|
}
|
|
beforeMapper.insert(before);
|
|
beforeMapper.insert(before);
|
|
- }
|
|
|
|
- else if (Integer.parseInt(split[1]) == 7) {
|
|
|
|
|
|
+ } else if (Integer.parseInt(split[1]) == 7) {
|
|
//新增洗澡前拍照
|
|
//新增洗澡前拍照
|
|
BillGoodsInventory before = (BillGoodsInventory) entity;
|
|
BillGoodsInventory before = (BillGoodsInventory) entity;
|
|
if (billPcr.getVistitType() != 0) {
|
|
if (billPcr.getVistitType() != 0) {
|
|
@@ -528,15 +531,22 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
inventoryMapper.insert(before);
|
|
inventoryMapper.insert(before);
|
|
}
|
|
}
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
|
|
- if (allLocationId.length() > 9) {
|
|
|
|
- if (index == 1) {
|
|
|
|
- baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
|
|
|
|
|
|
+
|
|
|
|
+ Integer locationId = billPcr.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 {
|
|
} 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) {
|
|
} else if (nextId == 1) {
|
|
//新增采样
|
|
//新增采样
|
|
@@ -616,8 +626,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
}
|
|
}
|
|
beforeMapper.insert(before);
|
|
beforeMapper.insert(before);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
- }
|
|
|
|
- else if (nextId == 7) {
|
|
|
|
|
|
+ } else if (nextId == 7) {
|
|
//新增洗澡前拍照
|
|
//新增洗澡前拍照
|
|
BillGoodsInventory before = (BillGoodsInventory) newObject;
|
|
BillGoodsInventory before = (BillGoodsInventory) newObject;
|
|
if (billPcr.getVistitType() != 0) {
|
|
if (billPcr.getVistitType() != 0) {
|
|
@@ -731,7 +740,23 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
}
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
- String s = "0,1,0,2,0";
|
|
|
|
|
|
+ String s = "0,1,0,2,0,3,0";
|
|
|
|
+ String a = "1,1,1,1,1,1,1";
|
|
|
|
+ String s1 = "3";
|
|
|
|
+ String s3 = a.substring(0, s.indexOf(s1) + 3);
|
|
|
|
+// System.out.println(s.indexOf(s1));
|
|
|
|
+ String[] split = s3.split(",");
|
|
|
|
+ String s2 = "";
|
|
|
|
+ for (int i = 0; i < split.length; i++) {
|
|
|
|
+ if (i == split.length - 1) {
|
|
|
|
+ s2 = s2 + split[i].replaceAll(split[i], "2");
|
|
|
|
+ } else {
|
|
|
|
+ s2 = split[i].replaceAll(split[i], "2") + "," + s2;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ System.out.println(s2);
|
|
|
|
+ s2 = s2 + s.substring(s.indexOf(s1) + 3);
|
|
|
|
+ System.out.println(s2);
|
|
// String[] split = s.split(",");
|
|
// String[] split = s.split(",");
|
|
// Integer index = 0;
|
|
// Integer index = 0;
|
|
// for (int i = 0; i < split.length; i++) {
|
|
// for (int i = 0; i < split.length; i++) {
|
|
@@ -746,12 +771,12 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
// sb.setCharAt(a,'0');
|
|
// sb.setCharAt(a,'0');
|
|
// System.out.println(sb.toString());
|
|
// System.out.println(sb.toString());
|
|
|
|
|
|
- String s1 = "2,0,0";
|
|
|
|
- System.out.println(s1.indexOf("2"));
|
|
|
|
- StringBuilder sb = new StringBuilder(s1);
|
|
|
|
- sb.setCharAt(2, '1');
|
|
|
|
- sb.setCharAt(4, '1');
|
|
|
|
- System.out.println(sb.toString());
|
|
|
|
|
|
+// String s1 = "2,0,0";
|
|
|
|
+// System.out.println(s1.indexOf("2"));
|
|
|
|
+// StringBuilder sb = new StringBuilder(s1);
|
|
|
|
+// sb.setCharAt(2, '1');
|
|
|
|
+// sb.setCharAt(4, '1');
|
|
|
|
+// System.out.println(sb.toString());
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|