ソースを参照

[CODE]: 仓库表添加字段(库容)

maxianghua 4 年 前
コミット
0a66adb4e2

+ 50 - 43
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/domain/TWarehouse.java

@@ -1,110 +1,117 @@
 package com.ruoyi.basicData.domain;
-
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
  * 仓库对象 t_warehouse
  *
  * @author ruoyi
- * @date 2020-12-11
+ * @date 2021-01-07
  */
-public class TWarehouse extends BaseEntity {
+public class TWarehouse extends BaseEntity
+{
     private static final long serialVersionUID = 1L;
 
-    /**
-     * $column.columnComment
-     */
+    /** $column.columnComment */
     private Long fId;
 
-    /**
-     * 编号
-     */
+    /** 编号 */
     @Excel(name = "编号")
     private String fNo;
 
-    /**
-     * 名称
-     */
+    /** 名称 */
     @Excel(name = "名称")
     private String fName;
 
-    /**
-     * 地址
-     */
+    /** 地址 */
     @Excel(name = "地址")
     private String fAddr;
 
-    /**
-     * 状态,默认 T ,正常T 停用F 下拉选择
-     */
+    /** 库容 */
+    @Excel(name = "库容")
+    private Long fTotalgross;
+
+    /** 状态,默认 T ,正常T 停用F 下拉选择 */
     @Excel(name = "状态,默认 T ,正常T 停用F 下拉选择")
     private String fStatus;
 
-    /**
-     * 删除状态
-     */
-    @TableLogic
+    /** 删除状态 */
     private String delFlag;
 
-    public void setfId(Long fId) {
+    public void setfId(Long fId)
+    {
         this.fId = fId;
     }
 
-    public Long getfId() {
+    public Long getfId()
+    {
         return fId;
     }
-
-    public void setfNo(String fNo) {
+    public void setfNo(String fNo)
+    {
         this.fNo = fNo;
     }
 
-    public String getfNo() {
+    public String getfNo()
+    {
         return fNo;
     }
-
-    public void setfName(String fName) {
+    public void setfName(String fName)
+    {
         this.fName = fName;
     }
 
-    public String getfName() {
+    public String getfName()
+    {
         return fName;
     }
-
-    public void setfAddr(String fAddr) {
+    public void setfAddr(String fAddr)
+    {
         this.fAddr = fAddr;
     }
 
-    public String getfAddr() {
+    public String getfAddr()
+    {
         return fAddr;
     }
+    public void setfTotalgross(Long fTotalgross)
+    {
+        this.fTotalgross = fTotalgross;
+    }
 
-    public void setfStatus(String fStatus) {
+    public Long getfTotalgross()
+    {
+        return fTotalgross;
+    }
+    public void setfStatus(String fStatus)
+    {
         this.fStatus = fStatus;
     }
 
-    public String getfStatus() {
+    public String getfStatus()
+    {
         return fStatus;
     }
-
-    public void setDelFlag(String delFlag) {
+    public void setDelFlag(String delFlag)
+    {
         this.delFlag = delFlag;
     }
 
-    public String getDelFlag() {
+    public String getDelFlag()
+    {
         return delFlag;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                 .append("fId", getfId())
                 .append("fNo", getfNo())
                 .append("fName", getfName())
                 .append("fAddr", getfAddr())
+                .append("fTotalgross", getfTotalgross())
                 .append("fStatus", getfStatus())
                 .append("delFlag", getDelFlag())
                 .append("createBy", getCreateBy())
@@ -114,4 +121,4 @@ public class TWarehouse extends BaseEntity {
                 .append("remark", getRemark())
                 .toString();
     }
-}
+}

+ 21 - 16
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

@@ -5,30 +5,32 @@
 <mapper namespace="com.ruoyi.basicData.mapper.TWarehouseMapper">
 
     <resultMap type="TWarehouse" id="TWarehouseResult">
-        <result property="fId" column="f_id"/>
-        <result property="fNo" column="f_no"/>
-        <result property="fName" column="f_name"/>
-        <result property="fAddr" column="f_addr"/>
-        <result property="fStatus" column="f_status"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="remark" column="remark"/>
+        <result property="fId"    column="f_id"    />
+        <result property="fNo"    column="f_no"    />
+        <result property="fName"    column="f_name"    />
+        <result property="fAddr"    column="f_addr"    />
+        <result property="fTotalgross"    column="f_totalgross"    />
+        <result property="fStatus"    column="f_status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
     </resultMap>
 
     <sql id="selectTWarehouseVo">
-        select f_id, f_no, f_name, f_addr, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_warehouse
+        select f_id, f_no, f_name, f_addr, f_totalgross, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_warehouse
     </sql>
 
     <select id="selectTWarehouseList" parameterType="TWarehouse" resultMap="TWarehouseResult">
         <include refid="selectTWarehouseVo"/>
         <where>
-            <if test="fNo != null  and fNo != ''">and f_no = #{fNo}</if>
-            <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
-            <if test="fAddr != null  and fAddr != ''">and f_addr = #{fAddr}</if>
-            <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
+            <if test="fNo != null  and fNo != ''"> and f_no = #{fNo}</if>
+            <if test="fName != null  and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
+            <if test="fAddr != null  and fAddr != ''"> and f_addr = #{fAddr}</if>
+            <if test="fTotalgross != null "> and f_totalgross = #{fTotalgross}</if>
+            <if test="fStatus != null  and fStatus != ''"> and f_status = #{fStatus}</if>
         </where>
     </select>
 
@@ -43,6 +45,7 @@
             <if test="fNo != null and fNo != ''">f_no,</if>
             <if test="fName != null and fName != ''">f_name,</if>
             <if test="fAddr != null and fAddr != ''">f_addr,</if>
+            <if test="fTotalgross != null">f_totalgross,</if>
             <if test="fStatus != null">f_status,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="createBy != null">create_by,</if>
@@ -55,6 +58,7 @@
             <if test="fNo != null and fNo != ''">#{fNo},</if>
             <if test="fName != null and fName != ''">#{fName},</if>
             <if test="fAddr != null and fAddr != ''">#{fAddr},</if>
+            <if test="fTotalgross != null">#{fTotalgross},</if>
             <if test="fStatus != null">#{fStatus},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -71,6 +75,7 @@
             <if test="fNo != null and fNo != ''">f_no = #{fNo},</if>
             <if test="fName != null and fName != ''">f_name = #{fName},</if>
             <if test="fAddr != null and fAddr != ''">f_addr = #{fAddr},</if>
+            <if test="fTotalgross != null">f_totalgross = #{fTotalgross},</if>
             <if test="fStatus != null">f_status = #{fStatus},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="createBy != null">create_by = #{createBy},</if>