Explorar o código

后期优化代码

wang_xy %!s(int64=2) %!d(string=hai) anos
pai
achega
2d3cfb3576

+ 1 - 0
.idea/compiler.xml

@@ -2,6 +2,7 @@
 <project version="4">
   <component name="CompilerConfiguration">
     <annotationProcessing>
+      <profile default="true" name="Default" enabled="true" />
       <profile name="Maven default annotation processors profile" enabled="true">
         <sourceOutputDir name="target/generated-sources/annotations" />
         <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />

+ 0 - 13
.idea/libraries/Maven__com_huaweicloud_esdk_obs_java_bundle_3_22_3.xml

@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: com.huaweicloud:esdk-obs-java-bundle:3.22.3">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/com/huaweicloud/esdk-obs-java-bundle/3.22.3/esdk-obs-java-bundle-3.22.3.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/com/huaweicloud/esdk-obs-java-bundle/3.22.3/esdk-obs-java-bundle-3.22.3-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/com/huaweicloud/esdk-obs-java-bundle/3.22.3/esdk-obs-java-bundle-3.22.3-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>

+ 124 - 0
.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 1 - 1
ruoyi-admin/ruoyi-admin.iml

@@ -189,7 +189,7 @@
     <orderEntry type="library" name="Maven: com.yomahub:tlog-spring-boot-configuration:1.3.3" level="project" />
     <orderEntry type="library" name="Maven: com.yomahub:tlog-webroot:1.3.3" level="project" />
     <orderEntry type="library" name="Maven: com.yomahub:tlog-feign:1.3.3" level="project" />
-    <orderEntry type="library" name="Maven: com.huaweicloud:esdk-obs-java-bundle:3.22.3" level="project" />
+    <orderEntry type="library" name="Maven: com.huaweicloud:esdk-obs-java-bundle:3.23.3" level="project" />
     <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.14.1" level="project" />
     <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.14.1" level="project" />
     <orderEntry type="module" module-name="ruoyi-system" />

+ 1 - 1
ruoyi-admin/src/main/resources/application-dev.yml

@@ -123,7 +123,7 @@ spring:
     # 数据库索引
     database: 0
     # 密码
-    password: edyj123456
+    password: sooka123456
     # 连接超时时间
     timeout: 10s
     # 是否开启ssl

+ 1 - 1
ruoyi-framework/ruoyi-framework.iml

@@ -220,7 +220,7 @@
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
     <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.83" level="project" />
     <orderEntry type="library" name="Maven: com.yomahub:tlog-feign:1.3.3" level="project" />
-    <orderEntry type="library" name="Maven: com.huaweicloud:esdk-obs-java-bundle:3.22.3" level="project" />
+    <orderEntry type="library" name="Maven: com.huaweicloud:esdk-obs-java-bundle:3.23.3" level="project" />
     <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.14.1" level="project" />
     <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.14.1" level="project" />
   </component>

+ 1 - 1
ruoyi-gas/ruoyi-gas.iml

@@ -213,7 +213,7 @@
     <orderEntry type="library" name="Maven: com.alibaba:druid:1.2.8" level="project" />
     <orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:3.4.1" level="project" />
     <orderEntry type="library" name="Maven: p6spy:p6spy:3.9.1" level="project" />
-    <orderEntry type="library" name="Maven: com.huaweicloud:esdk-obs-java-bundle:3.22.3" level="project" />
+    <orderEntry type="library" name="Maven: com.huaweicloud:esdk-obs-java-bundle:3.23.3" level="project" />
     <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.14.1" level="project" />
     <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.14.1" level="project" />
     <orderEntry type="module" module-name="ruoyi-system" />

+ 4 - 0
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/GArea.java

@@ -49,4 +49,8 @@ public class GArea extends BaseEntity {
      * 释放人
      */
     private String releaseBy;
+    /**
+     * 行政区
+     */
+    private String district;
 }

+ 6 - 0
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/bo/GAreaBo.java

@@ -76,4 +76,10 @@ public class GAreaBo extends BaseEntity {
     @ApiModelProperty(value = "排序的方向", example = "asc,desc")
     private String isAsc;
 
+    /**
+     * 行政区
+     */
+    @ApiModelProperty("行政区")
+    private String district;
+
 }

+ 1 - 0
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/bo/GOrderBo.java

@@ -151,4 +151,5 @@ public class GOrderBo extends BaseEntity {
 
     private Integer version;
     private String whether;
+    private String district;
 }

+ 16 - 0
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/vo/GAreaVo.java

@@ -58,6 +58,13 @@ public class GAreaVo {
 
 	private String userName;
 
+	/**
+	 * 行政区
+	 */
+	@ExcelProperty(value = "行政区")
+	@ApiModelProperty("行政区")
+	private String district;
+
 	public Long getId() {
 		return id;
 	}
@@ -89,4 +96,13 @@ public class GAreaVo {
 	public void setUserName(String userName) {
 		this.userName = userName;
 	}
+
+
+	public String getDistrict() {
+		return district;
+	}
+
+	public void setDistrict(String district) {
+		this.district = district;
+	}
 }

+ 2 - 1
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/vo/GImportVo.java

@@ -20,7 +20,8 @@ import java.io.Serializable;
 public class GImportVo implements Serializable {
     private static final long serialVersionUID = 1L;
 
-
+    @ExcelProperty(value = "行政区")
+    private String district;
     @ExcelProperty(value = "小区")
     private String areaName;
     @ExcelProperty(value = "楼宇")

+ 2 - 2
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/vo/GOrderVo.java

@@ -110,18 +110,18 @@ public class GOrderVo {
     /**
      * 备注
      */
-	@ApiModelProperty("备注")
+	@ExcelProperty(value = "备注")
 	private String remark;
 	/**
 	 * 审核意见
 	 */
+	@ExcelProperty(value = "意见")
 	private String reason;
 
 	private Integer version;
 	private String whether;
 
 
-
 	private List<String> photoList;
 
 	@ExcelProperty(value = "创建时间")

+ 9 - 0
ruoyi-gas/src/main/java/com/ruoyi/gas/service/impl/GAreaServiceImpl.java

@@ -23,6 +23,7 @@ import com.ruoyi.gas.domain.vo.*;
 import com.ruoyi.gas.mapper.*;
 import com.ruoyi.gas.service.IGAreaService;
 import com.ruoyi.gas.service.IGOrderPhotoService;
+import com.ruoyi.system.mapper.SysDictDataMapper;
 import lombok.extern.log4j.Log4j;
 import lombok.extern.slf4j.Slf4j;
 import org.aspectj.apache.bcel.generic.LineNumberGen;
@@ -81,6 +82,8 @@ public class GAreaServiceImpl extends ServicePlusImpl<GAreaMapper, GArea, GAreaV
 
     @Autowired
     private ObsService obsService;
+    @Autowired
+    private SysDictDataMapper sysDictDataMapper;
 
     @Override
     public GAreaVo queryById(Long id) {
@@ -226,6 +229,11 @@ public class GAreaServiceImpl extends ServicePlusImpl<GAreaMapper, GArea, GAreaV
         StringBuilder successMsg = new StringBuilder();
         for (int i=n ;i< list.size() ;i++) {
             GImportVo vo = list.get(i);
+
+            String districtValue = sysDictDataMapper.queryValueTextByKey("district",vo.getDistrict());
+            if(StringUtils.isBlank(districtValue)){
+                throw new ServiceException("" + "第" + (n+1) + "行行政区填写错误,导入失败!");
+            }
 //        }
 //        for (GImportVo vo : list) {
             try {
@@ -242,6 +250,7 @@ public class GAreaServiceImpl extends ServicePlusImpl<GAreaMapper, GArea, GAreaV
                         area.setName(vo.getAreaName());
                         area.setCreateBy(operName);
                         area.setCreateTime(new Date());
+                        area.setDistrict(districtValue);
                         gAreaMapper.insert(area);
                         if (StringUtils.isNotNull(vo.getBuildName())) {
                             //楼宇

+ 6 - 1
ruoyi-gas/src/main/resources/mapper/GAreaMapper.xml

@@ -14,12 +14,14 @@
         <result property="createTime" column="create_time"/>
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
+        <result property="district" column="district"/>
     </resultMap>
     <select id="getList" resultType="com.ruoyi.gas.domain.vo.GAreaVo">
         select a.id as id,
         a.name as name,
         (select b.name from g_user b where b.id = a.user_id) as userName,
-        a.release_is as releaseIs
+        a.release_is as releaseIs,
+        a.district as district
         from g_area a
         <where>
             a.del_flag = '0'
@@ -29,6 +31,9 @@
             <if test="p.userId != null  and p.userId != ''">
                 and a.user_id = #{p.userId}
             </if>
+            <if test="p.district != null  and p.district != ''">
+                and a.district = #{p.district}
+            </if>
         </where>
     </select>
     <select id="getArea" resultType="com.ruoyi.gas.domain.vo.GAreaVo">

+ 65 - 19
ruoyi-gas/src/main/resources/mapper/GOrderMapper.xml

@@ -28,7 +28,7 @@
     <select id="getListAll" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
         select a.id as id,
         a.service_type as serviceType,
-        (select name from g_user where id = a.user_id) as userName,
+        u.name as userName,
         a.pipe_type as pipeType,
         a.pipe_length as pipeLength,
         a.valve_type as valveType,
@@ -38,12 +38,13 @@
         a.time as time,
         a.whether as whether,
         a.version as version,
-        CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
+        CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
         from g_order a
         left join g_house b on a.house_id = b.id
         left join g_unit c on b.unit_id = c.id
         left join g_building d on c.building_id = d.id
         left join g_area e on d.area_id = e.id
+        left join sys_dict_data f on e.district = f.dict_value
         left join g_user u on a.user_id = u.id
         where a.del_flag = '0'
         and b.del_flag = '0'
@@ -51,6 +52,7 @@
         and d.del_flag = '0'
         and e.del_flag = '0'
         and a.service_type not in ('004','005','006')
+        and f.dict_type='district'
         <if test="p.serviceType != null  and p.serviceType != ''">
             and a.service_type = #{p.serviceType}
         </if>
@@ -84,12 +86,15 @@
         <if test=" p.endTime != null">
             and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{p.endTime},'%Y-%m-%d 23:59:59')
         </if>
+        <if test=" p.district != null">
+            and e.district = #{p.district}
+        </if>
         order by time desc
     </select>
     <select id="getListExport" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
         select a.id as id,
         a.service_type as serviceType,
-        (select name from g_user where id = a.user_id) as userName,
+        u.name as userName,
         a.pipe_type as pipeType,
         a.pipe_length as pipeLength,
         a.valve_type as valveType,
@@ -97,15 +102,17 @@
         a.examine_status as examineStatus,
         a.remark as remark,
         a.time as exportTime,
-        CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house,
+        CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house,
         a.whether as whether,
         a.version as version,
-        a.house_id as houseId
+        a.house_id as houseId,
+        a.reason as reason
         from g_order a
         left join g_house b on a.house_id = b.id
         left join g_unit c on b.unit_id = c.id
         left join g_building d on c.building_id = d.id
         left join g_area e on d.area_id = e.id
+        left join sys_dict_data f on e.district = f.dict_value
         left join g_user u on a.user_id = u.id
         where a.del_flag = '0'
         and b.del_flag = '0'
@@ -113,6 +120,7 @@
         and d.del_flag = '0'
         and e.del_flag = '0'
         and a.service_type not in ('004','005','006')
+        and f.dict_type='district'
         <if test="p.serviceType != null  and p.serviceType != ''">
             and a.service_type = #{p.serviceType}
         </if>
@@ -146,12 +154,15 @@
         <if test=" p.endTime != null">
             and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{p.endTime},'%Y-%m-%d 23:59:59')
         </if>
+        <if test=" p.district != null">
+            and e.district = #{p.district}
+        </if>
         order by time desc
     </select>
     <select id="getListExamine" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
         select a.id as id,
         a.service_type as serviceType,
-        (select name from g_user where id = a.user_id) as userName,
+        u.name as userName,
         a.pipe_type as pipeType,
         a.pipe_length as pipeLength,
         a.valve_type as valveType,
@@ -161,12 +172,13 @@
         a.time as time,
         a.whether as whether,
         a.version as version,
-        CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
+        CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
         from g_order a
         left join g_house b on a.house_id = b.id
         left join g_unit c on b.unit_id = c.id
         left join g_building d on c.building_id = d.id
         left join g_area e on d.area_id = e.id
+        left join sys_dict_data f on e.district = f.dict_value
         left join g_user u on a.user_id = u.id
         where a.del_flag = '0' and a.order_status = '001'
         and b.del_flag = '0'
@@ -174,6 +186,7 @@
         and d.del_flag = '0'
         and e.del_flag = '0'
         and a.service_type not in ('004','005','006')
+        and f.dict_type='district'
         <if test="p.serviceType != null  and p.serviceType != ''">
             and a.service_type = #{p.serviceType}
         </if>
@@ -189,6 +202,9 @@
         <if test="p.jobNum != null  and p.jobNum != ''">
             AND SUBSTRING(u.job_num, 1,4) like CONCAT(CONCAT(#{p.jobNum}), '%')
         </if>
+        <if test=" p.district != null">
+            and e.district = #{p.district}
+        </if>
         order by time desc
     </select>
     <select id="getById" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
@@ -294,7 +310,7 @@
     <select id="getListByStatus" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
         select a.id as id,
         a.service_type as serviceType,
-        (select name from g_user where id = a.user_id) as userName,
+        u.name as userName,
         a.pipe_type as pipeType,
         a.pipe_length as pipeLength,
         a.valve_type as valveType,
@@ -304,14 +320,16 @@
         a.time as time,
         a.whether as whether,
         a.version as version,
-        CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
+        CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
         from g_order a
         left join g_house b on a.house_id = b.id
         left join g_unit c on b.unit_id = c.id
         left join g_building d on c.building_id = d.id
         left join g_area e on d.area_id = e.id
+        left join sys_dict_data f on e.district = f.dict_value
         where a.del_flag = '0'
         and a.service_type not in ('004','005','006')
+        and f.dict_type='district'
         <if test="p.areaId != null  and p.areaId != ''">
             and e.id = #{p.areaId}
         </if>
@@ -321,29 +339,34 @@
         <if test="p.value != null  and p.value != ''">
             and a.examine_status = #{p.value}
         </if>
+        <if test=" p.district != null">
+            and e.district = #{p.district}
+        </if>
         order by time desc
     </select>
     <select id="getListAnJian" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
         select a.id as id,
-        (select name from g_user where id = a.user_id) as userName,
+        u.name as userName,
         a.remark as remark,
         a.time as time,
         a.update_time as updateTime,
         a.whether as whether,
         a.version as version,
-        CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
+        CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
         from g_order a
         left join g_house b on a.house_id = b.id
         left join g_unit c on b.unit_id = c.id
         left join g_building d on c.building_id = d.id
         left join g_area e on d.area_id = e.id
         left join g_user u on a.user_id = u.id
+        left join sys_dict_data f on e.district = f.dict_value
         where a.del_flag = '0'
         and b.del_flag = '0'
         and c.del_flag = '0'
         and d.del_flag = '0'
         and e.del_flag = '0'
         and a.service_type ='004'
+        and f.dict_type='district'
         <if test="p.userId != null  and p.userId != ''">
             and a.user_id = #{p.userId}
         </if>
@@ -368,15 +391,18 @@
         <if test=" p.endTime != null">
             and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{p.endTime},'%Y-%m-%d 23:59:59')
         </if>
+        <if test=" p.district != null">
+            and e.district = #{p.district}
+        </if>
         order by a.update_time desc
     </select>
     <select id="getListAnJianExport" resultType="com.ruoyi.gas.domain.vo.GOrderExportVoAnJian">
         select a.id as id,
-        (select name from g_user where id = a.user_id) as userName,
+        u.name as userName,
         a.remark as remark,
         a.time as time,
         a.update_time as updateTime,
-        CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house,
+        CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house,
         a.whether as whether
         from g_order a
         left join g_house b on a.house_id = b.id
@@ -384,12 +410,14 @@
         left join g_building d on c.building_id = d.id
         left join g_area e on d.area_id = e.id
         left join g_user u on a.user_id = u.id
+        left join sys_dict_data f on e.district = f.dict_value
         where a.del_flag = '0'
         and b.del_flag = '0'
         and c.del_flag = '0'
         and d.del_flag = '0'
         and e.del_flag = '0'
         and a.service_type ='004'
+        and f.dict_type='district'
         <if test="p.userId != null  and p.userId != ''">
             and a.user_id = #{p.userId}
         </if>
@@ -414,22 +442,26 @@
         <if test=" p.endTime != null">
             and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{p.endTime},'%Y-%m-%d 23:59:59')
         </if>
+        <if test=" p.district != null">
+            and e.district = #{p.district}
+        </if>
         order by a.update_time desc,userName
     </select>
     <select id="getListWeiXiu" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
         select a.id as id,
-        (select name from g_user where id = a.user_id) as userName,
+        u.name as userName,
         a.remark as remark,
         a.time as time,
         a.update_time as updateTime,
         a.whether as whether,
         a.version as version,
-        CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
+        CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
         from g_order a
         left join g_house b on a.house_id = b.id
         left join g_unit c on b.unit_id = c.id
         left join g_building d on c.building_id = d.id
         left join g_area e on d.area_id = e.id
+        left join sys_dict_data f on e.district = f.dict_value
         left join g_user u on a.user_id = u.id
         where a.del_flag = '0'
         and b.del_flag = '0'
@@ -437,6 +469,7 @@
         and d.del_flag = '0'
         and e.del_flag = '0'
         and a.service_type ='005'
+        and f.dict_type='district'
         <if test="p.userId != null  and p.userId != ''">
             and a.user_id = #{p.userId}
         </if>
@@ -461,21 +494,25 @@
         <if test=" p.endTime != null">
             and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{p.endTime},'%Y-%m-%d 23:59:59')
         </if>
+        <if test=" p.district != null">
+            and e.district = #{p.district}
+        </if>
         order by a.update_time desc
     </select>
     <select id="getListWeiXiuExport" resultType="com.ruoyi.gas.domain.vo.GOrderExportVoWeiXiu">
         select a.id as id,
-        (select name from g_user where id = a.user_id) as userName,
+        u.name as userName,
         a.remark as remark,
         a.time as time,
         a.update_time as updateTime,
-        CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house,
+        CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house,
         a.whether as whether
         from g_order a
         left join g_house b on a.house_id = b.id
         left join g_unit c on b.unit_id = c.id
         left join g_building d on c.building_id = d.id
         left join g_area e on d.area_id = e.id
+        left join sys_dict_data f on e.district = f.dict_value
         left join g_user u on a.user_id = u.id
         where a.del_flag = '0'
         and b.del_flag = '0'
@@ -483,6 +520,7 @@
         and d.del_flag = '0'
         and e.del_flag = '0'
         and a.service_type ='005'
+        and f.dict_type='district'
         <if test="p.userId != null  and p.userId != ''">
             and a.user_id = #{p.userId}
         </if>
@@ -507,20 +545,24 @@
         <if test=" p.endTime != null">
             and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{p.endTime},'%Y-%m-%d 23:59:59')
         </if>
+        <if test=" p.district != null">
+            and e.district = #{p.district}
+        </if>
         order by a.update_time desc,userName
     </select>
     <select id="getListKaiShuan" resultType="com.ruoyi.gas.domain.vo.GOrderVo">
         select a.id as id,
-        (select name from g_user where id = a.user_id) as userName,
+        u.name as userName,
         a.remark as remark,
         a.time as time,
         a.update_time as updateTime,
-        CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as house
+        CONCAT(f.dict_label,'-',e.name,'-',d.name,'-',c.name,'-',b.name) as house
         from g_order a
         left join g_house b on a.house_id = b.id
         left join g_unit c on b.unit_id = c.id
         left join g_building d on c.building_id = d.id
         left join g_area e on d.area_id = e.id
+        left join sys_dict_data f on e.district = f.dict_value
         left join g_user u on a.user_id = u.id
         where a.del_flag = '0'
         and b.del_flag = '0'
@@ -528,6 +570,7 @@
         and d.del_flag = '0'
         and e.del_flag = '0'
         and a.service_type ='006'
+        and f.dict_type='district'
         <if test="p.userId != null  and p.userId != ''">
             and a.user_id = #{p.userId}
         </if>
@@ -552,6 +595,9 @@
         <if test=" p.endTime != null">
             and DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{p.endTime},'%Y-%m-%d 23:59:59')
         </if>
+        <if test=" p.district != null">
+            and e.district = #{p.district}
+        </if>
         order by a.update_time desc
     </select>
     <select id="getByHouseId" resultType="com.ruoyi.gas.domain.GOrder">

+ 1 - 1
ruoyi-mobile/ruoyi-mobile.iml

@@ -213,7 +213,7 @@
     <orderEntry type="library" name="Maven: com.alibaba:druid:1.2.8" level="project" />
     <orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:3.4.1" level="project" />
     <orderEntry type="library" name="Maven: p6spy:p6spy:3.9.1" level="project" />
-    <orderEntry type="library" name="Maven: com.huaweicloud:esdk-obs-java-bundle:3.22.3" level="project" />
+    <orderEntry type="library" name="Maven: com.huaweicloud:esdk-obs-java-bundle:3.23.3" level="project" />
     <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.14.1" level="project" />
     <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.14.1" level="project" />
     <orderEntry type="module" module-name="ruoyi-system" />

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java

@@ -24,5 +24,8 @@ public interface SysDictDataMapper extends BaseMapperPlus<SysDictData> {
 
     String queryDictTextByKey(@Param("code") String code, @Param("key") String key);
 
+    String queryValueTextByKey(@Param("code") String code, @Param("key") String key);
+
     String queryTableDictTextByKey(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("key") String key);
+
 }

+ 5 - 1
ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@@ -24,7 +24,11 @@
         select s.dict_label from sys_dict_data s where s.dict_type = #{code} and s.dict_value = #{key}
     </select>
 
+    <select id="queryValueTextByKey" resultType="java.lang.String">
+        select s.dict_value from sys_dict_data s where s.dict_type = #{code} and s.dict_label = #{key}
+    </select>
+
     <select id="queryTableDictTextByKey" resultType="java.lang.String">
         select ${text} as "text" from ${table} where ${code}= #{key}
     </select>
-</mapper>
+</mapper>