Browse Source

重点工程添加排序

lyq 1 year ago
parent
commit
809005c718

+ 22 - 16
data-ui/src/views/data/generalbusiness/keyProjects/index.vue

@@ -270,6 +270,9 @@
               <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
                           placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"/>
             </el-form-item>
+            <el-form-item label="显示排序" prop="orderNum">
+              <el-input-number v-model="form.orderNum" controls-position="right" :min="0" :max="9999" />
+            </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="项目环境" prop="environment">
@@ -359,6 +362,14 @@
         </el-row>
         <el-row>
           <el-col :span="24">
+            <el-form-item label="建设内容" prop="introduction">
+              <el-input v-model="form.introduction" type="textarea" placeholder="请输入建设内容" maxlength="500"
+                        :autosize="{ minRows: 5, maxRows: 5}"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
             <el-form-item label="绑定设备" prop="deviceList">
               <el-select v-model="form.deviceList" filterable placeholder="请选择设备" multiple>
                 <el-option
@@ -373,14 +384,6 @@
         </el-row>
         <el-row>
           <el-col :span="24">
-            <el-form-item label="建设内容" prop="introduction">
-              <el-input v-model="form.introduction" type="textarea" placeholder="请输入建设内容" maxlength="500"
-                        :autosize="{ minRows: 5, maxRows: 5}"/>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
             <el-form-item label="封面" prop="photoId">
               <ImageUpload ref="ImageUpload" :limit="1" :fileType="['png', 'jpg', 'jpeg']" :value="form.photoId"
                            @input="getUrl"></ImageUpload>
@@ -597,6 +600,9 @@
             <el-form-item label="所属部门" prop="deptId">
               <el-input v-model="form.deptName" readonly/>
             </el-form-item>
+            <el-form-item label="显示排序" prop="orderNum">
+              <el-input v-model="form.orderNum" readonly/>
+            </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="项目环境" prop="environment">
@@ -668,6 +674,14 @@
         </el-row>
         <el-row>
           <el-col :span="24">
+            <el-form-item label="建设内容" prop="introduction">
+              <el-input v-model="form.introduction" type="textarea" maxlength="500"
+                        :autosize="{ minRows: 5, maxRows: 5}" readonly/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
             <el-form-item label="绑定设备" prop="deviceList">
               <el-select v-model="form.deviceList" multiple placeholder="" ref="selectRef4" @blur="modelClick()"
                          @click.native="modelClick()" style="pointer-events: none;">
@@ -683,14 +697,6 @@
         </el-row>
         <el-row>
           <el-col :span="24">
-            <el-form-item label="建设内容" prop="introduction">
-              <el-input v-model="form.introduction" type="textarea" maxlength="500"
-                        :autosize="{ minRows: 5, maxRows: 5}" readonly/>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
             <el-form-item label="封面" prop="photoId">
               <ImageUpload v-if="form.photoId!=null" ref="ImageUpload" :limit="1" :fileType="['png', 'jpg', 'jpeg']"
                            :value="form.photoId"

+ 13 - 0
src/main/java/com/sooka/sponest/data/generalbusiness/domain/CenterdataTKeyProjects.java

@@ -229,6 +229,11 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
     private String cameraSystem;
 
     /**
+     * 显示排序
+     */
+    private Long orderNum;
+
+    /**
      * 工程简介
      */
     @ApiModelProperty(value = "建设内容", required = false)
@@ -505,6 +510,14 @@ public class CenterdataTKeyProjects extends BaseBusinessEntity {
         return cameraSystem;
     }
 
+    public Long getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(Long orderNum) {
+        this.orderNum = orderNum;
+    }
+
     public void setIntroduction(String introduction) {
         this.introduction = introduction;
     }

+ 1 - 1
src/main/resources/mapper/commandcenter/CommandCentreMapper.xml

@@ -183,7 +183,7 @@
         <if test="state != null and state != ''" >
             HAVING cameraCode IS NOT NULL
         </if>
-        ORDER BY a.create_time DESC
+        ORDER BY a.order_num,a.create_time DESC
     </select>
 
     <select id="getImportAreaType" parameterType="CommandCenterBO" resultType="AreaBody">

+ 8 - 3
src/main/resources/mapper/generalbusiness/CenterdataTKeyProjectsMapper.xml

@@ -22,6 +22,7 @@
         <result property="cameraSystem" column="camera_system"/>
         <result property="deptId" column="dept_id"/>
         <result property="deptName" column="dept_name"/>
+        <result property="orderNum" column="order_num"/>
         <result property="introduction" column="introduction"/>
         <result property="createBy" column="create_by"/>
         <result property="createName" column="create_name"/>
@@ -48,8 +49,9 @@
     </resultMap>
 
     <sql id="selectCenterdataTKeyProjectsVo">
-        select id, project_name, project_target, project_type, project_level, construction_unit, principal, phone, construction_site, construction_area, longitude, latitude, camera_system, dept_id, dept_name, introduction,photo_id,create_time,create_by,create_name,update_time,update_by,update_name,
-         territoriality,park,park_longitude,park_latitude,environment,legal_unit,start_time,end_time,nature,total_invest,year_invest,industry_type,secretary,secretary_duties,secretary_phone from centerdata_t_key_projects
+        select id, project_name, project_target, project_type, project_level, construction_unit, principal, phone, construction_site, construction_area, longitude, latitude, camera_system, dept_id, dept_name, order_num, introduction,
+        photo_id, create_time, create_by, create_name, update_time, update_by, update_name, territoriality, park, park_longitude, park_latitude, environment, legal_unit, start_time, end_time, nature, total_invest, year_invest, industry_type,
+        secretary, secretary_duties, secretary_phone from centerdata_t_key_projects
     </sql>
 
     <select id="selectCenterdataTKeyProjectsList" parameterType="CenterdataTKeyProjects"
@@ -84,7 +86,7 @@
             <if test="park != null  and park != ''">and park = #{park}</if>
             ${params.dataScope}
         </where>
-        order by a.create_time desc
+        order by a.order_num,a.create_time desc
     </select>
 
     <select id="selectCenterdataTKeyProjectsById" parameterType="String" resultMap="CenterdataTKeyProjectsResult">
@@ -110,6 +112,7 @@
             <if test="cameraSystem != null">camera_system,</if>
             <if test="deptId != null and deptId != ''">dept_id,</if>
             <if test="deptName != null and deptName != ''">dept_name,</if>
+            <if test="orderNum != null">order_num,</if>
             <if test="introduction != null">introduction,</if>
             <if test="photoId != null">photo_id,</if>
             <if test="createBy != null">create_by,</if>
@@ -150,6 +153,7 @@
             <if test="cameraSystem != null">#{cameraSystem},</if>
             <if test="deptId != null and deptId != ''">#{deptId},</if>
             <if test="deptName != null and deptName != ''">#{deptName},</if>
+            <if test="orderNum != null">#{orderNum},</if>
             <if test="introduction != null">#{introduction},</if>
             <if test="photoId != null">#{photoId},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -194,6 +198,7 @@
             <if test="deptId != null and deptId != ''">dept_id = #{deptId},</if>
             <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
             <if test="photoId != null">photo_id = #{photoId},</if>
+            <if test="orderNum != null">order_num = #{orderNum},</if>
             <if test="introduction != null">introduction = #{introduction},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createName != null">create_name = #{createName},</if>