Browse Source

Merge remote-tracking branch 'origin/HuaLan' into HuaLan

LZH 2 years ago
parent
commit
225316e24b

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java

@@ -60,7 +60,7 @@ public class GlobalExceptionHandler {
      */
     @ExceptionHandler(ServiceException.class)
     public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request) {
-        log.error(e.getMessage());
+        log.error("业务异常:" + e.getMessage());
 //        log.error(e.getMessage(), e);
         Integer code = e.getCode();
         List<String> lockList = redisTemplate.opsForList().range(RedisKey.LOCK_LIST + e.getToken(), 0, -1);

+ 46 - 25
ruoyi-ui/src/views/base/locationInfo/index.vue

@@ -1,16 +1,16 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="仓库" prop="warehouseId">
-        <el-select v-model="queryParams.warehouseId" placeholder="请选择所属仓库" clearable size="small" style="width: 100%">
-          <el-option
-            v-for="dict in this.warehouseCombo"
-            :key="dict.warehouseId"
-            :label="dict.warehouseName"
-            :value="dict.warehouseId"
-          />
-        </el-select>
-      </el-form-item>
+<!--      <el-form-item label="仓库" prop="warehouseId">-->
+<!--        <el-select v-model="queryParams.warehouseId" placeholder="请选择所属仓库" clearable size="small" style="width: 100%">-->
+<!--          <el-option-->
+<!--            v-for="dict in this.warehouseCombo"-->
+<!--            :key="dict.warehouseId"-->
+<!--            :label="dict.warehouseName"-->
+<!--            :value="dict.warehouseId"-->
+<!--          />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
       <el-form-item label="库区" prop="zoneId">
         <el-select v-model="queryParams.zoneId" placeholder="请选择库区" clearable size="small" style="width: 100%">
           <el-option
@@ -21,6 +21,15 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item label="库位id" prop="id">
+        <el-input
+          v-model="queryParams.id"
+          placeholder="请输入库位编码"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="库位编码" prop="locationNo">
         <el-input
           v-model="queryParams.locationNo"
@@ -30,6 +39,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="AGV站点" prop="agvStation">
+        <el-input
+          v-model="queryParams.agvStation"
+          placeholder="请输入AGV站点"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="库位状态" prop="stockStatus">
         <el-select v-model="queryParams.stockStatus" placeholder="请选择库位状态" clearable size="small">
           <el-option
@@ -124,19 +142,11 @@
 
     <el-table v-loading="loading" :data="locationInfoList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="id" align="center" prop="id" />
+      <el-table-column label="库位id" align="center" prop="id" />
 <!--      <el-table-column label="仓库" align="center" prop="warehouseId" />-->
-      <el-table-column label="区域" align="center" prop="zoneId" />
+      <el-table-column label="区域" align="center" prop="zoneName" />
       <el-table-column label="库位编码" align="center" prop="locationNo" width="200"/>
       <el-table-column label="AGV站点" align="center" prop="agvStation" />
-      <el-table-column label="排号" align="center" prop="rowNo" />
-      <el-table-column label="排序号" align="center" prop="rowIndex" />
-      <el-table-column label="列号" align="center" prop="colNo" />
-      <el-table-column label="列序号" align="center" prop="colIndex" />
-      <el-table-column label="层号" align="center" prop="shiftNo" />
-      <el-table-column label="层序号" align="center" prop="shiftIndex" />
-      <el-table-column label="限高" align="center" prop="heightLimit" />
-      <el-table-column label="限重" align="center" prop="weightLimit" />
       <el-table-column label="库位状态" align="center" prop="stockStatus">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.location_status" :value="scope.row.stockStatus"/>
@@ -147,11 +157,19 @@
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isEmpty"/>
         </template>
       </el-table-column>
-      <!--<el-table-column label="储位类型" align="center" prop="locationType">-->
-        <!--<template slot-scope="scope">-->
-          <!--<dict-tag :options="dict.type.location_type" :value="scope.row.locationType"/>-->
-        <!--</template>-->
-      <!--</el-table-column>-->
+      <el-table-column label="储位类型" align="center" prop="locationType">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.location_type" :value="scope.row.locationType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="排号" align="center" prop="rowNo" />
+      <el-table-column label="排序号" align="center" prop="rowIndex" />
+      <el-table-column label="列号" align="center" prop="colNo" />
+      <el-table-column label="列序号" align="center" prop="colIndex" />
+      <el-table-column label="层号" align="center" prop="shiftNo" />
+      <el-table-column label="层序号" align="center" prop="shiftIndex" />
+      <el-table-column label="限高" align="center" prop="heightLimit" />
+      <el-table-column label="限重" align="center" prop="weightLimit" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -394,7 +412,9 @@ export default {
         pageNum: 1,
         pageSize: 10,
         warehouseId: null,
+        id : null,
         zoneId: null,
+        zoneName: null,
         locationNo: null,
         stockStatus: null,
         isEmpty: null,
@@ -485,6 +505,7 @@ export default {
         id: null,
         warehouseId: null,
         zoneId: null,
+        zoneName: null,
         locationNo: null,
         locationBarcode: null,
         rowNo: null,

+ 11 - 1
ruoyi-ui/src/views/wms/allocation/index.vue

@@ -105,10 +105,20 @@
         </template>
       </el-table-column>
       <el-table-column label="分配数量" align="center" prop="qty" />
-      <el-table-column label="lotnum" align="center" prop="lotnum" />
       <el-table-column label="拣货数量" align="center" prop="pickQty" />
       <el-table-column label="已拣库位" align="center" prop="pickToLocation" />
       <el-table-column label="拣货事务" align="center" prop="pickTransactionId" />
+      <el-table-column label="批号" align="center" prop="lotatt01" />
+<!--      <el-table-column label="重量" align="center" prop="lotatt02" />-->
+<!--      <el-table-column label="生产日期" align="center" prop="lotatt03" />-->
+<!--      <el-table-column label="有效期" align="center" prop="lotatt04" />-->
+      <el-table-column label="质量状态" align="center" prop="lotatt05" />
+<!--      <el-table-column label="供应商" align="center" prop="lotatt06" />-->
+<!--      <el-table-column label="托盘号" align="center" prop="lotatt07" />-->
+      <el-table-column label="入库单号" align="center" prop="lotatt08" />
+<!--      <el-table-column label="拣货事务" align="center" prop="lotatt09" />-->
+<!--      <el-table-column label="拣货事务" align="center" prop="lotatt10" />-->
+      <el-table-column label="lotnum" align="center" prop="lotnum" />
       <!--<el-table-column label="待检库位" align="center" prop="locationId" />
       <el-table-column label="叫料待检事务id" align="center" prop="callTransactionId" />-->
       <el-table-column label="创建时间" align="center" prop="createDate" width="180">

+ 5 - 3
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/service/impl/SocketBufferServiceImpl.java

@@ -43,15 +43,17 @@ public class SocketBufferServiceImpl implements SocketBufferService {
     private RedisCache redisCache;
 
     // 创建一个线程池
-    private ExecutorService executorService;
+    private static ExecutorService executorService;
 
-    @Override
-    public List<Order> bufferSeparator(byte[] buffer) {
+    static {
         // 创建一个线程池
         executorService = new ThreadPoolExecutor(5, 30
                 , 60L, TimeUnit.SECONDS
                 , new SynchronousQueue<Runnable>(true));
+    }
 
+    @Override
+    public List<Order> bufferSeparator(byte[] buffer) {
         List<Order> orderList = new ArrayList<>();
         String bufferStr = ByteUtil.byteArray2HexString(buffer);
         //通过固定的头部 87CD0008 将多条消息拆分开

+ 3 - 3
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/service/impl/StatusUpdateServiceImpl.java

@@ -111,11 +111,11 @@ public class StatusUpdateServiceImpl implements StatusUpdateService {
         if (doorNo == 1) {
             doorNum = AutoDoorClient.AUTO_DOOR_NO.D;
         } else if (doorNo == 2) {
-            doorNum = AutoDoorClient.AUTO_DOOR_NO.B;
+            doorNum = AutoDoorClient.AUTO_DOOR_NO.C;
         }
         Boolean isOpen = autoDoorClient.sendOpen(doorNum);
         if (isOpen) {
-            log.info("门信号发送成功!门号:" + doorNo);
+            log.info("门信号发送成功!门号:" + doorNo);
             feedbackTS(doorNo);
         }
     }
@@ -126,7 +126,7 @@ public class StatusUpdateServiceImpl implements StatusUpdateService {
         if (doorNo == 1) {
             doorNum = AutoDoorClient.AUTO_DOOR_NO.D;
         } else if (doorNo == 2) {
-            doorNum = AutoDoorClient.AUTO_DOOR_NO.B;
+            doorNum = AutoDoorClient.AUTO_DOOR_NO.C;
         }
         Boolean isClose = autoDoorClient.sendClose(doorNum);
         if (isClose) {

+ 196 - 33
warewms-ams/src/main/java/com/ruoyi/ams/order/domain/ActAllocationDetails.java

@@ -8,7 +8,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
  * 分配查询对象 act_allocation_details
- * 
+ *
  * @author ruoyi
  * @date 2022-10-31
  */
@@ -79,151 +79,314 @@ public class ActAllocationDetails extends BaseEntity
     @Excel(name = "")
     private String userdefine4;
 
-    public void setAllocationId(String allocationId) 
+    private String lotatt01;
+    private String lotatt02;
+    private String lotatt03;
+    private String lotatt04;
+    private String lotatt05;
+    private String lotatt06;
+    private String lotatt07;
+    private String lotatt08;
+    private String lotatt09;
+    private String lotatt10;
+    private String lotatt11;
+    private String lotatt12;
+    private String lotatt13;
+    private String lotatt14;
+    private String lotatt15;
+    private String lotatt16;
+    private String lotatt17;
+    private String lotatt18;
+
+    public void setAllocationId(String allocationId)
     {
         this.allocationId = allocationId;
     }
 
-    public String getAllocationId() 
+    public String getAllocationId()
     {
         return allocationId;
     }
-    public void setOrderNo(String orderNo) 
+    public void setOrderNo(String orderNo)
     {
         this.orderNo = orderNo;
     }
 
-    public String getOrderNo() 
+    public String getOrderNo()
     {
         return orderNo;
     }
-    public void setLineNo(Long lineNo) 
+    public void setLineNo(Long lineNo)
     {
         this.lineNo = lineNo;
     }
 
-    public Long getLineNo() 
+    public Long getLineNo()
     {
         return lineNo;
     }
-    public void setMaterial(String material) 
+    public void setMaterial(String material)
     {
         this.material = material;
     }
 
-    public String getMaterial() 
+    public String getMaterial()
     {
         return material;
     }
-    public void setLocationId(Long locationId) 
+    public void setLocationId(Long locationId)
     {
         this.locationId = locationId;
     }
 
-    public Long getLocationId() 
+    public Long getLocationId()
     {
         return locationId;
     }
-    public void setCallTransactionId(String callTransactionId) 
+    public void setCallTransactionId(String callTransactionId)
     {
         this.callTransactionId = callTransactionId;
     }
 
-    public String getCallTransactionId() 
+    public String getCallTransactionId()
     {
         return callTransactionId;
     }
-    public void setStatus(String status) 
+    public void setStatus(String status)
     {
         this.status = status;
     }
 
-    public String getStatus() 
+    public String getStatus()
     {
         return status;
     }
-    public void setLotnum(String lotnum) 
+    public void setLotnum(String lotnum)
     {
         this.lotnum = lotnum;
     }
 
-    public String getLotnum() 
+    public String getLotnum()
     {
         return lotnum;
     }
-    public void setQty(BigDecimal qty) 
+    public void setQty(BigDecimal qty)
     {
         this.qty = qty;
     }
 
-    public BigDecimal getQty() 
+    public BigDecimal getQty()
     {
         return qty;
     }
-    public void setPickTransactionId(String pickTransactionId) 
+    public void setPickTransactionId(String pickTransactionId)
     {
         this.pickTransactionId = pickTransactionId;
     }
 
-    public String getPickTransactionId() 
+    public String getPickTransactionId()
     {
         return pickTransactionId;
     }
-    public void setPickToLocation(String pickToLocation) 
+    public void setPickToLocation(String pickToLocation)
     {
         this.pickToLocation = pickToLocation;
     }
 
-    public String getPickToLocation() 
+    public String getPickToLocation()
     {
         return pickToLocation;
     }
-    public void setPickQty(BigDecimal pickQty) 
+    public void setPickQty(BigDecimal pickQty)
     {
         this.pickQty = pickQty;
     }
 
-    public BigDecimal getPickQty() 
+    public BigDecimal getPickQty()
     {
         return pickQty;
     }
-    public void setUserdefine1(String userdefine1) 
+    public void setUserdefine1(String userdefine1)
     {
         this.userdefine1 = userdefine1;
     }
 
-    public String getUserdefine1() 
+    public String getUserdefine1()
     {
         return userdefine1;
     }
-    public void setUserdefine2(String userdefine2) 
+    public void setUserdefine2(String userdefine2)
     {
         this.userdefine2 = userdefine2;
     }
 
-    public String getUserdefine2() 
+    public String getUserdefine2()
     {
         return userdefine2;
     }
-    public void setUserdefine3(String userdefine3) 
+    public void setUserdefine3(String userdefine3)
     {
         this.userdefine3 = userdefine3;
     }
 
-    public String getUserdefine3() 
+    public String getUserdefine3()
     {
         return userdefine3;
     }
-    public void setUserdefine4(String userdefine4) 
+    public void setUserdefine4(String userdefine4)
     {
         this.userdefine4 = userdefine4;
     }
 
-    public String getUserdefine4() 
+    public String getUserdefine4()
     {
         return userdefine4;
     }
 
+    public String getLotatt01() {
+        return lotatt01;
+    }
+
+    public void setLotatt01(String lotatt01) {
+        this.lotatt01 = lotatt01;
+    }
+
+    public String getLotatt02() {
+        return lotatt02;
+    }
+
+    public void setLotatt02(String lotatt02) {
+        this.lotatt02 = lotatt02;
+    }
+
+    public String getLotatt03() {
+        return lotatt03;
+    }
+
+    public void setLotatt03(String lotatt03) {
+        this.lotatt03 = lotatt03;
+    }
+
+    public String getLotatt04() {
+        return lotatt04;
+    }
+
+    public void setLotatt04(String lotatt04) {
+        this.lotatt04 = lotatt04;
+    }
+
+    public String getLotatt05() {
+        return lotatt05;
+    }
+
+    public void setLotatt05(String lotatt05) {
+        this.lotatt05 = lotatt05;
+    }
+
+    public String getLotatt06() {
+        return lotatt06;
+    }
+
+    public void setLotatt06(String lotatt06) {
+        this.lotatt06 = lotatt06;
+    }
+
+    public String getLotatt07() {
+        return lotatt07;
+    }
+
+    public void setLotatt07(String lotatt07) {
+        this.lotatt07 = lotatt07;
+    }
+
+    public String getLotatt08() {
+        return lotatt08;
+    }
+
+    public void setLotatt08(String lotatt08) {
+        this.lotatt08 = lotatt08;
+    }
+
+    public String getLotatt09() {
+        return lotatt09;
+    }
+
+    public void setLotatt09(String lotatt09) {
+        this.lotatt09 = lotatt09;
+    }
+
+    public String getLotatt10() {
+        return lotatt10;
+    }
+
+    public void setLotatt10(String lotatt10) {
+        this.lotatt10 = lotatt10;
+    }
+
+    public String getLotatt11() {
+        return lotatt11;
+    }
+
+    public void setLotatt11(String lotatt11) {
+        this.lotatt11 = lotatt11;
+    }
+
+    public String getLotatt12() {
+        return lotatt12;
+    }
+
+    public void setLotatt12(String lotatt12) {
+        this.lotatt12 = lotatt12;
+    }
+
+    public String getLotatt13() {
+        return lotatt13;
+    }
+
+    public void setLotatt13(String lotatt13) {
+        this.lotatt13 = lotatt13;
+    }
+
+    public String getLotatt14() {
+        return lotatt14;
+    }
+
+    public void setLotatt14(String lotatt14) {
+        this.lotatt14 = lotatt14;
+    }
+
+    public String getLotatt15() {
+        return lotatt15;
+    }
+
+    public void setLotatt15(String lotatt15) {
+        this.lotatt15 = lotatt15;
+    }
+
+    public String getLotatt16() {
+        return lotatt16;
+    }
+
+    public void setLotatt16(String lotatt16) {
+        this.lotatt16 = lotatt16;
+    }
+
+    public String getLotatt17() {
+        return lotatt17;
+    }
+
+    public void setLotatt17(String lotatt17) {
+        this.lotatt17 = lotatt17;
+    }
+
+    public String getLotatt18() {
+        return lotatt18;
+    }
+
+    public void setLotatt18(String lotatt18) {
+        this.lotatt18 = lotatt18;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 26 - 4
warewms-ams/src/main/resources/mapper/docOrder/ActAllocationDetailsMapper.xml

@@ -25,6 +25,24 @@
         <result property="userdefine2" column="userdefine2"/>
         <result property="userdefine3" column="userdefine3"/>
         <result property="userdefine4" column="userdefine4"/>
+        <result property="lotatt01"    column="lotatt01"/>
+        <result property="lotatt02"    column="lotatt02"/>
+        <result property="lotatt03"    column="lotatt03"/>
+        <result property="lotatt04"    column="lotatt04"/>
+        <result property="lotatt05"    column="lotatt05"/>
+        <result property="lotatt06"    column="lotatt06"/>
+        <result property="lotatt07"    column="lotatt07"/>
+        <result property="lotatt08"    column="lotatt08"/>
+        <result property="lotatt09"    column="lotatt09"/>
+        <result property="lotatt10"    column="lotatt10"/>
+        <result property="lotatt11"    column="lotatt11"/>
+        <result property="lotatt12"    column="lotatt12"/>
+        <result property="lotatt13"    column="lotatt13"/>
+        <result property="lotatt14"    column="lotatt14"/>
+        <result property="lotatt15"    column="lotatt15"/>
+        <result property="lotatt16"    column="lotatt16"/>
+        <result property="lotatt17"    column="lotatt17"/>
+        <result property="lotatt18"    column="lotatt18"/>
     </resultMap>
 
     <sql id="selectActAllocationDetailsVo">
@@ -51,9 +69,13 @@
         from act_allocation_details
     </sql>
 
-    <select id="selectActAllocationDetailsList" parameterType="ActAllocationDetails"
-            resultMap="ActAllocationDetailsResult">
-        <include refid="selectActAllocationDetailsVo"/>
+    <select id="selectActAllocationDetailsList" parameterType="ActAllocationDetails" resultMap="ActAllocationDetailsResult">
+        select t1.*
+        ,t2.lotatt01,t2.lotatt02,t2.lotatt03,t2.lotatt04,t2.lotatt05,t2.lotatt06
+        ,t2.lotatt07,t2.lotatt08,t2.lotatt09,t2.lotatt10,t2.lotatt11,t2.lotatt12
+        ,t2.lotatt13,t2.lotatt14,t2.lotatt15,t2.lotatt16,t2.lotatt17,t2.lotatt18
+        from act_allocation_details t1
+        LEFT JOIN inv_lot_att t2 on t2.lotnum = t1.lotnum
         <where>
             <if test="allocationId != null  and allocationId != ''"> and allocation_id = #{allocationId}</if>
             <if test="orderNo != null  and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
@@ -181,4 +203,4 @@
     <update id="updateAllocationDetailsLocationIdByPalletNo">
         update act_allocation_details set location_id = #{locationId} where userdefine1 = #{palletNo}
     </update>
-</mapper>
+</mapper>

+ 13 - 0
warewms-base/src/main/java/com/ruoyi/base/domain/BaseLocationInfo.java

@@ -27,6 +27,12 @@ public class BaseLocationInfo extends BaseEntity {
     @Excel(name = "区域id")
     private Long zoneId;
 
+    /**
+     * 区域id
+     */
+    @Excel(name = "库区名称")
+    private String zoneName;
+
     /**
      * 库位编码
      */
@@ -400,6 +406,13 @@ public class BaseLocationInfo extends BaseEntity {
         this.orderByClause = orderByClause;
     }
 
+    public String getZoneName() {
+        return zoneName;
+    }
+
+    public void setZoneName(String zoneName) {
+        this.zoneName = zoneName;
+    }
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 9 - 2
warewms-base/src/main/resources/mapper/base/BaseLocationInfoMapper.xml

@@ -40,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <result property="zoneName"    column="zone_name"    />
     </resultMap>
 
     <resultMap type="BaseLocationLotattVO" id="BaseLocationInfoLotattResult">
@@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="lotattVO.lotatt16"    column="lotatt16"    />
         <result property="lotattVO.lotatt17"    column="lotatt17"    />
         <result property="lotattVO.lotatt18"    column="lotatt18"    />
+
     </resultMap>
 
     <resultMap type="lotattVO" id="LotattResult">
@@ -166,11 +168,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectBaseLocationInfoList" parameterType="BaseLocationInfo" resultMap="BaseLocationInfoResult">
-        <include refid="selectBaseLocationInfoVo"/>
+        select t1.*,t2.zone_name
+        from base_location_info t1
+        left join base_location_zone t2 on t2.zone_id=t1.zone_id
         <where>
+            <if test="id != null "> and id like concat('%', #{id}, '%')</if>
             <if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
-            <if test="zoneId != null "> and zone_id = #{zoneId}</if>
+            <if test="zoneId != null "> and t1.zone_id = #{zoneId}</if>
+            <if test="zoneName != null "> and zone_name = #{zoneName}</if>
             <if test="locationNo != null  and locationNo != ''"> and location_no like concat('%', #{locationNo}, '%')</if>
+            <if test="agvStation != null  and agvStation != ''"> and agv_station like concat('%', #{agvStation}, '%')</if>
             <if test="stockStatus != null  and stockStatus != ''"> and stock_status = #{stockStatus}</if>
             <if test="isEmpty != null  and isEmpty != ''"> and is_empty = #{isEmpty}</if>
             <if test="locationType != null  and locationType != ''"> and location_type = #{locationType}</if>