Newspaper il y a 1 an
Parent
commit
3f761d7686

+ 3 - 0
huimv-receive/src/main/java/com/huimv/receive/entity/BaseProcess.java

@@ -87,6 +87,9 @@ public class BaseProcess implements Serializable {
     private String allLocationId;
     private String allLocationStatus;
 
+    private String allFlowId;
+    private String currentFlowId;
+
 
 
 }

+ 4 - 4
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillCleanServiceImpl.java

@@ -405,8 +405,8 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                         isolate.setBillStatus(0);
                         isolate.setIsolateDayNum("");
                         isolate.setProcessId(billClean.getProcessId());
-                        isolate.setIsolateLocation(baseLocation.getNextLocation());
-                        isolate.setIsolateLocationId(baseLocation.getNextId());
+//                        isolate.setIsolateLocation(baseLocation.getNextLocation());
+//                        isolate.setIsolateLocationId(baseLocation.getNextId());
                         isolateMapper.insert(isolate);
 
                         if (exist.getExist() == 0) {
@@ -908,8 +908,8 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                         clean.setCarNum(billClean.getCarNum());
                         clean.setPhone(billClean.getPhone());
                         clean.setProcessId(billClean.getProcessId());
-                        clean.setTestLocationId(baseLocation.getNextId());
-                        clean.setTestLocation(baseLocation.getNextLocation());
+//                        clean.setTestLocationId(baseLocation.getNextId());
+//                        clean.setTestLocation(baseLocation.getNextLocation());
                         cleanMapper.insert(clean);
                         if (billClean.getDestId() == 7) {
                             baseProcess.setAllLocationStatus("2,2,1");

+ 44 - 93
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPersonnelAdmissionServiceImpl.java

@@ -85,6 +85,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
     private DeviceListMapper deviceListMapper;
     @Autowired
     private PeopleListMapper peopleListMapper;
+    @Autowired
+    private BaseWashoutPointMapper baseWashoutPointMapper;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -142,94 +144,43 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
         baseProcess.setUpdateDate(LocalDateTime.now().format(dateTimeFormatter));
         baseProcess.setCurrentStatus("0");
 
-        QueryWrapper<BaseLocation> queryWrapper = new QueryWrapper<>();
-        QueryWrapper<Exist> existQueryWrapper = new QueryWrapper<>();
-        existQueryWrapper.eq("farm_id", farmId);
-        Exist exist = existMapper.selectOne(existQueryWrapper);
-        if (vistitType.equals("5") && exist.getExist() == 0) {
-            if (destId.equals("9")) {
-                baseProcess.setAllLocationStatus("1,0");
-                baseProcess.setAllLocation("场外,初级洗消站");
-                baseProcess.setAllLocationId("26,9");
-            } else if (destId.equals("10")) {
-                baseProcess.setAllLocationId("9,10");
-                baseProcess.setAllLocation("初级洗消站,二级洗消站");
-                baseProcess.setAllLocationStatus("1,0");
-            } else if (destId.equals("11")) {
-                baseProcess.setAllLocationId("10,11");
-                baseProcess.setAllLocation("二级洗消站,三级洗消站");
-                baseProcess.setAllLocationStatus("1,0");
-            }
-        } else if (vistitType.equals("5") && exist.getExist() == 1) {
-            if (destId.equals("9")) {
-                baseProcess.setAllLocationStatus("1,0");
-                baseProcess.setAllLocation("场外,初级洗消站");
-                baseProcess.setAllLocationId("26,9");
-            }
-        } else {
-            queryWrapper.eq("vistit_type", vistitType).orderByAsc("location_type");
-            List<BaseLocation> baseLocations = baseLocationMapper.selectList(queryWrapper);
-            if (admissionType.equals("1")) {
-                baseProcess.setAllLocation("场外," + destName);
-                QueryWrapper<BaseLocation> queryWrapper1 = new QueryWrapper<>();
-                queryWrapper1.eq("vistit_type", vistitType).eq("location_type", 0);
-                baseProcess.setAllLocationId(baseLocationMapper.selectOne(queryWrapper1).getId() + "," + destId);
-                baseProcess.setAllLocationStatus("1,0");
-            } else {
-
-                if (vistitType.equals("0") && exist.getExist() == 1 && Integer.parseInt(destId) > 3) {
-                    if (Integer.parseInt(destId) == 4) {
-                        baseProcess.setAllLocation("场外,人员初级洗消站,净区,场内");
-                        baseProcess.setAllLocationId("20,1,2,4");
-                        baseProcess.setAllLocationStatus("1,0,0,0");
-                    } else {
-                        baseProcess.setAllLocation("场外,人员初级洗消站,净区,场内,生产区");
-                        baseProcess.setAllLocationId("20,1,2,4,5");
-                        baseProcess.setAllLocationStatus("1,0,0,0,0");
-                    }
-                } else if (vistitType.equals("3") && exist.getExist() == 1 && Integer.parseInt(destId) > 7) {
-                    baseProcess.setAllLocation("场外,车辆初级洗消站,中转料塔外围");
-                    baseProcess.setAllLocationId("20,6,8");
-                    baseProcess.setAllLocationStatus("1,0,0");
-
-                } else {
-                    String allLocation = "";
-                    String allLocationId = "";
-                    String allLocationStatus = "";
-                    for (BaseLocation baseLocation : baseLocations) {
-                        if (baseLocation.getId() < Integer.parseInt(destId) || baseLocation.getId() >= 20) {
-                            allLocation = allLocation + baseLocation.getLocationName() + ",";
-                            allLocationId = allLocationId + baseLocation.getId() + ",";
-                            allLocationStatus = allLocationStatus + "0" + ",";
-                        }
-                        if (baseLocation.getId() == Integer.parseInt(destId)) {
-                            allLocation = allLocation + baseLocation.getLocationName();
-                            allLocationId = allLocationId + baseLocation.getId();
-                            allLocationStatus = allLocationStatus + "0";
-                        }
-                    }
-                    baseProcess.setAllLocation(allLocation);
-                    baseProcess.setAllLocationId(allLocationId);
-                    String[] split = allLocationStatus.split(",");
-                    split[0] = "1";
-                    baseProcess.setAllLocationStatus(split[0] + allLocationStatus.substring(1));
-                }
-
+        String allLocation = "";
+        String allLocationId = "";
+        String allLocationStatus = "";
+        String allFlowId = "";
+        List<BaseWashoutPoint> baseWashoutPoints = baseWashoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getVisitingType, vistitType).like(BaseWashoutPoint::getFarmIds, farmId).orderByAsc(BaseWashoutPoint::getPointLevel));
+        for (BaseWashoutPoint baseWashoutPoint : baseWashoutPoints) {
+            if (ObjectUtil.isEmpty(allLocation)){
+                allLocation = baseLocationMapper.selectById(baseWashoutPoint.getLocationId()).getLocationName();
+                allLocationId = baseWashoutPoint.getLocationId().toString();
+                allLocationStatus = "0";
+                allFlowId = baseWashoutPoint.getFlowList();
+            }else {
+                allLocation = allLocation + "," + baseLocationMapper.selectById(baseWashoutPoint.getLocationId()).getLocationName();
+                allLocationId = allLocationId + "," + baseWashoutPoint.getLocationId();
+                allLocationStatus = allLocationStatus + "," + "0";
+                allFlowId = allFlowId + "0" + baseWashoutPoint.getFlowList();
             }
+            allLocation = allLocation + "," + baseWashoutPoint.getTailLocationName();
+            allLocationId = allLocationId + "," + "0";
+            allLocationStatus = allLocationStatus + "," + "0";
         }
+        baseProcess.setAllLocation(allLocation);
+        baseProcess.setAllLocationId(allLocationId);
+        baseProcess.setAllLocationStatus(allLocationStatus);
+        baseProcess.setAllFlowId(allFlowId);
+
 
 
         //获取位置
-        BaseLocation baseLocation;
-        if (vistitType.equals("5")) {
-            baseLocation = baseLocationMapper.selectById(destId);
-        } else {
-            baseLocation = baseLocationMapper.selectOne(new QueryWrapper<BaseLocation>().eq("vistit_type", vistitType).eq("parent_id", 0));
-        }
-        if (ObjectUtil.isEmpty(baseLocation)) {
-            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-            return new Result(10001, "该来访类型位置不存在", false);
-        }
+        BaseWashoutPoint baseWashoutPoint = baseWashoutPointMapper.selectOne(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getVisitingType, vistitType).eq(BaseWashoutPoint::getPointLevel, 1));
+        Integer locationId = baseWashoutPoint.getLocationId();
+
+        BaseLocation baseLocation = baseLocationMapper.selectById(locationId);
+//        if (ObjectUtil.isEmpty(baseLocation)) {
+//            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+//            return new Result(10001, "该来访类型位置不存在", false);
+//        }
         baseProcess.setCurrentLocation(baseLocation.getLocationName());
         baseProcess.setCurrentLocationId(baseLocation.getId().toString());
         baseProcess.setFarmId(Integer.parseInt(farmId));
@@ -1051,8 +1002,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                     cleanMapper.insert(billClean);
 
                     baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
-                    baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getNextLocation());
-                    baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getNextId());
+//                    baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getNextLocation());
+//                    baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getNextId());
                     String status = baseProcess.getCurrentStatus();
                     String substring = status.substring(0, status.length() - 1);
 
@@ -1304,8 +1255,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
             baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId());
         } else {
             baseProcess.setProcessType(0);
-            baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getNextLocation());
-            baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getNextId());
+//            baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getNextLocation());
+//            baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getNextId());
         }
 
         if (billIsolate.getIsolateLocationId() == 3 && baseProcess.getDestId() >= 4) {
@@ -1483,8 +1434,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
 
                 } else {
                     baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
-                    baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getNextLocation());
-                    baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getNextId());
+//                    baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getNextLocation());
+//                    baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getNextId());
                     String status = baseProcess.getCurrentStatus();
                     String substring = status.substring(0, status.length() - 1);
                     baseProcess.setCurrentStatus(substring + "1," + 0);
@@ -1739,8 +1690,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                     }
                 } else {
                     baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
-                    baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getNextLocation());
-                    baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getNextId());
+//                    baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getNextLocation());
+//                    baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getNextId());
                     String status = baseProcess.getCurrentStatus();
                     String substring = status.substring(0, status.length() - 1);
                     baseProcess.setCurrentStatus(substring + "1," + 0);
@@ -1760,8 +1711,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                     clean.setFarmId(billClean.getFarmId());
                     clean.setBillStatus(0);
                     clean.setProcessId(billClean.getProcessId());
-                    clean.setTestLocationId(baseLocation.getNextId());
-                    clean.setTestLocation(baseLocation.getNextLocation());
+//                    clean.setTestLocationId(baseLocation.getNextId());
+//                    clean.setTestLocation(baseLocation.getNextLocation());
                     clean.setPhone(billClean.getPhone());
                     clean.setCarNum(billClean.getCarNum());
                     clean.setImgStatus(0);