Browse Source

1.修改容器界面显示库位编号
2.容器管理界面根据库位编号查询

HuKang 2 years ago
parent
commit
a194d9adf0

+ 5 - 3
ruoyi-ui/src/views/wms/box/index.vue

@@ -40,9 +40,9 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="绑定库位" prop="locationId">
+      <el-form-item label="绑定库位" prop="locationNo">
         <el-input
-          v-model="queryParams.locationId"
+          v-model="queryParams.locationNo"
           placeholder="请输入绑定库位"
           clearable
           size="small"
@@ -131,7 +131,7 @@
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isEmpty"/>
         </template>
       </el-table-column>
-      <el-table-column label="绑定库位" align="center" prop="locationId" />
+      <el-table-column label="绑定库位" align="center" prop="locationNo" />
       <el-table-column label="是否满托" align="center" prop="isFull">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isFull"/>
@@ -261,6 +261,7 @@ export default {
         boxState: null,
         isEmpty: null,
         locationId: null,
+        locationNo: null,
         isFull: null
       },
       // 表单参数
@@ -303,6 +304,7 @@ export default {
         updateTime: null,
         userdefine1: null,
         userdefine2: null,
+        locationNo: null,
         locationId: null,
         isFull: null
       };

+ 51 - 51
warewms-ams/src/main/java/com/ruoyi/ams/box/domain/WmsBoxInfo.java

@@ -7,7 +7,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
  * 容器管理对象 wms_box_info
- * 
+ *
  * @author ruoyi
  * @date 2022-11-01
  */
@@ -48,103 +48,102 @@ public class WmsBoxInfo extends BaseEntity
 
     /** 绑定库位 */
     @Excel(name = "绑定库位")
+    private String locationNo;
+
     private Long locationId;
 
     /** 是否满托 */
     @Excel(name = "是否满托")
     private String isFull;
 
-    public void setId(Long id) 
-    {
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
-        return id;
+    public String getBoxNo() {
+        return boxNo;
     }
-    public void setBoxNo(String boxNo) 
-    {
+
+    public void setBoxNo(String boxNo) {
         this.boxNo = boxNo;
     }
 
-    public String getBoxNo() 
-    {
-        return boxNo;
+    public String getBoxType() {
+        return boxType;
     }
-    public void setBoxType(String boxType) 
-    {
+
+    public void setBoxType(String boxType) {
         this.boxType = boxType;
     }
 
-    public String getBoxType() 
-    {
-        return boxType;
+    public String getBoxRemark() {
+        return boxRemark;
     }
-    public void setBoxRemark(String boxRemark) 
-    {
+
+    public void setBoxRemark(String boxRemark) {
         this.boxRemark = boxRemark;
     }
 
-    public String getBoxRemark() 
-    {
-        return boxRemark;
+    public Integer getBoxState() {
+        return boxState;
     }
-    public void setBoxState(Integer boxState) 
-    {
+
+    public void setBoxState(Integer boxState) {
         this.boxState = boxState;
     }
 
-    public Integer getBoxState() 
-    {
-        return boxState;
+    public String getIsEmpty() {
+        return isEmpty;
     }
-    public void setIsEmpty(String isEmpty) 
-    {
+
+    public void setIsEmpty(String isEmpty) {
         this.isEmpty = isEmpty;
     }
 
-    public String getIsEmpty() 
-    {
-        return isEmpty;
+    public String getUserdefine1() {
+        return userdefine1;
     }
-    public void setUserdefine1(String userdefine1) 
-    {
+
+    public void setUserdefine1(String userdefine1) {
         this.userdefine1 = userdefine1;
     }
 
-    public String getUserdefine1() 
-    {
-        return userdefine1;
+    public String getUserdefine2() {
+        return userdefine2;
     }
-    public void setUserdefine2(String userdefine2) 
-    {
+
+    public void setUserdefine2(String userdefine2) {
         this.userdefine2 = userdefine2;
     }
 
-    public String getUserdefine2() 
-    {
-        return userdefine2;
+    public String getLocationNo() {
+        return locationNo;
     }
-    public void setLocationId(Long locationId) 
-    {
-        this.locationId = locationId;
+
+    public void setLocationNo(String locationNo) {
+        this.locationNo = locationNo;
     }
 
-    public Long getLocationId() 
-    {
+    public Long getLocationId() {
         return locationId;
     }
-    public void setIsFull(String isFull) 
-    {
-        this.isFull = isFull;
+
+    public void setLocationId(Long locationId) {
+        this.locationId = locationId;
     }
 
-    public String getIsFull() 
-    {
+    public String getIsFull() {
         return isFull;
     }
 
+    public void setIsFull(String isFull) {
+        this.isFull = isFull;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -160,6 +159,7 @@ public class WmsBoxInfo extends BaseEntity
             .append("updateTime", getUpdateTime())
             .append("userdefine1", getUserdefine1())
             .append("userdefine2", getUserdefine2())
+            .append("locationNo", getLocationNo())
             .append("locationId", getLocationId())
             .append("isFull", getIsFull())
             .toString();

+ 5 - 1
warewms-ams/src/main/resources/mapper/box/WmsBoxInfoMapper.xml

@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="userdefine2"    column="userdefine2"    />
         <result property="locationId"    column="location_id"    />
         <result property="isFull"    column="is_full"    />
+        <result property="locationNo" column="location_no"/>
     </resultMap>
 
     <sql id="selectWmsBoxInfoVo">
@@ -26,10 +27,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectWmsBoxInfoList" parameterType="WmsBoxInfo" resultMap="WmsBoxInfoResult">
-        <include refid="selectWmsBoxInfoVo"/>
+        select t1.*,t2.location_no
+        from wms_box_info t1
+        left join base_location_info t2 on t2.id = t1.location_id
         <where>
             <if test="isFull != null  and isFull != ''"> and is_full = #{isFull}</if>
             <if test="boxNo != null  and boxNo != ''"> and box_no = #{boxNo}</if>
+            <if test="locationNo != null  and locationNo != ''"> and t2.location_no = #{locationNo}</if>
         </where>
     </select>