Browse Source

资产信息新增数量、计量单位字段

LinWuTai 1 year ago
parent
commit
15d359d8b5

+ 6 - 6
ruoyi-admin/src/main/java/com/ruoyi/asset/domain/TbAssetInformation.java

@@ -166,13 +166,13 @@ public class TbAssetInformation extends BaseEntity
     @Excel(name = "是否白名单,Y:是,N:否", width = 30)
     private String isWhitelist;
 
-    /** 预留字段b */
-//    @Excel(name = "预留字段b")
-    private String reservedColumnB;
+    /** 数量 */
+    @Excel(name = "数量")
+    private String quantity;
 
-    /** 预留字段c */
-   // @Excel(name = "预留字段c")
-    private String reservedColumnC;
+    /** 计量单位 */
+    @Excel(name = "计量单位")
+    private String units;
 
     /** 预留字段d */
    // @Excel(name = "预留字段d")

+ 3 - 4
ruoyi-admin/src/main/resources/application-druid.yml

@@ -6,10 +6,9 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://139.9.50.163:3306/rfid-hotel-manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                #url: jdbc:mysql://127.0.0.1:3306/rfid-hotel-manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                #password: mysql@123456
-                password: ydl@123456
+                #url: jdbc:mysql://139.9.50.163:3306/rfid-hotel-manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://127.0.0.1:3306/rfid-hotel-manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                password: mysql@123456
                 username: root
             # 从库数据源
             slave:

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

@@ -79,7 +79,7 @@ spring:
     # 地址
     host: 127.0.0.1
     # 密码
-    password: # redis@123456
+    password: redis@123456
     # 端口,默认为6379
     port: 6379
     # 数据库索引

+ 14 - 12
ruoyi-admin/src/main/resources/mapper/asset/TbAssetInformationMapper.xml

@@ -44,8 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="isWhitelist"    column="is_whitelist"    />
-        <result property="reservedColumnB"    column="reserved_column_b"    />
-        <result property="reservedColumnC"    column="reserved_column_c"    />
+        <result property="quantity"    column="quantity"    />
+        <result property="units"    column="units"    />
         <result property="reservedColumnD"    column="reserved_column_d"    />
         <result property="reservedColumnE"    column="reserved_column_e"    />
         <result property="reservedColumnF"    column="reserved_column_f"    />
@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTbAssetInformationVo">
-        select id, code, name, number, image_url, category_number, specifications_model, abc_category, manage_status, user_department, department, responsible_person, location_number, property, purchase_date, commissioning_date, original_value, durable_years, net_value, residual_value, accumulated_depreciation, last_depreciation_date, depreciation_method, contract_number, factory_number, manufacturer, supplier, purpose, maintenance_date, maintenance_tel, maintenance_user, corporation, record_status, remark, create_by, create_time, update_by, update_time, is_whitelist, reserved_column_b, reserved_column_c, reserved_column_d, reserved_column_e, reserved_column_f, reserved_column_g, reserved_column_h, reserved_column_i, reserved_column_j from tb_asset_information
+        select id, code, name, number, image_url, category_number, specifications_model, abc_category, manage_status, user_department, department, responsible_person, location_number, property, purchase_date, commissioning_date, original_value, durable_years, net_value, residual_value, accumulated_depreciation, last_depreciation_date, depreciation_method, contract_number, factory_number, manufacturer, supplier, purpose, maintenance_date, maintenance_tel, maintenance_user, corporation, record_status, remark, create_by, create_time, update_by, update_time, is_whitelist, quantity, units, reserved_column_d, reserved_column_e, reserved_column_f, reserved_column_g, reserved_column_h, reserved_column_i, reserved_column_j from tb_asset_information
     </sql>
 
     <select id="selectInfoList" parameterType="TbAssetInformation" resultType="TbAssetInformation">
@@ -98,7 +98,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                a.create_time createTime,
                a.update_by updateBy,
                a.update_time updateTime,
-               a.is_whitelist isWhitelist
+               a.is_whitelist isWhitelist,
+               a.quantity,
+               a.units
         from tb_asset_information a
         left join tb_asset_category e on a.category_number = e.number
         left join sys_dept b on a.user_department = b.dept_id
@@ -151,8 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="corporation != null  and corporation != ''"> and corporation = #{corporation}</if>
             <if test="recordStatus != null "> and record_status = #{recordStatus}</if>
             <if test="isWhitelist != null  and isWhitelist != ''"> and is_whitelist = #{isWhitelist}</if>
-            <if test="reservedColumnB != null  and reservedColumnB != ''"> and reserved_column_b = #{reservedColumnB}</if>
-            <if test="reservedColumnC != null  and reservedColumnC != ''"> and reserved_column_c = #{reservedColumnC}</if>
+            <if test="quantity != null  and quantity != ''"> and quantity = #{quantity}</if>
+            <if test="units != null  and units != ''"> and units = #{units}</if>
             <if test="reservedColumnD != null  and reservedColumnD != ''"> and reserved_column_d = #{reservedColumnD}</if>
             <if test="reservedColumnE != null  and reservedColumnE != ''"> and reserved_column_e = #{reservedColumnE}</if>
             <if test="reservedColumnF != null  and reservedColumnF != ''"> and reserved_column_f = #{reservedColumnF}</if>
@@ -222,8 +224,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="isWhitelist != null">is_whitelist,</if>
-            <if test="reservedColumnB != null">reserved_column_b,</if>
-            <if test="reservedColumnC != null">reserved_column_c,</if>
+            <if test="quantity != null">quantity,</if>
+            <if test="units != null">units,</if>
             <if test="reservedColumnD != null">reserved_column_d,</if>
             <if test="reservedColumnE != null">reserved_column_e,</if>
             <if test="reservedColumnF != null">reserved_column_f,</if>
@@ -271,8 +273,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="isWhitelist != null">#{isWhitelist},</if>
-            <if test="reservedColumnB != null">#{reservedColumnB},</if>
-            <if test="reservedColumnC != null">#{reservedColumnC},</if>
+            <if test="quantity != null">#{quantity},</if>
+            <if test="units != null">#{units},</if>
             <if test="reservedColumnD != null">#{reservedColumnD},</if>
             <if test="reservedColumnE != null">#{reservedColumnE},</if>
             <if test="reservedColumnF != null">#{reservedColumnF},</if>
@@ -324,8 +326,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="isWhitelist != null">is_whitelist = #{isWhitelist},</if>
-            <if test="reservedColumnB != null">reserved_column_b = #{reservedColumnB},</if>
-            <if test="reservedColumnC != null">reserved_column_c = #{reservedColumnC},</if>
+            <if test="quantity != null">quantity = #{quantity},</if>
+            <if test="units != null">units = #{units},</if>
             <if test="reservedColumnD != null">reserved_column_d = #{reservedColumnD},</if>
             <if test="reservedColumnE != null">reserved_column_e = #{reservedColumnE},</if>
             <if test="reservedColumnF != null">reserved_column_f = #{reservedColumnF},</if>

+ 19 - 19
ruoyi-ui/src/views/asset/information/index.vue

@@ -260,23 +260,23 @@
           />
         </el-select>
       </el-form-item>
-      <!--<el-form-item label="预留字段b" prop="reservedColumnB">
+      <el-form-item label="数量" prop="quantity">
         <el-input
-          v-model="queryParams.reservedColumnB"
-          placeholder="请输入预留字段b"
+          v-model="queryParams.quantity"
+          placeholder="请输入数量"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="预留字段c" prop="reservedColumnC">
+      <el-form-item label="计量单位" prop="units">
         <el-input
-          v-model="queryParams.reservedColumnC"
-          placeholder="请输入预留字段c"
+          v-model="queryParams.units"
+          placeholder="请输入计量单位"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="预留字段d" prop="reservedColumnD">
+      <!-- <el-form-item label="预留字段d" prop="reservedColumnD">
         <el-input
           v-model="queryParams.reservedColumnD"
           placeholder="请输入预留字段d"
@@ -498,9 +498,9 @@
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isWhitelist"/>
         </template>
       </el-table-column>
-      <!-- <el-table-column label="预留字段b" align="center" prop="reservedColumnB" />
-      <el-table-column label="预留字段c" align="center" prop="reservedColumnC" />
-      <el-table-column label="预留字段d" align="center" prop="reservedColumnD" />
+      <el-table-column label="数量" align="center" prop="quantity" />
+      <el-table-column label="计量单位" align="center" prop="units" />
+      <!-- <el-table-column label="预留字段d" align="center" prop="reservedColumnD" />
       <el-table-column label="预留字段e" align="center" prop="reservedColumnE" />
       <el-table-column label="预留字段f" align="center" prop="reservedColumnF" />
       <el-table-column label="预留字段g" align="center" prop="reservedColumnG" />
@@ -700,13 +700,13 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <!-- <el-form-item label="预留字段b" prop="reservedColumnB">
-          <el-input v-model="form.reservedColumnB" placeholder="请输入预留字段b" />
+        <el-form-item label="数量" prop="quantity">
+          <el-input v-model="form.quantity" placeholder="请输入数量" />
         </el-form-item>
-        <el-form-item label="预留字段c" prop="reservedColumnC">
-          <el-input v-model="form.reservedColumnC" placeholder="请输入预留字段c" />
+        <el-form-item label="计量单位" prop="units">
+          <el-input v-model="form.units" placeholder="请输入计量单位" />
         </el-form-item>
-        <el-form-item label="预留字段d" prop="reservedColumnD">
+        <!-- <el-form-item label="预留字段d" prop="reservedColumnD">
           <el-input v-model="form.reservedColumnD" placeholder="请输入预留字段d" />
         </el-form-item>
         <el-form-item label="预留字段e" prop="reservedColumnE">
@@ -895,8 +895,8 @@ export default {
         corporation: null,
         recordStatus: null,
         isWhitelist: null,
-        reservedColumnB: null,
-        reservedColumnC: null,
+        quantity: null,
+        units: null,
         reservedColumnD: null,
         reservedColumnE: null,
         reservedColumnF: null,
@@ -1077,8 +1077,8 @@ export default {
         updateBy: null,
         updateTime: null,
         isWhitelist: null,
-        reservedColumnB: null,
-        reservedColumnC: null,
+        quantity: null,
+        units: null,
         reservedColumnD: null,
         reservedColumnE: null,
         reservedColumnF: null,