Huangxiaoqiang-03
2024-10-25 db3a7d2fd7276fc952a24965060accaf3a76861f
添加出库移库
已删除8个文件
已修改28个文件
已添加26个文件
1587 ■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1abe9649-fb25-4398-9e24-b4ac1e6dab06.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/29b80993-5f2f-4105-84fe-f842cfdb3cd5.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/882415c3-1a90-4a52-810f-4d72d250cc16.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/WIDESEAWCS_BasicInfoService.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/config/buttons.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/cachePoint.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/materielInfo.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0411b122-4aac-4e05-87bf-b24318b57075.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/44ea72ad-ffb7-4b5b-85e0-241240f07f30.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/86da0ee4-06d1-42f2-a5bf-e1a405be4a6d.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/96826077-2dcc-4819-9493-76e6f8cc4f44.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ddd95cc1-aa8d-43ca-a1cd-af308e641ed7.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IInboundOrderDetail_HtyRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IInboundOrder_HtyRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderDetail_HtyService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrder_HtyService.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundOrderDetail_HtyRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundOrder_HtyRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderDetail_HtyService.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrder_HtyService.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfoDetail_HtyRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfo_HtyRepository.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetail_HtyService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfo_HtyService.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundOrderDetail_HtyRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundOrder_HtyRepository.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderDetail_HtyService.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrder_HtyService.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail_Hty.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrder_Hty.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail_Hty.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder_Hty.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutboundOrderDetail_HtyRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutboundOrder_HtyRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Base/OutboundOrderDetail_HtyService.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Base/OutboundOrder_HtyService.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoDetail_HtyRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfo_HtyRepository.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoDetail_HtyService.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfo_HtyService.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_AGV.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs 295 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1abe9649-fb25-4398-9e24-b4ac1e6dab06.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/29b80993-5f2f-4105-84fe-f842cfdb3cd5.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/882415c3-1a90-4a52-810f-4d72d250cc16.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/WIDESEAWCS_BasicInfoService.csproj
@@ -7,7 +7,7 @@
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="WIDESEAWCS_QuartzJob" Version="2.0.2" />
    <PackageReference Include="WIDESEAWCS_QuartzJob" Version="2.0.3" />
  </ItemGroup>
  <ItemGroup>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj
@@ -7,7 +7,7 @@
    </PropertyGroup>
    <ItemGroup>
      <PackageReference Include="WIDESEAWCS_QuartzJob" Version="2.0.2" />
      <PackageReference Include="WIDESEAWCS_QuartzJob" Version="2.0.3" />
    </ItemGroup>
    <ItemGroup>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/config/buttons.js
@@ -93,6 +93,22 @@
    }
},
{
    name: "手 åЍ å®Œ æˆ",
    icon: '',
    class: '',
    value: 'TaskHandCompleted',
    onClick: function () {
    }
},
{
    name: "取 æ¶ˆ ä»» åŠ¡",
    icon: '',
    class: '',
    value: 'TaskHandCancel',
    onClick: function () {
    }
},
{
    name: "任务恢复",
    icon: '',
    class: '',
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js
@@ -17,16 +17,35 @@
  methods: {
    //下面这些方法可以保留也可以删除
    onInit() {
      let enableBtn = this.buttons.find(x => x.value == 'Enable');
      if (enableBtn) {
        enableBtn.onClick = function () {
          this.$message.success('自定义按钮点击事件');
      let EnableBtn = this.buttons.find(x => x.value == 'Enable');
      if (EnableBtn) {
        EnableBtn.onClick = function () {
          if (this.selection.length === 0) {
            return this.$message.error("请选择至少一条数据");
          }
          var keys = this.selection.map((item) => item.id); // èŽ·å–é€‰ä¸­è¡Œçš„id
          this.http
            .post("api/LocationInfo/LocationEnableStatus", keys, "数据处理中")
            .then((x) => {
              if (!x.status) return this.$message.error(x.message);
              this.$message.success("操作成功");
            });
        }
      }
      let disableBtn = this.buttons.find(x => x.value == 'Disable');
      if (disableBtn) {
        disableBtn.onClick = function () {
          this.$message.success('自定义按钮点击事件');
      let DisableBtn = this.buttons.find(x => x.value == 'Disable');
      if (DisableBtn) {
        DisableBtn.onClick = function () {
          if (this.selection.length === 0) {
            return this.$message.error("请选择至少一条数据");
          }
          var keys = this.selection.map((item) => item.id); // èŽ·å–é€‰ä¸­è¡Œçš„id
          this.http
            .post("api/LocationInfo/LocationDisableStatus", keys, "数据处理中")
            .then((x) => {
              if (!x.status) return this.$message.error(x.message);
              this.$message.success("操作成功");
            });
        }
      }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js
@@ -17,6 +17,31 @@
    methods: {
       //下面这些方法可以保留也可以删除
      onInit() {  
        let TaskHandCancelBtn = this.buttons.find(x => x.value == 'TaskHandCancel');
      if (TaskHandCancelBtn) {
        TaskHandCancelBtn.onClick = function () {
          this.$message.success('自定义按钮点击事件');
        }
      }
      let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted');
      if (TaskHandCompletedBtn) {
        TaskHandCompletedBtn.onClick = function () {
          let rows = this.$refs.table.getSelected();
          if (rows.length == 0) return this.$error("请选择数据!");
          var param = rows[0].taskNum;
          console.log(param);
          this.http
            .post("api/Task/TaskCompleted?taskNum="+param, "数据处理中...")
            .then((x) => {
              if (x.status) {
                this.$Message.success('任务手动完成成功.');
                this.refresh();
              } else {
                return this.$error(x.message);
              }
            });
        }
      }
      },
      onInited() {
        //框架初始化配置后
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/cachePoint.vue
@@ -60,7 +60,7 @@
      depth: "",
    });
    const searchFormOptions = ref([
    [
      [
        {title: "区域主键",field: "areaId",type: "string",},
        {title: "缓存点编号",field: "pointCode",type: "string",},
        {title: "缓存点状态",field: "pointStatus",type: "select",dataKey: "locationStatusEnum",data: [],},
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/materielInfo.vue
@@ -62,16 +62,7 @@
        },
      ],
      [
        {
          title: "允许混批",
          field: "isMixBatch",
          type: "string",
        },
        {
          title: "允许混料",
          field: "isMixMateriel",
          type: "string",
        },
        {
          title: "物料描述",
          field: "materielDes",
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue
@@ -164,11 +164,19 @@
        align: "left",
      },
      {
        field: "depth",
        title: "深度",
        type: "int",
        width: 80,
        align: "left",
      },
      {
        field: "dispatchertime",
        title: "任务下发时间",
        type: "datetime",
        width: 150,
        align: "left",
        hidden:true,
      },
      {
        field: "wMSId",
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0411b122-4aac-4e05-87bf-b24318b57075.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/44ea72ad-ffb7-4b5b-85e0-241240f07f30.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/86da0ee4-06d1-42f2-a5bf-e1a405be4a6d.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/96826077-2dcc-4819-9493-76e6f8cc4f44.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ddd95cc1-aa8d-43ca-a1cd-af308e641ed7.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs
@@ -123,35 +123,60 @@
        {
            return BaseDal.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo && x.Column == locationInfo.Column && x.Layer == locationInfo.Layer && x.Depth != locationInfo.Depth && x.Row != locationInfo.Row && (SqlFunc.Abs(x.Row - locationInfo.Row) == 1));
        }
        public void UpdateLocationLock(Dt_LocationInfo locationInfo, int? TaskNum)
        public void UpdateLocationLock(Dt_LocationInfo locations, int TaskNum,int changType,bool black)
        {
            try
            {
                if (locationInfo.Depth == 2)
                if (black)
                {
                    Dt_LocationInfo dt_LocationInfo = null;
                    int beforeStatus = 0;
                    if (locationInfo.Row == 1 || locationInfo.Row == 5)
                    (Dt_LocationInfo?, int?) result = isDepth(locations);
                    if (result.Item1 != null && (result.Item2 == LocationStatusEnum.Free.ObjToInt()|| result.Item2 == LocationStatusEnum.Lock.ObjToInt()))
                    {
                        dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo);
                        beforeStatus = dt_LocationInfo.LocationStatus;
                        if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt())
                        {
                            dt_LocationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                            BaseDal.UpdateData(dt_LocationInfo);
                        }
                        int beforeStatusEnd = result.Item1.LocationStatus;
                        result.Item1.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                        BaseDal.UpdateData(result.Item1);
                        _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result.Item1, beforeStatusEnd, changType, "", TaskNum);
                    }
                    else if (locationInfo.Row == 4 || locationInfo.Row == 8)
                }
                else
                {
                    (Dt_LocationInfo?, int?) result = isDepth(locations);
                    if (result.Item1 != null && result.Item2 == LocationStatusEnum.Free.ObjToInt())
                    {
                        dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo);
                        beforeStatus = dt_LocationInfo.LocationStatus;
                        if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt())
                        {
                            dt_LocationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                            BaseDal.UpdateData(dt_LocationInfo);
                        }
                        int beforeStatusEnd = result.Item1.LocationStatus;
                        result.Item1.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                        BaseDal.UpdateData(result.Item1);
                        _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result.Item1, beforeStatusEnd, changType, "", TaskNum);
                    }
                    _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Lock.ObjToInt(), "", TaskNum);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public void UpdateLocationFree(Dt_LocationInfo locations, int TaskNum, int changType,bool black)
        {
            try
            {
                (Dt_LocationInfo?, int?) result = isDepth(locations);
                if (result.Item1 != null)
                {
                    int beforeStatusEnd = result.Item1.LocationStatus;
                    result.Item1.LocationStatus = LocationStatusEnum.Free.ObjToInt();
                    BaseDal.UpdateData(result.Item1);
                    _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result.Item1, beforeStatusEnd, changType, "", TaskNum);
                }
            }
            catch (Exception ex)
@@ -160,93 +185,94 @@
            }
        }
        public void UpdateLocationFree(Dt_LocationInfo locationInfo, int? TaskNum)
        {
            try
            {
                if (locationInfo.Depth == 2)
                {
                    Dt_LocationInfo dt_LocationInfo = null;
                    int beforeStatus = 0;
                    if (locationInfo.Row == 1 || locationInfo.Row == 5)
                    {
                        dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo);
                        beforeStatus = dt_LocationInfo.LocationStatus;
                        if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt())
                        {
                            dt_LocationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
                            BaseDal.UpdateData(dt_LocationInfo);
                        }
                    }
                    else if (locationInfo.Row == 4 || locationInfo.Row == 8)
                    {
                        dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo);
                        beforeStatus = dt_LocationInfo.LocationStatus;
                        if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt())
                        {
                            dt_LocationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
                            BaseDal.UpdateData(dt_LocationInfo);
                        }
                    }
                    _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(dt_LocationInfo, beforeStatus, StockChangeType.Lock.ObjToInt(), "", TaskNum);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public Dt_LocationInfo isDepth(Dt_LocationInfo locationInfo)
        public (Dt_LocationInfo?,int?) isDepth(Dt_LocationInfo locationInfo)
        {
            if (locationInfo.Depth == 2)
            {
                if (locationInfo.Row == 1 || locationInfo.Row == 5)
                {
                    Dt_LocationInfo dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo);
                    if (dt_LocationInfo != null&& dt_LocationInfo.LocationStatus==LocationStatusEnum.InStock.ObjToInt())
                    {
                        return dt_LocationInfo;
                        return (dt_LocationInfo, LocationStatusEnum.InStock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Free.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Free.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Lock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.PalletLock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Pallet.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Pallet.ObjToInt());
                    }
                }
                else if (locationInfo.Row == 4 || locationInfo.Row == 8)
                {
                    Dt_LocationInfo dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo);
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt())
                    {
                        return dt_LocationInfo;
                        return (dt_LocationInfo, LocationStatusEnum.InStock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Free.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Free.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Lock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.PalletLock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Pallet.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Pallet.ObjToInt());
                    }
                }
            }
            return null;
            return (null, LocationStatusEnum.Free.ObjToInt());
        }
        public void RelocationLock(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos,int TaskNum)
        public void RelocationLock(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos, int TaskNum)
        {
            int beforeStatus = locationInfo.LocationStatus;
            int beforeStatu = locationInfos.LocationStatus;
            int beforeStartStatus = locationInfo.LocationStatus;
            int beforeEndStatus = locationInfos.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
            locationInfos.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
            if (locationInfos.LocationStatus == LocationStatusEnum.Pallet.ObjToInt())
            {
                locationInfos.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt();
            }
            else
            {
                locationInfos.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
            }
            BaseDal.UpdateData(locationInfo);
            BaseDal.UpdateData(locationInfos);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, beforeStatu, StockChangeType.Relocation.ObjToInt(), "", TaskNum);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStartStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, beforeEndStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum);
        }
        public void RelocationFree(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos, int TaskNum)
        public void RelocationFree(Dt_LocationInfo locations, int TaskNum)
        {
            int beforeStatus = locationInfo.LocationStatus;
            int beforeStatu = locationInfos.LocationStatus;
            int beforeEndStatus = locations.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
            locationInfos.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
            locations.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
            BaseDal.UpdateData(locationInfo);
            BaseDal.UpdateData(locationInfos);
            BaseDal.UpdateData(locations);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, beforeStatu, StockChangeType.Relocation.ObjToInt(), "", TaskNum);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locations, beforeEndStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs
@@ -21,11 +21,13 @@
        Dt_LocationInfo? AssignLocation(string stationCode, int inboundType);
        Dt_LocationInfo? AssignLocation(string RoadwayNo);
        void UpdateLocationLock(Dt_LocationInfo locationInfo,int? taskNum);
        void UpdateLocationFree(Dt_LocationInfo locationInfo, int? taskNum);
        Dt_LocationInfo isDepth(Dt_LocationInfo locationInfo);
        void UpdateLocationLock(Dt_LocationInfo locationInfo,int task, int changType,bool black);
        void UpdateLocationFree(Dt_LocationInfo locationInfo, int task, int changType, bool black);
        //(Dt_LocationInfo?,int) isDepth(Dt_LocationInfo locationInfo);
        void RelocationLock(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos,int TaskNum);
        void RelocationFree(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos, int TaskNum);
        void RelocationFree(Dt_LocationInfo locations, int TaskNum);
        WebResponseContent LocationEnableStatus(int[] keys);
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IInboundOrderDetail_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IInboundRepository
{
    public interface IInboundOrderDetail_HtyRepository : IRepository<Dt_InboundOrderDetail_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IInboundOrder_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IInboundRepository
{
    public interface IInboundOrder_HtyRepository : IRepository<Dt_InboundOrder_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderDetail_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IInboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IInboundService
{
    public interface IInboundOrderDetail_HtyService : IService<Dt_InboundOrderDetail_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrder_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Inbound;
using WIDESEA_IInboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IInboundService
{
    public interface IInboundOrder_HtyService : IService<Dt_InboundOrder_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundOrderDetail_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundRepository
{
    public interface IOutboundOrderDetail_HtyRepository : IRepository<Dt_OutboundOrderDetail_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundOrder_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundRepository
{
    public interface IOutboundOrder_HtyRepository : IRepository<Dt_OutboundOrder_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderDetail_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_DTO.Stock;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundService
{
    public interface IOutboundOrderDetail_HtyService : IService<Dt_OutboundOrderDetail_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrder_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Outbound;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundService
{
    public interface IOutboundOrder_HtyService : IService<Dt_OutboundOrder_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfoDetail_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockRepository
{
    public interface IStockInfoDetail_HtyRepository : IRepository<Dt_StockInfoDetail_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfo_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_DTO.Stock;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockRepository
{
    public interface IStockInfo_HtyRepository : IRepository<Dt_StockInfo_Hty>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetail_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockService
{
    public interface IStockInfoDetail_HtyService : IService<Dt_StockInfoDetail_Hty>
    {
        IStockInfoDetail_HtyRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfo_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockService
{
    public interface IStockInfo_HtyService : IService<Dt_StockInfo_Hty>
    {
        IStockInfo_HtyRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs
@@ -12,5 +12,8 @@
        IStockInfoDetailService StockInfoDetailService { get; }
        IStockInfoService StockInfoService { get; }
        IStockInfoDetail_HtyService StockInfoDetail_HtyService { get; }
        IStockInfo_HtyService StockInfo_HtyService { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundOrderDetail_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IInboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_InboundRepository
{
    public class InboundOrderDetail_HtyRepository : RepositoryBase<Dt_InboundOrderDetail_Hty>, IInboundOrderDetail_HtyRepository
    {
        public InboundOrderDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundOrder_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IInboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_InboundRepository
{
    public class InboundOrder_HtyRepository : RepositoryBase<Dt_InboundOrder_Hty>, IInboundOrder_HtyRepository
    {
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        public InboundOrder_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
            _unitOfWorkManage = unitOfWorkManage;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderDetail_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_IInboundRepository;
using WIDESEA_IInboundService;
using WIDESEA_Model.Models;
namespace WIDESEA_InboundService
{
    public partial class InboundOrderDetail_HtyService : ServiceBase<Dt_InboundOrderDetail_Hty, IInboundOrderDetail_HtyRepository>, IInboundOrderDetail_HtyService
    {
        public IInboundOrderDetail_HtyRepository Repository => BaseDal;
        public InboundOrderDetail_HtyService(IInboundOrderDetail_HtyRepository BaseDal) : base(BaseDal)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrder_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
using AutoMapper;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_Core.Utilities;
using WIDESEA_DTO;
using WIDESEA_DTO.Inbound;
using WIDESEA_IBasicService;
using WIDESEA_IInboundRepository;
using WIDESEA_IInboundService;
using WIDESEA_IStockService;
using WIDESEA_ITaskInfoRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_InboundService
{
    public partial class InboundOrder_HtyService : ServiceBase<Dt_InboundOrder_Hty, IInboundOrder_HtyRepository>, IInboundOrder_HtyService
    {
        public InboundOrder_HtyService(IInboundOrder_HtyRepository BaseDal) : base(BaseDal)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail_Hty.cs
@@ -1,4 +1,5 @@
using SqlSugar;
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -40,5 +41,41 @@
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark {  get; set; }
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "源主键")]
        public int SourceId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "备注")]
        public string OperateType { get; set; }
        /// <summary>
        /// åˆ›å»ºäºº
        /// </summary>
        [ImporterHeader(Name = "创建人")]
        [ExporterHeader(DisplayName = "创建人")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "创建人")]
        public string Creater { get; set; }
        /// <summary>
        /// åˆ›å»ºæ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "创建时间")]
        [ExporterHeader(DisplayName = "创建时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
        public DateTime CreateDate { get; set; } = DateTime.Now;
        /// <summary>
        /// æ›´æ–°è€…
        /// </summary>
        [ImporterHeader(Name = "修改人")]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
        /// <summary>
        /// ä¿®æ”¹æ—¥æœŸ
        /// </summary>
        [ImporterHeader(Name = "修改日期")]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrder_Hty.cs
@@ -1,4 +1,5 @@
using SqlSugar;
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -10,7 +11,7 @@
namespace WIDESEA_Model.Models
{
    [SugarTable(nameof(Dt_InboundOrder_Hty), "入库单")]
    public class Dt_InboundOrder_Hty : BaseEntity
    public class Dt_InboundOrder_Hty
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
@@ -34,7 +35,42 @@
        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "备注")]
        public string Remark { get; set; }
        [Navigate(NavigateType.OneToMany, nameof(Dt_InboundOrderDetail_Hty.OrderId), nameof(Id))]
        public List<Dt_InboundOrderDetail_Hty> Details { get; set; }
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "源主键")]
        public int SourceId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "备注")]
        public string OperateType { get; set; }
        /// <summary>
        /// åˆ›å»ºäºº
        /// </summary>
        [ImporterHeader(Name = "创建人")]
        [ExporterHeader(DisplayName = "创建人")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "创建人")]
        public string Creater { get; set; }
        /// <summary>
        /// åˆ›å»ºæ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "创建时间")]
        [ExporterHeader(DisplayName = "创建时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
        public DateTime CreateDate { get; set; } = DateTime.Now;
        /// <summary>
        /// æ›´æ–°è€…
        /// </summary>
        [ImporterHeader(Name = "修改人")]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
        /// <summary>
        /// ä¿®æ”¹æ—¥æœŸ
        /// </summary>
        [ImporterHeader(Name = "修改日期")]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail_Hty.cs
@@ -1,4 +1,5 @@
using SqlSugar;
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -9,7 +10,7 @@
namespace WIDESEA_Model.Models
{
    [SugarTable(nameof(Dt_OutboundOrderDetail_Hty), "出库单明细")]
    public class Dt_OutboundOrderDetail_Hty : BaseEntity
    public class Dt_OutboundOrderDetail_Hty
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
@@ -40,5 +41,41 @@
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "源主键")]
        public int SourceId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "备注")]
        public string OperateType { get; set; }
        /// <summary>
        /// åˆ›å»ºäºº
        /// </summary>
        [ImporterHeader(Name = "创建人")]
        [ExporterHeader(DisplayName = "创建人")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "创建人")]
        public string Creater { get; set; }
        /// <summary>
        /// åˆ›å»ºæ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "创建时间")]
        [ExporterHeader(DisplayName = "创建时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
        public DateTime CreateDate { get; set; } = DateTime.Now;
        /// <summary>
        /// æ›´æ–°è€…
        /// </summary>
        [ImporterHeader(Name = "修改人")]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
        /// <summary>
        /// ä¿®æ”¹æ—¥æœŸ
        /// </summary>
        [ImporterHeader(Name = "修改日期")]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder_Hty.cs
@@ -1,4 +1,5 @@
using SqlSugar;
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -10,7 +11,7 @@
namespace WIDESEA_Model.Models
{
    [SugarTable(nameof(Dt_OutboundOrder_Hty), "出库单")]
    public class Dt_OutboundOrder_Hty : BaseEntity
    public class Dt_OutboundOrder_Hty
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
@@ -34,7 +35,42 @@
        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "备注")]
        public string Remark { get; set; }
        [Navigate(NavigateType.OneToMany, nameof(Dt_OutboundOrderDetail_Hty.OrderId), nameof(Id))]
        public List<Dt_OutboundOrderDetail_Hty> Details { get; set; }
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "源主键")]
        public int SourceId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "备注")]
        public string OperateType { get; set; }
        /// <summary>
        /// åˆ›å»ºäºº
        /// </summary>
        [ImporterHeader(Name = "创建人")]
        [ExporterHeader(DisplayName = "创建人")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "创建人")]
        public string Creater { get; set; }
        /// <summary>
        /// åˆ›å»ºæ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "创建时间")]
        [ExporterHeader(DisplayName = "创建时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
        public DateTime CreateDate { get; set; } = DateTime.Now;
        /// <summary>
        /// æ›´æ–°è€…
        /// </summary>
        [ImporterHeader(Name = "修改人")]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
        /// <summary>
        /// ä¿®æ”¹æ—¥æœŸ
        /// </summary>
        [ImporterHeader(Name = "修改日期")]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,89 @@
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    [SugarTable(nameof(Dt_StockInfoDetail_Hty), "库存信息明细")]
    public class Dt_StockInfoDetail_Hty
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "库存信息主键")]
        public int StockId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "物料编号")]
        public string MaterielCode { get; set; }
        [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "物料名称")]
        public string MaterielName { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "单据编号")]
        public string OrderNo { get; set; }
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "批次号")]
        public string BatchNo { get; set; }
        [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "序列号")]
        public string SerialNumber { get; set; }
        [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "库存数量")]
        public decimal StockQuantity { get; set; }
        [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "出库数量", DefaultValue = "0")]
        public decimal OutboundQuantity { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "库存明细状态")]
        public int Status { get; set; }
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
        [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))]
        public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; }
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "源主键")]
        public int SourceId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "备注")]
        public string OperateType { get; set; }
        /// <summary>
        /// åˆ›å»ºäºº
        /// </summary>
        [ImporterHeader(Name = "创建人")]
        [ExporterHeader(DisplayName = "创建人")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "创建人")]
        public string Creater { get; set; }
        /// <summary>
        /// åˆ›å»ºæ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "创建时间")]
        [ExporterHeader(DisplayName = "创建时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
        public DateTime CreateDate { get; set; } = DateTime.Now;
        /// <summary>
        /// æ›´æ–°è€…
        /// </summary>
        [ImporterHeader(Name = "修改人")]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
        /// <summary>
        /// ä¿®æ”¹æ—¥æœŸ
        /// </summary>
        [ImporterHeader(Name = "修改日期")]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,70 @@
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    [SugarTable(nameof(Dt_StockInfo_Hty), "库存信息")]
    public class Dt_StockInfo_Hty
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "托盘编号")]
        public string PalletCode { get; set; }
        [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "货位编号")]
        public string LocationCode { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "是否满盘", DefaultValue = "0")]
        public bool IsFull { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "库存状态")]
        public int StockStatus { get; set; }
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "源主键")]
        public int SourceId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "备注")]
        public string OperateType { get; set; }
        /// <summary>
        /// åˆ›å»ºäºº
        /// </summary>
        [ImporterHeader(Name = "创建人")]
        [ExporterHeader(DisplayName = "创建人")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "创建人")]
        public string Creater { get; set; }
        /// <summary>
        /// åˆ›å»ºæ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "创建时间")]
        [ExporterHeader(DisplayName = "创建时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
        public DateTime CreateDate { get; set; } = DateTime.Now;
        /// <summary>
        /// æ›´æ–°è€…
        /// </summary>
        [ImporterHeader(Name = "修改人")]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
        /// <summary>
        /// ä¿®æ”¹æ—¥æœŸ
        /// </summary>
        [ImporterHeader(Name = "修改日期")]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs
@@ -27,7 +27,7 @@
        /// </summary>
        [ImporterHeader(Name = "任务号")]
        [ExporterHeader(DisplayName = "任务号")]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务号"), SequenceAttirbute(nameof(SequenceEnum.SeqTaskNum), 6000)]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务号"), SequenceAttirbute(nameof(SequenceEnum.SeqTaskNum), 999999999)]
        public int TaskNum { get; set; }
        /// <summary>
@@ -95,6 +95,14 @@
        public string NextAddress { get; set; }
        /// <summary>
        /// æ·±åº¦
        /// </summary>
        [ImporterHeader(Name = "深度")]
        [ExporterHeader(DisplayName = "深度")]
        [SugarColumn(IsNullable = true, ColumnDescription = "深度")]
        public int Depth { get; set; }
        /// <summary>
        /// å•据编号
        /// </summary>
        [ImporterHeader(Name = "单据编号")]
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs
@@ -121,6 +121,14 @@
        public DateTime? Dispatchertime { get; set; }
        /// <summary>
        /// æ·±åº¦
        /// </summary>
        [ImporterHeader(Name = "深度")]
        [ExporterHeader(DisplayName = "深度")]
        [SugarColumn(IsNullable = true, ColumnDescription = "深度")]
        public int Depth { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [ImporterHeader(Name = "备注")]
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutboundOrderDetail_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_OutboundRepository
{
    public class OutboundOrderDetail_HtyRepository : RepositoryBase<Dt_OutboundOrderDetail_Hty>, IOutboundOrderDetail_HtyRepository
    {
        public OutboundOrderDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutboundOrder_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_OutboundRepository
{
    public class OutboundOrder_HtyRepository : RepositoryBase<Dt_OutboundOrder_Hty>, IOutboundOrder_HtyRepository
    {
        public OutboundOrder_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Base/OutboundOrderDetail_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
using WIDESEA_IRecordService;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
using WIDESEA_StockRepository;
namespace WIDESEA_OutboundService
{
    public partial class OutboundOrderDetail_HtyService : ServiceBase<Dt_OutboundOrderDetail_Hty, IOutboundOrderDetail_HtyRepository>, IOutboundOrderDetail_HtyService
    {
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        private readonly IStockService _stockService;
        private readonly IBasicService _basicService;
        private readonly IRecordService _recordService;
        private readonly IOutboundRepository _outboundRepository;
        private readonly IOutStockLockInfoService _outStockLockInfoService;
        public IOutboundOrderDetail_HtyRepository Repository => BaseDal;
        public OutboundOrderDetail_HtyService(IOutboundOrderDetail_HtyRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockService stockService, IBasicService basicService,  IRecordService recordService, IOutboundRepository outboundRepository, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal)
        {
            _unitOfWorkManage = unitOfWorkManage;
            _stockService = stockService;
            _basicService = basicService;
            _recordService = recordService;
            _outboundRepository = outboundRepository;
            _outStockLockInfoService = outStockLockInfoService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Base/OutboundOrder_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
using AutoMapper;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_Core.Utilities;
using WIDESEA_DTO.Inbound;
using WIDESEA_DTO.Outbound;
using WIDESEA_IBasicService;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_OutboundService
{
    public partial class OutboundOrder_HtyService : ServiceBase<Dt_OutboundOrder_Hty, IOutboundOrder_HtyRepository>, IOutboundOrder_HtyService
    {
        private readonly IMapper _mapper;
        private readonly IMaterielInfoService _materielInfoService;
        private readonly IStockInfoService  _stockService;
        private readonly IStockInfoDetailService _stockDetailService;
        public IOutboundOrder_HtyRepository Repository => BaseDal;
        public OutboundOrder_HtyService(IOutboundOrder_HtyRepository BaseDal, IMapper mapper, IMaterielInfoService materielInfoService, IStockInfoDetailService stockDetailService, IStockInfoService stockInfoService) : base(BaseDal)
        {
            _mapper = mapper;
            _materielInfoService = materielInfoService;
            _stockDetailService = stockDetailService;
             _stockService = stockInfoService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoDetail_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_StockRepository
{
    public class StockInfoDetail_HtyRepository : RepositoryBase<Dt_StockInfoDetail_Hty>, IStockInfoDetail_HtyRepository
    {
        public StockInfoDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfo_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
using Org.BouncyCastle.Crypto;
using SqlSugar;
using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.Enums;
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_StockRepository
{
    public class StockInfo_HtyRepository : RepositoryBase<Dt_StockInfo_Hty>, IStockInfo_HtyRepository
    {
        public StockInfo_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfoDetail_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_StockService
{
    public partial class StockInfoDetail_HtyService : ServiceBase<Dt_StockInfoDetail_Hty, IStockInfoDetail_HtyRepository>, IStockInfoDetail_HtyService
    {
        public StockInfoDetail_HtyService(IStockInfoDetail_HtyRepository BaseDal) : base(BaseDal)
        {
        }
        public IStockInfoDetail_HtyRepository Repository => BaseDal;
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockInfo_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
using AutoMapper;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
using WIDESEA_IRecordRepository;
using WIDESEA_IRecordService;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_StockService
{
    public partial class StockInfo_HtyService : ServiceBase<Dt_StockInfo_Hty, IStockInfo_HtyRepository>, IStockInfo_HtyService
    {
        private readonly IMapper _mapper;
        private readonly IBasicRepository _basicRepository;
        private readonly IStockRepository _stockRepository;
        private readonly IRecordService _recordService;
        public IStockInfo_HtyRepository Repository => BaseDal;
        public StockInfo_HtyService(IStockInfo_HtyRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IStockRepository stockRepository, IRecordService recordService) : base(BaseDal)
        {
            _mapper = mapper;
            _basicRepository = basicRepository;
            _stockRepository = stockRepository;
            _recordService = recordService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs
@@ -52,6 +52,8 @@
            ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>();
            ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
            ISugarQueryable<Dt_StockInfoDetail> sugarQueryable2 = _dbBase.Queryable<Dt_StockInfoDetail>();
            List<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).WhereIF(!string.IsNullOrEmpty(where), where).Select((b, a) => new StockViewDTO
            {
@@ -77,6 +79,8 @@
                StockStatus = b.StockStatus,
                Details = b.Details,
            }).ToPageList(options.Page, options.Rows, ref totalCount);
            return new PageGridData<StockViewDTO>(totalCount, list);
        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs
@@ -114,6 +114,7 @@
                int index = 0;
                while (needQuantity > 0)
                {
                    Dt_StockInfo stockInfo = stockInfos[index];
                    decimal useableStockQuantity = stockInfo.Details.Where(x => x.MaterielCode == materielCode).Sum(x => x.StockQuantity - x.OutboundQuantity);
                    if (useableStockQuantity < needQuantity)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
@@ -12,11 +12,16 @@
        public IStockInfoDetailService StockInfoDetailService { get; }
        public IStockInfoService StockInfoService { get; }
        public IStockInfoDetail_HtyService StockInfoDetail_HtyService { get; }
        public StockSerivce(IStockInfoDetailService stockInfoDetailService, IStockInfoService stockInfoService)
        public IStockInfo_HtyService StockInfo_HtyService { get; }
        public StockSerivce(IStockInfoDetailService stockInfoDetailService, IStockInfoService stockInfoService, IStockInfoDetail_HtyService stockInfoDetail_HtyService, IStockInfo_HtyService stockInfo_HtyService)
        {
            StockInfoDetailService = stockInfoDetailService;
            StockInfoService = stockInfoService;
            StockInfoDetail_HtyService = stockInfoDetail_HtyService;
            StockInfo_HtyService = stockInfo_HtyService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs
@@ -36,8 +36,7 @@
        public int GetTaskNum(string sequenceName)
        {
            //return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt();
            return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR GetTaskNum").ObjToInt();
            return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt();
        }
        public override int AddData(Dt_Task entity)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_AGV.cs
@@ -33,7 +33,8 @@
                SourceAddress = outTask.TargetAddress,
                TargetAddress = cachePoint.PointCode,
                SourceKey = outTask.TaskId,
                TaskNum = outTask.TaskNum,
                //TaskNum = outTask.TaskNum,
                TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(),
                TaskType = TaskTypeEnum.AGVCarry.ObjToInt(),
            };
@@ -170,8 +171,8 @@
                endCachePoint.PointStatus = LocationStatusEnum.InStock.ObjToInt();
                _basicService.CachePointService.Repository.UpdateData(endCachePoint);
            }
            BaseDal.DeleteData(task);
            BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            //BaseDal.DeleteData(task);
            return new { code = 200, message = "成功" };
        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -119,11 +119,12 @@
                    BaseDal.AddData(task);
                    int beforeStatus = locationInfo.LocationStatus;
                    locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt();
                    if (isUpdateStock)
                    {
                        locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                        _basicService.LocationInfoService.UpdateLocationLock(locationInfo,task.TaskNum);
                        _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false);
                        if (stockInfo != null && stockInfo.Details != null && stockInfo.Details.Count > 0)
                        {
@@ -137,8 +138,12 @@
                            return content = WebResponseContent.Instance.Error("未找到库存信息");
                        }
                    }
                    else
                    {
                        locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt();
                        _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false);
                    }
                    _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
                    //_basicService.LocationInfoService.Repository.UpdateData(dt_LocationInfo);
                    _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
                    return content = WebResponseContent.Instance.OK();
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
@@ -8,6 +8,9 @@
using WIDESEA_DTO.Stock;
using WIDESEA_Model.Models;
using WIDESEA_Core.Helper;
using Microsoft.AspNetCore.Http;
using System.Reflection.Metadata;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
namespace WIDESEA_TaskInfoService
{
@@ -43,6 +46,7 @@
                            TargetAddress = roadwayInfo.OutStationCode,
                            TaskStatus = OutTaskStatusEnum.OutNew.ObjToInt(),
                            TaskType = TaskTypeEnum.Outbound.ObjToInt(),
                            Depth = locationInfo.Depth,
                            TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum))
                        };
                        tasks.Add(task);
@@ -147,16 +151,23 @@
        {
            try
            {
                WebResponseContent content=new WebResponseContent();
                _unitOfWorkManage.BeginTran();
                //判断移库
                /*List<Dt_Task> RelocationTasks = */
                RelocationTask(tasks);
                //BaseDal.AddData(RelocationTasks);
                BaseDal.AddData(tasks);
                content=RelocationTasks(tasks.OrderBy(x=>x.Depth).ToList());
                if (content.Status)
                {
                    _unitOfWorkManage.CommitTran();
                }
                else
                {
                    _unitOfWorkManage.RollbackTran();
                    return content;
                }
                //BaseDal.AddData(tasks);
                if (stockInfos != null && outboundOrderDetails != null && outStockLockInfos != null && locationInfos != null)
                {
                    WebResponseContent content = _outboundService.OutboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks);
                    content = _outboundService.OutboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks);
                    if (content.Status)
                    {
@@ -187,74 +198,195 @@
            }
        }
        /// <summary>
        /// ç§»åº“任务
        /// </summary>
        /// <param name="task"></param>
        /// <returns></returns>
        public WebResponseContent RelocationTask(List<Dt_Task> task)
        public WebResponseContent RelocationTasks(List<Dt_Task> task)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                _unitOfWorkManage.BeginTran();
                for (int i = 0; i < task.Count; i++)
                {
                    Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task[i].SourceAddress && x.RoadwayNo == task[i].Roadway);
                    if (locationInfo != null)
                    Dt_LocationInfo location = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task[i].SourceAddress && x.RoadwayNo == task[i].Roadway);
                    if (location != null)
                    {
                        Dt_LocationInfo location = _basicService.LocationInfoService.isDepth(locationInfo);
                        if (location != null)
                        //(Dt_LocationInfo?, int?) result = _basicService.LocationInfoService.isDepth(location);
                        (Dt_LocationInfo?, int?) result = isDepth(location);
                        if (result.Item1 != null &&result.Item2 != LocationStatusEnum.Lock.ObjToInt() && result.Item2 != LocationStatusEnum.PalletLock.ObjToInt() && result.Item2 != LocationStatusEnum.Free.ObjToInt())
                        {
                            Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == location.LocationCode);
                            if (stockInfo != null && location.LocationStatus == LocationStatusEnum.InStock.ObjToInt())
                            int sum = 0;
                            for (int j = 0; j < task.Count; j++)
                            {
                                Dt_LocationInfo? locationInfos = _basicService.LocationInfoService.AssignLocation(location.RoadwayNo);
                                if(locationInfos != null)
                                if (result.Item1.LocationCode == task[j].SourceAddress)
                                {
                                    Dt_Task tasks = new()
                                    {
                                        CurrentAddress = location.LocationCode,
                                        Grade = 0,
                                        PalletCode = stockInfo.PalletCode,
                                        NextAddress = locationInfos.LocationCode,
                                        Roadway = location.RoadwayNo,
                                        SourceAddress = location.LocationCode,
                                        TargetAddress = locationInfos.LocationCode,
                                        TaskStatus = InTaskStatusEnum.RelocationNew.ObjToInt(),
                                        TaskType = TaskTypeEnum.Relocation.ObjToInt(),
                                        TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum))
                                    };
                                    BaseDal.AddData(tasks);
                                    stockInfo.StockStatus = StockStatusEmun.移库锁定.ObjToInt();
                                    _stockService.StockInfoService.UpdateData(stockInfo);
                                    _basicService.LocationInfoService.RelocationLock(location, locationInfos,tasks.TaskNum);
                                    sum++;
                                }
                                else
                                {
                                    return content = WebResponseContent.Instance.Error("未找到可分配货位");
                                }
                            }
                            if (sum == 0)
                            {
                                return content = RelocationTask(task[i]);
                            }
                            else
                            {
                                return content = WebResponseContent.Instance.Error("未找到库存信息");
                                BaseDal.AddData(task[i]);
                                _basicService.LocationInfoService.UpdateLocationLock(location, task[i].TaskNum, StockChangeType.Outbound.ObjToInt(), true);
                            }
                        }
                        else if (result.Item1 == null && result.Item2 == LocationStatusEnum.Free.ObjToInt())
                        {
                            BaseDal.AddData(task[i]);
                            location.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                            _basicService.LocationInfoService.UpdateData(location);
                            content = WebResponseContent.Instance.OK();
                        }
                        else if (result.Item1 != null && result.Item2 == LocationStatusEnum.Free.ObjToInt())
                        {
                            BaseDal.AddData(task[i]);
                            location.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                            _basicService.LocationInfoService.UpdateData(location);
                            _basicService.LocationInfoService.UpdateLocationLock(location, task[i].TaskNum, StockChangeType.Outbound.ObjToInt(), false);
                            content = WebResponseContent.Instance.OK();
                        }
                        else if (result.Item1 != null && (result.Item2 == LocationStatusEnum.Lock.ObjToInt() || result.Item2 == LocationStatusEnum.PalletLock.ObjToInt()))
                        {
                            Dt_Task TaskInfo = BaseDal.QueryFirst(x => x.SourceAddress == result.Item1.LocationCode);
                            if (TaskInfo == null)
                            {
                                return content = WebResponseContent.Instance.Error("货位被锁定不可出库");
                            }
                            else
                            {
                                BaseDal.AddData(task[i]);
                                location.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                                _basicService.LocationInfoService.UpdateData(location);
                                content = WebResponseContent.Instance.OK();
                            }
                        }
                    }
                    else
                    {
                        return content = WebResponseContent.Instance.Error("任务信息异常");
                        return content = WebResponseContent.Instance.OK("任务异常");
                    }
                }
                _unitOfWorkManage.CommitTran();
                return content;
            }
            catch(Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                return content = WebResponseContent.Instance.Error(ex.Message);
            }
         }
        /// <summary>
        /// ç§»åº“任务
        /// </summary>
        /// <param name="task"></param>
        /// <returns></returns>
        public WebResponseContent RelocationTask(Dt_Task task)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress && x.RoadwayNo == task.Roadway);
                if (locationInfo != null)
                {
                    int beforeStatus = locationInfo.LocationStatus;
                    //(Dt_LocationInfo?,int?) Result = _basicService.LocationInfoService.isDepth(locationInfo);
                    (Dt_LocationInfo?,int?) Result = isDepth(locationInfo);
                    if (Result.Item1 != null&& Result.Item2== LocationStatusEnum.InStock.ObjToInt())
                    {
                        Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == Result.Item1.LocationCode);
                        Dt_StockInfoDetail stockInfoDetail = _stockService.StockInfoDetailService.Repository.QueryFirst(x => x.StockId==stockInfo.Id);
                        if (stockInfo != null&& stockInfoDetail != null)
                        {
                            (Dt_Task ?, Dt_LocationInfo ?) result= AddRelocationTask(Result.Item1, stockInfo, task);
                            if (result.Item1!=null&&result.Item2!=null)
                            {
                                _basicService.LocationInfoService.RelocationLock(Result.Item1, result.Item2, result.Item1.TaskNum);
                                locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                                _basicService.LocationInfoService.UpdateData(locationInfo);
                                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", task.TaskNum);
                                return content = WebResponseContent.Instance.OK();
                            }
                            else
                            {
                                return content = WebResponseContent.Instance.Error("移库任务生成失败");
                            }
                        }
                        else
                        {
                            return content = WebResponseContent.Instance.Error("未找到库存信息");
                        }
                    }
                    else if(Result.Item1 != null && Result.Item2 == LocationStatusEnum.Pallet.ObjToInt())
                    {
                        Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == Result.Item1.LocationCode);
                        if (stockInfo != null)
                        {
                            (Dt_Task?, Dt_LocationInfo?) result = AddRelocationTask(Result.Item1, stockInfo, task);
                            if (result.Item1 != null && result.Item2 != null)
                            {
                                _basicService.LocationInfoService.RelocationLock(Result.Item1, result.Item2, result.Item1.TaskNum);
                                locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                                _basicService.LocationInfoService.UpdateData(locationInfo);
                                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", task.TaskNum);
                                return content = WebResponseContent.Instance.OK();
                            }
                            else
                            {
                                return content = WebResponseContent.Instance.Error("移库任务生成失败");
                            }
                        }
                        else
                        {
                            return content = WebResponseContent.Instance.Error("未找到库存信息");
                        }
                    }
                    else
                    {
                        return content = WebResponseContent.Instance.Error("异常");
                    }
                }
                else
                {
                    return content = WebResponseContent.Instance.Error("任务信息异常");
                }
            }
            catch (Exception ex)
            {
                return content = WebResponseContent.Instance.Error(ex.Message);
            }
            return content;
        }
            finally
            {
            }
        }
        public (Dt_Task?,Dt_LocationInfo?) AddRelocationTask(Dt_LocationInfo location,Dt_StockInfo stockInfo,Dt_Task task)
        {
            Dt_LocationInfo? locationInfos = _basicService.LocationInfoService.AssignLocation(location.RoadwayNo);
            if (locationInfos != null)
            {
                Dt_Task tasks = new()
                {
                    CurrentAddress = location.LocationCode,
                    Grade = 0,
                    PalletCode = stockInfo.PalletCode,
                    NextAddress = locationInfos.LocationCode,
                    Roadway = location.RoadwayNo,
                    SourceAddress = location.LocationCode,
                    TargetAddress = locationInfos.LocationCode,
                    TaskStatus = InTaskStatusEnum.RelocationNew.ObjToInt(),
                    TaskType = TaskTypeEnum.Relocation.ObjToInt(),
                    TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum))
                };
                BaseDal.AddData(tasks);
                BaseDal.AddData(task);
                stockInfo.StockStatus = StockStatusEmun.移库锁定.ObjToInt();
                _stockService.StockInfoService.UpdateData(stockInfo);
            }
            return (task, locationInfos);
        }
        /// <summary>
        /// ç”Ÿæˆå‡ºåº“任务
        /// </summary>
@@ -272,6 +404,7 @@
                List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
                foreach (int key in keys)
                {
                    (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(key, stockSelectViews);
                    if (result.Item2 != null && result.Item2.Count > 0)
                    {
@@ -293,6 +426,8 @@
                    {
                        tasks.AddRange(result.Item1);
                    }
                }
                WebResponseContent content = GenerateOutboundTaskDataUpdate(tasks, stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos);
@@ -340,6 +475,9 @@
                    TargetAddress = endStation,
                    TaskStatus = OutTaskStatusEnum.OutNew.ObjToInt(),
                    TaskType = TaskTypeEnum.PalletOutbound.ObjToInt(),
                    Depth = locationInfo.Depth,
                    TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum))
                };
                int beforeStatus = locationInfo.LocationStatus;
                _unitOfWorkManage.BeginTran();
@@ -348,9 +486,10 @@
                BaseDal.AddData(task);
                _stockService.StockInfoService.UpdateData(stockInfo);
                _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum);
                _basicService.LocationInfoService.UpdateData(locationInfo);
                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", task.TaskNum);
                _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false);
                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Outbound.ObjToInt(), "", task.TaskNum);
                _unitOfWorkManage.CommitTran();
                return WebResponseContent.Instance.OK();
@@ -360,5 +499,63 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public (Dt_LocationInfo?, int?) isDepth(Dt_LocationInfo locationInfo)
        {
            if (locationInfo.Depth == 2)
            {
                if (locationInfo.Row == 1 || locationInfo.Row == 5)
                {
                    Dt_LocationInfo dt_LocationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo);
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.InStock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Free.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Free.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Lock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.PalletLock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Pallet.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Pallet.ObjToInt());
                    }
                }
                else if (locationInfo.Row == 4 || locationInfo.Row == 8)
                {
                    Dt_LocationInfo dt_LocationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo);
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.InStock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Free.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Free.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Lock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.PalletLock.ObjToInt());
                    }
                    if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Pallet.ObjToInt())
                    {
                        return (dt_LocationInfo, LocationStatusEnum.Pallet.ObjToInt());
                    }
                }
            }
            return (null, LocationStatusEnum.Free.ObjToInt());
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -123,11 +123,13 @@
            stockInfo.LocationCode = locationInfo.LocationCode;
            stockInfo.StockStatus = StockStatusEmun.已入库.ObjToInt();
            _stockService.StockInfoService.Repository.UpdateData(stockInfo);
            beforeQuantity = stockInfo.Details.Where(x => x.Id != 0).Sum(x => x.StockQuantity);
            int beforeStatus = locationInfo.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
            _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum);
            _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(),false);
            _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
            task.TaskStatus = InTaskStatusEnum.InFinish.ObjToInt();
@@ -156,17 +158,19 @@
            CheckCompleted(stockInfo, locationInfo);
            _stockService.StockInfoService.Repository.AddData(stockInfo);
            int beforeStatus = locationInfo.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
            _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum);
            _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false);
            _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
            task.TaskStatus = InTaskStatusEnum.InFinish.ObjToInt();
            BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum);
            return WebResponseContent.Instance.OK();
        }
@@ -199,6 +203,7 @@
        public WebResponseContent OutboundTaskCompleted(Dt_Task task)
        {
            decimal beforeQuantity = 0;
            Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);
            Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress);
@@ -208,16 +213,34 @@
            stockInfo.LocationCode = locationInfo.LocationCode;
            stockInfo.StockStatus = StockStatusEmun.出库完成.ObjToInt();
            _stockService.StockInfoService.Repository.UpdateData(stockInfo);
            int beforeStatus = locationInfo.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
            _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum);
            _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
            if (task.Depth == 1)
            {
                if (DepthTask(task)) { }
                else
                {
                    locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
                    _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false);
                    _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
                }
            }
            else
            {
                locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
                _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false);
                _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
            }
            task.TaskStatus = OutTaskStatusEnum.OutFinish.ObjToInt();
            BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
            beforeQuantity = stockInfo.Details.Where(x => x.Id != 0).Sum(x => x.StockQuantity);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Outbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
            _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) - beforeQuantity, StockChangeType.Outbound);
            return OnOutboundTaskCompleted?.Invoke(task) ?? WebResponseContent.Instance.OK();
        }
@@ -233,14 +256,17 @@
            _stockService.StockInfoService.Repository.DeleteData(stockInfo);
            int beforeStatus = locationInfo.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
            _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum);
            _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false);
            _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
            task.TaskStatus = OutTaskStatusEnum.OutFinish.ObjToInt();
            BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
            _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Outbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
            return WebResponseContent.Instance.OK();
        }
@@ -249,19 +275,15 @@
        {
            Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);
            Dt_LocationInfo locationStart = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress);
            Dt_LocationInfo locationEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
            CheckCompleted(stockInfo, locationStart);
            CheckCompleted(stockInfo, locationEnd);
            stockInfo.LocationCode = locationEnd.LocationCode;
            stockInfo.StockStatus = StockStatusEmun.已入库.ObjToInt();
            _stockService.StockInfoService.Repository.UpdateData(stockInfo);
            //locationStart.LocationStatus = LocationStatusEnum.Free.ObjToInt();
            _basicService.LocationInfoService.RelocationFree(locationStart, locationEnd, task.TaskNum);
            //_basicService.LocationInfoService.Repository.UpdateData(locationStart);
            _basicService.LocationInfoService.RelocationFree(locationEnd, task.TaskNum);
            task.TaskStatus = InTaskStatusEnum.RelocationFinish.ObjToInt();
            BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
@@ -269,5 +291,25 @@
            
            return WebResponseContent.Instance.OK();
        }
        public bool DepthTask(Dt_Task task)
        {
            Dt_LocationInfo location=_locationInfoService.Repository.QueryFirst(x=>x.LocationCode == task.SourceAddress);
            if(location != null)
            {
                if(location.Row%2==0)
                {
                    Dt_LocationInfo locations = _locationInfoService.Repository.QueryFirst(x => x.Row == location.Row + 1 && x.Layer == location.Layer && x.Column == location.Column && x.RoadwayNo == location.RoadwayNo);
                    Dt_Task tasks=BaseDal.QueryFirst(x=>x.SourceAddress == locations.LocationCode);
                    return tasks != null ? true : false;
                }
                else
                {
                    Dt_LocationInfo locations = _locationInfoService.Repository.QueryFirst(x => x.Row == location.Row - 1 && x.Layer == location.Layer && x.Column == location.Column && x.RoadwayNo == location.RoadwayNo);
                    Dt_Task tasks = BaseDal.QueryFirst(x => x.SourceAddress == locations.LocationCode);
                    return tasks != null ? true : false;
                }
            }
            return false;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs
@@ -47,5 +47,15 @@
            List<LocationGroupDTO> locations = _repository.GetLocationGroups(roadway, locationAStatus, locationBStatus);
            return locations;
        }
        [HttpPost, Route("LocationEnableStatus")]
        public WebResponseContent LocationEnableStatus(int[] keys)
        {
            return Service.LocationEnableStatus(keys); ;
        }
        [HttpPost, Route("LocationDisableStatus")]
        public WebResponseContent LocationDisableStatus(int[] keys)
        {
            return Service.LocationDisableStatus(keys); ;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -30,7 +30,7 @@
        }
        [HttpPost, Route("GenerateOutboundTask")]
        public WebResponseContent GenerateOutboundTask(int id, List<StockSelectViewDTO> stockSelectViews)
        public WebResponseContent GenerateOutboundTask(int id, [FromBody] List<StockSelectViewDTO> stockSelectViews)
        {
            return Service.GenerateOutboundTask(id, stockSelectViews);
        }
@@ -40,5 +40,11 @@
        {
            return Service.GenerateOutboundTask(keys);
        }
        [HttpPost, Route("PalletOutboundTask")]
        public WebResponseContent PalletOutboundTask(string roadwayNo, string endStation)
        {
            return Service.PalletOutboundTask(roadwayNo, endStation);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
@@ -40,7 +40,7 @@
builder.Services.AddAllOptionRegister();//读取配置文件
builder.Services.AddMemoryCacheSetup();//缓存
builder.Services.AddSqlsugarSetup();//SqlSugar å¯åŠ¨æœåŠ¡
builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入
//builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入
builder.Services.AddDbSetup();//Db å¯åŠ¨æœåŠ¡
builder.Services.AddAutoMapperSetup();