dengsixing 9 bulan lalu
induk
melakukan
87dcdb595e

+ 27 - 27
src/main/java/com/fdkankan/SceneApplication.java

@@ -51,32 +51,32 @@ public class SceneApplication implements CommandLineRunner {
     @Override
     public void run(String... args) throws Exception {
 
-        String initscene = redisClient.get("initscene");
-        if(StrUtil.isNotEmpty(initscene)){
-            return;
-        }
-        redisClient.add("initscene", "111");
-
-        log.info("初始化站址编码和时间任务开始");
-        List<Scene> list = sceneService.list(new LambdaQueryWrapper<Scene>().select(Scene::getId, Scene::getNum).isNull(Scene::getStationcode));
-        list.stream().forEach(s->{
-            String num = s.getNum();
-            try {
-                List<SceneConvertLog> logs = sceneConvertLogService.list(new LambdaQueryWrapper<SceneConvertLog>()
-                        .eq(SceneConvertLog::getEntityId, num)
-                        .eq(SceneConvertLog::getStatus, 1)
-                        .orderByDesc(SceneConvertLog::getCreateTime));
-                if(CollUtil.isNotEmpty(logs)){
-                    SceneConvertLog sceneConvertLog = logs.get(0);
-                    s.setStationcode(sceneConvertLog.getStationCode());
-                    s.setAlgorithmTime(sceneConvertLog.getCreateTime());
-                    sceneService.updateById(s);
-                }
-            }catch (Exception e){
-                log.error("填充场景站址编码和时间失败, num:{}", num, e);
-            }
-        });
-        log.info("初始化站址编码和时间任务结束");
-        redisClient.del("initscene");
+//        String initscene = redisClient.get("initscene");
+//        if(StrUtil.isNotEmpty(initscene)){
+//            return;
+//        }
+//        redisClient.add("initscene", "111");
+//
+//        log.info("初始化站址编码和时间任务开始");
+//        List<Scene> list = sceneService.list(new LambdaQueryWrapper<Scene>().select(Scene::getId, Scene::getNum).isNull(Scene::getStationcode));
+//        list.stream().forEach(s->{
+//            String num = s.getNum();
+//            try {
+//                List<SceneConvertLog> logs = sceneConvertLogService.list(new LambdaQueryWrapper<SceneConvertLog>()
+//                        .eq(SceneConvertLog::getEntityId, num)
+//                        .eq(SceneConvertLog::getStatus, 1)
+//                        .orderByDesc(SceneConvertLog::getCreateTime));
+//                if(CollUtil.isNotEmpty(logs)){
+//                    SceneConvertLog sceneConvertLog = logs.get(0);
+//                    s.setStationcode(sceneConvertLog.getStationCode());
+//                    s.setAlgorithmTime(sceneConvertLog.getCreateTime());
+//                    sceneService.updateById(s);
+//                }
+//            }catch (Exception e){
+//                log.error("填充场景站址编码和时间失败, num:{}", num, e);
+//            }
+//        });
+//        log.info("初始化站址编码和时间任务结束");
+//        redisClient.del("initscene");
     }
 }

+ 13 - 13
src/main/java/com/fdkankan/scene/entity/Scene.java

@@ -61,19 +61,19 @@ public class Scene extends Model<Scene> {
     @TableField("SUBGROUP")
     private Integer subgroup;
 
-    @TableField("STATIONCODE")
-    private String stationcode;
-
-    @TableField("SHOOT_TIME")
-    private Date shootTime;
-
-
-    @TableField("UP_TIME")
-    private Date upTime;
-
-
-    @TableField("ALGORITHM_TIME")
-    private Date algorithmTime;
+//    @TableField("STATIONCODE")
+//    private String stationcode;
+//
+//    @TableField("SHOOT_TIME")
+//    private Date shootTime;
+//
+//
+//    @TableField("UP_TIME")
+//    private Date upTime;
+//
+//
+//    @TableField("ALGORITHM_TIME")
+//    private Date algorithmTime;
 
 
 

+ 1 - 1
src/main/java/com/fdkankan/scene/service/SceneService.java

@@ -34,6 +34,6 @@ public interface SceneService extends IService<Scene> {
 
     List<Scene> listByNum(String num, Integer subgroup);
 
-    List<Scene> listByStationcode(String stationCode);
+//    List<Scene> listByStationcode(String stationCode);
 
 }

+ 14 - 14
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -426,16 +426,16 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
                 //俊波要求这两个字段查看页一定是0
                 sceneInfo.getControls().setShowDollhouse(CommonStatus.NO.code());
                 sceneInfo.getControls().setShowFloorplan(CommonStatus.NO.code());
-
-                List<Scene> sceneList = sceneService.listByStationcode(sceneInfo.getStationCode());
-                List<Map<String, String>> roomList = new ArrayList<>();
-                for (Scene scene : sceneList) {
-                    Map<String, String> item = new HashMap<>();
-                    item.put("stationCode", scene.getStationcode());
-                    item.put("roomEntityID", scene.getNum());
-                    roomList.add(item);
-                }
-                sceneInfo.setEntityList(roomList);
+//
+//                List<Scene> sceneList = sceneService.listByStationcode(sceneInfo.getStationCode());
+//                List<Map<String, String>> roomList = new ArrayList<>();
+//                for (Scene scene : sceneList) {
+//                    Map<String, String> item = new HashMap<>();
+//                    item.put("stationCode", scene.getStationcode());
+//                    item.put("roomEntityID", scene.getNum());
+//                    roomList.add(item);
+//                }
+//                sceneInfo.setEntityList(roomList);
         }
 
         return sceneInfo;
@@ -514,7 +514,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
 //        sceneInfoVO.setMosaicList(this.getMosaicList(num));
 
         sceneInfoVO.setSubgroup(scenePlus.getSubgroup());
-        sceneInfoVO.setStationCode(scenePlus.getStationcode());
+//        sceneInfoVO.setStationCode(scenePlus.getStationcode());
         long count = sceneService.count(new LambdaQueryWrapper<Scene>().eq(Scene::getNum, num).ne(Scene::getSubgroup, 0));
         if(count > 0){
             sceneInfoVO.setHasHighAndLow(CommonStatus.YES.code());
@@ -537,9 +537,9 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
             }
         }
 
-        sceneInfoVO.setShootTime(scenePlus.getShootTime());
-        sceneInfoVO.setUpTime(scenePlus.getUpTime());
-        sceneInfoVO.setAlgorithmTime(scenePlus.getAlgorithmTime());
+//        sceneInfoVO.setShootTime(scenePlus.getShootTime());
+//        sceneInfoVO.setUpTime(scenePlus.getUpTime());
+//        sceneInfoVO.setAlgorithmTime(scenePlus.getAlgorithmTime());
 
         return sceneInfoVO;
     }

+ 4 - 4
src/main/java/com/fdkankan/scene/service/impl/SceneServiceImpl.java

@@ -169,8 +169,8 @@ public class SceneServiceImpl extends ServiceImpl<SceneMapper, Scene> implements
         return this.list(new LambdaQueryWrapper<Scene>().eq(Scene::getNum, num).eq(Scene::getSubgroup, subgroup));
     }
 
-    @Override
-    public List<Scene> listByStationcode(String stationCode) {
-        return this.list(new LambdaQueryWrapper<Scene>().eq(Scene::getStationcode, stationCode).eq(Scene::getSubgroup, 0));
-    }
+//    @Override
+//    public List<Scene> listByStationcode(String stationCode) {
+//        return this.list(new LambdaQueryWrapper<Scene>().eq(Scene::getStationcode, stationCode).eq(Scene::getSubgroup, 0));
+//    }
 }