wangxinhui
15 小时以前 9d75314e88f8aac494d57715e3231fe3540cb867
优化更新
已修改20个文件
已添加2个文件
608 ■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/StackerCraneJob_GM.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/AGV_CPExtend.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/测试架仓/StackerCraneJob_CSJ.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/StackerCraneJob_ZH.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/config/buttons.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/taskinfo/extend/relocationTask.vue 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/RelocationDTO.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs 127 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -144,6 +144,11 @@
        Dt_Task QueryStackerCraneInTask(string deviceNo, string currentAddress = "");
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ç¼–号创建时间排序查询任务池移库任务
        /// </summary>
        Dt_Task QueryStackerCraneRelocationTask(string deviceNo);
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ç¼–号、当前地址按照优先级以及创建时间排序查询任务池出库类型的新增的任务
        /// </summary>
        /// <param name="deviceNo">设备编号</param>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -78,6 +78,8 @@
        public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 100 && x < 500).ToList();
        public List<int> TaskRelocationTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 900 && x < 100).ToList();
        public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository) : base(BaseDal)
        {
            _mapper = mapper;
@@ -207,6 +209,17 @@
                        continue;
                    }
                    Dt_Task task = _mapper.Map<Dt_Task>(item);
                    if (task.TaskType == TaskTypeEnum.Relocation.ObjToInt())
                    {
                        task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                        task.CurrentAddress = item.SourceAddress;
                        task.NextAddress = item.TargetAddress;
                        task.DeviceCode = task.Roadway;
                        task.TaskType = TaskTypeEnum.Relocation.ObjToInt();
                        task.Creater = "WMS";
                        tasks.Add(task);
                        continue;
                    }
                    task.Creater = "WMS";
                    task.TaskState = (int)TaskStatusEnum.New;
                    task.CurrentAddress = item.SourceAddress;
@@ -817,6 +830,14 @@
        }
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ç¼–号创建时间排序查询任务池移库任务
        /// </summary>
        public Dt_Task QueryStackerCraneRelocationTask(string deviceNo)
        {
            return BaseDal.QueryFirst(x => x.DeviceCode == deviceNo && TaskRelocationTypes.Contains(x.TaskType) && x.TaskState == (int)TaskStatusEnum.SC_Execute, TaskOrderBy);
        }
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ç¼–号、当前地址按照优先级以及创建时间排序查询任务池出库类型的新增的任务
        /// </summary>
        /// <param name="deviceNo">设备编号</param>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸ÉĤ²Ö/StackerCraneJob_GM.cs
@@ -326,7 +326,10 @@
                }
            }
            if (task == null)
            {
                task = _taskService.QueryStackerCraneRelocationTask(commonStackerCrane.DeviceCode);
            }
            return task;
        }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/³ÉÆ·²Ö/AGV_CPExtend.cs
@@ -99,7 +99,7 @@
                #endregion
                #region å‡ºåº“推送任务1线
                {
                    var newTasksOut1 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress=="5236").OrderBy(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
                    var newTasksOut1 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress=="5236").OrderByDescending(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
                    var downTasksOut1 = AllTasks.Where(x => (x.TaskState > TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5236").ToList();
                    Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.AGVStationCode == "5236");
                    IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
@@ -174,6 +174,7 @@
                            {
                                _taskService.UpdateData(newTasksOut1);
                            }
                            WriteInfo("5236", $"1线5236无任务,状态{stationCurrentStatus}可下发,下发任务:{newTasksOut1.Select(x => x.TaskNum)}");
                        }
                    }
                    
@@ -181,7 +182,7 @@
                #endregion
                #region å‡ºåº“推送任务2线
                {
                    var newTasksOut2 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5243").OrderBy(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
                    var newTasksOut2 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5243").OrderByDescending(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
                    var downTasksOut2 = AllTasks.Where(x => (x.TaskState > TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5243").ToList();
                    Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.AGVStationCode == "5243");
                    IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
@@ -256,6 +257,7 @@
                            {
                                _taskService.UpdateData(newTasksOut2);
                            }
                            WriteInfo("5243", $"2线5243无任务,状态{stationCurrentStatus}可下发,下发任务:{newTasksOut2.Select(x => x.TaskNum)}");
                        }
                        //else
                        //{
@@ -267,7 +269,7 @@
                #endregion
                #region å‡ºåº“推送任务3线
                {
                    var newTasksOut3 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5250").OrderBy(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
                    var newTasksOut3 = AllTasks.Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5250").OrderByDescending(x => x.Grade).ThenBy(x => x.GroupId).Take(5).ToList();
                    var downTasksOut3 = AllTasks.Where(x => (x.TaskState > TaskStatusEnum.New.ObjToInt()) && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == "5250").ToList();
                    Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.AGVStationCode == "5250");
                    IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
@@ -342,6 +344,7 @@
                            {
                                _taskService.UpdateData(newTasksOut3);
                            }
                            WriteInfo("5250", $"3线5250无任务,状态{stationCurrentStatus}可下发,下发任务:{newTasksOut3.Select(x => x.TaskNum)}");
                        }
                        //else
                        //{
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/°å²Ä²Ö/StackerCraneJob_BC.cs
@@ -379,7 +379,10 @@
                }
            }
            if (task==null)
            {
                task = _taskService.QueryStackerCraneRelocationTask(commonStackerCrane.DeviceCode);
            }
            return task;
        }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/²âÊԼܲÖ/StackerCraneJob_CSJ.cs
@@ -296,7 +296,10 @@
                }
            }
            if (task == null)
            {
                task = _taskService.QueryStackerCraneRelocationTask(commonStackerCrane.DeviceCode);
            }
            return task;
        }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/×躸²Ö/StackerCraneJob_ZH.cs
@@ -307,7 +307,10 @@
                }
            }
            if (task == null)
            {
                task = _taskService.QueryStackerCraneRelocationTask(commonStackerCrane.DeviceCode);
            }
            return task;
        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/config/buttons.js
@@ -210,6 +210,15 @@
    onClick: function () {
    }
},
{
    name: "手动移库",
    icon: '',
    class: '',
    value: 'Relocation',
    type: 'success',
    onClick: function () {
    }
},
]
export default buttons
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/taskinfo/extend/relocationTask.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,195 @@
<template>
    <div>
      <vol-box
        v-model="showDetialBox"
        :lazy="true"
        width="600px"
        :padding="15"
        title="打印"
      >
        <div>
          <el-form>
            <el-form-item required label="请选择仓库:">
              <el-select
                v-model="warehouseId"
                filterable
                placeholder="请选择"
                @change="getPalletType"
              >
                <el-option
                  v-for="item in warehouses"
                  :key="item.key"
                  :label="item.value"
                  :value="item.key"
                >
                  <span style="float: left">{{ item.value }}</span>
                  <span style="float: right; color: #8492a6; font-size: 13px">{{
                    item.key
                  }}</span>
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item required label="请输入起点:"
              ><el-input
                v-model="start"
                style="width: 180px"
                label="请输入起点"
              ></el-input>
            </el-form-item>
            <el-form-item required label="请输入终点:"
              ><el-input
                v-model="end"
                style="width: 180px"
                label="请输入终点"
              ></el-input>
            </el-form-item>
            <el-form-item
              required
              label="请选择巷道:"
              v-show="warehouseId != ''"
            >
              <el-radio-group v-model="palletType">
                <el-radio
                  v-for="item in palletTypes"
                  :key="item.key"
                  :label="item"
                  >{{ item.value }}</el-radio
                >
              </el-radio-group>
            </el-form-item>
          </el-form>
        </div>
        <template #footer>
          <el-button type="primary" size="small" @click="submit">确认</el-button>
          <el-button type="danger" size="small" @click="close">关闭</el-button>
        </template>
      </vol-box>
    </div>
  </template>
      <script>
  import VolBox from "@/components/basic/VolBox.vue";
  export default {
    components: { VolBox },
    data() {
      return {
        showDetialBox: false,
        warehouses: [],
        warehouseId: "",
        palletType: "",
        palletTypes: [],
        start:"",
        end:"",
      };
    },
    methods: {
      open() {
        if (this.warehouses.length == 0) {
          this.getWarehouseInfos();
        }
        if (this.warehouses.length == 1) {
              this.warehouseId = this.warehouses[0].key;
              this.getPalletType();
            }
        this.showDetialBox = true;
      },
      getWarehouseInfos() {
        this.http
          .post("api/Warehouse/GetWarehouseDicByUser", null, "数据处理中")
          .then((x) => {
            if (!x.status) return this.$message.error(x.message);
            this.warehouses = x.data;
            if (this.warehouses.length == 1) {
              this.warehouseId = this.warehouses[0].key;
            }
          });
      },
      getPalletType() {
        this.http
          .post("api/LocationInfo/GetLocationRoadway", null, "数据处理中")
          .then((x) => {
            if (!x.status) return this.$message.error(x.message);
            console.log(x.data)
            //this.palletTypes筛选x.data中warehouseId等于this.warehouseId的项
            console.log(this.warehouseId)
            this.palletTypes = x.data.filter(item => item.key == this.warehouseId);
          });
      },
      close() {
        this.showDetialBox = false;
        if (this.warehouses.length > 1) {
          this.warehouseId = "";
        }
        this.palletType = "";
      },
      submit() {
        if (this.warehouseId == "") return this.$message.error("请选择仓库");
        if (this.palletType == "") return this.$message.error("请选择巷道");
        if (this.start == "") return this.$message.error("请输入起点");
        if (this.end == "") return this.$message.error("请输入终点");
        var request = {
                "warehouseId": this.warehouseId,
                "locationStart": this.start,
                "locationEnd": this.end,
                "locationRoadway": this.palletType.key
            }
        this.http
          .post(
            `api/Task/ManualRelocation`,
            request,
            "数据处理中"
          )
          .then((x) => {
            if (!x.status) return this.$message.error(x.message);
            this.$message.success("操作成功");
            this.$parent.refresh();
            this.close();
          });
      },
    },
    created() {},
  };
  </script>
      <style scoped>
  .el-col {
    border-radius: 4px;
  }
  .grid-content {
    border-radius: 4px;
    min-height: 36px;
  }
  .content-text {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .right-text {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  </style>
      <style>
  .el-table .warning-row {
    background: #e6a23c;
  }
  .el-table .success-row {
    background: #f0f9eb;
  }
  .el-table .error-row {
    background: #f56c6c;
  }
  canvas {
    display: block;
    margin: auto;
  }
  </style>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js
@@ -1,10 +1,10 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import gridHeader from './extend/relocationTask.vue'
let extension = {
    components: {
      //查询界面扩展组件
      gridHeader: '',
      gridHeader: gridHeader,
      gridBody: '',
      gridFooter: '',
      //新建、编辑弹出框扩展组件
@@ -71,6 +71,12 @@
              });
        }
      }
      let relocationBtn = this.buttons.find(x => x.value == 'Relocation');
      if (relocationBtn) {
        relocationBtn.onClick = function () {
          this.$refs.gridHeader.open();
        }
      }
      },
      onInited() {
        //框架初始化配置后
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue
@@ -56,6 +56,8 @@
      [
        { title: "有效期查询",field: "effectiveDate",type: "date"},
        {title: "物料有效期",field: "expirationlabel",type: "selectList",dataKey:"expirationlabelEnum",data:[]},
        { title: "库龄(小于)", field: "inventoryage",type: "string"},
        { title: "库龄(大于)", field: "inventoryage1",type: "string"},
      ],
    ]);
    const columns = ref([
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs
@@ -75,12 +75,12 @@
                    if (beRelocation.Row <= maxDepth)
                    {
                        //过滤当前移库的同列同层
                        locationInfos = locationInfos.Where(x => x.Row <= maxDepth && x.Column!= beRelocation.Column && x.Layer!=beRelocation.Layer).ToList();
                        locationInfos = locationInfos.Where(x => x.Row <= maxDepth).ToList();
                    }
                    else if (beRelocation.Row > maxDepth)
                    {
                        //过滤当前移库的同列同层
                        locationInfos = locationInfos.Where(x => x.Row > maxDepth && x.Column != beRelocation.Column && x.Layer != beRelocation.Layer).ToList();
                        locationInfos = locationInfos.Where(x => x.Row > maxDepth).ToList();
                    }
                }
@@ -315,16 +315,6 @@
                            List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                            littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                        }
                        //if (moreDepthFlag && littleDepthFlag)
                        //{
                        //    return emptyLocation;
                        //}
                        //List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
                        //moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null;//查询大于当前货位深度的集合里是否有状态不为有货的货位,如果是true,则表示深货位有未被使用的情况
                        //List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                        //littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                    }
                    break;
                case 1:
@@ -346,12 +336,6 @@
                            List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                            littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                        }
                        //List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
                        //moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null;//查询大于当前货位深度的集合里是否有状态不为有货的货位,如果是true,则表示深货位有未被使用的情况
                        //List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                        //littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                    }
                    break;
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs
@@ -57,18 +57,9 @@
                    {
                        throw new Exception($"未找到货位信息");
                    }
                    //最大深位值
                    int maxDepth = locationInfos.Max(x => x.Depth);
                    //int mathCurrentRow = beRelocation.Row - Convert.ToInt32(Math.Ceiling(beRelocation.Row / maxDepth / 2.0)) * maxDepth * 2;
                    //if (mathCurrentRow <= maxDepth)
                    //{
                    //    locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 <= maxDepth).ToList();
                    //}
                    //else
                    //{
                    //    locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 > maxDepth).ToList();
                    //}
                    //移库为同侧
                    if (beRelocation.Row <= maxDepth)
                    {
                        locationInfos = locationInfos.Where(x => x.Row <= maxDepth).ToList();
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs
@@ -59,12 +59,12 @@
                    if (beRelocation.Row <= maxDepth)
                    {
                        //过滤当前移库的同列同层
                        locationInfos = locationInfos.Where(x => x.Row <= maxDepth && x.Column != beRelocation.Column && x.Layer != beRelocation.Layer).ToList();
                        locationInfos = locationInfos.Where(x => x.Row <= maxDepth).ToList();
                    }
                    else if (beRelocation.Row > maxDepth)
                    {
                        //过滤当前移库的同列同层
                        locationInfos = locationInfos.Where(x => x.Row > maxDepth && x.Column != beRelocation.Column && x.Layer != beRelocation.Layer).ToList();
                        locationInfos = locationInfos.Where(x => x.Row > maxDepth).ToList();
                    }
                }
@@ -141,15 +141,15 @@
                moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.LocationType != 0) == null;//查询大于当前货位深度的集合里是否有状态不为有货的货位,如果是true,则表示深货位有未被使用的情况
                List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.LocationType != 0) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
            }
            else
            {
                List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
                moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.LocationType != emptyLocation.LocationType) == null;//查询大于当前货位深度的集合里是否有状态不为有货的货位,如果是true,则表示深货位有未被使用的情况
                moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) ) == null;//查询大于当前货位深度的集合里是否有状态不为有货的货位,如果是true,则表示深货位有未被使用的情况
                List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.LocationType != emptyLocation.LocationType) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) ) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
            }
            if (moreDepthFlag && littleDepthFlag)
            {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/RelocationDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_DTO.Basic
{
    /// <summary>
    /// æ‰‹åŠ¨ç§»åº“å®žä½“
    /// </summary>
    public class RelocationDTO
    {
        /// <summary>
        /// ç§»åº“仓库Id
        /// </summary>
        public int warehouseId { get; set; }
        /// <summary>
        /// ç§»åº“起点
        /// </summary>
        public string locationStart { get; set; }
        /// <summary>
        /// ç§»åº“终点
        /// </summary>
        public string locationEnd { get; set; }
        /// <summary>
        /// ç§»åº“巷道号
        /// </summary>
        public string locationRoadway { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -28,6 +28,7 @@
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_DTO;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.ERP;
using WIDESEA_DTO.MES;
using WIDESEA_DTO.Stock;
@@ -199,6 +200,12 @@
        /// <param name="locationCode"></param>
        /// <returns></returns>
        WebResponseContent IsRelocation(int taskNum, string locationCode);
        /// <summary>
        /// æ‰‹åŠ¨ç§»åº“
        /// </summary>
        /// <param name="relocationDTO"></param>
        /// <returns></returns>
        WebResponseContent ManualRelocation(RelocationDTO relocationDTO);
        /// <summary>
        /// 
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs
@@ -115,6 +115,22 @@
                                            }
                                        }
                                        break;
                                    case "inventoryage":
                                        int inventoryage = param.Value.ObjToInt();
                                        if (inventoryage > 0)
                                        {
                                            DateTime dateTime = DateTime.Now.AddDays(-inventoryage);
                                            sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate >= dateTime);
                                        }
                                        break;
                                    case "inventoryage1":
                                        int inventoryage1 = param.Value.ObjToInt();
                                        if (inventoryage1 > 0)
                                        {
                                            DateTime dateTime = DateTime.Now.AddDays(-inventoryage1);
                                            sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate <= dateTime);
                                        }
                                        break;
                                }
                            }
                        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -358,7 +358,7 @@
                });
                //更新任务状态
                task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
                FeedBackWCSTaskCompleted(taskNum);
                _unitOfWorkManage.BeginTran();
                BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.人工完成 : OperateTypeEnum.自动完成);
                _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
@@ -389,6 +389,7 @@
                        _inboundOrderService.FeedbackInboundOrder(inboundOrder.Id);
                    }
                }
                FeedBackWCSTaskCompleted(taskNum);
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
@@ -699,7 +700,7 @@
                }
                task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
                FeedBackWCSTaskCompleted(taskNum);
                _unitOfWorkManage.BeginTran();
                if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutQuality.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt() || task.TaskType == TaskTypeEnum.MesHandPickOutbound.ObjToInt() || task.TaskType == TaskTypeEnum.MesHandOutbound.ObjToInt())
@@ -785,6 +786,7 @@
                    MesMaterialLotaAceptModel model = GetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, stockInfo.Details.Where(x => x.MaterielCode == mesOutboundOrders.FirstOrDefault().MaterialCode).Sum(x => x.StockQuantity));
                    UploadMesMaterialLotaAcept(model);
                }
                FeedBackWCSTaskCompleted(taskNum);
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -1064,78 +1064,83 @@
            }
            return content;
        }
        private static object emptyBack_inbound = new object();
        /// <summary>
        /// ç©ºæ¡†å›žåº“
        /// </summary>
        public WebResponseContent EmptyBackTask(string barCode, string startPoint)
        {
            WebResponseContent content = new WebResponseContent();
            try
            lock (emptyBack_inbound)
            {
                string palletCode = @"^C\d{5}$";  // æ­£åˆ™è¡¨è¾¾å¼
                bool isValid = Regex.IsMatch(barCode, palletCode);
                if (!isValid)
                WebResponseContent content = new WebResponseContent();
                try
                {
                    return content.Error($"框码格式错误{barCode}");
                    string palletCode = @"^C\d{5}$";  // æ­£åˆ™è¡¨è¾¾å¼
                    bool isValid = Regex.IsMatch(barCode, palletCode);
                    if (!isValid)
                    {
                        return content.Error($"框码格式错误{barCode}");
                    }
                    if (!OutStartPonits.Contains(startPoint))
                    {
                        return content.Error($"起点错误{startPoint}");
                    }
                    //判断当前点位是否重复
                    Dt_Task taskOldPoint = BaseDal.QueryFirst(x => x.SourceAddress == startPoint && (x.TaskStatus == TaskStatusEnum.New.ObjToInt() || x.TaskStatus == TaskStatusEnum.Line_Execute.ObjToInt() || x.TaskStatus == TaskStatusEnum.Line_Executing.ObjToInt()));
                    //if (taskOldPoint != null)
                    //{
                    //    return content.Error($"站点{startPoint}已存在任务");
                    //}
                    Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == barCode);
                    if (taskOld != null)
                    {
                        return content.Error($"胶框{barCode}任务已存在");
                    }
                    //if (_stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode) != null)
                    //{
                    //    return content.Error($"胶框{barCode}库存信息已存在");
                    //}
                    //todo:临时解绑
                    Dt_ProStockInfo proStockInfo = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode && x.StockStatus == StockStatusEmun.出库完成.ObjToInt());
                    if (_stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode) != null)
                    {
                        proStockInfo.PalletCode = proStockInfo.PalletCode + ":" + DateTime.Now.ToString("MM/dd");
                    }
                    //获取成品平库
                    Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA101.ToString());
                    Dt_Task newTask = new Dt_Task()
                    {
                        CurrentAddress = startPoint,
                        Grade = 0,
                        NextAddress = "",
                        PalletCode = barCode,
                        Roadway = "CL01_CP",
                        SourceAddress = startPoint,
                        TargetAddress = "",
                        TaskType = TaskTypeEnum.EmptyProductBack.ObjToInt(),
                        TaskStatus = TaskStatusEnum.New.ObjToInt(),
                        WarehouseId = warehouse.WarehouseId,
                        PalletType = 1
                    };
                    _unitOfWorkManage.BeginTran();
                    int taskId = BaseDal.AddData(newTask);
                    if (proStockInfo != null)
                    {
                        _stockRepository.ProStockInfoRepository.UpdateData(proStockInfo);
                    }
                    newTask.TaskId = taskId;
                    _unitOfWorkManage.CommitTran();
                    //推送任务
                    PushTasksToWCS(new List<Dt_Task> { newTask });
                    content.OK("发送成功");
                }
                if (!OutStartPonits.Contains(startPoint))
                catch (Exception ex)
                {
                    return content.Error($"起点错误{startPoint}");
                    content.Error(ex.Message);
                }
                //判断当前点位是否重复
                Dt_Task taskOldPoint = BaseDal.QueryFirst(x => x.SourceAddress == startPoint && (x.TaskStatus == TaskStatusEnum.New.ObjToInt() || x.TaskStatus == TaskStatusEnum.Line_Execute.ObjToInt() || x.TaskStatus == TaskStatusEnum.Line_Executing.ObjToInt()));
                //if (taskOldPoint != null)
                //{
                //    return content.Error($"站点{startPoint}已存在任务");
                //}
                Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == barCode);
                if (taskOld != null)
                {
                    return content.Error($"胶框{barCode}任务已存在");
                }
                //if (_stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode) != null)
                //{
                //    return content.Error($"胶框{barCode}库存信息已存在");
                //}
                //todo:临时解绑
                Dt_ProStockInfo proStockInfo = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode);
                if (_stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode) != null)
                {
                    proStockInfo.PalletCode = proStockInfo.PalletCode + ":" + DateTime.Now.ToString("MM/dd");
                }
                //获取成品平库
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA101.ToString());
                Dt_Task newTask = new Dt_Task()
                {
                    CurrentAddress = startPoint,
                    Grade = 0,
                    NextAddress = "",
                    PalletCode = barCode,
                    Roadway = "CL01_CP",
                    SourceAddress = startPoint,
                    TargetAddress = "",
                    TaskType = TaskTypeEnum.EmptyProductBack.ObjToInt(),
                    TaskStatus = TaskStatusEnum.New.ObjToInt(),
                    WarehouseId = warehouse.WarehouseId,
                    PalletType = 1
                };
                _unitOfWorkManage.BeginTran();
                int taskId = BaseDal.AddData(newTask);
                if (proStockInfo!=null)
                {
                    _stockRepository.ProStockInfoRepository.UpdateData(proStockInfo);
                }
                newTask.TaskId = taskId;
                _unitOfWorkManage.CommitTran();
                //推送任务
                PushTasksToWCS(new List<Dt_Task> { newTask });
                content.OK("发送成功");
                return content;
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs
@@ -10,6 +10,7 @@
using WIDESEA_Common.TaskEnum;
using WIDESEA_Core;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.Task;
using WIDESEA_Model.Models;
@@ -130,6 +131,84 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        /// <summary>
        /// æ‰‹åŠ¨ç§»åº“
        /// </summary>
        /// <returns></returns>
        public WebResponseContent ManualRelocation(RelocationDTO relocationDTO)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == relocationDTO.warehouseId);
                if (warehouse == null)
                {
                    return content.Error($"未找到对应的{relocationDTO.warehouseId}仓库信息");
                }
                Dt_LocationInfo locationInfoStart = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == relocationDTO.locationStart && x.WarehouseId== warehouse.WarehouseId && x.RoadwayNo == relocationDTO.locationRoadway && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt());
                Dt_LocationInfo locationInfoEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == relocationDTO.locationEnd && x.WarehouseId == warehouse.WarehouseId && x.RoadwayNo== relocationDTO.locationRoadway && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus==EnableStatusEnum.Normal.ObjToInt());
                if (locationInfoStart == null || locationInfoEnd==null)
                {
                    return content.Error($"未找到对应的货位信息或起点及终点货位条件不满足");
                }
                if (locationInfoStart.Column!= locationInfoEnd.Column || locationInfoStart.Layer != locationInfoEnd.Layer || locationInfoStart.Depth>= locationInfoEnd.Depth)
                {
                    return content.Error($"起点和终点移库货位需要满足同列同层终点货位深位需要大于起点货位");
                }
                Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == locationInfoStart.LocationCode);
                if (stockInfo == null)
                {
                    return content.Error($"未找到对应货位的库存信息");
                }
                Dt_Task taskTemp = Repository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
                if (taskTemp != null)
                {
                    return content.Error($"托盘{stockInfo.PalletCode}任务已存在");
                }
                Dt_Task newTask = new Dt_Task()
                {
                    Roadway = locationInfoStart.RoadwayNo,
                    WarehouseId = locationInfoStart.WarehouseId,
                    CurrentAddress = locationInfoStart.LocationCode,
                    Grade = 99,
                    NextAddress = locationInfoEnd.LocationCode,
                    OrderNo = "",
                    PalletCode = stockInfo.PalletCode,
                    PalletType = stockInfo.PalletType,
                    SourceAddress = locationInfoStart.LocationCode,
                    TargetAddress = locationInfoEnd.LocationCode,
                    TaskNum = Repository.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                    TaskStatus = TaskStatusEnum.SC_Execute.ObjToInt(),
                    TaskType = TaskTypeEnum.Relocation.ObjToInt()
                };
                if (stockInfo.StockLength > 0)
                {
                    newTask.TaskLength = stockInfo.StockLength;
                }
                _unitOfWorkManage.BeginTran();
                Repository.AddData(newTask);
                LocationStatusEnum lastStatusEnd = (LocationStatusEnum)locationInfoEnd.LocationStatus;
                _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, newTask.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfoEnd, lastStatusEnd, LocationStatusEnum.Lock, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum);
                LocationStatusEnum lastStatusStart = (LocationStatusEnum)locationInfoStart.LocationStatus;
                _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, newTask.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfoStart, lastStatusStart, LocationStatusEnum.Lock, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum);
                stockInfo.StockStatus = StockStatusEmun.移库锁定.ObjToInt();
                _stockRepository.StockInfoRepository.UpdateData(stockInfo);
                _unitOfWorkManage.CommitTran();
                //推送任务
                PushTasksToWCS(new List<Dt_Task> { newTask });
                return content.OK(data: _mapper.Map<WMSTaskDTO>(newTask));
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                return content.Error(ex.Message);
            }
        }
        public WebResponseContent RelocationTaskCompleted(Dt_Task task)
        {
@@ -153,7 +232,7 @@
                    return WebResponseContent.Instance.Error($"未找到对应的终点货位信息");
                }
                task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
                FeedBackWCSTaskCompleted(task.TaskNum);
                _unitOfWorkManage.BeginTran();
                stockInfo.LocationCode = locationInfoEnd.LocationCode;
                stockInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
@@ -162,6 +241,7 @@
                _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
                BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.人工完成 : WIDESEA_Core.Enums.OperateTypeEnum.自动完成);
                _unitOfWorkManage.CommitTran();
                FeedBackWCSTaskCompleted(task.TaskNum);
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs
@@ -9,6 +9,7 @@
using WIDESEA_Core.BaseController;
using WIDESEA_Core.Enums;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.System;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -96,5 +97,18 @@
                return WebResponseContent.Instance.Error(e.Message);
            }
        }
        [HttpPost, Route("GetLocationRoadway"), AllowAnonymous]
        public WebResponseContent GetLocationRoadway()
        {
            try
            {
                List<DictionaryDTO> dictionaryDTOs = Service.Repository.QueryData().GroupBy(x => new { x.RoadwayNo, x.WarehouseId }).Select(x => new DictionaryDTO { Key = x.Key.WarehouseId, Value = x.Key.RoadwayNo }).ToList() ;
                return WebResponseContent.Instance.OK(data: dictionaryDTOs);
            }
            catch (Exception e)
            {
                return WebResponseContent.Instance.Error(e.Message);
            }
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -4,6 +4,7 @@
using WIDESEA_Common.CommonEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.Stock;
using WIDESEA_DTO.Task;
using WIDESEA_ITaskInfoService;
@@ -270,6 +271,16 @@
        }
        /// <summary>
        /// æ‰‹åŠ¨ç§»åº“
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ManualRelocation"), AllowAnonymous]
        public WebResponseContent ManualRelocation([FromBody] RelocationDTO relocationDTO)
        {
            return Service.ManualRelocation(relocationDTO);
        }
        /// <summary>
        /// ä»»åŠ¡å®Œæˆ
        /// </summary>
        /// <param name="taskNum">任务号</param>