andy 3 éve
szülő
commit
c1726cae1d

+ 25 - 20
ruoyi-ui/src/views/ams/task/index.vue

@@ -142,8 +142,8 @@
 
     <el-table v-loading="loading" :data="wcsTaskList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="任务编号" align="center" prop="taskNo" />
-      <el-table-column label="仓库" align="center" prop="shopId" />
+      <el-table-column label="任务编号" align="center" prop="taskNo"  width="180"/>
+      <!--<el-table-column label="仓库" align="center" prop="shopId" />-->
       <!--<el-table-column label="调用系统名称" align="center" prop="sysName" />-->
       <!--<el-table-column label="调用设备名称" align="center" prop="deviceName" />-->
       <el-table-column label="起始点位" align="center" prop="locationFrom" />
@@ -151,27 +151,32 @@
       <el-table-column label="终点点位" align="center" prop="locationTo" />
       <el-table-column label="终点区域" align="center" prop="areaTo" />
       <el-table-column label="优先级" align="center" prop="priority" />
-      <el-table-column label="ִ状态" align="center" prop="state" />
-      <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="创建人" align="center" prop="createUser" />
-      <el-table-column label="创建时间" align="center" prop="createDate" width="180">
+      <el-table-column label="ִ状态" align="center" prop="state" >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createDate, '{y}-{m}-{d}') }}</span>
+          <div v-if="scope.row.state === 1">开始</div>
+          <div v-if="scope.row.state === 2">完成</div>
+          <div v-if="scope.row.state === 3">开始取货</div>
+          <div v-if="scope.row.state === 4">取货完成</div>
+          <div v-if="scope.row.state === 5">开始卸货</div>
+          <div v-if="scope.row.state === 6">卸货完成</div>
+          <div v-if="scope.row.state === 7">取消</div>
+          <div v-if="scope.row.state === 8">异常</div>
+          <div v-if="scope.row.state === 9">待下发</div>
+          <div v-if="scope.row.state === 10">已下发</div>
+          <div v-if="scope.row.state === 11">取消并归于起点</div>
+          <div v-if="scope.row.state === 12">取消并归于终点</div>
+          <div v-if="scope.row.state === 13">取货待确认</div>
+          <div v-if="scope.row.state === 14">卸货待确认</div>
         </template>
       </el-table-column>
-      <el-table-column label="任务类型" align="center" prop="taskType" />
-      <el-table-column label="任务开始时间" align="center" prop="startTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="任务结束时间" align="center" prop="endTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="父任务单号" align="center" prop="parentTask" />
-      <el-table-column label="AGV接收车号" align="center" prop="agvNo" />
+      <!--<el-table-column label="备注" align="center" prop="remark" />-->
+      <!--<el-table-column label="创建人" align="center" prop="createUser" />-->
+      <el-table-column label="创建时间" align="center" prop="createDate" width="200"/>
+      <!--<el-table-column label="任务类型" align="center" prop="taskType" />-->
+      <el-table-column label="任务开始时间" align="center" prop="startTime"/>
+      <el-table-column label="任务结束时间" align="center" prop="endTime"/>
+      <!--<el-table-column label="父任务单号" align="center" prop="parentTask" />-->
+      <!--<el-table-column label="AGV接收车号" align="center" prop="agvNo" />-->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button

+ 3 - 2
warewms-ams/src/main/java/com/ruoyi/ams/business/BusinessServiceImpl.java

@@ -75,12 +75,13 @@ public class BusinessServiceImpl implements IBusinessService {
                 wcsTask.setAreaFrom(locationFrom.getZoneId().toString());
                 wcsTask.setLocationFrom(agvCallDTO.getLocationFrom());
                 wcsTask.setAreaTo(locationInfo.getZoneId()+"");
-                wcsTask.setLocationTo(locationInfo.getZoneId()+"");
+                wcsTask.setLocationTo(locationInfo.getId().toString());
                 wcsTask.setState(9L);
+                wcsTask.setPriority(1L);
                 wcsTask.setCreateDate(new Date());
                 wcsTask.setBusinessType("01");
                 wcsTask.setTaskType("");
-                businessService.sendTask(wcsTask);
+                return businessService.addTask(wcsTask);
             } else if (StringUtils.isEmpty(agvCallDTO.getLocationFrom()) && !StringUtils.isEmpty(agvCallDTO.getLocationTo())) {
                 //如果起始库位为空、目标库位不为空则表示为出库
             } else if (!StringUtils.isEmpty(agvCallDTO.getLocationFrom()) && !StringUtils.isEmpty(agvCallDTO.getLocationTo())) {

+ 1 - 0
warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotLocIdServiceImpl.java

@@ -152,6 +152,7 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService
         invLotLocId.setQtyallocated(BigDecimal.ZERO);
         invLotLocId.setQtyallocatedEach(BigDecimal.ZERO);
         invLotLocId.setQtypa(BigDecimal.ZERO);
+        invLotLocId.setQtyrpin(BigDecimal.ZERO);
         invLotLocId.setCreateTime(new Date());
         invLotLocIdMapper.insertInvLotLocId(invLotLocId);
 

+ 6 - 6
warewms-ams/src/main/java/com/ruoyi/ams/task/domain/WcsTask.java

@@ -78,8 +78,8 @@ public class WcsTask extends BaseEntity
     private String createUser;
 
     /** 创建时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date createDate;
 
     /** 编辑人 */
@@ -97,13 +97,13 @@ public class WcsTask extends BaseEntity
     private String shopId;
 
     /** 任务开始时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "任务开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "任务开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date startTime;
 
     /** 任务结束时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "任务结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "任务结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date endTime;
 
     /** 父任务单号 */

+ 2 - 0
warewms-ams/src/main/java/com/ruoyi/ams/task/mapper/WcsTaskMapper.java

@@ -27,6 +27,8 @@ public interface WcsTaskMapper
      */
      List<WcsTask> selectWcsTaskList(WcsTask wcsTask);
 
+     List<WcsTask> selectWcsTaskListVO(WcsTask wcsTask);
+
     /**
      * 新增AGV任务
      * 

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/task/service/impl/WcsTaskServiceImpl.java

@@ -40,7 +40,7 @@ public class WcsTaskServiceImpl implements IWcsTaskService
     @Override
     public List<WcsTask> selectWcsTaskList(WcsTask wcsTask)
     {
-        return wcsTaskMapper.selectWcsTaskList(wcsTask);
+        return wcsTaskMapper.selectWcsTaskListVO(wcsTask);
     }
 
     /**

+ 26 - 0
warewms-ams/src/main/resources/mapper/ams/WcsTaskMapper.xml

@@ -67,6 +67,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="agvNo != null  and agvNo != ''"> and agv_no like concat('%', #{agvNo}, '%')</if>
         </where>
     </select>
+
+    <select id="selectWcsTaskListVO" parameterType="WcsTask" resultMap="WcsTaskResult">
+        select t.task_no, t.business_type,bf.location_no location_from,fz.zone_name area_from,bt.location_no location_to,tz.zone_name area_to,
+        t.state,t.create_date,t.task_type, t.start_time, t.end_time
+        from wcs_task t
+        left join base_location_info bf on t.location_from = bf.id
+        left join base_location_info bt on t.location_to = bt.id
+        left join base_location_zone fz on t.area_from = fz.zone_id
+        left join base_location_zone tz on t.area_to = tz.zone_id
+        <where>
+            <if test="locationFrom != null  and locationFrom != ''"> and t.location_from = #{locationFrom}</if>
+            <if test="areaFrom != null  and areaFrom != ''"> and t.area_from = #{areaFrom}</if>
+            <if test="locationTo != null  and locationTo != ''"> and t.location_to = #{locationTo}</if>
+            <if test="areaTo != null  and areaTo != ''"> and t.area_to = #{areaTo}</if>
+            <if test="priority != null "> and t.priority = #{priority}</if>
+            <if test="state != null "> and t.state = #{state}</if>
+            <if test="createUser != null  and createUser != ''"> and t.create_user = #{createUser}</if>
+            <if test="createDate != null "> and t.create_date = #{createDate}</if>
+            <if test="taskType != null  and taskType != ''"> and t.task_type = #{taskType}</if>
+            <if test="shopId != null  and shopId != ''"> and t.shop_id = #{shopId}</if>
+            <if test="startTime != null "> and t.start_time = #{startTime}</if>
+            <if test="endTime != null "> and t.end_time = #{endTime}</if>
+            <if test="parentTask != null  and parentTask != ''"> and t.parent_task = #{parentTask}</if>
+            <if test="agvNo != null  and agvNo != ''"> and t.agv_no like concat('%', #{agvNo}, '%')</if>
+        </where>
+    </select>
     
     <select id="selectWcsTaskByTaskNo" parameterType="String" resultMap="WcsTaskResult">
         <include refid="selectWcsTaskVo"/>

+ 1 - 1
warewms-base/src/main/java/com/ruoyi/base/mapper/BaseLocationInfoMapper.java

@@ -90,5 +90,5 @@ public interface BaseLocationInfoMapper
      * @param status
      * @return
      */
-     int updateLocationStockStatus(Long id,String status);
+     int updateLocationStockStatus(@Param("id") Long id,@Param("status") String status);
 }

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

@@ -274,7 +274,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
 
-    <update id="updateLocationStockStatus" parameterType="string">
+    <update id="updateLocationStockStatus">
         update base_location_info set stock_status = #{status} where id = #{id}
     </update>