1
hutongqing
2024-09-23 d1a2afa67032339c2eb1019a02c6b6d036c0bdb1
1
已删除3个文件
已修改48个文件
已添加45个文件
3432 ■■■■ 文件已修改
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/router/viewGird.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue 339 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/21e966d8-e44a-432b-8c0b-3c4e5e7c05fd.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3dfde05d-a5a2-4fcc-8f16-01b7d188fff6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/79eb5ca9-e241-4647-98b5-bb5bc7256530.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8d854c1d-3953-4118-905c-6e5e5a843136.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d8e0fc94-3eb1-4d2c-ac54-1343a3bbf1a6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f65c354a-0e46-42e0-8d03-b1244d9e8a93.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/AreaRouterRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CachePointRepository.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/RoadwayInfoRepository.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaInfoService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaRouterService.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs 222 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CachePointService.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/AGVTaskFeedBackModel.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/IRepository.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/SequenceEnum.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/TaskEnum.cs 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/IUser.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/ModelValidate.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/CachePointGroupDTO.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaRouterRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICachePointRepository.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaInfoService.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaRouterService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICachePointService.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IRoadwayInfoService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IInboundRepository.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IRecordRepository/IRecordRepository.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IRecordService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfoRepository.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundRepository.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_AreaRouter.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CachePoint.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_RoadwayInfo.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Menu.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutboundRepository.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_RecordRepository/RecordRepository.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/RecordService.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_MenuRepository.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_MenuService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_AGV.cs 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 166 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskServiceExtendFunc.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/AreaInfoController.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue
@@ -3,7 +3,7 @@
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="75%"
      width="60%"
      :padding="15"
      title="指定库存"
    >
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
    components: {
      //查询界面扩展组件
      gridHeader: '',
      gridBody: '',
      gridFooter: '',
      //新建、编辑弹出框扩展组件
      modelHeader: '',
      modelBody: '',
      modelFooter: ''
    },
    tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
    buttons: { view: [], box: [], detail: [] }, //扩展的按钮
    methods: {
       //下面这些方法可以保留也可以删除
      onInit() {
      },
      onInited() {
        //框架初始化配置后
        //如果要配置明细表,在此方法操作
        //this.detailOptions.columns.forEach(column=>{ });
      },
      searchBefore(param) {
        //界面查询前,可以给param.wheres添加查询参数
        //返回false,则不会执行查询
        return true;
      },
      searchAfter(result) {
        //查询后,result返回的查询数据,可以在显示到表格前处理表格的值
        return true;
      },
      addBefore(formData) {
        //新建保存前formData为对象,包括明细表,可以给给表单设置值,自己输出看formData的值
        return true;
      },
      updateBefore(formData) {
        //编辑保存前formData为对象,包括明细表、删除行的Id
        return true;
      },
      rowClick({ row, column, event }) {
        //查询界面点击行事件
        // this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
      },
      modelOpenAfter(row) {
        //点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
        //(1)判断是编辑还是新建操作: this.currentAction=='Add';
        //(2)给弹出框设置默认值
        //(3)this.editFormFields.字段='xxx';
        //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
        //看不懂就把输出看:console.log(this.editFormOptions)
      }
    }
  };
  export default extension;
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/router/viewGird.js
@@ -81,6 +81,10 @@
    path: '/task',
    name: 'task',
    component: () => import('@/views/taskinfo/task.vue')
  }, {
    path: '/stockView',
    name: 'stockView',
    component: () => import('@/views/stock/stockView.vue')
  }]
export default viewgird
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue
@@ -64,7 +64,12 @@
        },
      ],
      [
        { title: "货位类型", required: true, field: "locationType", type: "string" },
        {
          title: "货位类型",
          required: true,
          field: "locationType",
          type: "string",
        },
        {
          title: "货位状态",
          required: true,
@@ -85,13 +90,13 @@
        },
      ],
      [
      {
        {
          title: "巷道编号",
          required: true,
          field: "roadwayNo",
          type: "string",
        },
      ]
      ],
    ]);
    const searchFormFields = ref({
      locationCode: "",
@@ -125,14 +130,14 @@
        field: "locationCode",
        title: "货位编号",
        type: "string",
        width: 150,
        width: 180,
        align: "left",
      },
      {
        field: "locationName",
        title: "货位名称",
        type: "string",
        width: 150,
        width: 220,
        align: "left",
      },
      {
@@ -148,6 +153,7 @@
        type: "string",
        width: 90,
        align: "left",
        hidden: true,
      },
      {
        field: "column",
@@ -155,6 +161,7 @@
        type: "int",
        width: 120,
        align: "left",
        hidden: true,
      },
      {
        field: "layer",
@@ -162,6 +169,7 @@
        type: "string",
        width: 200,
        align: "left",
        hidden: true,
      },
      {
        field: "depth",
@@ -169,6 +177,7 @@
        type: "string",
        width: 180,
        align: "left",
        hidden: true,
      },
      {
        field: "locationType",
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,339 @@
<template>
  <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  </view-grid>
</template>
    <script>
import extend from "@/extension/stock/stockView.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
  setup() {
    const table = ref({
      key: "stockId",
      footer: "Foots",
      cnName: "库存视图",
      name: "stockView",
      url: "/stockView/",
      sortName: "stockId",
    });
    const editFormFields = ref({
      palletCode: "",
      locationCode: "",
      locationName: "",
    });
    const editFormOptions = ref([
      [
        {
          title: "托盘编号",
          required: true,
          field: "palletCode",
          type: "string",
        },
        {
          title: "货位编号",
          required: true,
          field: "locationCode",
          type: "string",
        },
        {
          title: "货位名称",
          required: true,
          field: "locationName",
          type: "string",
        },
      ],
    ]);
    const searchFormFields = ref({
      palletCode: "",
      locationCode: "",
    });
    const searchFormOptions = ref([
      [
        { title: "托盘编号", field: "palletCode" },
        { title: "货位编号", field: "locationCode" },
      ],
    ]);
    const columns = ref([
      {
        field: "stockId",
        title: "Id",
        type: "int",
        width: 90,
        hidden: true,
        readonly: true,
        require: true,
        align: "left",
      },
      {
        field: "palletCode",
        title: "托盘编号",
        type: "string",
        width: 150,
        link: true,
        align: "left",
      },
      {
        field: "locationCode",
        title: "货位编号",
        type: "string",
        width: 180,
        align: "left",
      },
      {
        field: "locationName",
        title: "货位名称",
        type: "string",
        width: 220,
        align: "left",
      },
      {
        field: "roadwayNo",
        title: "巷道编号",
        type: "decimal",
        width: 90,
        align: "left",
      },
      {
        field: "row",
        title: "货位行",
        type: "string",
        width: 90,
        align: "left",
        hidden: true,
      },
      {
        field: "column",
        title: "货位列",
        type: "int",
        width: 120,
        align: "left",
        hidden: true,
      },
      {
        field: "layer",
        title: "货位层",
        type: "string",
        width: 200,
        align: "left",
        hidden: true,
      },
      {
        field: "depth",
        title: "货位深度",
        type: "string",
        width: 180,
        align: "left",
        hidden: true,
      },
      {
        field: "stockStatus",
        title: "库存状态",
        type: "string",
        width: 200,
        align: "left",
      },
      {
        field: "locationType",
        title: "货位类型",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "locationStatus",
        title: "货位状态",
        type: "string",
        width: 200,
        align: "left",
      },
      {
        field: "enalbeStatus",
        title: "禁用状态",
        type: "string",
        width: 180,
        align: "left",
      },
      {
        field: "isFull",
        title: "是否满盘",
        type: "string",
        width: 150,
        align: "left",
        hidden: true,
      },
      {
        field: "creater",
        title: "创建人",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "createDate",
        title: "创建时间",
        type: "datetime",
        width: 160,
        align: "left",
      },
      {
        field: "modifier",
        title: "修改人",
        type: "string",
        width: 100,
        align: "left",
      },
      {
        field: "modifyDate",
        title: "修改时间",
        type: "datetime",
        width: 160,
        align: "left",
      },
      {
        field: "remark",
        title: "备注",
        type: "string",
        width: 100,
        align: "left",
      },
    ]);
    const detail = ref({
      cnName: "库存明细信息",
      table: "StockInfoDetail",
      columns: [
        {
          field: "id",
          title: "Id",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "stockId",
          title: "库存信息主键",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "materielCode",
          title: "物料编号",
          type: "string",
          width: 150,
          align: "left",
        },
        {
          field: "materielName",
          title: "物料名称",
          type: "string",
          width: 150,
          align: "left",
        },
        {
          field: "orderNo",
          title: "单据编号",
          type: "decimal",
          width: 90,
          align: "left",
        },
        {
          field: "batchNo",
          title: "批次号",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "serialNumber",
          title: "序列号",
          type: "int",
          width: 120,
          align: "left",
        },
        {
          field: "stockQuantity",
          title: "库存数量",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "outboundQuantity",
          title: "出库数量",
          type: "string",
          width: 180,
          align: "left",
        },
        {
          field: "status",
          title: "库存明细状态",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "creater",
          title: "创建人",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          align: "left",
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 100,
          align: "left",
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 160,
          align: "left",
        },
        {
          field: "remark",
          title: "备注",
          type: "string",
          width: 100,
          align: "left",
        },
      ],
      sortName: "id",
      key: "id",
    });
    return {
      table,
      extend,
      editFormFields,
      editFormOptions,
      searchFormFields,
      searchFormOptions,
      columns,
      detail,
    };
  },
});
</script>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue
@@ -1,14 +1,32 @@
<template>
  <div class="menu-container">
    <!-- <el-input/> -->
    <vol-box :width="940" :mask="true" :height="500" title="图标列表" v-model="model">
    <vol-box
      :width="940"
      :mask="true"
      :height="500"
      title="图标列表"
      v-model="model"
    >
      <Icons :onSelect="onSelect"></Icons>
      <template #footer>
        <el-button type="primary" size="mini" @click="model = false">ç¡® è®¤</el-button>
        <el-button type="primary" size="mini" @click="model = false"
          >ç¡® è®¤</el-button
        >
      </template>
    </vol-box>
    <vol-box :width="600" :mask="true" :height="270" title="其他权限" v-model="actionModel">
      <vol-form ref="actionForm" :formRules="actionOptions" :formFields="actionFields">
    <vol-box
      :width="600"
      :mask="true"
      :height="270"
      title="其他权限"
      v-model="actionModel"
    >
      <vol-form
        ref="actionForm"
        :formRules="actionOptions"
        :formFields="actionFields"
      >
        <template #header>
          <div>
            <el-alert show-icon type="success">
@@ -20,7 +38,9 @@
        </template>
      </vol-form>
      <template #footer>
        <el-button type="primary" size="mini" @click="otherAction">ç¡® è®¤</el-button>
        <el-button type="primary" size="mini" @click="otherAction"
          >ç¡® è®¤</el-button
        >
      </template>
    </vol-box>
@@ -28,12 +48,21 @@
    <div class="menu-left">
      <div class="m-title"><i class="el-icon-warning-outline"></i>菜单列表</div>
      <el-scrollbar style="height: 100%; width: 200px">
        <VolMenu :onSelect="getTreeItem" :list="tree" :isCollapse="false"></VolMenu>
        <VolMenu
          :onSelect="getTreeItem"
          :list="tree"
          :isCollapse="false"
        ></VolMenu>
      </el-scrollbar>
    </div>
    <div class="menu-right">
      <el-scrollbar style="height: 100%">
        <el-alert title="菜单配置说明" type="warning" :closable="false" show-icon>
        <el-alert
          title="菜单配置说明"
          type="warning"
          :closable="false"
          show-icon
        >
          <div>
            1、如果是用代码生器生成的Vue页面,Url为Vue项目中src->router->viewGrid.js对应表名的path属性
          </div>
@@ -42,31 +71,56 @@
          </div>
        </el-alert>
        <div style="padding: 0px 30px 0 20px">
          <vol-form class="form-content" ref="form" :formRules="options" :formFields="fields">
          <vol-form
            class="form-content"
            ref="form"
            :formRules="options"
            :formFields="fields"
          >
          </vol-form>
          <div>
            <div class="auth-group">
              <label style="width: 100px">权限按钮:</label>
              <div class="ck">
                <el-checkbox-group v-model="actions">
                  <el-checkbox v-for="(item, index) in action" :key="index" :label="item.value">{{ item.text + "(" +
                    item.value + ")" }}</el-checkbox>
                  <el-checkbox
                    v-for="(item, index) in action"
                    :key="index"
                    :label="item.value"
                    >{{ item.text + "(" + item.value + ")" }}</el-checkbox
                  >
                </el-checkbox-group>
              </div>
            </div>
          </div>
          <div style="padding-left: 100px">
            <el-button @click="handleCheckAll" size="mini" type="success" plain><i class="el-icon-check"></i>全
              é€‰</el-button>
            <el-button @click="actionModel = true" size="mini" type="primary" plain><i
                class="el-icon-plus"></i>其他权限</el-button>
            <el-button @click="handleCheckAll" size="mini" type="success" plain
              ><i class="el-icon-check"></i>全 é€‰</el-button
            >
            <el-button
              @click="actionModel = true"
              size="mini"
              type="primary"
              plain
              ><i class="el-icon-plus"></i>其他权限</el-button
            >
          </div>
          <div class="m-btn">
            <el-button type="primary" @click="save"><i class="el-icon-check"></i>保存</el-button>
            <el-button type="success" @click="add"><i class="el-icon-plus"></i>新建</el-button>
            <el-button type="warning" @click="addChild"><i class="el-icon-plus"></i>添加子级</el-button>
            <el-button type="primary" plain @click="addBrother"><i class="el-icon-circle-plus"></i> æ·»åŠ åŒçº§</el-button>
            <el-button type="warning" plain @click="delMenu"><i class="el-icon-delete"></i> åˆ é™¤èœå•</el-button>
            <el-button type="primary" @click="save"
              ><i class="el-icon-check"></i>保存</el-button
            >
            <el-button type="success" @click="add"
              ><i class="el-icon-plus"></i>新建</el-button
            >
            <el-button type="warning" @click="addChild"
              ><i class="el-icon-plus"></i>添加子级</el-button
            >
            <el-button type="primary" plain @click="addBrother"
              ><i class="el-icon-circle-plus"></i> æ·»åŠ åŒçº§</el-button
            >
            <el-button type="warning" plain @click="delMenu"
              ><i class="el-icon-delete"></i> åˆ é™¤èœå•</el-button
            >
          </div>
        </div>
      </el-scrollbar>
@@ -176,7 +230,11 @@
        tigger = true;
        let menuId = this.fields.menuId;
        this.http
          .post("/api/Sys_Menu/delMenu?menuId=" + menuId, {}, "正在删除数据....")
          .post(
            "/api/Sys_Menu/delMenu?menuId=" + menuId,
            {},
            "正在删除数据...."
          )
          .then((x) => {
            if (!x.status) return this.$Message.error(x.message);
            this.$refs.form.reset();
@@ -227,7 +285,7 @@
            orderNo: this.fields.orderNo,
            parentId: this.fields.parentId,
          });
          console.log(this.tree)
          console.log(this.tree);
        });
      });
    },
@@ -246,11 +304,9 @@
    onOpenChange(node) {
      if (node.length == 0) return;
      this.getTreeItem(node[node.length > 1 ? node.length - 1 : 0]);
    }
    },
  },
  created(){
  },
  created() {},
  setup() {
    const tree = ref([]);
    const actionValues = ref([]);
@@ -270,10 +326,10 @@
    });
    const initTree = () => {
      http.post("/api/Sys_Menu/getMenu", {}, true).then((x) => {
        x.forEach(item => {
          item.icon = 'el-icon-menu';
        })
        x.forEach((item) => {
          item.icon = "el-icon-menu";
        });
        tree.value = x;
      });
    };
@@ -294,9 +350,7 @@
      icon: "",
      orderNo: "",
      enable: 1,
      createDate: "",
      creator: "",
      modifyDate: "",
      menuType: 0,
    });
    const actionFields = ref({
@@ -379,19 +433,18 @@
            { key: 0, value: "禁用" },
          ],
        },
        // {
        //   // 2022.03.26增移动端加菜单类型
        //   title: "菜单类型",
        //   field: "menuType",
        //   required: true,
        //   type: "select",
        //   colSize: 4,
        //   data: [
        //     { key: 1, value: "WCS菜单" },
        //     { key: 0, value: "WMS菜单" },
        //     { key: 99, value: "共用" }
        //   ],
        // },
        {
          // 2022.03.26增移动端加菜单类型
          title: "菜单类型",
          field: "menuType",
          required: true,
          type: "select",
          colSize: 4,
          data: [
            { key: 0, value: "PC端菜单" },
            { key: 1, value: "移动端菜单" },
          ],
        },
        {
          title: "图标Icon",
          field: "icon",
@@ -426,33 +479,35 @@
    ]);
    const refForm = ref();
    const getTreeItem = (node) => {
      http.post("api/Sys_Menu/getTreeItem?menuId=" + node, {}, true).then((x) => {
        try {
          fields.value.icon = x.icon;
          if (x.auth) {
            x.auth = JSON.parse(x.auth);
            action.value.splice(8, action.value.length);
      http
        .post("api/Sys_Menu/getTreeItem?menuId=" + node, {}, true)
        .then((x) => {
          try {
            fields.value.icon = x.icon;
            if (x.auth) {
              x.auth = JSON.parse(x.auth);
              action.value.splice(8, action.value.length);
            actions.value = x.auth.map((element) => {
              if (actionValues.value.indexOf(element.value) == -1) {
                action.value.push(element);
              }
              return element.value;
            });
          } else {
            action.value.splice(8, action.value.length);
              actions.value = x.auth.map((element) => {
                if (actionValues.value.indexOf(element.value) == -1) {
                  action.value.push(element);
                }
                return element.value;
              });
            } else {
              action.value.splice(8, action.value.length);
              x.auth = [];
              fields.value.icon = "";
              actions.value = [];
            }
          } catch (error) {
            console.log("菜单功能权限转换成JSON失败:" + x.auth);
            x.auth = [];
            fields.value.icon = "";
            //   this.icon = "";
            actions.value = [];
          }
        } catch (error) {
          console.log("菜单功能权限转换成JSON失败:" + x.auth);
          x.auth = [];
          //   this.icon = "";
          actions.value = [];
        }
        refForm.value.reset(x);
      });
          refForm.value.reset(x);
        });
    };
    return {
      tree,
@@ -468,7 +523,7 @@
      actionOptions,
      options,
      form: refForm,
      getTreeItem
      getTreeItem,
    };
  },
  data() {
@@ -521,7 +576,7 @@
      margin-top: 1px;
    }
    >div {
    > div {
      float: left;
    }
  }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/21e966d8-e44a-432b-8c0b-3c4e5e7c05fd.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3dfde05d-a5a2-4fcc-8f16-01b7d188fff6.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/79eb5ca9-e241-4647-98b5-bb5bc7256530.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8d854c1d-3953-4118-905c-6e5e5a843136.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d8e0fc94-3eb1-4d2c-ac54-1343a3bbf1a6.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f65c354a-0e46-42e0-8d03-b1244d9e8a93.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/AreaRouterRepository.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_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_BasicRepository
{
    public class AreaRouterRepository : RepositoryBase<Dt_AreaRouter>, IAreaRouterRepository
    {
        public AreaRouterRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IBasicRepository;
namespace WIDESEA_BasicRepository
{
    public class BasicRepository : IBasicRepository
    {
        public IAreaInfoRepository AreaInfoRepository { get; }
        public ILocationInfoRepository LocationInfoRepository { get; }
        public IMaterielInfoRepository MaterielInfoRepository { get; }
        public IRoadwayInfoRepository RoadwayInfoRepository { get; }
        public IWarehouseRepository WarehouseRepository { get; }
        public IAreaRouterRepository AreaRouterRepository { get; }
        public ICachePointRepository CachePointRepository { get; }
        public BasicRepository(IAreaInfoRepository areaInfoRepository, ILocationInfoRepository locationInfoRepository, IMaterielInfoRepository materielInfoRepository, IRoadwayInfoRepository roadwayInfoRepository, IWarehouseRepository warehouseRepository, IAreaRouterRepository areaRouterRepository, ICachePointRepository cachePointRepository)
        {
            AreaInfoRepository = areaInfoRepository;
            LocationInfoRepository = locationInfoRepository;
            MaterielInfoRepository = materielInfoRepository;
            RoadwayInfoRepository = roadwayInfoRepository;
            WarehouseRepository = warehouseRepository;
            AreaRouterRepository = areaRouterRepository;
            CachePointRepository = cachePointRepository;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CachePointRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@

using SqlSugar;
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_Core.Helper;
using WIDESEA_DTO.Basic;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_BasicRepository
{
    public class CachePointRepository : RepositoryBase<Dt_CachePoint>, ICachePointRepository
    {
        public CachePointRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
        public List<CachePointGroupDTO> GetCachePointGroups(int areaId, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus)
        {
           return Db.Queryable<Dt_CachePoint>().Where(a => a.Depth == 1 && a.AreaId == areaId && a.PointStatus == locationAStatus.ObjToInt() && a.PointStatus == locationAStatus.ObjToInt()).InnerJoin(Db.Queryable<Dt_CachePoint>().Where(b => b.Depth == 2 && b.AreaId == areaId && b.PointStatus == locationBStatus.ObjToInt() && b.PointStatus == locationBStatus.ObjToInt()), (a, b) => a.Column == b.Column && a.AreaId == b.AreaId && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1).Select((a, b) => new CachePointGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, PointCodeA = a.PointCode, PointCodeB = b.PointCode, PointStatusA = a.PointStatus, PointStatusB = b.PointStatus, PointTypeA = a.PointType, PointTypeB = b.PointType }).ToList();
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs
@@ -22,12 +22,17 @@
        public List<LocationGroupDTO> GetAllLocationGroups(string roadway)
        {
            return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>((a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1, (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnalbeStatus, EnableStatusB = b.EnalbeStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType }, a => a.Depth == 1 && a.RoadwayNo == roadway, b => b.Depth == 2 && b.RoadwayNo == roadway, x => true);
            return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>((a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1, (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType }, a => a.Depth == 1 && a.RoadwayNo == roadway, b => b.Depth == 2 && b.RoadwayNo == roadway, x => true);
        }
        public List<LocationGroupDTO> GetLocationGroups(string roadway, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus)
        {
            return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>((a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1, (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnalbeStatus, EnableStatusB = b.EnalbeStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType }, a => a.Depth == 1 && a.RoadwayNo == roadway && a.LocationStatus == locationAStatus.ObjToInt(), b => b.Depth == 2 && b.RoadwayNo == roadway && b.LocationStatus == locationBStatus.ObjToInt(), x => true);
            return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>(
                (a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1,
                (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType },
                a => a.Depth == 1 && a.RoadwayNo == roadway && a.LocationStatus == locationAStatus.ObjToInt(),
                b => b.Depth == 2 && b.RoadwayNo == roadway && b.LocationStatus == locationBStatus.ObjToInt(),
                x => true);
        }
        public override bool UpdateData(Dt_LocationInfo entity)
@@ -37,7 +42,7 @@
        public List<string> GetCanOutLocationCodes(List<string> roadways, List<int> areaIds)
        {
            return QueryData(x => x.LocationCode, x => roadways.Contains(x.RoadwayNo) && (areaIds.Contains(x.AreaId) || x.AreaId == 0) && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnalbeStatus == LocationEnalbeStatusEnum.Normal.ObjToInt())).Distinct().ToList();
            return QueryData(x => x.LocationCode, x => roadways.Contains(x.RoadwayNo) && (areaIds.Contains(x.AreaId) || x.AreaId == 0) && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt())).Distinct().ToList();
        }
        public List<Dt_LocationInfo> GetLocationInfos(List<string> locationCodes)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/RoadwayInfoRepository.cs
@@ -20,6 +20,6 @@
        /// <summary>
        /// å¯å‡ºåº“的巷道编号集合
        /// </summary>
        public List<string> CanOutRoadwayNos => QueryData(x => x.RoadwayNo, x => x.EnalbeStatus == RoadwayStatusEnum.Normal.ObjToInt() || x.EnalbeStatus == RoadwayStatusEnum.OnlyOut.ObjToInt()).Distinct().ToList();
        public List<string> CanOutRoadwayNos => QueryData(x => x.RoadwayNo, x => x.EnableStatus == RoadwayStatusEnum.Normal.ObjToInt() || x.EnableStatus == RoadwayStatusEnum.OnlyOut.ObjToInt()).Distinct().ToList();
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaInfoService.cs
@@ -3,7 +3,10 @@
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_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -17,5 +20,7 @@
        }
        public IAreaInfoRepository Repository => BaseDal;
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaRouterService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
namespace WIDESEA_BasicService
{
    public class AreaRouterService : ServiceBase<Dt_AreaRouter, IAreaRouterRepository>, IAreaRouterService
    {
        public AreaRouterService(IAreaRouterRepository BaseDal) : base(BaseDal)
        {
        }
        public IAreaRouterRepository Repository => BaseDal;
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,222 @@
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_Core;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
using WIDESEA_Core.Helper;
namespace WIDESEA_BasicService
{
    public class BasicService : IBasicService
    {
        public IAreaInfoService AreaInfoService { get; }
        public ILocationInfoService LocationInfoService { get; }
        public IMaterielInfoService MaterielInfoService { get; }
        public IRoadwayInfoService RoadwayInfoService { get; }
        public IWarehouseService WarehouseService { get; }
        public IAreaRouterService AreaRouterService { get; }
        public ICachePointService CachePointService { get; }
        public BasicService(IAreaInfoService areaInfoService, ILocationInfoService locationInfoService, IMaterielInfoService materielInfoService, IRoadwayInfoService roadwayInfoService, IWarehouseService warehouseService, IAreaRouterService areaRouterService, ICachePointService cachePointService)
        {
            AreaInfoService = areaInfoService;
            LocationInfoService = locationInfoService;
            MaterielInfoService = materielInfoService;
            RoadwayInfoService = roadwayInfoService;
            WarehouseService = warehouseService;
            AreaRouterService = areaRouterService;
            CachePointService = cachePointService;
        }
        #region AreaInfo
        public WebResponseContent AreaEnableStatus(int[] keys)
        {
            List<Dt_AreaInfo> areaInfos = AreaInfoService.Repository.QueryData(x => keys.Contains(x.Id));
            areaInfos.ForEach(x =>
            {
                x.AreaStatus = EnableEnum.Enable.ObjToInt();
            });
            AreaInfoService.Repository.UpdateData(areaInfos);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent AreaDisableStatus(int[] keys)
        {
            List<Dt_AreaInfo> areaInfos = AreaInfoService.Repository.QueryData(x => keys.Contains(x.Id));
            areaInfos.ForEach(x =>
            {
                x.AreaStatus = EnableEnum.Disable.ObjToInt();
            });
            AreaInfoService.Repository.UpdateData(areaInfos);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent AreaEnableStatus(int key)
        {
            return AreaEnableStatus(new int[] { key });
        }
        public WebResponseContent AreaDisableStatus(int key)
        {
            return AreaDisableStatus(new int[] { key });
        }
        #endregion
        #region CachePoint
        public WebResponseContent CachePointEnableStatus(int[] keys)
        {
            List<Dt_CachePoint> cachePoints = CachePointService.Repository.QueryData(x => keys.Contains(x.Id));
            cachePoints.ForEach(x =>
            {
                x.EnableStatus = EnableEnum.Enable.ObjToInt();
            });
            CachePointService.Repository.UpdateData(cachePoints);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent CachePointDisableStatus(int[] keys)
        {
            List<Dt_CachePoint> cachePoints = CachePointService.Repository.QueryData(x => keys.Contains(x.Id));
            cachePoints.ForEach(x =>
            {
                x.EnableStatus = EnableEnum.Disable.ObjToInt();
            });
            CachePointService.Repository.UpdateData(cachePoints);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent CachePointEnableStatus(int key)
        {
            return CachePointEnableStatus(new int[] { key });
        }
        public WebResponseContent CachePointDisableStatus(int key)
        {
            return CachePointDisableStatus(new int[] { key });
        }
        #endregion
        #region LocationInfo
        public WebResponseContent LocationEnableStatus(int[] keys)
        {
            List<Dt_LocationInfo> locationInfos = LocationInfoService.Repository.QueryData(x => keys.Contains(x.Id));
            locationInfos.ForEach(x =>
            {
                x.EnableStatus = EnableEnum.Enable.ObjToInt();
            });
            LocationInfoService.Repository.UpdateData(locationInfos);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent LocationDisableStatus(int[] keys)
        {
            List<Dt_LocationInfo> locationInfos = LocationInfoService.Repository.QueryData(x => keys.Contains(x.Id));
            locationInfos.ForEach(x =>
            {
                x.EnableStatus = EnableEnum.Disable.ObjToInt();
            });
            LocationInfoService.Repository.UpdateData(locationInfos);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent LocationEnableStatus(int key)
        {
            return LocationEnableStatus(new int[] { key });
        }
        public WebResponseContent LocationDisableStatus(int key)
        {
            return LocationDisableStatus(new int[] { key });
        }
        #endregion
        #region RoadwayInfo
        public WebResponseContent RoadwayEnableStatus(int[] keys)
        {
            List<Dt_RoadwayInfo> roadwayInfos = RoadwayInfoService.Repository.QueryData(x => keys.Contains(x.Id));
            roadwayInfos.ForEach(x =>
            {
                x.EnableStatus = EnableEnum.Enable.ObjToInt();
            });
            RoadwayInfoService.Repository.UpdateData(roadwayInfos);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent RoadwayDisableStatus(int[] keys)
        {
            List<Dt_RoadwayInfo> roadwayInfos = RoadwayInfoService.Repository.QueryData(x => keys.Contains(x.Id));
            roadwayInfos.ForEach(x =>
            {
                x.EnableStatus = EnableEnum.Disable.ObjToInt();
            });
            RoadwayInfoService.Repository.UpdateData(roadwayInfos);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent RoadwayEnableStatus(int key)
        {
            return RoadwayEnableStatus(new int[] { key });
        }
        public WebResponseContent RoadwayDisableStatus(int key)
        {
            return RoadwayDisableStatus(new int[] { key });
        }
        #endregion
        #region Warehouse
        public WebResponseContent WarehouseEnableStatus(int[] keys)
        {
            List<Dt_Warehouse> warehouses = WarehouseService.Repository.QueryData(x => keys.Contains(x.Id));
            warehouses.ForEach(x =>
            {
                x.WarehouseStatus = EnableEnum.Enable.ObjToInt();
            });
            WarehouseService.Repository.UpdateData(warehouses);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent WarehouseDisableStatus(int[] keys)
        {
            List<Dt_Warehouse> warehouses = WarehouseService.Repository.QueryData(x => keys.Contains(x.Id));
            warehouses.ForEach(x =>
            {
                x.WarehouseStatus = EnableEnum.Disable.ObjToInt();
            });
            WarehouseService.Repository.UpdateData(warehouses);
            return WebResponseContent.Instance.OK();
        }
        public WebResponseContent WarehouseEnableStatus(int key)
        {
            return WarehouseEnableStatus(new int[] { key });
        }
        public WebResponseContent WarehouseDisableStatus(int key)
        {
            return WarehouseDisableStatus(new int[] { key });
        }
        #endregion
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CachePointService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
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.Basic;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
namespace WIDESEA_BasicService
{
    public class CachePointService : ServiceBase<Dt_CachePoint, ICachePointRepository>, ICachePointService
    {
        public CachePointService(ICachePointRepository BaseDal) : base(BaseDal)
        {
        }
        public ICachePointRepository Repository => BaseDal;
        private readonly Dictionary<string, OrderByType> _emptyAssignOrderBy = new()
        {
            { nameof(Dt_CachePoint.Depth), OrderByType.Desc },
            { nameof(Dt_CachePoint.Column), OrderByType.Asc },
            { nameof(Dt_CachePoint.Row), OrderByType.Asc },
        };
        public Dt_CachePoint? AssignCachePoint(int areaId)
        {
            List<CachePointGroupDTO> cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.Free);
            if (cachePointGroups != null && cachePointGroups.Count > 0)
            {
                CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt());
                int id = pointGroupDTO?.IdB ?? 0;
                return BaseDal.QueryFirst(x => x.Id == id);
            }
            cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.Free, LocationStatusEnum.Free);
            if (cachePointGroups != null && cachePointGroups.Count > 0)
            {
                CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt());
                int id = pointGroupDTO?.IdA ?? 0;
                return BaseDal.QueryFirst(x => x.Id == id);
            }
            return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy);
        }
        public Dt_CachePoint? GetIbStockCachePoint(int areaId)
        {
            List<CachePointGroupDTO> cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.Free);
            if (cachePointGroups != null && cachePointGroups.Count > 0)
            {
                CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt());
                int id = pointGroupDTO?.IdA ?? 0;
                return BaseDal.QueryFirst(x => x.Id == id);
            }
            cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.InStock);
            if (cachePointGroups != null && cachePointGroups.Count > 0)
            {
                CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt());
                int id = pointGroupDTO?.IdB ?? 0;
                return BaseDal.QueryFirst(x => x.Id == id);
            }
            return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
@@ -18,9 +18,7 @@
{
    public class LocationInfoService : ServiceBase<Dt_LocationInfo, ILocationInfoRepository>, ILocationInfoService
    {
        private readonly IAreaInfoRepository _areaInfoRepository;
        private readonly IWarehouseRepository _warehouseRepository;
        private readonly IRoadwayInfoRepository _roadwayInfoRepository;
        private readonly IBasicRepository _basicRepository;
        private Dictionary<string, OrderByType> _emptyAssignOrderBy = new Dictionary<string, OrderByType>()
        {
@@ -32,11 +30,9 @@
        public ILocationInfoRepository Repository => BaseDal;
        public LocationInfoService(ILocationInfoRepository BaseDal, IAreaInfoRepository areaInfoRepository, IWarehouseRepository warehouseRepository, IRoadwayInfoRepository roadwayInfoRepository) : base(BaseDal)
        public LocationInfoService(ILocationInfoRepository BaseDal, IBasicRepository basicRepository) : base(BaseDal)
        {
            _areaInfoRepository = areaInfoRepository;
            _warehouseRepository = warehouseRepository;
            _roadwayInfoRepository = roadwayInfoRepository;
            _basicRepository = basicRepository;
        }
        public override WebResponseContent AddData(SaveModel saveModel)
@@ -48,17 +44,17 @@
        {
            try
            {
                Dt_RoadwayInfo roadwayInfo = _roadwayInfoRepository.QueryFirst(x => x.InStationCode == stationCode) ?? throw new Exception("未找到该站台对应的巷道,请检查基础配置信息");
                if (roadwayInfo.EnalbeStatus != RoadwayStatusEnum.Normal.ObjToInt() && roadwayInfo.EnalbeStatus != RoadwayStatusEnum.OnlyIn.ObjToInt())
                Dt_RoadwayInfo roadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.InStationCode == stationCode) ?? throw new Exception("未找到该站台对应的巷道,请检查基础配置信息");
                if (roadwayInfo.EnableStatus != RoadwayStatusEnum.Normal.ObjToInt() && roadwayInfo.EnableStatus != RoadwayStatusEnum.OnlyIn.ObjToInt())
                {
                    throw new Exception("该巷道不可入库,请检查巷道禁用信息");
                }
                if (roadwayInfo.WarehouseId > 0)
                if (roadwayInfo.AreaId > 0)
                {
                    Dt_Warehouse warehouse = _warehouseRepository.QueryFirst(x => x.Id == roadwayInfo.WarehouseId);
                    if (warehouse != null && warehouse.WarehouseStatus == EnableEnum.Disable.ObjToInt())
                    Dt_AreaInfo areaInfo = _basicRepository.AreaInfoRepository.QueryFirst(x => x.Id == roadwayInfo.AreaId);
                    if (areaInfo != null && areaInfo.AreaStatus == EnableEnum.Disable.ObjToInt())
                    {
                        throw new Exception("仓库被禁用,不可入库");
                        throw new Exception("区域被禁用,不可入库");
                    }
                }
                if (inboundType == TaskTypeEnum.PalletInbound.ObjToInt())//空盘入库分配逻辑
@@ -80,34 +76,42 @@
        private Dt_LocationInfo EmptyAssignLocation(string roadway)
        {
            List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Pallet);
            List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Pallet, LocationStatusEnum.Free);
            if (locationGroups != null && locationGroups.Count > 0)
            {
                return BaseDal.QueryFirst(x => x.Id == locationGroups.FirstOrDefault().IdA);
                LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt());
                int id = locationGroup?.IdA ?? 0;
                return BaseDal.QueryFirst(x => x.Id == id);
            }
            locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Free);
            if (locationGroups != null && locationGroups.Count > 0)
            {
                return BaseDal.QueryFirst(x => x.Id == locationGroups.FirstOrDefault().IdB);
                LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt());
                int id = locationGroup?.IdB ?? 0;
                return BaseDal.QueryFirst(x => x.Id == id);
            }
            return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnalbeStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy);
            return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy);
        }
        private Dt_LocationInfo StoredAssignLocation(string roadway)
        {
            List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.InStock);
            if (locationGroups != null && locationGroups.Count > 0)
            List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.InStock, LocationStatusEnum.Free);
            if (locationGroups != null)
            {
                return BaseDal.QueryFirst(x => x.Id == locationGroups.FirstOrDefault().IdA);
                LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt());
                int id = locationGroup?.IdA ?? 0;
                return BaseDal.QueryFirst(x => x.Id == id);
            }
            locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Free);
            if (locationGroups != null && locationGroups.Count > 0)
            {
                return BaseDal.QueryFirst(x => x.Id == locationGroups.FirstOrDefault().IdB);
                LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt());
                int id = locationGroup?.IdB ?? 0;
                return BaseDal.QueryFirst(x => x.Id == id);
            }
            return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnalbeStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy);
            return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy);
        }
        public Dt_LocationInfo AdjacentDepthLocation(string locationCode)
@@ -140,7 +144,7 @@
                            {
                                AreaId = 0,
                                Column = j + 1,
                                EnalbeStatus = LocationEnalbeStatusEnum.Normal.ObjToInt(),
                                EnableStatus = LocationEnalbeStatusEnum.Normal.ObjToInt(),
                                Layer = k + 1,
                                LocationStatus = LocationStatusEnum.Free.ObjToInt(),
                                LocationType = LocationTypeEnum.Cube.ObjToInt(),
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Common/AGVTaskFeedBackModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Common
{
    public class AGVTaskFeedBackModel
    {
        public string Task_id { get; set; }
        public string Task_status { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs
@@ -1,8 +1,13 @@
using System;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_Core.Utilities;
namespace WIDESEA_Core
{
@@ -24,6 +29,96 @@
        /// æŸ¥è¯¢æ¡ä»¶
        /// </summary>
        public List<SearchParameters> Filter { get; set; }
        public string ValidatePageOptions(PropertyInfo[] entityProperties)
        {
            string where = string.Empty;
            List<SearchParameters> searchParametersList = new List<SearchParameters>();
            if (this.Filter != null && this.Filter.Count > 0)
            {
                searchParametersList.AddRange(Filter);
            }
            else if (!string.IsNullOrEmpty(Wheres))
            {
                try
                {
                    searchParametersList = Wheres.DeserializeObject<List<SearchParameters>>();
                    Filter = searchParametersList;
                }
                catch { }
            }
            for (int i = 0; i < searchParametersList.Count; i++)
            {
                if (string.IsNullOrEmpty(searchParametersList[i].Value))
                {
                    continue;
                }
                PropertyInfo? property = entityProperties.Where(c => c.Name.ToUpper() == searchParametersList[i].Name.ToUpper()).FirstOrDefault();
                if (property == null) continue;
                List<(bool, string, object)> results = property.ValidationValueForDbType(searchParametersList[i].Value.Split(',')).ToList();
                if (results == null || results.Count() == 0)
                {
                    continue;
                }
                for (int j = 0; j < results.Count(); j++)
                {
                    if (j == 0)
                    {
                        where += "(";
                    }
                    LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
                    if (expressionType == LinqExpressionType.Equal)
                    {
                        where += $"{searchParametersList[i].Name} = '{results[j].Item3}'";
                    }
                    else
                    {
                        where += $"{searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{results[j].Item3}'";
                    }
                    if (j == results.Count() - 1)
                    {
                        where += ")";
                    }
                    else
                    {
                        where += " or ";
                    }
                }
                if (i < searchParametersList.Count - 1)
                    where += " and ";
            }
            return where;
        }
        public Dictionary<string, OrderByType> GetPageDataSort(PropertyInfo[] propertyInfo)
        {
            if (!string.IsNullOrEmpty(Sort))
            {
                if (Sort.Contains(","))
                {
                    List<string> sortArr = Sort.Split(",").Where(x => propertyInfo.Any(p => p.Name == x)).ToList();
                    Dictionary<string, OrderByType> sortDic = new Dictionary<string, OrderByType>();
                    foreach (var item in sortArr)
                    {
                        sortDic[item] = Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc;
                    }
                    return sortDic;
                }
                else if (propertyInfo.Any(x => x.Name == Sort.FirstLetterToLower() || x.Name == Sort.FirstLetterToUpper()))
                {
                    return new Dictionary<string, OrderByType> {
                        {
                            Sort,Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc
                        } };
                }
            }
            return new Dictionary<string, OrderByType> { { "CreateDate", Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc } };
        }
    }
    public class SearchParameters
    {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/IRepository.cs
@@ -7,6 +7,7 @@
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Enums;
namespace WIDESEA_Core.BaseRepository
{
@@ -70,6 +71,10 @@
        Task<bool> DeleteDataByIdAsync(object id);
        bool DeleteAndMoveIntoHty(TEntity entity, OperateType operateType);
        bool DeleteAndMoveIntoHty(List<TEntity> entities, OperateType operateType);
        /// <summary>
        /// é€šè¿‡ä¸»é”®æ•°æ®åˆ é™¤å¤šæ¡æ•°æ®
        /// </summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs
@@ -16,6 +16,11 @@
using WIDESEA_Core.Const;
using WIDESEA_Core.AOP;
using OfficeOpenXml.FormulaParsing.ExpressionGraph;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Utilities;
using Microsoft.AspNetCore.Mvc.RazorPages;
using NetTaste;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Core.BaseRepository
{
@@ -537,7 +542,7 @@
        public virtual List<TResult> QueryTabs<T, T2, TResult>(
           Expression<Func<T, T2, object[]>> joinExpression,
           Expression<Func<T, T2, TResult>> selectExpression,
           Expression<Func<T,T2, bool>> whereExpressionT1,
           Expression<Func<T, T2, bool>> whereExpressionT1,
           Expression<Func<TResult, bool>> whereExpression)
        {
            List<TResult> list = _db.Queryable(joinExpression).WhereIF(whereExpressionT1 != null, whereExpressionT1)
@@ -859,6 +864,103 @@
             .WhereIF(whereExpression != null, whereExpression).ToListAsync();
        }
        public bool DeleteAndMoveIntoHty(TEntity entity, OperateType operateType)
        {
            Type type = entity.GetType();
            Assembly assembly = type.Assembly;
            Type? htyType = assembly.GetType(type.FullName + "_Hty");
            if (htyType != null)
            {
                object? obj = Activator.CreateInstance(htyType);
                PropertyInfo keyPro = typeof(TEntity).GetKeyProperty();
                PropertyInfo? operateTypePro = htyType.GetProperty(nameof(OperateType));
                PropertyInfo? sourceIdPro = htyType.GetProperty("SourceId");
                if (obj != null && keyPro != null && operateTypePro != null && sourceIdPro != null)
                {
                    operateTypePro.SetValue(obj, operateType.ToString());
                    sourceIdPro.SetValue(obj, keyPro.GetValue(entity));
                    List<PropertyInfo> propertyInfos = htyType.GetProperties().Where(x => x.Name != operateTypePro.Name && x.Name != sourceIdPro.Name && x.Name != keyPro.Name).ToList();
                    for (int i = 0; i < propertyInfos.Count; i++)
                    {
                        PropertyInfo propertyInfo = propertyInfos[i];
                        PropertyInfo? property = type.GetProperty(propertyInfo.Name);
                        if (property != null)
                        {
                            if (propertyInfo.Name == nameof(BaseEntity.Modifier))
                            {
                                propertyInfo.SetValue(obj, App.User.UserId > 0 ? App.User.UserName : App.User.UserId.ToString());
                            }
                            else if (propertyInfo.Name == nameof(BaseEntity.ModifyDate))
                            {
                                propertyInfo.SetValue(obj, DateTime.Now);
                            }
                            else
                            {
                                propertyInfo.SetValue(obj, property.GetValue(entity));
                            }
                        }
                    }
                    _db.InsertableByObject(obj).AS(type.Name + "_Hty").ExecuteCommand();
                }
            }
            return DeleteData(entity);
        }
        public bool DeleteAndMoveIntoHty(List<TEntity> entities, OperateType operateType)
        {
            Type type = typeof(TEntity);
            Assembly assembly = type.Assembly;
            Type? htyType = assembly.GetType(type.FullName + "_Hty");
            if (htyType != null)
            {
                object? obj2 = Activator.CreateInstance(htyType);
                PropertyInfo keyPro = typeof(TEntity).GetKeyProperty();
                PropertyInfo? operateTypePro = htyType.GetProperty(nameof(OperateType));
                PropertyInfo? sourceIdPro = htyType.GetProperty("SourceId");
                if (obj2 != null && keyPro != null && operateTypePro != null && sourceIdPro != null)
                {
                    List<PropertyInfo> propertyInfos = htyType.GetProperties().Where(x => x.Name != operateTypePro.Name && x.Name != sourceIdPro.Name && x.Name != keyPro.Name).ToList();
                    List<object> list = new List<object>();
                    foreach (var item in entities)
                    {
                        object? obj = Activator.CreateInstance(htyType);
                        if (obj != null)
                        {
                            operateTypePro.SetValue(obj, operateType.ToString());
                            sourceIdPro.SetValue(obj, keyPro.GetValue(item));
                            for (int i = 0; i < propertyInfos.Count; i++)
                            {
                                PropertyInfo propertyInfo = propertyInfos[i];
                                PropertyInfo? property = type.GetProperty(propertyInfo.Name);
                                if (property != null)
                                {
                                    if (propertyInfo.Name == nameof(BaseEntity.Modifier))
                                    {
                                        propertyInfo.SetValue(obj, App.User.UserId > 0 ? App.User.UserName : App.User.UserId.ToString());
                                    }
                                    else if (propertyInfo.Name == nameof(BaseEntity.ModifyDate))
                                    {
                                        propertyInfo.SetValue(obj, DateTime.Now);
                                    }
                                    else
                                    {
                                        propertyInfo.SetValue(obj, property.GetValue(item));
                                    }
                                }
                            }
                            list.Add(obj);
                        }
                    }
                    _db.InsertableByObject(list).AS(type.Name + "_Hty").ExecuteCommand();
                }
            }
            return DeleteData(entities);
        }
        //List<TResult> QueryMuch<T, T2, T3, TResult>(
        //    Expression<Func<T, T2, T3, object[]>> joinExpression,
        //    Expression<Func<T, T2, T3, TResult>> selectExpression,
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
@@ -34,7 +34,7 @@
        public ISqlSugarClient Db => BaseDal.Db;
        private PropertyInfo[] _propertyInfo { get; set; } = null;
        private PropertyInfo[] TProperties
        public PropertyInfo[] TProperties
        {
            get
            {
@@ -49,112 +49,14 @@
        public virtual PageGridData<TEntity> GetPageData(PageDataOptions options)
        {
            string wheres = ValidatePageOptions(options);
            string wheres = options.ValidatePageOptions(TProperties);
            //获取排序字段
            Dictionary<string, OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
            Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(TProperties);
            PageGridData<TEntity> pageGridData = new PageGridData<TEntity>();
            pageGridData = BaseDal.QueryPage(wheres, options.Page, options.Rows, orderbyDic);
            return pageGridData;
        }
        protected string ValidatePageOptions(PageDataOptions options)
        {
            options = options ?? new PageDataOptions();
            string where = "";
            List<SearchParameters> searchParametersList = new List<SearchParameters>();
            if (options.Filter != null && options.Filter.Count > 0)
            {
                searchParametersList.AddRange(options.Filter);
            }
            else if (!string.IsNullOrEmpty(options.Wheres))
            {
                try
                {
                    searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
                    options.Filter = searchParametersList;
                }
                catch { }
            }
            QueryRelativeList?.Invoke(searchParametersList);
            for (int i = 0; i < searchParametersList.Count; i++)
            {
                if (string.IsNullOrEmpty(searchParametersList[i].Value))
                {
                    continue;
                }
                PropertyInfo property = TProperties.Where(c => c.Name.ToUpper() == searchParametersList[i].Name.ToUpper()).FirstOrDefault();
                if (property == null) continue;
                List<(bool, string, object)> results = property.ValidationValueForDbType(searchParametersList[i].Value.Split(',')).ToList();
                if (results == null || results.Count() > 0)
                {
                    continue;
                }
                for (int j = 0; j < results.Count(); j++)
                {
                    if (j == 0)
                    {
                        where += "(";
                    }
                    LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
                    if (expressionType == LinqExpressionType.Equal)
                    {
                        where += $"{searchParametersList[i].Name} = '{results[j].Item3}'";
                    }
                    else
                    {
                        where += $"{searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{results[j].Item3}'";
                    }
                    if (j == results.Count() - 1)
                    {
                        where += ")";
                    }
                    else
                    {
                        where += " or ";
                    }
                }
                if (i < searchParametersList.Count - 1)
                    where += " and ";
            }
            return where;
        }
        /// <summary>
        /// èŽ·å–æŽ’åºå­—æ®µ
        /// </summary>
        /// <param name="pageData"></param>
        /// <param name="propertyInfo"></param>
        /// <returns></returns>
        private Dictionary<string, OrderByType> GetPageDataSort(PageDataOptions pageData, PropertyInfo[] propertyInfo)
        {
            if (!string.IsNullOrEmpty(pageData.Sort))
            {
                if (pageData.Sort.Contains(","))
                {
                    List<string> sortArr = pageData.Sort.Split(",").Where(x => propertyInfo.Any(p => p.Name == x)).ToList();
                    Dictionary<string, OrderByType> sortDic = new Dictionary<string, OrderByType>();
                    foreach (var item in sortArr)
                    {
                        sortDic[item] = pageData.Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc;
                    }
                    return sortDic;
                }
                else if (propertyInfo.Any(x => x.Name == pageData.Sort.FirstLetterToLower() || x.Name == pageData.Sort.FirstLetterToUpper()))
                {
                    return new Dictionary<string, OrderByType> {
                        {
                            pageData.Sort,pageData.Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc
                        } };
                }
            }
            return new Dictionary<string, OrderByType> { { "CreateDate", pageData.Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc } };
        }
        public virtual object GetDetailPage(PageDataOptions pageData)
@@ -242,8 +144,8 @@
                }
                else if (keyPro.PropertyType == typeof(int) || keyPro.PropertyType == typeof(long))
                {
                    SugarColumn sugarColumn = keyPro.GetCustomAttribute<SugarColumn>();
                    if (sugarColumn.IsIdentity)
                    SugarColumn? sugarColumn = keyPro.GetCustomAttribute<SugarColumn>();
                    if (sugarColumn?.IsIdentity ?? true)
                    {
                        saveModel.MainData.Remove(keyPro.Name.FirstLetterToUpper());
                        saveModel.MainData.Remove(keyPro.Name.FirstLetterToLower());
@@ -603,9 +505,9 @@
                string savePath = AppDomain.CurrentDomain.BaseDirectory + $"ExcelExport";
                IExporter exporter = new ExcelExporter();
                string wheres = ValidatePageOptions(options);
                string wheres = options.ValidatePageOptions(TProperties);
                //获取排序字段
                Dictionary<string, OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
                Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(TProperties);
                List<TEntity> entities = BaseDal.QueryData(wheres, orderbyDic);
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs
@@ -38,7 +38,7 @@
    #endregion åº“存状态
    public enum OperateTypeEnum
    public enum OperateType
    {
        äººå·¥åˆ é™¤ = 1,
        è‡ªåŠ¨åˆ é™¤ = 2,
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/SequenceEnum.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Core.Enums
{
    public enum SequenceEnum
    {
        SeqTaskNum
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/TaskEnum.cs
@@ -14,8 +14,6 @@
    /// </summary>
    public enum TaskTypeEnum
    {
        /// <summary>
        /// å‡ºåº“ =100
        /// </summary>
@@ -89,7 +87,9 @@
        /// <summary>
        /// åº“外移库
        /// </summary>
        RelocationOut = 302
        RelocationOut = 302,
        AGVCarry = 500,
    }
    #endregion ä»»åŠ¡ç±»åž‹
@@ -105,27 +105,6 @@
        /// æ–°å»ºå…¥åº“任务
        /// </summary>
        InNew = 200,
        /// <summary>
        /// AGV入库执行中
        /// </summary>
        AGV_InExecuting = 210,
        /// <summary>
        /// AGV入库完成
        /// </summary>
        AGV_InFinish = 215,
        /// <summary>
        /// è¾“送线入库执行中
        /// </summary>
        Line_InExecuting = 220,
        /// <summary>
        /// è¾“送线入库完成
        /// </summary>
        Line_InFinish = 225,
        /// <summary>
        /// å †åž›æœºå…¥åº“执行中
        /// </summary>
@@ -168,27 +147,6 @@
        /// æ–°å»ºä»»åŠ¡
        /// </summary>
        OutNew = 100,
        /// <summary>
        /// AGV执行中
        /// </summary>
        AGV_OutExecuting = 110,
        /// <summary>
        /// AGV出库完成
        /// </summary>
        AGV_OutFinish = 115,
        /// <summary>
        /// è¾“送线出库执行中
        /// </summary>
        Line_OutExecuting = 120,
        /// <summary>
        /// è¾“送线出库完成
        /// </summary>
        Line_OutFinish = 125,
        /// <summary>
        /// å †åž›æœºå‡ºåº“执行中
        /// </summary>
@@ -225,4 +183,12 @@
        OutException = 199
    }
    public enum AGVTaskStatusEnum
    {
        AGV_New = 500,
        AGV_Executing = 510,
        AGV_Finish = 520
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs
@@ -42,6 +42,8 @@
        public string Token => GetToken();
        public int MenuType => (_accessor.HttpContext?.Request.Headers.ContainsKey("uniapp") ?? false) ? 1 : 0;
        public bool IsAuthenticated()
        {
            return _accessor.HttpContext?.User?.Identity?.IsAuthenticated ?? false;
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/IUser.cs
@@ -28,6 +28,8 @@
        string Token { get; }
        int MenuType {  get; }
        void UpdateToke(string token);
        /// <summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs
@@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using WIDESEA_Core.Helper;
using WIDESEA_Core.LogHelper;
@@ -20,94 +21,117 @@
        /// 
        /// </summary>
        private readonly RequestDelegate _next;
        private readonly ILogger<ApiLogMiddleware> _logger;
        public ApiLogMiddleware(RequestDelegate next, ILogger<ApiLogMiddleware> logger)
        public ApiLogMiddleware(RequestDelegate next)
        {
            _next = next;
            _logger = logger;
        }
        //todo
        public async Task InvokeAsync(HttpContext context)
        {
            //if (AppSettings.app("Middleware", "RequestResponseLog", "Enabled").ObjToBool())
            // è¿‡æ»¤ï¼Œåªæœ‰æŽ¥å£
            if (context.Request.Path.Value?.Contains("api") ?? false)
            {
                // è¿‡æ»¤ï¼Œåªæœ‰æŽ¥å£
                if (context.Request.Path.Value.Contains("api"))
                {
                    context.Request.EnableBuffering();
                    //Stream originalBody = context.Response.Body;
                context.Request.EnableBuffering();
                Stream originalBody = context.Response.Body;
                try
                {
                    try
                    {
                        // å­˜å‚¨è¯·æ±‚数据
                        //string requestParam = GetRequestData(context);
                        //DateTime beginDate = DateTime.Now;
                        await RequestDataLog(context);
                        context.Request.Body.Position = 0;
                    }
                    catch { }
                    using MemoryStream ms = new();
                    context.Response.Body = ms;
                        //using var ms = new MemoryStream();
                        //context.Response.Body = ms;
                    await _next(context);
                        await _next(context);
                    try
                    {
                        // å­˜å‚¨å“åº”数据
                        //DateTime endDate = DateTime.Now;
                        //string responseParam = GetResponsetData(context);
                        ResponseDataLog(context.Response, ms);
                    }
                    catch { }
                        //context.Response.Body.Position = 0;
                        //await context.Response.Body.CopyToAsync(originalBody);
                    ms.Position = 0;
                    await ms.CopyToAsync(originalBody);
                        //Logger.WriteApiLog2DB(context,requestParam, beginDate, responseParam, endDate, context.Response.StatusCode == 200 ? LoggerStatus.Success : LoggerStatus.Error);
                    }
                    catch (Exception ex)
                    {
                        // è®°å½•异常
                        _logger.LogError(ex.Message + "" + ex.InnerException);
                    }
                    finally
                    {
                        //context.Response.Body = originalBody;
                    }
                }
                //else
                //{
                //    await _next(context);
                //}
                catch (Exception ex)
                {
                    // è®°å½•异常
                }
                finally
                {
                    context.Response.Body = originalBody;
                }
            }
            //else
            //{
            //    await _next(context);
            //}
        }
        private string GetRequestData(HttpContext context)
        {
            try
            else
            {
                using StreamReader sr = new StreamReader(context.Request.Body);
                string request = JsonConvert.SerializeObject(sr.ReadToEnd()); ;
                context.Request.Body.Position = 0;
                return request;
            }
            catch (Exception ex)
            {
                return $"请求参数获取错误,{ex.Message}";
                await _next(context);
            }
        }
        private string GetResponsetData(HttpContext context)
        private async Task RequestDataLog(HttpContext context)
        {
            try
            var request = context.Request;
            var sr = new StreamReader(request.Body);
            //long length = request.Body.Length;
            RequestLogInfo requestResponse = new RequestLogInfo()
            {
                using StreamReader sr = new StreamReader(context.Response.Body);
                string response = JsonConvert.SerializeObject(sr.ReadToEnd()); ;
                context.Response.Body.Position = 0;
                return response;
            }
            catch (Exception ex)
                Path = request.Path,
                QueryString = request.QueryString.ToString(),
                BodyData = await sr.ReadToEndAsync()
            };
            var content = JsonConvert.SerializeObject(requestResponse);
            if (!string.IsNullOrEmpty(content))
            {
                return $"响应参数获取错误,{ex.Message}";
                LogLock.OutLogAOP("接口日志", new string[] { "请求数据 -  è¯·æ±‚数据类型:" + requestResponse.GetType().ToString(), content });
                request.Body.Position = 0;
            }
        }
        private void ResponseDataLog(HttpResponse response, MemoryStream ms)
        {
            ms.Position = 0;
            var responseBody = new StreamReader(ms).ReadToEnd();
            // å޻除 Html
            var reg = "<[^>]+>";
            var isHtml = Regex.IsMatch(responseBody, reg);
            if (!string.IsNullOrEmpty(responseBody))
            {
                Parallel.For(0, 1, e =>
                {
                    LogLock.OutLogAOP("接口日志", new string[] { "响应数据 -  å“åº”数据类型:" + responseBody.GetType().ToString(), responseBody });
                });
            }
        }
    }
    public class RequestLogInfo
    {
        /// <summary>
        /// è¯·æ±‚地址
        /// </summary>
        public string Path { get; set; }
        /// <summary>
        /// è¯·æ±‚参数
        /// </summary>
        public string QueryString { get; set; }
        /// <summary>
        /// Body参数
        /// </summary>
        public string BodyData { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs
@@ -228,9 +228,12 @@
        {
            foreach (PropertyInfo property in properties)
            {
                SugarColumn sugarColumn = property.GetCustomAttribute<SugarColumn>();
                if (sugarColumn.IsPrimaryKey)
                    return property.Name;
                SugarColumn? sugarColumn = property.GetCustomAttribute<SugarColumn>();
                if (sugarColumn != null)
                {
                    if (sugarColumn.IsPrimaryKey)
                        return property.Name;
                }
            }
            return null;
        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/ModelValidate.cs
@@ -162,15 +162,19 @@
                                Type[] types = propertyInfo.PropertyType.GenericTypeArguments;
                                if (types.Length == 1)
                                {
                                    string str = value.Serialize();
                                    if (str == "[]")
                                    if (tempValue.ChangeType(property.PropertyType).ToString() == propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1].ChangeType(property.PropertyType).ToString())
                                    {
                                        return (false, $"【{property.Name}】属性的值为【{propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1]}】时【{propertyInfo.Name}】属性的值不可为空", data);
                                        string str = value.Serialize();
                                        if (str == "[]")
                                        {
                                            return (false, $"【{property.Name}】属性的值为【{propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1]}】时【{propertyInfo.Name}】属性的值不可为空", data);
                                        }
                                    }
                                }
                                else if (types.Length == 0)
                                {
                                    if (tempValue.ChangeType(property.PropertyType) != propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1].ChangeType(property.PropertyType) && value == null && string.IsNullOrEmpty(value.ToString()))
                                    if (tempValue.ChangeType(property.PropertyType).ToString() == propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1].ChangeType(property.PropertyType).ToString() && value == null && string.IsNullOrEmpty(value.ToString()))
                                    {
                                        return (false, $"【{property.Name}】属性的值为【{propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1]}】时【{propertyInfo.Name}】属性的值不可为空", data);
                                    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/CachePointGroupDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_DTO.Basic
{
    public class CachePointGroupDTO
    {
        public int IdA { get; set; }
        public int IdB { get; set; }
        public string PointCodeA { get; set; }
        public string PointCodeB { get; set; }
        public int PointTypeA { get; set; }
        public int PointTypeB { get; set; }
        public int PointStatusA { get; set; }
        public int PointStatusB { get; set; }
        public int DepthA { get; set; }
        public int DepthB { get; set; }
        public int EnableStatusA { get; set; }
        public int EnableStatusB { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs
@@ -1,4 +1,5 @@

using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
@@ -9,8 +10,31 @@
namespace WIDESEA_DTO.Stock
{
    public class StockViewDTO : Dt_LocationInfo
    public class StockViewDTO
    {
        public int AreaId { get; set; }
        public string LocationCode { get; set; }
        public string LocationName { get; set; }
        public int Column { get; set; }
        public int Row { get; set; }
        public int Layer { get; set; }
        public int Depth { get; set; }
        public int LocationStatus { get; set; }
        public int LocationType { get; set; }
        public string RoadwayNo { get; set; }
        public int EnalbeStatus { get; set; }
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int StockId { get; set; }
        public string PalletCode { get; set; }
@@ -21,6 +45,14 @@
        public string StockRemark { get; set; }
        public string Creater { get; set; }
        public DateTime CreateDate { get; set; }
        public string Modifier { get; set; }
        public DateTime? ModifyDate { get; set; }
        [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(StockId))]
        public List<Dt_StockInfoDetail> Details { get; set; }
    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaRouterRepository.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_IBasicRepository
{
    public interface IAreaRouterRepository : IRepository<Dt_AreaRouter>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IBasicRepository
{
    public interface IBasicRepository : IDependency
    {
        IAreaInfoRepository AreaInfoRepository { get; }
        ILocationInfoRepository LocationInfoRepository { get; }
        IMaterielInfoRepository MaterielInfoRepository { get; }
        IRoadwayInfoRepository RoadwayInfoRepository { get; }
        IWarehouseRepository WarehouseRepository { get; }
        IAreaRouterRepository AreaRouterRepository { get; }
        ICachePointRepository CachePointRepository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICachePointRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
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.Basic;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicRepository
{
    public interface ICachePointRepository : IRepository<Dt_CachePoint>
    {
        List<CachePointGroupDTO> GetCachePointGroups(int areaId, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaInfoService.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
@@ -11,6 +12,6 @@
{
    public interface IAreaInfoService : IService<Dt_AreaInfo>
    {
       IAreaInfoRepository Repository { get; }
        IAreaInfoRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaRouterService.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_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicService
{
    public interface IAreaRouterService : IService<Dt_AreaRouter>
    {
        IAreaRouterRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IBasicService
{
    public interface IBasicService: IDependency
    {
        IAreaInfoService AreaInfoService { get; }
        ILocationInfoService LocationInfoService { get; }
        IMaterielInfoService MaterielInfoService { get; }
        IRoadwayInfoService RoadwayInfoService { get; }
        IWarehouseService WarehouseService { get; }
        IAreaRouterService AreaRouterService { get; }
        ICachePointService CachePointService { get; }
        WebResponseContent AreaEnableStatus(int[] keys);
        WebResponseContent AreaDisableStatus(int[] keys);
        WebResponseContent AreaEnableStatus(int key);
        WebResponseContent AreaDisableStatus(int key);
        WebResponseContent CachePointEnableStatus(int[] keys);
        WebResponseContent CachePointDisableStatus(int[] keys);
        WebResponseContent CachePointEnableStatus(int key);
        WebResponseContent CachePointDisableStatus(int key);
        WebResponseContent LocationEnableStatus(int[] keys);
        WebResponseContent LocationDisableStatus(int[] keys);
        WebResponseContent LocationEnableStatus(int key);
        WebResponseContent LocationDisableStatus(int key);
        WebResponseContent RoadwayEnableStatus(int[] keys);
        WebResponseContent RoadwayDisableStatus(int[] keys);
        WebResponseContent RoadwayEnableStatus(int key);
        WebResponseContent RoadwayDisableStatus(int key);
        WebResponseContent WarehouseEnableStatus(int[] keys);
        WebResponseContent WarehouseDisableStatus(int[] keys);
        WebResponseContent WarehouseEnableStatus(int key);
        WebResponseContent WarehouseDisableStatus(int key);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICachePointService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
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_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicService
{
    public interface ICachePointService : IService<Dt_CachePoint>
    {
        ICachePointRepository Repository { get; }
        Dt_CachePoint? AssignCachePoint(int areaId);
        Dt_CachePoint? GetIbStockCachePoint(int areaId);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs
@@ -20,5 +20,6 @@
        Dt_LocationInfo AdjacentDepthLocation(string locationCode);
        Dt_LocationInfo? AssignLocation(string stationCode, int inboundType);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
@@ -20,5 +21,6 @@
        Dt_MaterielInfo GetMaterielInfo(string materielCode);
        List<Dt_MaterielInfo> GetMaterielInfos(List<string> materielCodes);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IRoadwayInfoService.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
@@ -12,5 +13,6 @@
    public interface IRoadwayInfoService : IService<Dt_RoadwayInfo>
    {
        IRoadwayInfoRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
@@ -12,5 +13,6 @@
    public interface IWarehouseService : IService<Dt_Warehouse>
    {
        IWarehouseRepository Repository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IInboundRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IInboundRepository
{
    public interface IInboundRepository : IDependency
    {
        IInboundOrderDetailRepository InboundOrderDetailRepository { get; }
        IInboundOrderRepository InboundOrderRepository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs
@@ -18,5 +18,7 @@
        WebResponseContent AddInboundOrder(InboundOrderAddDTO orderAddDTO);
        WebResponseContent MaterielGroup(MaterielGroupDTO materielGroupDTO);
        WebResponseContent QueryOrderInfo(int pageNo, string orderNo);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IInboundService
{
    public interface IInboundService:IDependency
    {
        IInboundOrderDetailService InboundOrderDetailService { get; }
        IInboundOrderService InbounOrderService { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IOutboundRepository
{
    public interface IOutboundRepository : IDependency
    {
        IOutboundOrderDetailRepository OutboundOrderDetailRepository { get; }
        IOutboundOrderRepository OutboundOrderRepository { get; }
        IOutStockLockInfoRepository OutboundStockLockInfoRepository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IOutboundService
{
    public interface IOutboundService:IDependency
    {
        IOutboundOrderDetailService OutboundOrderDetailService { get; }
        IOutboundOrderService OutboundOrderService { get; }
        IOutStockLockInfoService OutboundStockLockInfoService { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IRecordRepository/IRecordRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IRecordRepository
{
    public interface IRecordRepository : IDependency
    {
        ILocationStatusChangeRecordRepository LocationStatusChangeRecordRepository { get; }
        IStockQuantityChangeRecordRepository StockQuantityChangeRecordRepository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IRecordService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IRecordService
{
    public interface IRecordService : IDependency
    {
        ILocationStatusChangeRecordSetvice LocationStatusChangeRecordSetvice { get; }
        IStockQuantityChangeRecordService StockQuantityChangeRecordService { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfoRepository.cs
@@ -26,5 +26,7 @@
        List<Dt_StockInfo> GetStockInfosExclude(string materielCode, List<string> palletCodes);
        bool UpdateDataWithDetail(Dt_StockInfo stockInfo);
        Dt_StockInfo GetPalletStockInfo(string roadwayNo);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IStockRepository
{
    public interface IStockRepository : IDependency
    {
        IStockInfoDetailRepository StockInfoDetailRepository { get; }
        IStockInfoRepository StockInfoRepository { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
namespace WIDESEA_IStockService
{
    public interface IStockService:IDependency
    {
        IStockInfoDetailService StockInfoDetailService { get; }
        IStockInfoService StockInfoService { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.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.Stock;
namespace WIDESEA_IStockService
{
    public interface IStockViewService : IDependency
    {
        PageGridData<StockViewDTO> GetPageData(PageDataOptions options);
        object GetDetailPage(PageDataOptions pageData);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -42,5 +42,11 @@
        WebResponseContent GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews);
        WebResponseContent GenerateOutboundTask(int[] keys);
        WebResponseContent PalletOutboundTask(string roadwayNo, string endStation);
        WebResponseContent CallMateriel(string endPoint);
        WebResponseContent MaterielCarry(string startPoint);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IInboundRepository;
namespace WIDESEA_InboundRepository
{
    public class InboundRepository : IInboundRepository
    {
        public IInboundOrderDetailRepository InboundOrderDetailRepository { get; }
        public IInboundOrderRepository InboundOrderRepository { get; }
        public InboundRepository(IInboundOrderDetailRepository inboundOrderDetailRepository, IInboundOrderRepository inboundOrderRepository)
        {
            InboundOrderDetailRepository = inboundOrderDetailRepository;
            InboundOrderRepository = inboundOrderRepository;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs
@@ -1,4 +1,5 @@
using AutoMapper;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -25,24 +26,23 @@
    public class InboundOrderService : ServiceBase<Dt_InboundOrder, IInboundOrderRepository>, IInboundOrderService
    {
        private readonly IMapper _mapper;
        private readonly IMaterielInfoService _materielInfoService;
        private readonly IStockInfoService _stockInfoService;
        private readonly IStockInfoDetailService _stockDetailService;
        private readonly ITaskRepository _taskRepository;
        private readonly IInboundOrderDetailService _inboundOrderDetailService;
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        private readonly ITaskRepository _taskRepository;
        private IBasicService _basicService;
        private IStockService _stockService;
        private IInboundOrderDetailService _inboundOrderDetailService;
        public IInboundOrderRepository Repository => BaseDal;
        public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IMaterielInfoService materielInfoService, IStockInfoDetailService stockDetailService, IStockInfoService stockInfoService, ITaskRepository taskRepository, IInboundOrderDetailService inboundOrderDetailService, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
        public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, ITaskRepository taskRepository, IBasicService basicService, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService) : base(BaseDal)
        {
            _mapper = mapper;
            _materielInfoService = materielInfoService;
            _stockDetailService = stockDetailService;
            _stockInfoService = stockInfoService;
            _taskRepository = taskRepository;
            _inboundOrderDetailService = inboundOrderDetailService;
            _unitOfWorkManage = unitOfWorkManage;
            _taskRepository = taskRepository;
            _basicService = basicService;
            _stockService = stockService;
            _inboundOrderDetailService = inboundOrderDetailService;
        }
        /// <summary>
@@ -108,7 +108,7 @@
            }
            List<string> materielCodes = inboundOrderAddDTO.Details.Select(x => x.MaterielCode).ToList();
            if (!_materielInfoService.ExsitMateriels(materielCodes))
            if (!_basicService.MaterielInfoService.ExsitMateriels(materielCodes))
            {
                return (false, "有物料信息未录入,请录入物料信息", inboundOrderAddDTO);
            }
@@ -146,12 +146,12 @@
                List<string> materielCodes = matSerialNumberDTOs.GroupBy(x => x.MaterielCode).Select(x => x.Key).ToList();
                List<Dt_MaterielInfo> materielInfos = _materielInfoService.GetMaterielInfos(materielCodes);
                List<Dt_MaterielInfo> materielInfos = _basicService.MaterielInfoService.GetMaterielInfos(materielCodes);
                Dt_InboundOrder inboundOrder = GetInboundOrder(materielGroupDTO.OrderNo);
                Dt_StockInfo? stockInfo = _stockInfoService.GetStockByPalletCode(materielGroupDTO.PalletCode);
                Dt_StockInfo? stockInfo = _stockService.StockInfoService.GetStockByPalletCode(materielGroupDTO.PalletCode);
                (bool, string, object?) result = CheckMaterielGroupParam(materielGroupDTO, matSerialNumberDTOs, materielInfos, materielCodes, inboundOrder, stockInfo);
                if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2);
@@ -220,7 +220,7 @@
                _unitOfWorkManage.BeginTran();
                UpdateData(inboundOrder);
                _inboundOrderDetailService.UpdateData(inboundOrderDetails);
                _stockInfoService.AddMaterielGroup(stockInfo);
                _stockService.StockInfoService.AddMaterielGroup(stockInfo);
                _unitOfWorkManage.CommitTran();
                return WebResponseContent.Instance.OK();
            }
@@ -256,7 +256,7 @@
                return (false, "已上架的托盘不能再次组盘", materielGroupDTO);
            }
            if (_stockDetailService.ExistSerialNumbers(materielGroupDTO.SerialNumbers))
            if (_stockService.StockInfoDetailService.ExistSerialNumbers(materielGroupDTO.SerialNumbers))
            {
                return (false, "有序列号在库存中已存在", materielGroupDTO);
            }
@@ -307,5 +307,31 @@
            return (true, "成功", materielGroupDTO);
        }
        public WebResponseContent QueryOrderInfo(int pageNo, string orderNo)
        {
            if (string.IsNullOrEmpty(orderNo))
            {
                object obj = Repository.QueryPage(x => true, pageNo, 10, new Dictionary<string, OrderByType> { { nameof(Dt_InboundOrder.CreateDate), OrderByType.Desc } }).Rows.Select(x => new
                {
                    x.OrderNo,
                    x.UpperOrderNo,
                    x.CreateDate,
                    x.Creater
                });
                return WebResponseContent.Instance.OK(data: obj);
            }
            else
            {
                object obj = Repository.QueryPage(x => x.OrderNo == orderNo, pageNo, 10, new Dictionary<string, OrderByType> { { nameof(Dt_InboundOrder.CreateDate), OrderByType.Desc } }).Rows.Select(x => new
                {
                    x.OrderNo,
                    x.UpperOrderNo,
                    x.CreateDate,
                    x.Creater
                });
                return WebResponseContent.Instance.OK(data: obj);
            }
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IInboundService;
namespace WIDESEA_InboundService
{
    public class InboundService : IInboundService
    {
        public IInboundOrderDetailService InboundOrderDetailService { get; }
        public IInboundOrderService InbounOrderService { get; }
        public InboundService(IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService)
        {
            InboundOrderDetailService = inboundOrderDetailService;
            InbounOrderService = inbounOrderService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_AreaRouter.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
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_AreaRouter))]
    public class Dt_AreaRouter : BaseEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// èµ·ç‚¹åŒºåŸŸ
        /// </summary>
        [ImporterHeader(Name = "起点")]
        [ExporterHeader(DisplayName = "起点")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "起点")]
        public string StartArea { get; set; }
        /// <summary>
        /// ç»ˆç‚¹åŒºåŸŸ
        /// </summary>
        [ImporterHeader(Name = "终点")]
        [ExporterHeader(DisplayName = "终点")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "终点")]
        public string NextArea { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "路由类型")]
        public int RouterType { get; set; }
        /// <summary>
        /// æ˜¯å¦æ˜¯æœ€ç»ˆç‚¹
        /// </summary>
        [ImporterHeader(Name = "是否是最终点")]
        [ExporterHeader(DisplayName = "是否是最终点")]
        [SugarColumn(IsNullable = false, ColumnDescription = "是否是最终点")]
        public bool IsEnd { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [ImporterHeader(Name = "备注")]
        [ExporterHeader(DisplayName = "备注")]
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CachePoint.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
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_CachePoint), "缓存点位")]
    public class Dt_CachePoint : BaseEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "区域主键")]
        public int AreaId { get; set; }
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "缓存点编号")]
        public string PointCode { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "缓存点状态")]
        public int PointStatus { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "缓存点启用状态")]
        public int EnableStatus { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "货位行")]
        public int Row { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "货位列")]
        public int Column { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "货位深度")]
        public int Depth { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "缓存点类型")]
        public int PointType { get; set; }
        [SugarColumn(IsNullable = true, Length = 500, ColumnDescription = "备注")]
        public string Remark { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs
@@ -48,7 +48,7 @@
        public int LocationStatus {  get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "禁用状态")]
        public int EnalbeStatus { get; set; }
        public int EnableStatus { get; set; }
        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "备注")]
        public string Remark {  get; set; }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_RoadwayInfo.cs
@@ -18,10 +18,10 @@
        public string RoadwayNo {  get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "仓库主键")]
        public int WarehouseId {  get; set; }
        public int AreaId {  get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "禁用状态")]
        public int EnalbeStatus {  get; set; }
        public int EnableStatus {  get; set; }
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "设备编号")]
        public string DeviceNo {  get; set; }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Menu.cs
@@ -75,11 +75,9 @@
        /// <summary>
        /// èœå•类型
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "菜单类型")]
        public int? MenuType { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "菜单类型")]
        public int MenuType { get; set; }
        [Navigate(NavigateType.OneToMany, nameof(ParentId), nameof(MenuId)), SugarColumn(IsIgnore = true, IsNullable = true)]
        public List<Sys_Menu> Menus { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs
@@ -7,6 +7,7 @@
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.DB.Models;
using WIDESEA_Core.Enums;
namespace WIDESEA_Model.Models
{
@@ -26,7 +27,7 @@
        /// </summary>
        [ImporterHeader(Name = "任务号")]
        [ExporterHeader(DisplayName = "任务号")]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务号"), SequenceAttirbute("SeqTaskNum", 6000)]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务号"), SequenceAttirbute(nameof(SequenceEnum.SeqTaskNum), 6000)]
        public int TaskNum { get; set; }
        /// <summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,169 @@
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.Attributes;
using WIDESEA_Core.Enums;
namespace WIDESEA_Model.Models
{
    [SugarTable(nameof(Dt_Task_Hty), "任务信息历史")]
    public class Dt_Task_Hty
    {
        /// <summary>
        /// ä¸»é”®
        /// </summary>
        [ImporterHeader(Name = "主键")]
        [ExporterHeader(DisplayName = "主键")]
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int TaskId { get; set; }
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        [ImporterHeader(Name = "任务号")]
        [ExporterHeader(DisplayName = "任务号")]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务号"), SequenceAttirbute(nameof(SequenceEnum.SeqTaskNum), 6000)]
        public int TaskNum { get; set; }
        /// <summary>
        /// æ‰˜ç›˜ç¼–号
        /// </summary>
        [ImporterHeader(Name = "托盘编号")]
        [ExporterHeader(DisplayName = "托盘编号")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "托盘编号")]
        public string PalletCode { get; set; }
        /// <summary>
        /// å··é“号
        /// </summary>
        [ImporterHeader(Name = "巷道号")]
        [ExporterHeader(DisplayName = "巷道号")]
        [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "巷道号")]
        public string Roadway { get; set; }
        /// <summary>
        /// ä»»åŠ¡ç±»åž‹
        /// </summary>
        [ImporterHeader(Name = "任务类型")]
        [ExporterHeader(DisplayName = "任务类型")]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务类型")]
        public int TaskType { get; set; }
        /// <summary>
        /// ä»»åŠ¡çŠ¶æ€
        /// </summary>
        [ImporterHeader(Name = "任务状态")]
        [ExporterHeader(DisplayName = "任务状态")]
        [SugarColumn(IsNullable = false, ColumnDescription = "任务状态")]
        public int TaskStatus { get; set; }
        /// <summary>
        /// èµ·å§‹åœ°å€
        /// </summary>
        [ImporterHeader(Name = "起始地址")]
        [ExporterHeader(DisplayName = "起始地址")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "起始地址")]
        public string SourceAddress { get; set; }
        /// <summary>
        /// ç›®æ ‡åœ°å€
        /// </summary>
        [ImporterHeader(Name = "目标地址")]
        [ExporterHeader(DisplayName = "目标地址")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "目标地址")]
        public string TargetAddress { get; set; }
        /// <summary>
        /// å½“前位置
        /// </summary>
        [ImporterHeader(Name = "当前位置")]
        [ExporterHeader(DisplayName = "当前位置")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "当前位置")]
        public string CurrentAddress { get; set; }
        /// <summary>
        /// ä¸‹ä¸€åœ°å€
        /// </summary>
        [ImporterHeader(Name = "下一地址")]
        [ExporterHeader(DisplayName = "下一地址")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "下一地址")]
        public string NextAddress { get; set; }
        /// <summary>
        /// å¼‚常信息
        /// </summary>
        [ImporterHeader(Name = "单据编号")]
        [ExporterHeader(DisplayName = "单据编号")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "单据编号")]
        public string? OrderNo { get; set; }
        /// <summary>
        /// ä¼˜å…ˆçº§
        /// </summary>
        [ImporterHeader(Name = "优先级")]
        [ExporterHeader(DisplayName = "优先级")]
        [SugarColumn(IsNullable = false, ColumnDescription = "优先级")]
        public int Grade { get; set; }
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "源主键")]
        public int SourceKey { get; set; }
        /// <summary>
        /// ä»»åŠ¡ä¸‹å‘æ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "任务下发时间")]
        [ExporterHeader(DisplayName = "任务下发时间")]
        [SugarColumn(IsNullable = true, ColumnDescription = "任务下发时间")]
        public DateTime? Dispatchertime { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [ImporterHeader(Name = "备注")]
        [ExporterHeader(DisplayName = "备注")]
        [SugarColumn(IsNullable = true, Length = 255, 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_OutboundRepository/OutboundRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IOutboundRepository;
namespace WIDESEA_OutboundRepository
{
    public class OutboundRepository : IOutboundRepository
    {
        public IOutboundOrderDetailRepository OutboundOrderDetailRepository { get; }
        public IOutboundOrderRepository OutboundOrderRepository { get; }
        public IOutStockLockInfoRepository OutboundStockLockInfoRepository { get; }
        public OutboundRepository(IOutboundOrderDetailRepository outboundOrderDetailRepository, IOutboundOrderRepository outboundOrderRepository, IOutStockLockInfoRepository outboundStockLockInfoRepository)
        {
            OutboundOrderDetailRepository = outboundOrderDetailRepository;
            OutboundOrderRepository = outboundOrderRepository;
            OutboundStockLockInfoRepository = outboundStockLockInfoRepository;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs
@@ -25,25 +25,24 @@
{
    public class OutboundOrderDetailService : ServiceBase<Dt_OutboundOrderDetail, IOutboundOrderDetailRepository>, IOutboundOrderDetailService
    {
        private readonly IStockInfoService _stockInfoService;
        private readonly IStockInfoDetailService _stockInfoDetailService;
        private readonly IOutStockLockInfoService _outStockLockInfoService;
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        private readonly ILocationStatusChangeRecordSetvice _locationStatusChangeRecordSetvice;
        private readonly IOutboundOrderService _outboundOrderService;
        private readonly ILocationInfoService _locationInfoService;
        private readonly IStockService _stockService;
        private readonly IBasicService _basicService;
        private readonly IRecordService _recordService;
        private readonly IOutboundRepository _outboundRepository;
        private readonly IOutStockLockInfoService _outStockLockInfoService;
        public IOutboundOrderDetailRepository Repository => BaseDal;
        public OutboundOrderDetailService(IOutboundOrderDetailRepository BaseDal, IStockInfoService stockInfoService, IOutStockLockInfoService outStockLockInfoService, IUnitOfWorkManage unitOfWorkManage, ILocationStatusChangeRecordSetvice locationStatusChangeRecordSetvice, IOutboundOrderService outboundOrderService, ILocationInfoService locationInfoService, IStockInfoDetailService stockInfoDetailService) : base(BaseDal)
        public OutboundOrderDetailService(IOutboundOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockService stockService, IBasicService basicService,  IRecordService recordService, IOutboundRepository outboundRepository, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal)
        {
            _stockInfoService = stockInfoService;
            _outStockLockInfoService = outStockLockInfoService;
            _unitOfWorkManage = unitOfWorkManage;
            _locationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice;
            _outboundOrderService = outboundOrderService;
            _locationInfoService = locationInfoService;
            _stockInfoDetailService = stockInfoDetailService;
            _stockService = stockService;
            _basicService = basicService;
            _recordService = recordService;
            _outboundRepository = outboundRepository;
            _outStockLockInfoService = outStockLockInfoService;
        }
        //
        public WebResponseContent LockOutboundStock(int orderDetailId)
@@ -56,7 +55,7 @@
            List<Dt_StockInfo> outStock = new List<Dt_StockInfo>();
            List<Dt_StockInfo> stockInfos = _stockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode);
            List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode);
            decimal stockTotalQuantity = stockInfos.Select(x => x.Details.Sum(v => v.StockQuantity - v.OutboundQuantity)).Sum(x => x);
            if (stockTotalQuantity >= needQuantity)//库存够
            {
@@ -152,12 +151,12 @@
            (bool, string) checkResult = CheckSelectStockDeital(outboundOrderDetail, stockSelectViews);
            if (!checkResult.Item1) throw new Exception(checkResult.Item2);
            Dt_OutboundOrder outboundOrder = _outboundOrderService.Repository.QueryFirst(x => x.Id == outboundOrderDetail.OrderId);
            Dt_OutboundOrder outboundOrder = _outboundRepository.OutboundOrderRepository.QueryFirst(x => x.Id == outboundOrderDetail.OrderId);
            decimal originalNeedQuantity = outboundOrderDetail.OrderQuantity - outboundOrderDetail.LockQuantity;
            decimal needQuantity = originalNeedQuantity;
            List<Dt_StockInfo> outStocks = _stockInfoService.Repository.GetStockInfosByPalletCodes(stockSelectViews.Select(x => x.PalletCode).ToList());
            List<Dt_StockInfo> outStocks = _stockService.StockInfoService.Repository.GetStockInfosByPalletCodes(stockSelectViews.Select(x => x.PalletCode).ToList());
            decimal assignQuantity = 0;
            outStocks.ForEach(x =>
            {
@@ -178,9 +177,9 @@
            needQuantity -= assignQuantity;
            if (outboundOrderDetail.OrderQuantity > outboundOrderDetail.LockQuantity)
            {
                List<Dt_StockInfo> stockInfos = _stockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode);
                List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode);
                stockInfos = stockInfos.Where(x => !stockSelectViews.Select(v => v.PalletCode).Contains(x.PalletCode)).ToList();
                List<Dt_StockInfo> autoAssignStocks = _stockInfoService.GetOutboundStocks(stockInfos, outboundOrderDetail.MaterielCode, needQuantity, out decimal residueQuantity);
                List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, outboundOrderDetail.MaterielCode, needQuantity, out decimal residueQuantity);
                outboundOrderDetail.LockQuantity += needQuantity - residueQuantity;
                outStocks.AddRange(autoAssignStocks);
                outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.AssignOver.ObjToInt();
@@ -192,7 +191,7 @@
            List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetOutStockLockInfos(outboundOrder, outboundOrderDetail, outStocks);
            List<Dt_LocationInfo> locationInfos = _locationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList());
            List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList());
            return (outStocks, outboundOrderDetail, outStockLockInfos, locationInfos);
        }
@@ -274,13 +273,13 @@
        {
            try
            {
                _stockInfoService.Repository.UpdateData(stockInfos);
                _stockService.StockInfoService.Repository.UpdateData(stockInfos);
                List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
                foreach (var item in stockInfos)
                {
                    stockInfoDetails.AddRange(item.Details);
                }
                _stockInfoDetailService.Repository.UpdateData(stockInfoDetails);
                _stockService.StockInfoDetailService.Repository.UpdateData(stockInfoDetails);
                BaseDal.UpdateData(outboundOrderDetails);
                List<Dt_OutStockLockInfo> addOutStockLockInfos = outStockLockInfos.Where(x => x.Id == 0).ToList();
@@ -294,8 +293,8 @@
                    _outStockLockInfoService.Repository.UpdateData(updateOutStockLockInfos);
                }
                _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, locationStatus.ObjToInt(), StockChangeType.Outbound.ObjToInt(), "", tasks?.Select(x => x.TaskNum).ToList());
                _locationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus);
                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, locationStatus.ObjToInt(), StockChangeType.Outbound.ObjToInt(), "", tasks?.Select(x => x.TaskNum).ToList());
                _basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus);
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
@@ -330,7 +329,7 @@
            List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetByOrderDetailId(orderDetailId, OutStockStatus.已分配);
            if (outStockLockInfos.Count > 0)
            {
                List<Dt_StockInfo> stocks = _stockInfoService.Repository.GetStockInfosByPalletCodes(outStockLockInfos.Select(x => x.PalletCode).ToList());
                List<Dt_StockInfo> stocks = _stockService.StockInfoService.Repository.GetStockInfosByPalletCodes(outStockLockInfos.Select(x => x.PalletCode).ToList());
                if (stocks.Count > 0)
                {
                    stocks.ForEach(x =>
@@ -349,7 +348,7 @@
                        x.Status = OutStockStatus.撤销.ObjToInt();
                    });
                    List<Dt_LocationInfo> locationInfos = _locationInfoService.Repository.GetLocationInfos(stocks.Select(x => x.LocationCode).ToList());
                    List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.GetLocationInfos(stocks.Select(x => x.LocationCode).ToList());
                    return LockOutboundStockDataUpdate(stocks, new List<Dt_OutboundOrderDetail> { outboundOrderDetail }, outStockLockInfos, locationInfos, LocationStatusEnum.InStock);
                }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs
@@ -25,7 +25,7 @@
    {
        private readonly IMapper _mapper;
        private readonly IMaterielInfoService _materielInfoService;
        private readonly IStockInfoService _stockInfoService;
        private readonly IStockInfoService  _stockService;
        private readonly IStockInfoDetailService _stockDetailService;
        public IOutboundOrderRepository Repository => BaseDal;
@@ -35,7 +35,7 @@
            _mapper = mapper;
            _materielInfoService = materielInfoService;
            _stockDetailService = stockDetailService;
            _stockInfoService = stockInfoService;
             _stockService = stockInfoService;
        }
        public override WebResponseContent AddData(SaveModel saveModel)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IOutboundService;
namespace WIDESEA_OutboundService
{
    public class OutboundService : IOutboundService
    {
        public IOutboundOrderDetailService OutboundOrderDetailService { get; }
        public IOutboundOrderService OutboundOrderService { get; }
        public IOutStockLockInfoService OutboundStockLockInfoService { get; }
        public OutboundService(IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService)
        {
            OutboundOrderDetailService = outboundOrderDetailService;
            OutboundOrderService = outboundOrderService;
            OutboundStockLockInfoService = outboundStockLockInfoService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_RecordRepository/RecordRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IRecordRepository;
namespace WIDESEA_RecordRepository
{
    public class RecordRepository : IRecordRepository
    {
        public ILocationStatusChangeRecordRepository LocationStatusChangeRecordRepository { get; }
        public IStockQuantityChangeRecordRepository StockQuantityChangeRecordRepository { get; }
        public RecordRepository(ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository, IStockQuantityChangeRecordRepository stockQuantityChangeRecordRepository)
        {
            LocationStatusChangeRecordRepository = locationStatusChangeRecordRepository;
            StockQuantityChangeRecordRepository = stockQuantityChangeRecordRepository;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/RecordService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IRecordService;
namespace WIDESEA_RecordService
{
    public class RecordService : IRecordService
    {
        public ILocationStatusChangeRecordSetvice LocationStatusChangeRecordSetvice { get; }
        public IStockQuantityChangeRecordService StockQuantityChangeRecordService { get; }
        public RecordService(ILocationStatusChangeRecordSetvice locationStatusChangeRecordSetvice, IStockQuantityChangeRecordService stockQuantityChangeRecordService)
        {
            LocationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice;
            StockQuantityChangeRecordService = stockQuantityChangeRecordService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs
@@ -1,11 +1,13 @@
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;
@@ -15,10 +17,8 @@
{
    public class StockInfoRepository : RepositoryBase<Dt_StockInfo>, IStockInfoRepository
    {
        private readonly ILocationInfoRepository _locationInfoRepository;
        public StockInfoRepository(IUnitOfWorkManage unitOfWorkManage, ILocationInfoRepository locationInfoRepository) : base(unitOfWorkManage)
        public StockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
            _locationInfoRepository = locationInfoRepository;
        }
        public List<StockViewDTO> GetAllStockViews()
@@ -31,24 +31,22 @@
                AreaId = a.AreaId,
                LocationCode = b.LocationCode,
                Column = a.Column,
                CreateDate = a.CreateDate,
                Creater = a.Creater,
                CreateDate = b.CreateDate,
                Creater = b.Creater,
                Depth = a.Depth,
                EnalbeStatus = a.EnalbeStatus,
                Id = a.Id,
                EnalbeStatus = a.EnableStatus,
                IsFull = b.IsFull,
                Layer = a.Layer,
                LocationName = a.LocationName,
                LocationStatus = a.LocationStatus,
                LocationType = a.LocationType,
                Modifier = a.Modifier,
                ModifyDate = a.ModifyDate,
                Modifier = b.Modifier,
                ModifyDate = b.ModifyDate,
                PalletCode = b.PalletCode,
                Remark = a.Remark,
                StockRemark = b.Remark,
                RoadwayNo = a.RoadwayNo,
                Row = a.Row,
                StockId = b.Id,
                StockRemark = b.Remark,
                StockStatus = b.StockStatus,
                Details = b.Details,
            }).Includes(x => x.Details).ToList();
@@ -96,5 +94,12 @@
        {
            return Db.UpdateNav(stockInfo).Include(x => x.Details).ExecuteCommand();
        }
        public Dt_StockInfo GetPalletStockInfo(string roadwayNo)
        {
            //ISugarQueryable<string> locationCodes = Db.Queryable<Dt_LocationInfo>().Where(x => x.RoadwayNo == roadwayNo && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || LocationEnalbeStatusEnum.Normal.ObjToInt() == x.EnalbeStatus)).Select(x => x.LocationCode);
            return Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == StockStatusEmun.已入库.ObjToInt() && SqlFunc.Subqueryable<Dt_LocationInfo>().Where(v => v.LocationCode == x.LocationCode && v.RoadwayNo == roadwayNo && v.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (v.EnableStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || LocationEnalbeStatusEnum.Normal.ObjToInt() == v.EnableStatus)).Any()).OrderBy(x => x.ModifyDate).First();
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IStockRepository;
namespace WIDESEA_StockRepository
{
    public class StockRepository : IStockRepository
    {
        public IStockInfoDetailRepository StockInfoDetailRepository { get; }
        public IStockInfoRepository StockInfoRepository { get; }
        public StockRepository(IStockInfoDetailRepository stockInfoDetailRepository, IStockInfoRepository stockInfoRepository)
        {
            StockInfoDetailRepository = stockInfoDetailRepository;
            StockInfoRepository = stockInfoRepository;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -23,24 +23,19 @@
    public class StockInfoService : ServiceBase<Dt_StockInfo, IStockInfoRepository>, IStockInfoService
    {
        private readonly IMapper _mapper;
        private readonly IStockQuantityChangeRecordService _stockQuantityChangeRecordService;
        private readonly IStockInfoDetailRepository _stockInfoDetailRepository;
        private readonly IWarehouseRepository _warehouseRepository;
        private readonly IRoadwayInfoRepository _roadwayInfoRepository;
        private readonly IAreaInfoRepository _areaInfoRepository;
        private readonly ILocationInfoRepository _locationInfoRepository;
        private readonly IBasicRepository _basicRepository;
        private readonly IStockRepository _stockRepository;
        private readonly IRecordService _recordService;
        public IStockInfoRepository Repository => BaseDal;
        public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IStockQuantityChangeRecordService stockQuantityChangeRecordService, IStockInfoDetailRepository stockInfoDetailRepository, IWarehouseRepository warehouseRepository, IRoadwayInfoRepository roadwayInfoRepository, IAreaInfoRepository areaInfoRepository, ILocationInfoRepository locationInfoRepository) : base(BaseDal)
        public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IStockRepository stockRepository,IRecordService recordService) : base(BaseDal)
        {
            _mapper = mapper;
            _stockQuantityChangeRecordService = stockQuantityChangeRecordService;
            _stockInfoDetailRepository = stockInfoDetailRepository;
            _warehouseRepository = warehouseRepository;
            _roadwayInfoRepository = roadwayInfoRepository;
            _areaInfoRepository = areaInfoRepository;
            _locationInfoRepository = locationInfoRepository;
            _basicRepository = basicRepository;
            _stockRepository = stockRepository;
            _recordService = recordService;
        }
        public Dt_StockInfo? GetStockByPalletCode(string palletCode)
@@ -48,7 +43,7 @@
            Dt_StockInfo stockInfo = BaseDal.QueryFirst(x => x.PalletCode == palletCode);
            if (stockInfo != null)
            {
                stockInfo.Details = _stockInfoDetailRepository.QueryData(x => x.StockId == stockInfo.Id);
                stockInfo.Details = _stockRepository.StockInfoDetailRepository.QueryData(x => x.StockId == stockInfo.Id);
            }
            return stockInfo;
        }
@@ -78,7 +73,7 @@
                {
                    if (stockInfo.Details[i].Id == 0)
                    {
                        details.Add(_stockInfoDetailRepository.Db.Insertable(stockInfo.Details[i]).ExecuteReturnEntity());
                        details.Add(_stockRepository.StockInfoDetailRepository.Db.Insertable(stockInfo.Details[i]).ExecuteReturnEntity());
                    }
                }
@@ -97,31 +92,31 @@
            }
            //_stockQuantityChangeRecordRepository.AddData(stockQuantityChangeRecords);
            stockInfo.Details = details;
            _stockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, StockChangeType.MaterielGroup);
            _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, StockChangeType.MaterielGroup);
        }
        public List<Dt_StockInfo> GetUseableStocks(string materielCode)
        {
            List<string> roadways = _roadwayInfoRepository.CanOutRoadwayNos;
            List<string> roadways = _basicRepository.RoadwayInfoRepository.CanOutRoadwayNos;
            List<int> warehouseIds = _warehouseRepository.EnableWarehouseIds;
            List<int> warehouseIds = _basicRepository.WarehouseRepository.EnableWarehouseIds;
            List<int> areaIds = _areaInfoRepository.GetEnableAreaIds(warehouseIds);
            List<int> areaIds = _basicRepository.AreaInfoRepository.GetEnableAreaIds(warehouseIds);
            List<string> locationCodes = _locationInfoRepository.GetCanOutLocationCodes(roadways, areaIds);
            List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(roadways, areaIds);
            return BaseDal.GetStockInfos(materielCode, locationCodes);
        }
        public List<StockSelectViewDTO> GetStockSelectViews(string materielCode)
        {
            List<string> roadways = _roadwayInfoRepository.CanOutRoadwayNos;
            List<string> roadways = _basicRepository.RoadwayInfoRepository.CanOutRoadwayNos;
            List<int> warehouseIds = _warehouseRepository.EnableWarehouseIds;
            List<int> warehouseIds = _basicRepository.WarehouseRepository.EnableWarehouseIds;
            List<int> areaIds = _areaInfoRepository.GetEnableAreaIds(warehouseIds);
            List<int> areaIds = _basicRepository.AreaInfoRepository.GetEnableAreaIds(warehouseIds);
            List<string> locationCodes = _locationInfoRepository.GetCanOutLocationCodes(roadways, areaIds);
            List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(roadways, areaIds);
            return BaseDal.QueryTabs<Dt_StockInfo, Dt_StockInfoDetail, StockSelectViewDTO>((a, b) => a.Id == b.StockId, (a, b) => new StockSelectViewDTO
            {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IStockService;
namespace WIDESEA_StockService
{
    public class StockSerivce:IStockService
    {
        public IStockInfoDetailService StockInfoDetailService { get; }
        public IStockInfoService StockInfoService { get; }
        public StockSerivce(IStockInfoDetailService stockInfoDetailService, IStockInfoService stockInfoService)
        {
            StockInfoDetailService = stockInfoDetailService;
            StockInfoService = stockInfoService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,107 @@

using Microsoft.AspNetCore.Http;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Dynamic;
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_Core.Utilities;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_StockService
{
    public class StockViewService : IStockViewService
    {
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        private readonly SqlSugarClient _dbBase;
        public StockViewService(IUnitOfWorkManage unitOfWorkManage)
        {
            _unitOfWorkManage = unitOfWorkManage;
            _dbBase = unitOfWorkManage.GetDbClient();
        }
        public virtual PageGridData<StockViewDTO> GetPageData(PageDataOptions options)
        {
            string where = options.ValidatePageOptions(typeof(StockViewDTO).GetProperties());
            //获取排序字段
            //Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(typeof(StockViewDTO).GetProperties());
            //List<OrderByModel> orderByModels = new List<OrderByModel>();
            //foreach (var item in orderbyDic)
            //{
            //    OrderByModel orderByModel = new OrderByModel()
            //    {
            //        FieldName = item.Key,
            //        OrderByType = item.Value
            //    };
            //    orderByModels.Add(orderByModel);
            //}
            int totalCount = 0;
            ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>();
            ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
            List<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).WhereIF(!string.IsNullOrEmpty(where), where).Select((b, a) => new StockViewDTO
            {
                AreaId = a.AreaId,
                LocationCode = b.LocationCode,
                Column = a.Column,
                CreateDate = b.CreateDate,
                Creater = b.Creater,
                Depth = a.Depth,
                EnalbeStatus = a.EnableStatus,
                IsFull = b.IsFull,
                Layer = a.Layer,
                LocationName = a.LocationName,
                LocationStatus = a.LocationStatus,
                LocationType = a.LocationType,
                Modifier = b.Modifier,
                ModifyDate = b.ModifyDate,
                PalletCode = b.PalletCode,
                StockRemark = b.Remark,
                RoadwayNo = a.RoadwayNo,
                Row = a.Row,
                StockId = b.Id,
                StockStatus = b.StockStatus,
                Details = b.Details,
            }).ToPageList(options.Page, options.Rows, ref totalCount);
            return new PageGridData<StockViewDTO>(totalCount, list);
        }
        public virtual object GetDetailPage(PageDataOptions pageData)
        {
            Type t = typeof(StockViewDTO);
            if (pageData.Value == null) return new PageGridData<object>(total: 0, null);
            string keyName = t.GetKeyName();
            ////生成查询条件
            //Expression<Func<TEntity, bool>> whereExpression = keyName.CreateExpression<TEntity>(pageData.Value, LinqExpressionType.Equal);
            int totalCount = 0;
            PropertyInfo? propertyInfo = t.GetProperties().FirstOrDefault(x => x.GetCustomAttribute<Navigate>() != null);
            if (propertyInfo != null)
            {
                Type detailType = propertyInfo.PropertyType.GetGenericArguments()[0];
                Navigate? navigate = propertyInfo.GetCustomAttribute<Navigate>();
                if (navigate != null)
                {
                    List<ExpandoObject> list = _dbBase.Queryable(detailType.Name, "detail").Where(navigate.GetName(), "=", pageData.Value).ToPageList(pageData.Page, pageData.Rows, ref totalCount);
                    return new PageGridData<ExpandoObject>(totalCount, list);
                }
            }
            return new PageGridData<object>(total: 0, null);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_MenuRepository.cs
@@ -27,11 +27,10 @@
        public List<MenuDTO> GetAllMenu()
        {
            List<Sys_Menu> menus = base.QueryData(x => x.Enable == 1 || x.Enable == 2).OrderByDescending(a => a.OrderNo).ThenByDescending(q => q.ParentId).ToList();
            List<Sys_Menu> menus = base.QueryData(x => (x.Enable == 1 || x.Enable == 2) && x.MenuType == App.User.MenuType).OrderByDescending(a => a.OrderNo).ThenByDescending(q => q.ParentId).ToList();
            List<MenuDTO> _menus = _mapper.Map<List<MenuDTO>>(menus);
            _menus.ForEach(x =>
            {
                x.MenuType ??= 0;
                if (!string.IsNullOrEmpty(x.Auth) && x.Auth.Length > 10)
                {
                    try
@@ -99,7 +98,7 @@
                        ParentId = a.ParentId,
                        TableName = (a.TableName ?? "").ToLower(),
                        UserAuth = a.Auth,
                        MenuType = a.MenuType ?? 0
                        MenuType = a.MenuType
                    }).ToList();
                return MenuActionToArray(permissions);
            }
@@ -111,7 +110,7 @@
            {
                //没有redis/memory缓存角色的版本号或与当前服务器的角色版本号不同时,刷新缓存
                List<Permissions> _permissions = QueryTabs<Sys_Menu, Sys_RoleAuth, Permissions>((a, b) => new object[] { JoinType.Inner, a.MenuId == b.MenuId }, (a, b) => new Permissions { MenuId = a.MenuId, ParentId = a.ParentId, TableName = (a.TableName ?? "").ToLower(), MenuAuth = a.Auth, UserAuth = b.AuthValue ?? "", MenuType = a.MenuType ?? 0 }, (a, b) => b.RoleId == roleId, x => true);
                List<Permissions> _permissions = QueryTabs<Sys_Menu, Sys_RoleAuth, Permissions>((a, b) => new object[] { JoinType.Inner, a.MenuId == b.MenuId }, (a, b) => new Permissions { MenuId = a.MenuId, ParentId = a.ParentId, TableName = (a.TableName ?? "").ToLower(), MenuAuth = a.Auth, UserAuth = b.AuthValue ?? "", MenuType = a.MenuType }, (a, b) => b.RoleId == roleId, x => true);
                ActionToArray(_permissions);
@@ -194,7 +193,7 @@
                    p.Icon,
                    p.Enable,
                    // 2022.03.26增移动端加菜单类型
                    MenuType = p.MenuType ?? 0,
                    p.MenuType,
                    p.CreateDate,
                    p.Creater,
                    p.TableName,
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_MenuService.cs
@@ -135,7 +135,6 @@
                    Sys_Menu sysMenu = BaseDal.QueryFirst(x => x.TableName == menu.TableName);
                    if (sysMenu != null)
                    {
                        sysMenu.MenuType ??= 0;
                        if (sysMenu.MenuType == menu.MenuType)
                        {
                            if ((menu.MenuId > 0 && sysMenu.MenuId != menu.MenuId)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_AGV.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,179 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common;
using WIDESEA_Core;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_Model.Models;
namespace WIDESEA_TaskInfoService
{
    public partial class TaskService
    {
        /// <summary>
        /// ç«‹åº“出库AGV搬运
        /// </summary>
        /// <param name="outTask"></param>
        /// <returns></returns>
        public WebResponseContent ShelfOutboundCarry(Dt_Task outTask)
        {
            Dt_CachePoint cachePoint = GetCachePointByStartPoint(outTask.TargetAddress);
            Dt_Task task = new()
            {
                CurrentAddress = outTask.TargetAddress,
                Grade = 0,
                NextAddress = cachePoint.PointCode,
                OrderNo = outTask.OrderNo,
                PalletCode = outTask.PalletCode + "-AGV",
                Roadway = "",
                SourceAddress = outTask.TargetAddress,
                TargetAddress = cachePoint.PointCode,
                SourceKey = outTask.TaskId,
                TaskNum = outTask.TaskNum,
                TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(),
                TaskType = TaskTypeEnum.AGVCarry.ObjToInt(),
            };
            cachePoint.PointStatus = LocationStatusEnum.Lock.ObjToInt();
            _basicService.CachePointService.Repository.UpdateData(cachePoint);
            Repository.AddData(task);
            return WebResponseContent.Instance.OK();
        }
        /// <summary>
        /// å«æ–™
        /// </summary>
        /// <param name="endPoint"></param>
        /// <returns></returns>
        public WebResponseContent CallMateriel(string endPoint)
        {
            Dt_CachePoint cachePoint = GetCachePointByEndPoint(endPoint);
            Dt_Task task = new Dt_Task()
            {
                CurrentAddress = cachePoint.PointCode,
                Grade = 0,
                NextAddress = endPoint,
                OrderNo = "",
                PalletCode = cachePoint.Remark,
                Roadway = "",
                SourceAddress = cachePoint.PointCode,
                TargetAddress = endPoint,
                SourceKey = 0,
                TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(),
                TaskType = TaskTypeEnum.AGVCarry.ObjToInt(),
            };
            cachePoint.PointStatus = LocationStatusEnum.Lock.ObjToInt();
            _basicService.CachePointService.Repository.UpdateData(cachePoint);
            Repository.AddData(task);
            return WebResponseContent.Instance.OK();
        }
        /// <summary>
        /// ç‰©æ–™æ¬è¿
        /// </summary>
        /// <param name="startPoint"></param>
        /// <returns></returns>
        public WebResponseContent MaterielCarry(string startPoint)
        {
            Dt_CachePoint cachePoint = GetCachePointByStartPoint(startPoint);
            Dt_Task task = new()
            {
                CurrentAddress = startPoint,
                Grade = 0,
                NextAddress = cachePoint.PointCode,
                OrderNo = "",
                PalletCode = startPoint + "-AGV",
                Roadway = "",
                SourceAddress = startPoint,
                TargetAddress = cachePoint.PointCode,
                SourceKey = 0,
                TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(),
                TaskType = TaskTypeEnum.AGVCarry.ObjToInt(),
            };
            cachePoint.PointStatus = LocationStatusEnum.Lock.ObjToInt();
            _basicService.CachePointService.Repository.UpdateData(cachePoint);
            Repository.AddData(task);
            return WebResponseContent.Instance.OK();
        }
        private Dt_CachePoint GetCachePointByStartPoint(string startPoint)
        {
            Dt_AreaRouter areaRouter = _basicService.AreaRouterService.Repository.QueryFirst(x => x.StartArea == startPoint);
            if (areaRouter == null)
            {
                throw new Exception("未找到路由信息");
            }
            Dt_AreaInfo areaInfo = _basicService.AreaInfoService.Repository.QueryFirst(x => x.AreaCode == areaRouter.NextArea);
            if (areaInfo == null)
            {
                throw new Exception("未找到下一区域信息");
            }
            Dt_CachePoint? cachePoint = _basicService.CachePointService.AssignCachePoint(areaInfo.Id);
            if (cachePoint == null)
            {
                throw new Exception("未找到空闲缓存点");
            }
            return cachePoint;
        }
        private Dt_CachePoint GetCachePointByEndPoint(string endPoint)
        {
            Dt_AreaRouter areaRouter = _basicService.AreaRouterService.Repository.QueryFirst(x => x.NextArea == endPoint);
            if (areaRouter == null)
            {
                throw new Exception("未找到路由信息");
            }
            Dt_AreaInfo areaInfo = _basicService.AreaInfoService.Repository.QueryFirst(x => x.AreaCode == areaRouter.StartArea);
            if (areaInfo == null)
            {
                throw new Exception("未找到起点缓存区域信息");
            }
            Dt_CachePoint? cachePoint = _basicService.CachePointService.GetIbStockCachePoint(areaInfo.Id);
            if (cachePoint == null)
            {
                throw new Exception("未找到有货缓存点");
            }
            return cachePoint;
        }
        public object AGVTaskFeedBack(AGVTaskFeedBackModel model)
        {
            Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(model.Task_id));
            if (task == null)
            {
                return new { code = 404, message = "未找到该任务" };
            }
            Dt_CachePoint startCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == task.SourceAddress);
            if (startCachePoint != null)
            {
                startCachePoint.PointStatus = LocationStatusEnum.Free.ObjToInt();
                _basicService.CachePointService.Repository.UpdateData(startCachePoint);
            }
            Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == task.TargetAddress);
            if (endCachePoint != null)
            {
                endCachePoint.PointStatus = LocationStatusEnum.InStock.ObjToInt();
                _basicService.CachePointService.Repository.UpdateData(endCachePoint);
            }
            BaseDal.DeleteData(task);
            return new { code = 200, message = "成功" };
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -72,7 +72,7 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_StockInfo stockInfo = _stockInfoService.Repository.GetStockInfo(palletCode);
                Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(palletCode);
                (bool, string) result = CheckRequestInbound(stationCode, palletCode, true, stockInfo);
                if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2);
                content = AssignLocUpdateData(stationCode, TaskTypeEnum.Inbound.ObjToInt(), palletCode, true, stockInfo);
@@ -99,7 +99,7 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_LocationInfo? locationInfo = _locationInfoService.AssignLocation(stationCode, taskType);
                Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(stationCode, taskType);
                if (locationInfo != null)
                {
                    Dt_Task task = new()
@@ -126,15 +126,15 @@
                            orderNo = stockInfo.Details.FirstOrDefault()?.OrderNo ?? "";
                            stockInfo.StockStatus = StockStatusEmun.入库确认.ObjToInt();
                            _stockInfoService.Repository.UpdateData(stockInfo);
                            _stockService.StockInfoService.Repository.UpdateData(stockInfo);
                        }
                        else
                        {
                            return content = WebResponseContent.Instance.Error("未找到库存信息");
                        }
                    }
                    _locationInfoService.Repository.UpdateData(locationInfo);
                    _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
                    _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
                    _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
                    return content = WebResponseContent.Instance.OK();
                }
@@ -186,7 +186,7 @@
            }
            else
            {
                if (_stockInfoService.Repository.QueryFirst(x => x.PalletCode == palletCode) != null)
                if (_stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == palletCode) != null)
                {
                    return (false, "该托盘已存在库内");
                }
@@ -195,35 +195,6 @@
            return (true, "成功");
        }
        /// <summary>
        /// ç©ºæ‰˜ç›˜å…¥åº“完成处理
        /// </summary>
        /// <param name="task">任务实体对象</param>
        /// <returns>返回处理结果</returns>
        public WebResponseContent PalletInboundTaskCompleted(Dt_Task task)
        {
            Dt_StockInfo stockInfo = new Dt_StockInfo()
            {
                PalletCode = task.PalletCode,
                LocationCode = task.TargetAddress,
                StockStatus = StockStatusEmun.已入库.ObjToInt()
            };
            Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
            CheckInboundCompleted(stockInfo, locationInfo);
            _stockInfoService.Repository.AddData(stockInfo);
            int beforeStatus = locationInfo.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
            _locationInfoService.Repository.UpdateData(locationInfo);
            BaseDal.DeleteData(task);
            _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum);
            return WebResponseContent.Instance.OK();
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
@@ -13,6 +13,12 @@
{
    public partial class TaskService
    {
        /// <summary>
        /// åº“存数据转出库任务
        /// </summary>
        /// <param name="stockInfos"></param>
        /// <returns></returns>
        public List<Dt_Task> GetTasks(List<Dt_StockInfo> stockInfos)
        {
            List<Dt_Task> tasks = new List<Dt_Task>();
@@ -22,8 +28,8 @@
                if (stockInfo != null)
                {
                    Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
                    Dt_RoadwayInfo roadwayInfo = _roadwayInfoRepository.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo);
                    Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
                    Dt_RoadwayInfo roadwayInfo = _basicService.RoadwayInfoService.Repository.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo);
                    if (roadwayInfo != null)
                    {
                        Dt_Task task = new()
@@ -35,9 +41,9 @@
                            Roadway = locationInfo.RoadwayNo,
                            SourceAddress = stockInfo.LocationCode,
                            TargetAddress = roadwayInfo.OutStationCode,
                            TaskStatus = InTaskStatusEnum.InNew.ObjToInt(),
                            TaskStatus = OutTaskStatusEnum.OutNew.ObjToInt(),
                            TaskType = TaskTypeEnum.Outbound.ObjToInt(),
                            TaskNum = BaseDal.GetTaskNum("SeqTaskNum")
                            TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum))
                        };
                        tasks.Add(task);
                    }
@@ -46,10 +52,17 @@
            return tasks;
        }
        /// <summary>
        /// å‡ºåº“任务数据处理
        /// </summary>
        /// <param name="orderDetailId"></param>
        /// <param name="stockSelectViews"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) OutboundTaskDataHandle(int orderDetailId, List<StockSelectViewDTO> stockSelectViews)
        {
            List<Dt_Task> tasks = new List<Dt_Task>();
            Dt_OutboundOrderDetail outboundOrderDetail = _outboundOrderDetailService.Repository.QueryFirst(x => x.Id == orderDetailId);
            Dt_OutboundOrderDetail outboundOrderDetail = _outboundService.OutboundOrderDetailService.Repository.QueryFirst(x => x.Id == orderDetailId);
            if (outboundOrderDetail == null)
            {
@@ -66,7 +79,7 @@
            List<Dt_LocationInfo>? locationInfos = null;
            if (outboundOrderDetail.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt())
            {
                (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundOrderDetailService.AssignStockOutbound(outboundOrderDetail, stockSelectViews);
                (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutboundOrderDetailService.AssignStockOutbound(outboundOrderDetail, stockSelectViews);
                if (result.Item1 != null && result.Item1.Count > 0)
                {
                    tasks = GetTasks(result.Item1);
@@ -88,10 +101,10 @@
            }
            else
            {
                List<Dt_OutStockLockInfo> stockLockInfos = _outStockLockInfoService.GetByOrderDetailId(outboundOrderDetail.OrderId);
                List<Dt_OutStockLockInfo> stockLockInfos = _outboundService.OutboundStockLockInfoService.GetByOrderDetailId(outboundOrderDetail.OrderId);
                if (stockLockInfos != null && stockLockInfos.Count > 0)
                {
                    List<Dt_StockInfo> stocks = _stockInfoService.Repository.GetStockInfosByPalletCodes(stockLockInfos.Select(x => x.PalletCode).Distinct().ToList());
                    List<Dt_StockInfo> stocks = _stockService.StockInfoService.Repository.GetStockInfosByPalletCodes(stockLockInfos.Select(x => x.PalletCode).Distinct().ToList());
                    tasks = GetTasks(stocks);
                }
            }
@@ -99,6 +112,12 @@
            return (tasks, stockInfos, orderDetail == null ? null : new List<Dt_OutboundOrderDetail> { orderDetail }, outStockLockInfos, locationInfos);
        }
        /// <summary>
        /// ç”Ÿæˆå‡ºåº“任务
        /// </summary>
        /// <param name="orderDetailId"></param>
        /// <param name="stockSelectViews"></param>
        /// <returns></returns>
        public WebResponseContent GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews)
        {
            try
@@ -115,6 +134,15 @@
            }
        }
        /// <summary>
        /// ç”Ÿæˆå‡ºåº“任务后数据更新到数据库
        /// </summary>
        /// <param name="tasks"></param>
        /// <param name="stockInfos"></param>
        /// <param name="outboundOrderDetails"></param>
        /// <param name="outStockLockInfos"></param>
        /// <param name="locationInfos"></param>
        /// <returns></returns>
        public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutboundOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null)
        {
            try
@@ -124,7 +152,7 @@
                BaseDal.AddData(tasks);
                if (stockInfos != null && outboundOrderDetails != null && outStockLockInfos != null && locationInfos != null)
                {
                    WebResponseContent content = _outboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks);
                    WebResponseContent content = _outboundService.OutboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks);
                    if (content.Status)
                    {
@@ -143,7 +171,7 @@
                        x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
                    });
                    _outboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
                    _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
                }
                _unitOfWorkManage.CommitTran();
                return WebResponseContent.Instance.OK();
@@ -156,6 +184,11 @@
        }
        /// <summary>
        /// ç”Ÿæˆå‡ºåº“任务
        /// </summary>
        /// <param name="keys"></param>
        /// <returns></returns>
        public WebResponseContent GenerateOutboundTask(int[] keys)
        {
            try
@@ -200,5 +233,55 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        /// <summary>
        /// ç©ºæ‰˜ç›˜å‡ºåº“任务
        /// </summary>
        /// <param name="inTask"></param>
        /// <returns></returns>
        public WebResponseContent PalletOutboundTask(string roadwayNo, string endStation)
        {
            try
            {
                Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetPalletStockInfo(roadwayNo);
                if (stockInfo == null)
                {
                    return WebResponseContent.Instance.Error("未找到空托盘库存");
                }
                Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode && x.RoadwayNo == roadwayNo);
                if (locationInfo == null)
                {
                    return WebResponseContent.Instance.Error("未找到空托盘库存对应的货位信息");
                }
                Dt_RoadwayInfo roadwayInfo = _basicService.RoadwayInfoService.Repository.QueryFirst(x => x.InStationCode == endStation && x.RoadwayNo == roadwayNo);
                if (roadwayInfo == null)
                {
                    return WebResponseContent.Instance.Error("未找到终点巷道信息");
                }
                Dt_Task task = new Dt_Task()
                {
                    CurrentAddress = stockInfo.LocationCode,
                    Grade = 0,
                    NextAddress = endStation,
                    PalletCode = stockInfo.PalletCode,
                    Roadway = roadwayNo,
                    SourceAddress = stockInfo.LocationCode,
                    TargetAddress = endStation,
                    TaskStatus = OutTaskStatusEnum.OutNew.ObjToInt(),
                    TaskType = TaskTypeEnum.PalletOutbound.ObjToInt(),
                };
                _unitOfWorkManage.BeginTran();
                stockInfo.StockStatus = StockStatusEmun.出库锁定.ObjToInt();
                locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                BaseDal.AddData(task);
                _unitOfWorkManage.CommitTran();
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -37,6 +37,7 @@
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IInboundService;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
using WIDESEA_IRecordService;
@@ -53,46 +54,108 @@
    {
        private readonly IMapper _mapper;
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        private readonly ILocationInfoService _locationInfoService;
        private readonly IStockInfoService _stockInfoService;
        private readonly ILocationStatusChangeRecordSetvice _locationStatusChangeRecordSetvice;
        private readonly IOutboundOrderDetailService _outboundOrderDetailService;
        private readonly IRoadwayInfoRepository _roadwayInfoRepository;
        private readonly IOutStockLockInfoService _outStockLockInfoService;
        private readonly IBasicService _basicService;
        private readonly IOutboundService _outboundService;
        private readonly IInboundService _inboundService;
        private readonly IRecordService _recordService;
        private readonly IStockService _stockService;
        public ITaskRepository Repository => BaseDal;
        public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, ILocationInfoService locationInfoService, IStockInfoRepository stockInfoRepository, ILocationStatusChangeRecordSetvice locationStatusChangeRecordSetvice, IOutboundOrderDetailService outboundOrderDetailService, IRoadwayInfoRepository roadwayInfoRepository, IOutStockLockInfoService outStockLockInfoService, IStockInfoService stockInfoService) : base(BaseDal)
        public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IBasicService basicService, IOutboundService outboundService, IInboundService inboundService, IRecordService recordService, IStockService stockService) : base(BaseDal)
        {
            _mapper = mapper;
            _locationInfoService = locationInfoService;
            _stockInfoService = stockInfoService;
            _locationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice;
            _outboundOrderDetailService = outboundOrderDetailService;
            _roadwayInfoRepository = roadwayInfoRepository;
            _unitOfWorkManage = unitOfWorkManage;
            _outStockLockInfoService = outStockLockInfoService;
            _basicService = basicService;
            _outboundService = outboundService;
            _inboundService = inboundService;
            _recordService = recordService;
            _stockService = stockService;
        }
        /// <summary>
        /// ä»»åŠ¡å®Œæˆ
        /// </summary>
        /// <param name="taskNum">任务号</param>
        /// <returns>返回处理结果</returns>
        public WebResponseContent TaskCompleted(int taskNum)
        {
            try
            {
                Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
                if (task == null)
                {
                    return WebResponseContent.Instance.Error("未找到任务信息");
                }
                MethodInfo? methodInfo = GetType().GetMethod(((TaskTypeEnum)task.TaskType) + "TaskCompleted");
                if (methodInfo != null)
                {
                    WebResponseContent? responseContent = (WebResponseContent?)methodInfo.Invoke(this, new object[] { task });
                    if (responseContent != null)
                    {
                        return responseContent;
                    }
                }
                return WebResponseContent.Instance.Error("未找到任务类型对应业务处理逻辑");
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public WebResponseContent InboundTaskCompleted(Dt_Task task)
        {
            Dt_StockInfo stockInfo = _stockInfoService.Repository.GetStockInfo(task.PalletCode);
            Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);
            Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
            Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
            CheckInboundCompleted(stockInfo, locationInfo);
            CheckCompleted(stockInfo, locationInfo);
            stockInfo.LocationCode = locationInfo.LocationCode;
            stockInfo.StockStatus = StockStatusEmun.已入库.ObjToInt();
            _stockInfoService.Repository.UpdateData(stockInfo);
            _stockService.StockInfoService.Repository.UpdateData(stockInfo);
            int beforeStatus = locationInfo.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
            _locationInfoService.Repository.UpdateData(locationInfo);
            locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
            _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
            BaseDal.DeleteData(task);
            _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
            return WebResponseContent.Instance.OK();
        }
        /// <summary>
        /// ç©ºæ‰˜ç›˜å…¥åº“完成处理
        /// </summary>
        /// <param name="task">任务实体对象</param>
        /// <returns>返回处理结果</returns>
        public WebResponseContent PalletInboundTaskCompleted(Dt_Task task)
        {
            Dt_StockInfo stockInfo = new Dt_StockInfo()
            {
                PalletCode = task.PalletCode,
                LocationCode = task.TargetAddress,
                StockStatus = StockStatusEmun.已入库.ObjToInt()
            };
            Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
            CheckCompleted(stockInfo, locationInfo);
            _stockService.StockInfoService.Repository.AddData(stockInfo);
            int beforeStatus = locationInfo.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
            _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
            BaseDal.DeleteData(task);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum);
            return WebResponseContent.Instance.OK();
        }
@@ -103,7 +166,7 @@
        /// <param name="stockInfo"></param>
        /// <param name="locationInfo"></param>
        /// <returns></returns>
        private (bool, string) CheckInboundCompleted(Dt_StockInfo stockInfo, Dt_LocationInfo locationInfo, bool isCheckStockDetail = true)
        private (bool, string) CheckCompleted(Dt_StockInfo stockInfo, Dt_LocationInfo locationInfo, bool isCheckStockDetail = true)
        {
            if (stockInfo == null)
            {
@@ -123,29 +186,48 @@
            return (true, "成功");
        }
        /// <summary>
        /// ä»»åŠ¡å®Œæˆ
        /// </summary>
        /// <param name="taskNum">任务号</param>
        /// <returns>返回处理结果</returns>
        public WebResponseContent TaskCompleted(int taskNum)
        public WebResponseContent OutboundTaskCompleted(Dt_Task task)
        {
            Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
            if (task == null)
            {
                return WebResponseContent.Instance.Error("未找到任务信息");
            }
            MethodInfo? methodInfo = GetType().GetMethod(((TaskTypeEnum)task.TaskType) + "TaskCompleted");
            if (methodInfo != null)
            {
                WebResponseContent? responseContent = (WebResponseContent?)methodInfo.Invoke(this, new object[] { task });
                if (responseContent != null)
                {
                    return responseContent;
                }
            }
            return WebResponseContent.Instance.Error();
            Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);
            Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress);
            CheckCompleted(stockInfo, locationInfo);
            stockInfo.LocationCode = locationInfo.LocationCode;
            stockInfo.StockStatus = StockStatusEmun.出库完成.ObjToInt();
            _stockService.StockInfoService.Repository.UpdateData(stockInfo);
            int beforeStatus = locationInfo.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
            _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
            BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
            return OnOutboundTaskCompleted?.Invoke(task) ?? WebResponseContent.Instance.OK();
        }
        public WebResponseContent PalletOutboundTaskCompleted(Dt_Task task)
        {
            Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);
            Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress);
            CheckCompleted(stockInfo, locationInfo);
            _stockService.StockInfoService.Repository.DeleteData(stockInfo);
            int beforeStatus = locationInfo.LocationStatus;
            locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
            _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
            BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
            return WebResponseContent.Instance.OK();
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskServiceExtendFunc.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Model.Models;
namespace WIDESEA_TaskInfoService
{
    public partial class TaskService
    {
        public Func<Dt_Task, WebResponseContent>? OnOutboundTaskCompleted => ShelfOutboundCarry;
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj
@@ -8,9 +8,9 @@
  <ItemGroup>
    <ProjectReference Include="..\WIDESEA_IBasicService\WIDESEA_IBasicService.csproj" />
    <ProjectReference Include="..\WIDESEA_IInboundService\WIDESEA_IInboundService.csproj" />
    <ProjectReference Include="..\WIDESEA_IOutboundService\WIDESEA_IOutboundService.csproj" />
    <ProjectReference Include="..\WIDESEA_IRecordService\WIDESEA_IRecordService.csproj" />
    <ProjectReference Include="..\WIDESEA_IStockRepository\WIDESEA_IStockRepository.csproj" />
    <ProjectReference Include="..\WIDESEA_IStockService\WIDESEA_IStockService.csproj" />
    <ProjectReference Include="..\WIDESEA_ITaskInfoService\WIDESEA_ITaskInfoService.csproj" />
  </ItemGroup>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/AreaInfoController.cs
@@ -1,9 +1,12 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.Helper;
using WIDESEA_DTO;
using WIDESEA_DTO.Basic;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -13,9 +16,18 @@
    [ApiController]
    public class AreaInfoController : ApiBaseController<IAreaInfoService, Dt_AreaInfo>
    {
        public AreaInfoController(IAreaInfoService service) : base(service)
        private readonly IBasicService _basicService;
        public AreaInfoController(IAreaInfoService service,IBasicService basicService) : base(service)
        {
            _basicService = basicService;
        }
        [HttpPost, Route("GetAllLocationGroups"), AllowAnonymous]
        public List<LocationGroupDTO> GetAllLocationGroups(string roadway)
        {
            List<LocationGroupDTO> locations = _basicService.LocationInfoService.Repository.GetAllLocationGroups(roadway);
            return locations;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs
@@ -23,10 +23,6 @@
            return Service.AddInboundOrder(orderAddDTO);
        }
        [HttpPost, Route("MaterielGroup")]
        public WebResponseContent MaterielGroup([FromBody] MaterielGroupDTO materielGroupDTO)
        {
            return Service.MaterielGroup(materielGroupDTO);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Inbound;
using WIDESEA_IInboundService;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers
{
    [Route("api/PDA")]
    [ApiController]
    public class PDAController : ApiBaseController<ITaskService, Dt_Task>
    {
        private readonly IInboundService _inboundService;
        public PDAController(ITaskService service, IInboundService inboundService) : base(service)
        {
            _inboundService = inboundService;
        }
        [HttpPost, Route("CallMateriel")]
        public WebResponseContent CallMateriel(string endPoint)
        {
            return Service.CallMateriel(endPoint);
        }
        [HttpPost, Route("MaterielCarry")]
        public WebResponseContent MaterielCarry(string startPoint)
        {
            return Service.MaterielCarry(startPoint);
        }
        [HttpPost, Route("MaterielGroup")]
        public WebResponseContent MaterielGroup([FromBody] MaterielGroupDTO materielGroupDTO)
        {
            return _inboundService.InbounOrderService.MaterielGroup(materielGroupDTO);
        }
        [HttpPost, Route("QueryOrderInfo")]
        public WebResponseContent QueryOrderInfo(int pageNo, string orderNo)
        {
            return _inboundService.InbounOrderService.QueryOrderInfo(pageNo, orderNo);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs
@@ -14,16 +14,14 @@
    [ApiController]
    public class StockInfoController : ApiBaseController<IStockInfoService, Dt_StockInfo>
    {
        private readonly IStockInfoRepository _stockInfoRepository;
        public StockInfoController(IStockInfoService service, IStockInfoRepository stockInfoRepository) : base(service)
        public StockInfoController(IStockInfoService service) : base(service)
        {
            _stockInfoRepository = stockInfoRepository;
        }
        [HttpPost, Route("GetAllStockViews"), AllowAnonymous]
        public List<StockViewDTO> GetAllStockViews()
        {
            return _stockInfoRepository.GetAllStockViews();
            return Service.Repository.GetAllStockViews();
        }
        [HttpPost, Route("GetStockSelectViews"), AllowAnonymous]
@@ -31,5 +29,10 @@
        {
            return Service.GetStockSelectViews(materielCode);
        }
        [HttpPost, Route("GetPalletStockInfo"), AllowAnonymous]
        public Dt_StockInfo GetPalletStockInfo(string roadwayNo)
        {
            return Service.Repository.GetPalletStockInfo(roadwayNo);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Stock
{
    [Route("api/StockView")]
    [ApiController]
    public class StockViewController : ApiBaseController<IStockViewService, StockViewDTO>
    {
        public StockViewController(IStockViewService service) : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs
@@ -35,6 +35,7 @@
        {
            return Json(Service.Login(loginInfo));
        }
        [HttpPost, Route("getCurrentUserInfo")]
        public WebResponseContent GetCurrentUser()
        {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj
@@ -43,6 +43,10 @@
    </ItemGroup>
    
    <ItemGroup>
      <PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.7.3" />
    </ItemGroup>
    <ItemGroup>
      <ProjectReference Include="..\WIDESEA_BasicService\WIDESEA_BasicService.csproj" />
      <ProjectReference Include="..\WIDESEA_InboundService\WIDESEA_InboundService.csproj" />
      <ProjectReference Include="..\WIDESEA_OutboundService\WIDESEA_OutboundService.csproj" />