Kaynağa Gözat

文件下载修改

wang_xy 1 yıl önce
ebeveyn
işleme
9093e886f0

+ 24 - 9
ruoyi-gas/src/main/java/com/ruoyi/gas/service/impl/GCourtyardNetworkManagementServiceImpl.java

@@ -155,17 +155,32 @@ public class GCourtyardNetworkManagementServiceImpl extends ServicePlusImpl<GCou
     @Override
     public List<zipFileBo> installList(GCourtyardNetworkManagementBo bo) {
         List<Map> list=new ArrayList<>();
-        if (!bo.getRemarks().equals("4")&&!bo.getRemarks().equals("0"))
-        {
-            list=baseMapper.getAllList(bo);
-        }
-       else if (bo.getRemarks()=="4")
-        {
+        if ("0".equals(bo.getRemarks())) {//庭院管网
+            list = baseMapper.getInstallList(bo);
+        }else if ("1".equals(bo.getRemarks())) {//路段巡查
+            bo.setRemarks("g_road_section_inspection");
+            list = baseMapper.getAllList(bo);
+        }else if ("2".equals(bo.getRemarks())){//阀井巡查
+            bo.setRemarks("g_valve_well_inspection");
+            list = baseMapper.getAllList(bo);
+        }else if ("3".equals(bo.getRemarks())){//巡检车队
+            bo.setRemarks("g_patrol_team");
+            list = baseMapper.getAllList(bo);
+        }else if ("4".equals(bo.getRemarks())){//调压箱巡查
             list=baseMapper.getRegulatorBoxList(bo);
-        }else if (bo.getRemarks().equals("0"))
-        {
-            list=baseMapper.getInstallList(bo);
+        }else if ("5".equals(bo.getRemarks())){//调压箱维护
+            bo.setRemarks("g_regulating_box_maintenance");
+            list = baseMapper.getAllList(bo);
         }
+
+//        if (!bo.getRemarks().equals("4")&&!bo.getRemarks().equals("0")){
+//            bo.setRemarks("g_regulating_box_maintenance");
+//            list=baseMapper.getAllList(bo);
+//        }else if (bo.getRemarks().equals("4")){
+//            list=baseMapper.getRegulatorBoxList(bo);
+//        }else if (bo.getRemarks().equals("0")){
+//            list=baseMapper.getInstallList(bo);
+//        }
         List<zipFileBo> zipFileBoList=new ArrayList<>();
 
         DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd");

+ 5 - 5
ruoyi-gas/src/main/java/com/ruoyi/gas/utils/FileInstallUtils.java

@@ -37,11 +37,11 @@ public class FileInstallUtils {
               if (!file.exists()) {
                   file.mkdirs();
               }
-              File Namefile=new File(new String(file.getPath()+"/"+zipFileBo.getName()));
-              if (!Namefile.exists()) {
-                  Namefile.mkdirs();
-              }
-              File typefile=new File(new String(Namefile.getPath()+"/"+zipFileBo.getType()));
+//              File Namefile=new File(new String(file.getPath()+"/"+zipFileBo.getName()));
+//              if (!Namefile.exists()) {
+//                  Namefile.mkdirs();
+//              }
+              File typefile=new File(new String(file.getPath()+"/"+zipFileBo.getName()+zipFileBo.getType()));
               if (!typefile.exists()) {
                   typefile.mkdirs();
               }

+ 2 - 2
ruoyi-gas/src/main/resources/mapper/GCourtyardNetworkManagementMapper.xml

@@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         a.create_time ,
         b.name AS createName,
         d.post_name AS `areaName`,
-        GROUP_CONCAT(C.pic_url) AS pic_urls
+        GROUP_CONCAT(c.pic_url) AS pic_urls
         FROM
         g_regulator_box  a
         LEFT JOIN g_user b ON a.create_by=b.id
@@ -144,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         a.create_time ,
         b.name AS createName,
         d.post_name AS `areaName`,
-        GROUP_CONCAT(C.pic_url) AS pic_urls
+        GROUP_CONCAT(c.pic_url) AS pic_urls
         FROM
         ${p.remarks}  a
         LEFT JOIN g_user b ON a.create_by=b.id