andy 3 роки тому
батько
коміт
e1a05d6ae6

+ 1 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/ams/LineCallController.java

@@ -8,7 +8,6 @@ import com.ruoyi.ams.lineCall.domain.form.LineCallForm;
 import com.ruoyi.ams.lineCall.domain.vo.LineCallVO;
 import com.ruoyi.ams.lineCall.service.ILineCallService;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -21,7 +20,7 @@ import java.util.List;
  * Date: 2022/3/7
  */
 @RestController
-@RequestMapping("/ams/lineCall")
+@RequestMapping("/ams/agv")
 public class LineCallController {
 
     @Autowired

+ 1 - 1
ruoyi-admin/src/test/java/com/ruoyi/admin/test/base/WarehouseTest.java

@@ -71,7 +71,7 @@ public class WarehouseTest {
         LotattDTO lotattDTO = new LotattDTO();
         lotattDTO.setLotatt01("1000");
         InWarehouseDTO inWarehouseDTO = new InWarehouseDTO();
-        inWarehouseDTO.setSku("test1");
+        inWarehouseDTO.setSku("test2");
         inWarehouseDTO.setWarehouseId(1L);
         inWarehouseDTO.setLotattDTO(lotattDTO);
         BaseLocationInfo locationInfo = businessService.inLocationAllocation(inWarehouseDTO);

+ 2 - 2
ruoyi-ui/src/api/ams/lineCall.js

@@ -3,14 +3,14 @@ import request from '@/utils/request'
 // 初始化flow
 export function choseFlow(id) {
   return request({
-    url: '/ams/lineCall/' + id,
+    url: '/ams/agv/' + id,
     method: 'get'
   })
 }
 
 export function exec(param) {
   return request({
-    url: '/ams/lineCall/exec',
+    url: '/ams/agv/exec',
     method: 'post',
     data: param
   })

+ 1 - 2
ruoyi-ui/src/views/ams/lineCall/index.vue

@@ -103,7 +103,7 @@
     <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="物料" prop="sku" v-if="form.skuTypeFlag !== 'Hidden'">
-          <el-select style="width: 100%" v-model="form.sku" placeholder="请选择物料" clearable size="small">
+          <el-select style="width: 100%" v-model="form.sku" placeholder="请选择物料" clearable size="small" @change="skuChange">
             <el-option
               v-for="dict in skuTypeCombo"
               :key="dict.sku"
@@ -393,7 +393,6 @@
               lineCallDetailsFormList.push(obj)
             }
             this.form.lineCallDetailsFormList = lineCallDetailsFormList
-            console.log(this.form)
             exec(this.form).then(response => {
               if (response.code === 200) {
                 this.$modal.msgSuccess("执行成功");

+ 20 - 3
warewms-ams/src/main/java/com/ruoyi/ams/config/service/LocationAllocationStrategy.java

@@ -207,7 +207,7 @@ public class LocationAllocationStrategy {
         BaseLocationInfo currentLocation = null;
         BaseLocationLotattVO currentLocationLotatt = null;
 
-        //同批次属性优先出库
+        //同批次属性优先出库,进行效期排序
         if (asnSoStrategy.getSoSameLotatt1Flag().equals("optimization")) {
             if (asnSoStrategy.getSoPeriodFlag().equals("optimization") || asnSoStrategy.getSoPeriodFlag().equals("force")) {
                 sameLotattList.sort(new LocationSortComparator());
@@ -215,6 +215,12 @@ public class LocationAllocationStrategy {
             for (LocationSortDTO locationSortDTO : list) {
                 List<BaseLocationLotattVO> locationInfoList = map.get(locationSortDTO.getColNo());
                 for (BaseLocationLotattVO b : locationInfoList) {
+                    //如果不是强制效期优先的进行多列同时出库跳过已经在出库的列
+                    if (!asnSoStrategy.getSoPeriodFlag().equals("force")) {
+                        if (taskingFlag.get(b.getColNo())) {
+                            continue;
+                        }
+                    }
                     if (currentLocation == null) {
                         if (b.getIsEmpty().equals("N") && b.getStockStatus().equals("00")) {
                             BaseLocationInfo locationInfo = new BaseLocationInfo();
@@ -236,12 +242,17 @@ public class LocationAllocationStrategy {
                 }
             }
         }
-
-        if (asnSoStrategy.getSoPeriodFlag().equals("optimization") || asnSoStrategy.getSoPeriodFlag().equals("force")) { //近效期
+        //非同批次属性,进行效期排序
+        if (asnSoStrategy.getSoPeriodFlag().equals("optimization") || asnSoStrategy.getSoPeriodFlag().equals("force")) {
             list.sort(new LocationSortComparator());
             for (LocationSortDTO locationSortDTO : list) {
                 List<BaseLocationLotattVO> locationInfoList = map.get(locationSortDTO.getColNo());
                 for (BaseLocationLotattVO b : locationInfoList) {
+                    if (!asnSoStrategy.getSoPeriodFlag().equals("force")) {
+                        if (taskingFlag.get(b.getColNo())) {
+                            continue;
+                        }
+                    }
                     if (currentLocation == null) {
                         if (b.getIsEmpty().equals("N") && b.getStockStatus().equals("00")) {
                             BaseLocationInfo locationInfo = new BaseLocationInfo();
@@ -268,9 +279,15 @@ public class LocationAllocationStrategy {
                 }
             }
         } else {
+            //不进行效期排序
             for (Map.Entry<String, List<BaseLocationLotattVO>> entry : map.entrySet()) {
                 List<BaseLocationLotattVO> locationInfoList = entry.getValue();
                 for (BaseLocationLotattVO b : locationInfoList) {
+                    if (!asnSoStrategy.getSoPeriodFlag().equals("force")) {
+                        if (taskingFlag.get(b.getColNo())) {
+                            continue;
+                        }
+                    }
                     if (currentLocation == null) {
                         if (b.getIsEmpty().equals("N") && b.getStockStatus().equals("00")) {
                             BaseLocationInfo locationInfo = new BaseLocationInfo();

+ 9 - 1
warewms-ams/src/main/java/com/ruoyi/ams/config/service/impl/FlowConfigHeaderServiceImpl.java

@@ -261,6 +261,14 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
      */
     @Override
     public List<FlowConfigLotattVO> selectLotattDetails(Long id) {
-        return flowConfigHeaderMapper.selectLotattDetails(id);
+        List<FlowConfigLotattVO> flowConfigLotattVOList = flowConfigHeaderMapper.selectLotattDetails(id);
+        if (flowConfigLotattVOList != null && flowConfigLotattVOList.size() > 0) {
+            for (FlowConfigLotattVO v : flowConfigLotattVOList) {
+                if (v.getInputType().equals("DateBox") && !StringUtils.isEmpty(v.getLotattValue()) && v.getLotattValue().equals("now")) {
+                    v.setLotattValue(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, new Date()));
+                }
+            }
+        }
+        return flowConfigLotattVOList;
     }
 }

+ 2 - 1
warewms-ams/src/main/resources/mapper/ams/FlowConfigHeaderMapper.xml

@@ -211,7 +211,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </insert>
 
     <select id="selectLotattDetails" parameterType="Long" resultMap="FlowConfigLotattVOResult">
-        select d.lotatt_id,d.required_tag lotatt_flag,d.lotatt_name,d.input_type,d.input_scope,d.default_value lotatt_value
+        select d.lotatt_id,d.required_tag lotatt_flag,d.lotatt_name,d.input_type,d.input_scope,
+        d.default_value lotatt_value
         from lotatt_config d
         where d.required_tag &lt;&gt; 'Hidden'
     </select>