wangxinhui
20 小时以前 6d3ea08855337c0cfcc60df2903d3431611c7097
优化程序,输送线入库按钮对接
已删除2个文件
已添加10个文件
已修改15个文件
1143 ■■■■ 文件已修改
项目代码/WCSClient/src/api/http.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/extension/basicinfo/extend/GetLocationStatus.vue 258 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/extension/basicinfo/locationInfo.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/views/basicinfo/locationInfo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_BasicInfoRepository/LocationStatusChangeRecordRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_BasicInfoService/LocationStatusChangeRecordService.cs 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Common/LocationChangeType.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Common/StationTypeEnum.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_IBasicInfoRepository/ILocationStatusChangeRecordRepository.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_IBasicInfoService/ILocationStatusChangeRecordService.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Model/Models/BasicInfo/Dt_LocationStatusChangeRecord.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationStatusChangeRecordController.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/appsettings.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs 124 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/一期线体/ConveyorLineJob1.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/二期线体/ConveyorLineDBName.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/二期线体/ConveyorLineJob2.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/码垛/MDJob_CP.cs 199 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/一期对接相关资料/工具.zip 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口汇总文件/EPLight Web API 接口文档1.1.docx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口汇总文件/WMS接口对接文档20251202_V1.1.3.docx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口汇总文件/WMS接口对接文档20251211_V1.1.3.docx 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCSClient/src/api/http.js
@@ -12,15 +12,15 @@
let loadingInstance;
let loadingStatus = false;
if (process.env.NODE_ENV == 'development') {
    axios.defaults.baseURL = 'http://127.0.0.1:9291/';
    axios.defaults.baseURL = 'http://11.2.30.112:9291/';
    //axios.defaults.baseURL = 'http://192.168.35.3:9281/';
}
else if (process.env.NODE_ENV == 'debug') {
    axios.defaults.baseURL = 'http://127.0.0.1:8098/';
    axios.defaults.baseURL = 'http://11.2.30.112:9291/';
}
else if (process.env.NODE_ENV == 'production') {
    axios.defaults.baseURL = 'http://192.168.35.3:9281/';
    axios.defaults.baseURL = 'http://11.2.30.112:9291/';
}
if (!axios.defaults.baseURL.endsWith('/')) {
    axios.defaults.baseURL+="/";
ÏîÄ¿´úÂë/WCSClient/src/extension/basicinfo/extend/GetLocationStatus.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,258 @@
<template>
  <div>
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="1000px"
      :padding="15"
      title="货位状态变动记录"
    >
      <div class="box-table" style="margin-top: 1%">
        <el-table
          ref="singleTable"
          :data="tableData"
          style="width: 100%; height: 100%"
          highlight-current-row
          @row-click="handleRowClick"
          height="500px"
          @selection-change="handleSelectionChange"
        >
          >
          <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
          <el-table-column
            label="序号"
            type="index"
            fixed="left"
            width="55"
            align="center"
          ></el-table-column>
          <el-table-column
            v-for="(item, index) in tableColumns.filter((x) => !x.hidden)"
            :key="index"
            :prop="item.field"
            :label="item.title"
            :width="item.width"
            align="center"
          >
            <template #default="scoped">
              <div v-if="item.type == 'icon'">
                <el-tooltip
                  class="item"
                  effect="dark"
                  :content="item.title"
                  placement="bottom"
                  ><el-button
                    type="text"
                    @click="tableButtonClick(scoped.row, item)"
                    ><i
                      :class="item.icon"
                      style="font-size: 22px"
                    ></i></el-button
                ></el-tooltip>
              </div>
              <div v-else-if="item.type == 'tag'">
                <el-tag size="small">
                  {{ getDictionary(scoped.row, item) }}
                </el-tag>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </vol-box>
  </div>
</template>
<script>
import VolBox from "@/components/basic/VolBox.vue";
export default {
  components: { VolBox },
  data() {
    return {
      showDetialBox: false,
      row: null,
      tableData: [],
      LocationStates:[{key: "0", value: "空闲"}, {key: "1", value: "锁定"}, {key: "100", value: "有货"}],
      LocationChanges:[{key: "0", value: "入库分配"}, {key: "1", value: "出库分配"}, {key: "2", value: "入库任务完成"}, {key: "3", value: "出库任务完成"}],
      tableColumns: [
        {
          field: "locationId",
          title: "货位主键",
          type: "string",
          width: 100,
          align: "left",
          hidden: true,
        },
        {
          field: "locationCode",
          title: "货位编号",
          type: "string",
          align: "left",
        },
        {
          field: "beforeStatus",
          title: "变动前货位状态",
          type: "tag",
          width: 150,
          align: "left",
          bindKey: "locationStatusEnum",
        },
        {
          field: "afterStatus",
          title: "变动后货位状态",
          type: "tag",
          width: 150,
          align: "left",
          bindKey: "locationStatusEnum",
        },
        {
          field: "changeType",
          title: "变动类型",
          type: "tag",
          width: 100,
          align: "left",
          bindKey: "locationChangeType",
        },
        {
          field: "taskNum",
          title: "任务号",
          type: "string",
          width: 180,
          align: "left",
        },
        {
          field: "creater",
          title: "创建人",
          type: "string",
          width: 90,
          align: "left",
          hidden: true,
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          align: "left",
          sort: true,
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 100,
          align: "left",
          hidden: true,
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 160,
          align: "left",
          hidden: true,
          sort: true,
        },
        {
          field: "remark",
          title: "备注",
          type: "string",
          width: 100,
          align: "left",
          hidden: true,
        },
      ],
      paginations: {
        sort: "CreateDate",
        order: "desc",
        Foots: "",
        total: 0,
        // 2020.08.29增加自定义分页条大小
        sizes: [120],
        size: 120, // é»˜è®¤åˆ†é¡µå¤§å°
        Wheres: [],
        page: 1,
        rows: 120,
      },
      dictionaryList: null,
    };
  },
  methods: {
    open(row) {
      this.row = row;
      this.showDetialBox = true;
      this.getDetailData();
      this.getDictionaryData();
    },
    getDetailData() {
      this.http
        .post(
          "/api/LocationStatusChangeRecord/GetLocationState?id=" + this.row.id,
          {},
          true
        )
        .then((x) => {
          if (!x.status) return this.$message.error(x.message);
          this.tableData = x.data;
        });
    },
    getDictionary(row, column) {
        if (column.bindKey=="locationStatusEnum") {
          var dicItem = this.LocationStates.find((x) => x.key == row[column.field]);
          if (dicItem) {
            return dicItem.value;
          } else {
            return row[column.field];
          }
        }else if (column.bindKey=="locationChangeType") {
          var dicItem = this.LocationChanges.find((x) => x.key == row[column.field]);
          if (dicItem) {
            return dicItem.value;
          } else {
            return row[column.field];
          }
        }else {
          return row[column.field];
        }
    },
  },
  created() {},
};
</script>
<style scoped>
.el-col {
  border-radius: 4px;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
.content-text {
  display: flex;
  align-items: center;
  justify-content: center;
}
.right-text {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
</style>
<style>
.el-table .warning-row {
  background: #e6a23c;
}
.el-table .success-row {
  background: #f0f9eb;
}
.el-table .error-row {
  background: #f56c6c;
}
</style>
ÏîÄ¿´úÂë/WCSClient/src/extension/basicinfo/locationInfo.js
@@ -1,11 +1,11 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
// import gridBody from './extend/GetLocationStatus.vue'
import gridBody from './extend/GetLocationStatus.vue'
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: '',
    gridBody: gridBody,
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
ÏîÄ¿´úÂë/WCSClient/src/views/basicinfo/locationInfo.vue
@@ -24,7 +24,7 @@
      cnName: "货位信息",
      name: "locationInfo",
      url: "/LocationInfo/",
      sortName: "id",
      sortName: "createDate",
    });
    const editFormFields = ref({
      locationStatus: "",
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_BasicInfoRepository/LocationStatusChangeRecordRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IRecordRepository;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Model.Models;
namespace WIDESEA_RecordRepository
{
    public class LocationStatusChangeRecordRepository : RepositoryBase<Dt_LocationStatusChangeRecord>, ILocationStatusChangeRecordRepository
    {
        public LocationStatusChangeRecordRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs
@@ -33,7 +33,7 @@
        public DateTime DateTime { get; set; }
    }
    public partial class LocationInfoService : ServiceBase<Dt_LocationInfo, ILocationInfoRepository>, ILocationInfoService
    public class LocationInfoService : ServiceBase<Dt_LocationInfo, ILocationInfoRepository>, ILocationInfoService
    {
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        public ILocationInfoRepository Repository => BaseDal;
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_BasicInfoService/LocationStatusChangeRecordService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,103 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IRecordRepository;
using WIDESEAWCS_Common;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_BasicInfoService
{
    public class LocationStatusChangeRecordService : ServiceBase<Dt_LocationStatusChangeRecord, ILocationStatusChangeRecordRepository>, ILocationStatusChangeRecordService
    {
        public ILocationStatusChangeRecordRepository Repository => BaseDal;
        public LocationStatusChangeRecordService(ILocationStatusChangeRecordRepository BaseDal) : base(BaseDal)
        {
        }
        /// <summary>
        /// è´§ä½å˜åŠ¨è®°å½•æ·»åŠ (单个)
        /// </summary>
        public void AddLocationStatusChangeRecord(Dt_LocationInfo locationInfo, LocationStatusEnum lastStatus, LocationStatusEnum newStatus, LocationChangeType changeType, int? taskNum = null)
        {
            try
            {
                Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord()
                {
                    AfterStatus = newStatus.ObjToInt(),
                    BeforeStatus = lastStatus.ObjToInt(),
                    ChangeType = changeType.ObjToInt(),
                    LocationCode = locationInfo.LocationCode,
                    LocationId = locationInfo.Id,
                    TaskNum = taskNum,
                    Creater = "",
                    CreateDate = DateTime.Now,
                };
                BaseDal.AddData(locationStatusChangeRecord);
            }
            catch (Exception ex)
            {
                throw new Exception($"{ex.Message}");
            }
        }
        /// <summary>
        /// è´§ä½å˜åŠ¨è®°å½•æ·»åŠ (多个)
        /// </summary>
        public void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, LocationStatusEnum lastStatus, LocationStatusEnum newStatus, LocationChangeType changeType, List<int>? taskNums = null)
        {
            try
            {
                List<Dt_LocationStatusChangeRecord> records = new List<Dt_LocationStatusChangeRecord>();
                for (int i = 0; i < locationInfos.Count; i++)
                {
                    Dt_LocationInfo locationInfo = locationInfos[i];
                    int? taskNum = (taskNums != null && taskNums.Count > 0 && taskNums.Count == locationInfos.Count) ? taskNums[i] : null;
                    Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord()
                    {
                        AfterStatus = newStatus.ObjToInt(),
                        BeforeStatus = lastStatus.ObjToInt(),
                        ChangeType = changeType.ObjToInt(),
                        LocationCode = locationInfo.LocationCode,
                        LocationId = locationInfo.Id,
                        TaskNum = taskNum,
                        Creater = "",
                        CreateDate = DateTime.Now,
                    };
                    records.Add(locationStatusChangeRecord);
                }
                BaseDal.AddData(records);
            }
            catch (Exception ex)
            {
                throw new Exception($"{ex.Message}");
            }
        }
        /// <summary>
        /// èŽ·å–æŒ‡å®šè´§ä½å˜åŠ¨è®°å½•
        /// </summary>
        /// <returns></returns>
        public WebResponseContent GetLocationState(int id)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                List<Dt_LocationStatusChangeRecord> location = BaseDal.QueryData(x => x.LocationId == id).OrderByDescending(x => x.CreateDate).ToList();
                return content = WebResponseContent.Instance.OK(data: location);
            }
            catch (Exception ex)
            {
                return content = WebResponseContent.Instance.Error(ex.Message);
            }
        }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Common/LocationChangeType.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEAWCS_Common
{
    /// <summary>
    /// è´§ä½çŠ¶æ€å˜æ›´ç±»åž‹
    /// </summary>
    public enum LocationChangeType
    {
        /// <summary>
        /// å…¥åº“分配
        /// </summary>
        [Description("入库分配")]
        InboundAssignLocation,
        /// <summary>
        /// å‡ºåº“分配
        /// </summary>
        [Description("出库分配")]
        OutboundAssignLocation,
        /// <summary>
        /// å…¥åº“任务完成
        /// </summary>
        [Description("入库任务完成")]
        InboundCompleted,
        /// <summary>
        /// å‡ºåº“任务完成
        /// </summary>
        [Description("出库任务完成")]
        OutboundCompleted
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Common/StationTypeEnum.cs
@@ -19,11 +19,6 @@
        /// <summary>
        /// å‡ºåº“站台
        /// </summary>
        StationType_OnlyOutbound = 2,
        /// <summary>
        /// å‡ºå…¥åº“站台
        /// </summary>
        StationType_InboundAndOutbound = 3,
        StationType_OnlyOutbound = 2
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs
@@ -93,4 +93,38 @@
        /// </summary>
        public string ContainerCode { get; set; }
    }
    /// <summary>
    /// æ’­ç§å¢™ä¸‹å‘
    /// </summary>
    public class TaskSendLight
    {
        /// <summary>
        /// æ’­ç§å¢™ç¼–号(B1一期/B2二期播种墙)
        /// </summary>
        public string TagNo { get; set; }
        /// <summary>
        /// è®¢å•号
        /// </summary>
        public string DocNo { get; set; }
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        public string TaskNo { get; set; }
        /// <summary>
        /// è´§ä½å·
        /// </summary>
        public string TagCode { get; set; }
        /// <summary>
        /// ç”µå­æ ‡ç­¾æ˜¾ç¤ºæ•°é‡
        /// </summary>
        public int TagQunity { get; set; }
        /// <summary>
        /// äº®ç¯é¢œè‰²
        /// </summary>
        public string Color { get; set; }
        /// <summary>
        /// æ¨¡å¼
        /// </summary>
        public int Mode { get; set; }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_IBasicInfoRepository/ILocationStatusChangeRecordRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Enums;
using WIDESEAWCS_Common;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Model.Models;
namespace WIDESEA_IRecordRepository
{
    public interface ILocationStatusChangeRecordRepository : IRepository<Dt_LocationStatusChangeRecord>
    {
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_IBasicInfoService/ILocationStatusChangeRecordService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_IRecordRepository;
using WIDESEAWCS_Common;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_IBasicInfoService
{
    public interface ILocationStatusChangeRecordService : IService<Dt_LocationStatusChangeRecord>
    {
        ILocationStatusChangeRecordRepository Repository { get; }
        /// <summary>
        /// è´§ä½å˜åŠ¨è®°å½•æ·»åŠ (单个)
        /// </summary>
        void AddLocationStatusChangeRecord(Dt_LocationInfo locationInfo, LocationStatusEnum lastStatus, LocationStatusEnum newStatus, LocationChangeType changeType, int? taskNum = null);
        /// <summary>
        /// è´§ä½å˜åŠ¨è®°å½•æ·»åŠ (多个)
        /// </summary>
        void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, LocationStatusEnum lastStatus, LocationStatusEnum newStatus, LocationChangeType changeType, List<int>? taskNums = null);
        /// <summary>
        /// èŽ·å–æŒ‡å®šè´§ä½å˜åŠ¨è®°å½•
        /// </summary>
        /// <returns></returns>
        WebResponseContent GetLocationState(int id);
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -59,10 +59,25 @@
        /// <returns>返回处理结果</returns>
        WebResponseContent ReceiveWMSTask([NotNull] WMSTaskDTO taskDTO);
        /// <summary>
        /// æ’­ç§å¢™åˆå§‹åŒ–
        /// </summary>
        /// <returns></returns>
        WebResponseContent InitLight();
        /// <summary>
        /// æ’­ç§å¢™ç»“束作业
        /// </summary>
        /// <returns></returns>
        WebResponseContent EndLight();
        /// <summary>
        /// æ’­ç§å¢™äº®ç¯
        /// </summary>
        /// <returns></returns>
        WebResponseContent SendLight(TaskSendLight taskSendLight);
        /// <summary>
        /// å®¹å™¨å…¥åº“创建任务
        /// </summary>
        /// <returns></returns>
        WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO,string deviceCode);
        WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO,string deviceCode,string stationCode);
        /// <summary>
        /// ç”³è¯·å…¥åº“
        /// </summary>
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Model/Models/BasicInfo/Dt_LocationStatusChangeRecord.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,66 @@
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.DB.Models;
namespace WIDESEAWCS_Model.Models
{
    /// <summary>
    /// è´§ä½çŠ¶æ€å˜åŠ¨è®°å½•
    /// </summary>
    [SugarTable(nameof(Dt_LocationStatusChangeRecord), "货位状态变动记录")]
    public class Dt_LocationStatusChangeRecord : BaseEntity
    {
        /// <summary>
        /// ä¸»é”®
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// è´§ä½ä¸»é”®
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "货位主键")]
        public int LocationId { get; set; }
        /// <summary>
        /// è´§ä½ç¼–号
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "货位编号")]
        public string LocationCode { get; set; }
        /// <summary>
        /// å˜åŠ¨å‰è´§ä½çŠ¶æ€
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "变动前货位状态")]
        public int BeforeStatus { get; set; }
        /// <summary>
        /// å˜åŠ¨åŽè´§ä½çŠ¶æ€
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "变动后货位状态")]
        public int AfterStatus { get; set; }
        /// <summary>
        /// å˜åŠ¨ç±»åž‹ï¼ˆå‡ºåº“ã€å…¥åº“ã€æ‰‹åŠ¨è°ƒæ•´...)
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "变动类型(出库、入库)")]
        public int ChangeType { get; set; }
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "任务号")]
        public int? TaskNum { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs
@@ -141,24 +141,17 @@
                if (stationManger.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt())
                {
                    commonConveyorLine.Communicator.Write("21", (short)256);
                    commonConveyorLine.Communicator.Write("21", new byte[] { 1, 0 });
                }
                else
                {
                    commonConveyorLine.Communicator.Write("23", (short)256);
                    commonConveyorLine.Communicator.Write("23", new byte[] { 1, 0 });
                }
                content.OK();
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains("数据写入,地址:【23】,写入的数据:【256】") || ex.Message.Contains("数据写入,地址:【21】,写入的数据:【256】"))
                {
                    content.OK();
                }
                else
                {
                    content.Error(ex.Message);
                }
                content.Error(ex.Message);
            }
            return content;
        }
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationStatusChangeRecordController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Basic
{
    /// <summary>
    /// è´§ä½çŠ¶æ€å˜åŠ¨è®°å½•
    /// </summary>
    [Route("api/LocationStatusChangeRecord")]
    [ApiController]
    public class LocationStatusChangeRecordController : ApiBaseController<ILocationStatusChangeRecordService, Dt_LocationStatusChangeRecord>
    {
        public LocationStatusChangeRecordController(ILocationStatusChangeRecordService service) : base(service)
        {
        }
        /// <summary>
        /// èŽ·å–æŒ‡å®šè´§ä½å˜åŠ¨è®°å½•
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet,Route("GetLocationState")]
        public WebResponseContent GetLocationState(int id)
        {
            return Service.GetLocationState(id);
        }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -56,6 +56,7 @@
        {
            return Service.RollbackTaskStatusToLast(taskNum);
        }
        private static object lock_containerFlow = new object();
        /// <summary>
        /// å®¹å™¨æµåŠ¨æŽ¥å£
        /// </summary>
@@ -63,47 +64,77 @@
        [HttpPost, HttpGet, Route("ContainerFlow"), AllowAnonymous]
        public WebResponseContent ContainerFlow([FromBody] ContainerFlowDTO containerFlowDTO)
        {
            WebResponseContent content = new WebResponseContent();
            try
            lock (lock_containerFlow)
            {
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x=>x.PickStationCode==containerFlowDTO.SlotCode) ?? throw new Exception($"{containerFlowDTO.SlotCode}拣选位置不存在");
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                if (device == null)
                WebResponseContent content = new WebResponseContent();
                try
                {
                    return WebResponseContent.Instance.Error($"未找到对应设备{stationManger.StationDeviceCode}");
                }
                if (stationManger.StationDeviceCode== "CL1" || stationManger.StationDeviceCode == "CL2")
                {
                    OtherDevice commonConveyorLine = (OtherDevice)device;
                    byte[] bytesPick = commonConveyorLine.Communicator.Read("2", 5);
                    string PickBarCode = Encoding.UTF8.GetString(bytesPick).Replace("\0", "").Replace("\\0", "");
                    if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"传入料箱码{containerFlowDTO.ContainerCode},输送料箱码{PickBarCode}数据错误");
                    if (containerFlowDTO.Direction == "100")
                    Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.PickStationCode == containerFlowDTO.SlotCode) ?? throw new Exception($"{containerFlowDTO.SlotCode}拣选位置不存在");
                    IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                    if (device == null)
                    {
                        WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode);
                        if (!responseContent.Status) throw new Exception(responseContent.Message);
                        return WebResponseContent.Instance.Error($"未找到对应设备{stationManger.StationDeviceCode}");
                    }
                    commonConveyorLine.Communicator.Write("22", (short)(containerFlowDTO.Direction == "100" ? 256 : 512));
                }
                else
                {
                    CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device;
                    string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Trim();
                    if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"传入料箱码{containerFlowDTO.ContainerCode},输送料箱码{PickBarCode}数据错误");
                    if (containerFlowDTO.Direction == "100")
                    if (stationManger.StationDeviceCode == "CL1" || stationManger.StationDeviceCode == "CL2")
                    {
                        WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode);
                        if (!responseContent.Status) throw new Exception(responseContent.Message);
                        OtherDevice commonConveyorLine = (OtherDevice)device;
                        byte[] bytesPick = commonConveyorLine.Communicator.Read("2", 5);
                        string PickBarCode = Encoding.UTF8.GetString(bytesPick).Replace("\0", "").Replace("\\0", "");
                        if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"传入料箱码{containerFlowDTO.ContainerCode},输送料箱码{PickBarCode}数据错误");
                        if (containerFlowDTO.Direction == "100")
                        {
                            WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode);
                            if (!responseContent.Status) throw new Exception(responseContent.Message);
                        }
                        commonConveyorLine.Communicator.Write("22", (containerFlowDTO.Direction == "100" ? new byte[] { 1, 0 } : new byte[] { 2, 0 }));
                    }
                    commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)containerFlowDTO.Direction.ObjToInt(), stationManger.StationCode);
                    else
                    {
                        CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device;
                        string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Trim();
                        if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"传入料箱码{containerFlowDTO.ContainerCode},输送料箱码{PickBarCode}数据错误");
                        if (containerFlowDTO.Direction == "100")
                        {
                            WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode);
                            if (!responseContent.Status) throw new Exception(responseContent.Message);
                        }
                        commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)containerFlowDTO.Direction.ObjToInt(), stationManger.StationCode);
                    }
                    content.OK();
                }
                content.OK();
                catch (Exception ex)
                {
                    content.Error(ex.Message);
                }
                return content;
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// æ’­ç§å¢™åˆå§‹åŒ–
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("InitLight"), AllowAnonymous]
        public WebResponseContent InitLight()
        {
            return Service.InitLight();
        }
        /// <summary>
        /// æ’­ç§å¢™ç»“束作业
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("EndLight"), AllowAnonymous]
        public WebResponseContent EndLight()
        {
            return Service.EndLight();
        }
        /// <summary>
        /// æ’­ç§å¢™äº®ç¯
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("SendLight"), AllowAnonymous]
        public WebResponseContent SendLight([FromBody] TaskSendLight taskSendLight)
        {
            return Service.SendLight(taskSendLight);
        }
        /// <summary>
        /// ç”³è¯·å…¥åº“
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/appsettings.json
@@ -25,6 +25,9 @@
    "IPs": "http://127.0.0.1:8080,http://localhost:8080"
  },
  "WMSApiAddress": "http://127.0.0.1:9293", //"http://127.0.0.1:9283",正式环境地址
  "LogDeubgEnable": true, //是否记录调试日志
  "PrintSql": false, //打印SQL语句
  "LogAOPEnable": false, //是否记录AOP日志
  "ApiName": "WIDESEA",
  "ExpMinutes": 300,
  "QuartzJobAutoStart": true,
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -24,8 +24,10 @@
using System.Linq;
using System.Net.Http.Headers;
using System.Security.Policy;
using System.Threading.Tasks;
using WIDESEA_DTO.Agv;
using WIDESEA_External.Model;
using WIDESEAWCS_BasicInfoService;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.APIEnum;
using WIDESEAWCS_Common.TaskEnum;
@@ -63,6 +65,7 @@
        private readonly IApiInfoRepository _apiInfoRepository;
        private readonly ILocationInfoRepository _locationInfoRepository;
        private readonly ILocationInfoService _locationInfoService;
        private readonly ILocationStatusChangeRecordService _locationStatusChangeRecordService;
        private Dictionary<string, OrderByType> _taskOrderBy = new()
            {
@@ -80,7 +83,7 @@
        public List<int> TaskRelocationTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 900 && x < 1000).ToList();
        public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository,ILocationInfoRepository locationInfoRepository,IUnitOfWorkManage unitOfWorkManage, ILocationInfoService locationInfoService) : base(BaseDal)
        public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository,ILocationInfoRepository locationInfoRepository,IUnitOfWorkManage unitOfWorkManage, ILocationInfoService locationInfoService,ILocationStatusChangeRecordService locationStatusChangeRecordService) : base(BaseDal)
        {
            _mapper = mapper;
            _cacheService = cacheService;
@@ -93,6 +96,7 @@
            _locationInfoRepository = locationInfoRepository;
            _unitOfWorkManage = unitOfWorkManage;
            _locationInfoService = locationInfoService;
            _locationStatusChangeRecordService=locationStatusChangeRecordService;
        }
        static object lock_taskReceive = new object();
        /// <summary>
@@ -156,9 +160,8 @@
                    BaseDal.AddData(tasks);
                    _locationInfoRepository.UpdateData(locationInfos);
                    _unitOfWorkManage.CommitTran();
                    _taskExecuteDetailService.AddTaskExecuteDetail(tasks.Select(x => x.TaskNum).ToList(), "接收WMS任务");
                    _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfos, LocationStatusEnum.InStock, LocationStatusEnum.Lock, LocationChangeType.OutboundAssignLocation, tasks.Select(x => x.TaskNum).ToList());
                    content = tasks.Count > 0 ? content.OK("成功!"+(errorMsg.IsNullOrEmpty()? "": errorMsg)) : content.Error("失败");
                }
            }
@@ -168,46 +171,105 @@
            }
            return content;
        }
        static object lock_containerFlow = new object();
        /// <summary>
        /// å®¹å™¨å…¥åº“创建任务
        /// </summary>
        /// <returns></returns>
        public WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO, string deviceCode)
        public WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO, string deviceCode, string stationCode)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                lock (lock_containerFlow)
                List<Dt_LocationInfo> locationInfos = _locationInfoRepository.QueryData();
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.PalletCode == containerFlowDTO.ContainerCode);
                if (locationInfo != null) throw new Exception($"库位料箱号{containerFlowDTO.ContainerCode}已存在");
                if (BaseDal.QueryFirst(x => x.PalletCode == containerFlowDTO.ContainerCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState == TaskStatusEnum.CL_Executing.ObjToInt() && x.DeviceCode== deviceCode) != null)
                {
                    List<Dt_LocationInfo> locationInfos = _locationInfoRepository.QueryData();
                    Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x=>x.PalletCode== containerFlowDTO.ContainerCode);
                    if (locationInfo != null) throw new Exception($"库位料箱号{containerFlowDTO.ContainerCode}已存在");
                    if (BaseDal.QueryFirst(x=>x.PalletCode==containerFlowDTO.ContainerCode)!=null) throw new Exception($"料箱号{containerFlowDTO.ContainerCode}任务已存在");
                    Dt_LocationInfo? noInLocation = locationInfos.FirstOrDefault(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt());
                    if (noInLocation == null) throw new Exception($"可用货位不足!");
                    Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && x.StationDeviceCode == deviceCode);
                    //创建任务
                    Dt_Task task = new Dt_Task();
                    task.PalletCode = containerFlowDTO.ContainerCode;
                    task.SourceAddress = containerFlowDTO.SlotCode;
                    task.CurrentAddress = containerFlowDTO.SlotCode;
                    task.NextAddress = stationManger.StationCode;
                    task.TargetAddress = "";
                    task.WMSId = "";
                    task.TaskType = TaskTypeEnum.Inbound.ObjToInt();
                    task.Roadway = noInLocation.RoadwayNo;
                    task.DeviceCode = stationManger.StationDeviceCode;
                    task.TaskState = TaskStatusEnum.CL_Executing.ObjToInt();
                    //添加任务
                    BaseDal.AddData(task);
                    _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "创建入库任务");
                    content.OK("成功");
                    return content.OK();
                }
                else if(BaseDal.QueryFirst(x => x.PalletCode == containerFlowDTO.ContainerCode) != null)
                {
                    throw new Exception($"料箱号{containerFlowDTO.ContainerCode}任务已存在");
                }
                Dt_LocationInfo? noInLocation = locationInfos.FirstOrDefault(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt());
                if (noInLocation == null) throw new Exception($"可用货位不足!");
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && x.StationDeviceCode == deviceCode);
                //创建任务
                Dt_Task task = new Dt_Task();
                task.PalletCode = containerFlowDTO.ContainerCode;
                task.SourceAddress = containerFlowDTO.SlotCode;
                task.CurrentAddress = containerFlowDTO.SlotCode;
                task.NextAddress = stationManger.StationCode;
                task.TargetAddress = "";
                task.WMSId = "";
                task.TaskType = TaskTypeEnum.Inbound.ObjToInt();
                task.Roadway = noInLocation.RoadwayNo;
                task.DeviceCode = stationManger.StationDeviceCode;
                task.TaskState = TaskStatusEnum.CL_Executing.ObjToInt();
                //添加任务
                BaseDal.AddData(task);
                _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "创建入库任务");
                content.OK("成功");
            }
            catch (Exception ex)
            {
                content.Error($"错误信息:{ex.Message}");
            }
            return content;
        }
        /// <summary>
        /// æ’­ç§å¢™åˆå§‹åŒ–
        /// </summary>
        /// <returns></returns>
        public WebResponseContent InitLight()
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                EPLightContent lightContent = INITIALIZATION();
                if (lightContent.Result != "0") throw new Exception($"{lightContent.Msg}");
                content.OK();
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// ç»“束作业
        /// </summary>
        /// <returns></returns>
        public WebResponseContent EndLight()
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                EPLightContent lightContent = ENDWORK();
                if (lightContent.Result != "0") throw new Exception($"{lightContent.Msg}");
                content.OK();
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// æ’­ç§å¢™äº®ç¯
        /// </summary>
        /// <returns></returns>
        public WebResponseContent SendLight(TaskSendLight taskSendLight)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                EPLightContent pLightContent = new EPLightContent();
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
@@ -239,7 +301,7 @@
                    _locationInfoRepository.UpdateData(locationInfo);
                    _unitOfWorkManage.CommitTran();
                    _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, $"分配货位{locationInfo.LocationCode}");
                    _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, LocationStatusEnum.Free, LocationStatusEnum.Lock, LocationChangeType.InboundAssignLocation, task.TaskNum);
                    content.OK("成功");
                }
            }
@@ -513,6 +575,7 @@
                    _locationInfoRepository.UpdateData(locationInfo);
                    BaseDal.DeleteAndMoveIntoHty(task, App.User?.UserId == 0 ? OperateTypeEnum.自动完成 : OperateTypeEnum.人工完成);
                    _unitOfWorkManage.CommitTran();
                    _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, LocationStatusEnum.Lock, LocationStatusEnum.Free, LocationChangeType.OutboundCompleted, task.TaskNum);
                }
                else if(task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//入库任务完成逻辑
                {
@@ -548,6 +611,7 @@
                    _locationInfoRepository.UpdateData(locationInfo);
                    BaseDal.DeleteAndMoveIntoHty(task, App.User?.UserId == 0 ? OperateTypeEnum.自动完成 : OperateTypeEnum.人工完成);
                    _unitOfWorkManage.CommitTran();
                    _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, LocationStatusEnum.Lock, LocationStatusEnum.InStock, LocationChangeType.InboundCompleted, task.TaskNum);
                }
                content.OK("任务完成");
            }
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/Ò»ÆÚÏßÌå/ConveyorLineJob1.cs
@@ -44,7 +44,8 @@
        private readonly IRouterRepository _routerRepository;
        private readonly IRouterService _routerService;
        private readonly IRouterExtension _routerExtension;
        private static string BarCode1 = "";
        private static string BarCode2 = "";
        public ConveyorLineJob1(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
        {
            _cacheService = cacheService;
@@ -90,14 +91,31 @@
                                //上报WMS料箱到达
                                if (pickBarCode.IsNotEmptyOrNull())
                                {
                                    WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode);
                                    if (content.Status)
                                    if (device.DeviceCode == "CL1" && BarCode1!= pickBarCode)
                                    {
                                        WriteInfo(device.DeviceCode, $"{station.PickStationCode}拣选申请上报成功{pickBarCode}");
                                        WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode);
                                        if (content.Status)
                                        {
                                            WriteInfo(device.DeviceCode, $"{station.PickStationCode}拣选申请上报成功{pickBarCode}");
                                        }
                                        else
                                        {
                                            WriteError(device.DeviceCode, $"{station.PickStationCode}拣选申请上报WMS错误{pickBarCode},信息{content.Message}");
                                        }
                                        BarCode1 = pickBarCode;
                                    }
                                    else
                                    if (device.DeviceCode == "CL2" && BarCode1 != pickBarCode)
                                    {
                                        WriteError(device.DeviceCode, $"{station.PickStationCode}拣选申请上报WMS错误{pickBarCode},信息{content.Message}");
                                        WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode);
                                        if (content.Status)
                                        {
                                            WriteInfo(device.DeviceCode, $"{station.PickStationCode}拣选申请上报成功{pickBarCode}");
                                        }
                                        else
                                        {
                                            WriteError(device.DeviceCode, $"{station.PickStationCode}拣选申请上报WMS错误{pickBarCode},信息{content.Message}");
                                        }
                                        BarCode2 = pickBarCode;
                                    }
                                }
                                else
@@ -115,7 +133,7 @@
                            if (InTake==256 && InBarCode.IsNotEmptyOrNull())
                            {
                                //申请入库任务
                                Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == InBarCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState != TaskStatusEnum.CL_Executing.ObjToInt());
                                Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == InBarCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState != TaskStatusEnum.CL_Executing.ObjToInt() && x.DeviceCode==device.DeviceCode);
                                if (task != null) continue;
                                WebResponseContent content = _taskService.RequestInTask(station.StationCode, InBarCode);
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/¶þÆÚÏßÌå/ConveyorLineDBName.cs
@@ -39,6 +39,10 @@
        /// <summary>
        /// å¿ƒè·³å†™å…¥
        /// </summary>
        WriteHeart
        WriteHeart,
        /// <summary>
        /// æŒ‰é’®ç”³è¯·(读)
        /// </summary>
        R_DownRequest,
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/¶þÆÚÏßÌå/ConveyorLineJob2.cs
@@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common;
@@ -78,7 +79,37 @@
                                    WriteError(conveyorLine.DeviceCode, $"{station.PickStationCode}拣选申请为{PickRequest}条码为空值");
                                }
                            }
                            //按钮申请
                            bool DownRequest = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.R_DownRequest, station.StationCode);
                            if (DownRequest)
                            {
                                string PickBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, station.StationCode).Trim();
                                //上报WMS料箱到达
                                if (PickBarCode.IsNotEmptyOrNull())
                                {
                                    ContainerFlowDTO containerFlowDTO = new ContainerFlowDTO()
                                    {
                                        SlotCode = station.PickStationCode,
                                        ContainerCode = PickBarCode,
                                        Direction="100"
                                    };
                                    WebResponseContent responseContent = _taskService.ContainerFlow(containerFlowDTO, station.StationDeviceCode, station.PickStationCode);
                                    if (responseContent.Status)
                                    {
                                        conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)containerFlowDTO.Direction.ObjToInt(), station.StationCode);
                                    }
                                    else
                                    {
                                        WriteError(conveyorLine.DeviceCode, $"{station.PickStationCode}按钮申请错误{PickBarCode},信息{responseContent.Message}");
                                    };
                                }
                                else
                                {
                                    WriteError(conveyorLine.DeviceCode, $"{station.PickStationCode}按钮申请为{DownRequest}条码为空值");
                                }
                            }
                        }
                        else
                        {
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs
ÎļþÒÑɾ³ý
ÏîÄ¿×ÊÁÏ/Ò»ÆÚ¶Ô½ÓÏà¹Ø×ÊÁÏ/¹¤¾ß.zip
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿Ú»ã×ÜÎļþ/EPLight Web API ½Ó¿ÚÎĵµ1.1.docx
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿Ú»ã×ÜÎļþ/WMS½Ó¿Ú¶Ô½ÓÎĵµ20251202_V1.1.3.docx
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿Ú»ã×ÜÎļþ/WMS½Ó¿Ú¶Ô½ÓÎĵµ20251211_V1.1.3.docx
Binary files differ