소스 검색

bug修复

andy 3 년 전
부모
커밋
9188305ae2

+ 0 - 1
ruoyi-admin/start.bat

@@ -26,7 +26,6 @@ rem set "JAVA_OPTS=-Xms256m -Xmx1024m"
 
 set APP_BASE_PATH=%~dp0
 set CP=%APP_BASE_PATH%conf;%APP_BASE_PATH%lib\*
-cd %APP_BASE_PATH%bin
 java -Xverify:none %JAVA_OPTS% -cp %CP% %MAIN_CLASS%
 
 

+ 1 - 5
ruoyi-ui/src/views/ams/flowConfig/index.vue

@@ -268,11 +268,7 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column label="备注" prop="remark">
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.remark" placeholder="请输入备注" />
-            </template>
-          </el-table-column>
+          <el-table-column label="备注" prop="remark"></el-table-column>
         </el-table>
       </el-form>
       <div slot="footer" class="dialog-footer">

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

@@ -82,6 +82,8 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
         FlowConfigHeaderVO flowConfigHeaderVO = flowConfigHeaderMapper.selectFlowConfigHeaderById(flowConfigForm.getId());
         FlowConfigHeader flowConfigHeader = new FlowConfigHeader();
         BeanUtils.copyProperties(flowConfigHeaderVO, flowConfigHeader);
+        flowConfigHeader.setFlowConfigDetailsList(flowConfigForm.getFlowConfigDetailsList());
+        //把前端传递的数组行参数转换成字符串保存到数据库
         if (flowConfigForm.getSkuType() != null) {
             flowConfigHeader.setSkuType(String.join(",", flowConfigForm.getSkuType()));
         }
@@ -108,6 +110,7 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
 
         List<String> headerLocationFrom = new ArrayList<>();
         List<String> headerLocationTo = new ArrayList<>();
+        //查询所有流程判断起始库位和目标库位不能重复,因为叫料时会根据区域自定匹配流程
         List<FlowConfigHeader> headerList = flowConfigHeaderMapper.selectFlowConfigHeaderList(null);
         if (headerList != null && headerList.size() > 0) {
             for (FlowConfigHeader header : headerList) {
@@ -164,6 +167,11 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
         return flowConfigHeaderMapper.deleteFlowConfigHeaderById(id);
     }
 
+    /**
+     * 新增流程配置
+     * @param flowConfigForm
+     * @return
+     */
     @Transactional(rollbackFor = Exception.class)
     @Override
     public AjaxResult addFlowConfig(FlowConfigForm flowConfigForm) {
@@ -190,7 +198,7 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
         if (list != null && list.size() > 0) {
             return AjaxResult.error("该流程名称已存在");
         }
-        //TODO 起始区域和目标区域不能重复
+
         List<String> headerLocationFrom = new ArrayList<>();
         List<String> headerLocationTo = new ArrayList<>();
         List<FlowConfigHeader> headerList = flowConfigHeaderMapper.selectFlowConfigHeaderList(null);
@@ -237,6 +245,11 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
         }
     }
 
+    /**
+     * 加载流程配置定义的批次属性,关联批次属性配置表配置的控件选项以及名称
+     * @param id
+     * @return
+     */
     @Override
     public List<FlowConfigLotattVO> selectLotattDetails(Long id) {
         return flowConfigHeaderMapper.selectLotattDetails(id);

+ 11 - 3
warewms-ams/src/main/java/com/ruoyi/ams/lineCall/service/impl/LineCallServiceImpl.java

@@ -33,23 +33,28 @@ public class LineCallServiceImpl implements ILineCallService {
     public LineCallVO selectLineCall(Long flowConfigId, Long warehouseId) {
         LineCallVO lineCallVO = new LineCallVO();
         FlowConfigHeaderVO flowConfigHeaderVO = flowConfigHeaderMapper.selectFlowConfigHeaderById(flowConfigId);
+        if (flowConfigHeaderVO == null) {
+            throw new RuntimeException(String.format("ID:%d的流程不存在", flowConfigId));
+        }
         BaseSku skuQuery = new BaseSku();
         skuQuery.setSkuType(flowConfigHeaderVO.getSkuType());
         List<BaseSku> skuList = baseSkuService.selectBaseSkuList(skuQuery);
-
+        //返回前端的字典
         List<BaseLocationInfo> locationFromList = new ArrayList<>();
         List<BaseLocationInfo> locationToList = new ArrayList<>();
-        //初始化起始库位
+        //把前端传递的参数转换成数组方便使用
         String[] locationFromArr = flowConfigHeaderVO.getLocationFrom().split(",");
         String[] locationToArr = flowConfigHeaderVO.getLocationTo().split(",");
-        //初始化目标库位
+        //起始库位
         for (int i = 0; i < locationFromArr.length; i++) {
             String s = locationFromArr[i];
+            //判断是否为库位
             boolean isLocation = baseLocationInfoService.checkIsLocation(s, warehouseId);
             if (isLocation) {
                 BaseLocationInfo b = baseLocationInfoService.selectBaseLocationInfoById(Long.parseLong(s));
                 locationFromList.add(b);
             } else {
+                //如果是区域把区域内的库位查询出来
                 BaseLocationInfo query = new BaseLocationInfo();
                 query.setWarehouseId(warehouseId);
                 query.setZoneId(Long.parseLong(s));
@@ -57,6 +62,7 @@ public class LineCallServiceImpl implements ILineCallService {
                 locationFromList.addAll(bList);
             }
         }
+        //目标库位逻辑同上
         for (int i = 0; i < locationToArr.length; i++) {
             String s = locationToArr[i];
             boolean isLocation = baseLocationInfoService.checkIsLocation(s, warehouseId);
@@ -71,9 +77,11 @@ public class LineCallServiceImpl implements ILineCallService {
                 locationToList.addAll(bList);
             }
         }
+        //数量默认值
         if (flowConfigHeaderVO.getQty() != null) {
             lineCallVO.setQty(flowConfigHeaderVO.getQty().doubleValue());
         }
+        //重量默认值
         if (flowConfigHeaderVO.getWeight() != null) {
             lineCallVO.setWeight(flowConfigHeaderVO.getWeight().doubleValue());
         }