From 6d3ea08855337c0cfcc60df2903d3431611c7097 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 13 十二月 2025 17:36:56 +0800
Subject: [PATCH] 优化程序,输送线入库按钮对接

---
 项目代码/WCSServices/WIDESEAWCS_Tasks/二期线体/ConveyorLineDBName.cs                                     |    6 
 项目代码/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs                                       |  124 +++++-
 项目代码/WCSServices/WIDESEAWCS_BasicInfoRepository/LocationStatusChangeRecordRepository.cs          |   18 +
 项目代码/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs                              |    2 
 项目资料/一期对接相关资料/工具.zip                                                                             |    0 
 项目代码/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationStatusChangeRecordController.cs |   32 ++
 项目代码/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs                                     |   17 +
 项目代码/WCSServices/WIDESEAWCS_Model/Models/BasicInfo/Dt_LocationStatusChangeRecord.cs              |   66 ++++
 项目代码/WCSServices/WIDESEAWCS_Common/StationTypeEnum.cs                                            |    7 
 项目代码/WCSServices/WIDESEAWCS_BasicInfoService/LocationStatusChangeRecordService.cs                |  103 ++++++
 项目资料/接口汇总文件/EPLight Web API 接口文档1.1.docx                                                         |    0 
 项目代码/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs                            |   97 ++++--
 项目代码/WCSClient/src/api/http.js                                                                   |    6 
 项目代码/WCSClient/src/extension/basicinfo/extend/GetLocationStatus.vue                              |  258 ++++++++++++++++
 项目代码/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs                              |   13 
 项目代码/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs                                           |   34 ++
 项目代码/WCSClient/src/extension/basicinfo/locationInfo.js                                           |    4 
 项目代码/WCSServices/WIDESEAWCS_Server/appsettings.json                                              |    3 
 /dev/null                                                                                        |    0 
 项目资料/接口汇总文件/WMS接口对接文档20251211_V1.1.3.docx                                                        |    0 
 项目代码/WCSServices/WIDESEAWCS_Tasks/一期线体/ConveyorLineJob1.cs                                       |   32 +
 项目代码/WCSServices/WIDESEAWCS_Common/LocationChangeType.cs                                         |   39 ++
 项目代码/WCSServices/WIDESEAWCS_Tasks/二期线体/ConveyorLineJob2.cs                                       |   33 ++
 项目代码/WCSServices/WIDESEAWCS_IBasicInfoService/ILocationStatusChangeRecordService.cs              |   32 ++
 项目代码/WCSClient/src/views/basicinfo/locationInfo.vue                                              |    2 
 项目代码/WCSServices/WIDESEAWCS_IBasicInfoRepository/ILocationStatusChangeRecordRepository.cs        |   16 +
 26 files changed, 848 insertions(+), 96 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/api/http.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/api/http.js"
index 2bf3bb2..4358160 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/api/http.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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+="/";
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/basicinfo/extend/GetLocationStatus.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/basicinfo/extend/GetLocationStatus.vue"
new file mode 100644
index 0000000..530dda8
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/basicinfo/locationInfo.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/basicinfo/locationInfo.js"
index 3b380cd..b323be4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/basicinfo/locationInfo.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/basicinfo/locationInfo.js"
@@ -1,11 +1,11 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-// import gridBody from './extend/GetLocationStatus.vue'
+import gridBody from './extend/GetLocationStatus.vue'
 let extension = {
   components: {
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
     gridHeader: '',
-    gridBody: '',
+    gridBody: gridBody,
     gridFooter: '',
     //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
     modelHeader: '',
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/views/basicinfo/locationInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/views/basicinfo/locationInfo.vue"
index 74915ed..f1b092f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/views/basicinfo/locationInfo.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/views/basicinfo/locationInfo.vue"
@@ -24,7 +24,7 @@
       cnName: "璐т綅淇℃伅",
       name: "locationInfo",
       url: "/LocationInfo/",
-      sortName: "id",
+      sortName: "createDate",
     });
     const editFormFields = ref({
       locationStatus: "",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoRepository/LocationStatusChangeRecordRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoRepository/LocationStatusChangeRecordRepository.cs"
new file mode 100644
index 0000000..c9ac1fb
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoRepository/LocationStatusChangeRecordRepository.cs"
@@ -0,0 +1,18 @@
+锘縰sing 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)
+        {
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs"
index 119392f..97ea408 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationStatusChangeRecordService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationStatusChangeRecordService.cs"
new file mode 100644
index 0000000..2e59271
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_BasicInfoService/LocationStatusChangeRecordService.cs"
@@ -0,0 +1,103 @@
+锘縰sing 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);
+            }
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Common/LocationChangeType.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Common/LocationChangeType.cs"
new file mode 100644
index 0000000..674705d
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Common/LocationChangeType.cs"
@@ -0,0 +1,39 @@
+锘縰sing 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
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Common/StationTypeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Common/StationTypeEnum.cs"
index ec58375..5c772d5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Common/StationTypeEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Common/StationTypeEnum.cs"
@@ -19,11 +19,6 @@
         /// <summary>
         /// 鍑哄簱绔欏彴
         /// </summary>
-        StationType_OnlyOutbound = 2,
-
-        /// <summary>
-        /// 鍑哄叆搴撶珯鍙�
-        /// </summary>
-        StationType_InboundAndOutbound = 3,
+        StationType_OnlyOutbound = 2
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs"
index cceb9a4..12aa1f8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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; }
+    }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_IBasicInfoRepository/ILocationStatusChangeRecordRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_IBasicInfoRepository/ILocationStatusChangeRecordRepository.cs"
new file mode 100644
index 0000000..2a5646d
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_IBasicInfoRepository/ILocationStatusChangeRecordRepository.cs"
@@ -0,0 +1,16 @@
+锘縰sing 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>
+    {
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_IBasicInfoService/ILocationStatusChangeRecordService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_IBasicInfoService/ILocationStatusChangeRecordService.cs"
new file mode 100644
index 0000000..1335a9b
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_IBasicInfoService/ILocationStatusChangeRecordService.cs"
@@ -0,0 +1,32 @@
+锘縰sing 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);
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index 6caa9f4..9d49e37 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Model/Models/BasicInfo/Dt_LocationStatusChangeRecord.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Model/Models/BasicInfo/Dt_LocationStatusChangeRecord.cs"
new file mode 100644
index 0000000..d3e09f1
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Model/Models/BasicInfo/Dt_LocationStatusChangeRecord.cs"
@@ -0,0 +1,66 @@
+锘縰sing 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; }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
index 51c7860..98f0bee 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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;
         }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationStatusChangeRecordController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationStatusChangeRecordController.cs"
new file mode 100644
index 0000000..499f6b6
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationStatusChangeRecordController.cs"
@@ -0,0 +1,32 @@
+锘縰sing 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);
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
index 470221f..f34f16d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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}鎷i�変綅缃笉瀛樺湪");
-                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}鎷i�変綅缃笉瀛樺湪");
+                    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>
         /// 鐢宠鍏ュ簱
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/appsettings.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/appsettings.json"
index bf8f45b..3c3f3c1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/appsettings.json"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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",姝e紡鐜鍦板潃
+  "LogDeubgEnable": true, //鏄惁璁板綍璋冭瘯鏃ュ織
+  "PrintSql": false, //鎵撳嵃SQL璇彞
+  "LogAOPEnable": false, //鏄惁璁板綍AOP鏃ュ織
   "ApiName": "WIDESEA",
   "ExpMinutes": 300,
   "QuartzJobAutoStart": true,
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
index f501dc9..c3526ee 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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("浠诲姟瀹屾垚");
             }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\270\200\346\234\237\347\272\277\344\275\223/ConveyorLineJob1.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\270\200\346\234\237\347\272\277\344\275\223/ConveyorLineJob1.cs"
index e821c77..ba907c7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\270\200\346\234\237\347\272\277\344\275\223/ConveyorLineJob1.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\270\200\346\234\237\347\272\277\344\275\223/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}鎷i�夌敵璇蜂笂鎶ユ垚鍔焮pickBarCode}");
+                                        WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode);
+                                        if (content.Status)
+                                        {
+                                            WriteInfo(device.DeviceCode, $"{station.PickStationCode}鎷i�夌敵璇蜂笂鎶ユ垚鍔焮pickBarCode}");
+                                        }
+                                        else
+                                        {
+                                            WriteError(device.DeviceCode, $"{station.PickStationCode}鎷i�夌敵璇蜂笂鎶MS閿欒{pickBarCode}锛屼俊鎭瘂content.Message}");
+                                        }
+                                        BarCode1 = pickBarCode;
                                     }
-                                    else
+                                    if (device.DeviceCode == "CL2" && BarCode1 != pickBarCode)
                                     {
-                                        WriteError(device.DeviceCode, $"{station.PickStationCode}鎷i�夌敵璇蜂笂鎶MS閿欒{pickBarCode}锛屼俊鎭瘂content.Message}");
+                                        WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode);
+                                        if (content.Status)
+                                        {
+                                            WriteInfo(device.DeviceCode, $"{station.PickStationCode}鎷i�夌敵璇蜂笂鎶ユ垚鍔焮pickBarCode}");
+                                        }
+                                        else
+                                        {
+                                            WriteError(device.DeviceCode, $"{station.PickStationCode}鎷i�夌敵璇蜂笂鎶MS閿欒{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);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineDBName.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineDBName.cs"
index 77cc90b..bbab284 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineDBName.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineDBName.cs"
@@ -39,6 +39,10 @@
         /// <summary>
         /// 蹇冭烦鍐欏叆
         /// </summary>
-        WriteHeart
+        WriteHeart,
+        /// <summary>
+        /// 鎸夐挳鐢宠(璇�)
+        /// </summary>
+        R_DownRequest,
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs"
index 191f8f9..0497039 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/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}鎷i�夌敵璇蜂负{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
                         {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs"
deleted file mode 100644
index bf8e9eb..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs"
+++ /dev/null
@@ -1,199 +0,0 @@
-锘縰sing Autofac.Core;
-using Microsoft.AspNetCore.Components.Routing;
-using Newtonsoft.Json;
-using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
-using Quartz;
-using System;
-using System.Collections.Generic;
-using System.IdentityModel.Tokens.Jwt;
-using System.Linq;
-using System.Reflection.Metadata;
-using System.Text;
-using System.Threading.Tasks;
-using WIDESEAWCS_Common;
-using WIDESEAWCS_Common.Helper;
-using WIDESEAWCS_Common.TaskEnum;
-using WIDESEAWCS_Communicator;
-using WIDESEAWCS_Core;
-using WIDESEAWCS_Core.Helper;
-using WIDESEAWCS_IBasicInfoRepository;
-using WIDESEAWCS_ITaskInfoRepository;
-using WIDESEAWCS_ITaskInfoService;
-using WIDESEAWCS_Model.Models;
-using WIDESEAWCS_QuartzJob;
-using WIDESEAWCS_QuartzJob.ConveyorLine.Enum;
-using WIDESEAWCS_QuartzJob.DTO;
-using WIDESEAWCS_QuartzJob.Models;
-using WIDESEAWCS_QuartzJob.Repository;
-using WIDESEAWCS_QuartzJob.Service;
-using WIDESEAWCS_Tasks.DBNames;
-using ICacheService = WIDESEAWCS_Core.Caches.ICacheService;
-
-namespace WIDESEAWCS_Tasks
-{
-    [DisallowConcurrentExecution]
-    public class MDJob_CP : JobBase, IJob
-    {
-        private readonly ICacheService _cacheService;
-        private readonly ITaskService _taskService;
-        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
-        private readonly ITaskRepository _taskRepository;
-        private readonly IStationMangerRepository _stationMangerRepository;
-        private readonly IRouterRepository _routerRepository;
-        private readonly IRouterService _routerService;
-        private readonly IRouterExtension _routerExtension;
-
-        public MDJob_CP(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
-        {
-            _cacheService = cacheService;
-            _taskService = taskService;
-            _taskExecuteDetailService = taskExecuteDetailService;
-            _taskRepository = taskRepository;
-            _stationMangerRepository = stationMangerRepository;
-            _routerRepository = routerRepository;
-            _routerService = routerService;
-            _routerExtension = routerExtension;
-        }
-
-        public Task Execute(IJobExecutionContext context)
-        {
-            bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
-            if (flag && value != null)
-            {
-                OtherDevice device = (OtherDevice)value;
-                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.CraneCode == device.DeviceCode);
-                foreach (var item in stationMangers)
-                {
-                    //鑾峰彇鍗忚
-                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.CraneCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
-                    DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.CraneCode && x.DeviceProParamType == nameof(W_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
-                    if (deviceProRead != null && deviceProWrite != null)
-                    {
-                        short Allow = device.GetValue<R_MDDB, short>(R_MDDB.R_MDAllow, item.CraneCode);
-
-                        #region 璇诲彇宸ヤ綅鐘舵��
-                        short R_MDStatus1 = device.GetValue<R_MDDB, short>(R_MDDB.R_MDStatus1, item.CraneCode);
-                        short R_MDStatus2 = device.GetValue<R_MDDB, short>(R_MDDB.R_MDStatus2, item.CraneCode);
-                        short R_MDStatus3 = device.GetValue<R_MDDB, short>(R_MDDB.R_MDStatus3, item.CraneCode);
-                        short R_MDStatus4 = device.GetValue<R_MDDB, short>(R_MDDB.R_MDStatus4, item.CraneCode);
-
-                        short ReceiveDoneState = device.GetValue<W_MDDB, short>(W_MDDB.W_MDReceiveDone, item.CraneCode);
-                        #endregion
-                        //鐮佸灈鐘舵��
-                        short PackState = device.GetValue<R_MDDB, short>(GetPackStateEnum(item.CraneStationCode), item.CraneCode);
-                        //鐮佸灈鏁伴噺
-                        short PackNum = device.GetValue<R_MDDB, short>(GetPackNumEnum(item.CraneStationCode), item.CraneCode);
-                        if (R_MDStatus1 == 1 || R_MDStatus2 == 1 || R_MDStatus3 == 1 || R_MDStatus4 == 1)
-                        {
-                            Thread.Sleep(200);
-                            if (ReceiveDoneState != 0)
-                            {
-                                device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDReceiveDone.ToString()).DeviceProDataBlock, 0);
-                                WriteInfo(item.CraneCode, $"{item.CraneCode}娓呴櫎涓嬪彂鏍囪瘑淇″彿");
-                            }
-                            continue;
-                        }
-                        if (PackState == 2)
-                        {
-                            Thread.Sleep(200);
-                            device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.CraneStationCode).ToString()).DeviceProDataBlock, 0);
-                            WriteInfo(item.StationName, $"{item.StationName}娓呴櫎宸ヤ綅缁撴墭淇″彿");
-                            continue;
-                        }
-                        device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.CraneStationCode).ToString()).DeviceProDataBlock, 2);
-                        WriteInfo(item.StationName, $"{item.StationName}鍐欏叆宸ヤ綅缁撴墭淇″彿");
-                        //鑾峰彇褰撳墠浠诲姟
-                        Dt_Task task = _taskRepository.QueryData(x => x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.DeviceCode == device.DeviceCode).OrderBy(x => x.TaskNum).FirstOrDefault();
-
-                        if (task != null)
-                        {
-                            //鍐欏叆宸ヤ綅鍙�
-                            device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDSendID.ToString()).DeviceProDataBlock, Convert.ToInt16(item.CraneStationCode));
-                            //鍐欏叆宸ヤ綅鍏佽鐮佸灈
-                            device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.CraneStationCode).ToString()).DeviceProDataBlock, 1);
-
-                            #region 鑾峰彇鍐欏叆鐮佸灈X銆乊銆乑鍧愭爣
-
-                            WriteInfo(item.StationName, $"鐮佸灈鏁伴噺銆恵PackNum}銆�");
-                            #endregion
-
-                            device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDA.ToString()).DeviceProDataBlock, 1);
-                            //鍐欏叆涓嬪彂鏍囪瘑
-                            device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDReceiveDone.ToString()).DeviceProDataBlock, 3);
-
-                            //鏇存柊浠诲姟淇℃伅
-                            task.TaskState = TaskStatusEnum.Finish.ObjToInt();
-                            //_taskRepository.UpdateData(task);
-                            //_taskService.TaskCompleted(task.TaskNum);
-                            Thread.Sleep(1000);
-                            WriteInfo(item.StationName, $"浠诲姟鍙穥task.TaskNum}鐮佸灈");
-                            return Task.CompletedTask;
-                        }
-                    }
-                    else
-                    {
-                        WriteError(item.StationName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
-                    }
-                }
-            }
-            return Task.CompletedTask;
-        }
-        /// <summary>
-        /// 鐮佸灈鏁伴噺
-        /// </summary>
-        public R_MDDB GetPackNumEnum(string StationCode)
-        {
-            switch (StationCode)
-            {
-                case "1":
-                    return R_MDDB.R_MDQtys1;
-                case "2":
-                    return R_MDDB.R_MDQtys2;
-                case "3":
-                    return R_MDDB.R_MDQtys3;
-                case "4":
-                    return R_MDDB.R_MDQtys4;
-                default:
-                    throw new Exception("鏈畾涔夊伐浣�");
-            }
-        }
-        /// <summary>
-        /// 鐮佸灈鐘舵��
-        /// </summary>
-        public R_MDDB GetPackStateEnum(string StationCode)
-        {
-            switch (StationCode)
-            {
-                case "1":
-                    return R_MDDB.R_MDStatus1;
-                case "2":
-                    return R_MDDB.R_MDStatus2;
-                case "3":
-                    return R_MDDB.R_MDStatus3;
-                case "4":
-                    return R_MDDB.R_MDStatus4;
-                default:
-                    throw new Exception("鏈畾涔夊伐浣�");
-            }
-        }
-        /// <summary>
-        /// 鐮佸灈宸ヤ綅
-        /// </summary>
-        public W_MDDB GetPackSendEnum(string StationCode)
-        {
-            switch (StationCode)
-            {
-                case "1":
-                    return W_MDDB.W_MDSend1;
-                case "2":
-                    return W_MDDB.W_MDSend2;
-                case "3":
-                    return W_MDDB.W_MDSend3;
-                case "4":
-                    return W_MDDB.W_MDSend4;
-                default:
-                    throw new Exception("鏈畾涔夊伐浣�");
-            }
-        }
-    }
-}
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\344\270\200\346\234\237\345\257\271\346\216\245\347\233\270\345\205\263\350\265\204\346\226\231/\345\267\245\345\205\267.zip" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\344\270\200\346\234\237\345\257\271\346\216\245\347\233\270\345\205\263\350\265\204\346\226\231/\345\267\245\345\205\267.zip"
new file mode 100644
index 0000000..2721dce
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\344\270\200\346\234\237\345\257\271\346\216\245\347\233\270\345\205\263\350\265\204\346\226\231/\345\267\245\345\205\267.zip"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/EPLight Web API \346\216\245\345\217\243\346\226\207\346\241\2431.1.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/EPLight Web API \346\216\245\345\217\243\346\226\207\346\241\2431.1.docx"
index b041b56..a2e7a3a 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/EPLight Web API \346\216\245\345\217\243\346\226\207\346\241\2431.1.docx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/EPLight Web API \346\216\245\345\217\243\346\226\207\346\241\2431.1.docx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/WMS\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\24320251202_V1.1.3.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/WMS\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\24320251202_V1.1.3.docx"
deleted file mode 100644
index aa93369..0000000
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/WMS\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\24320251202_V1.1.3.docx"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/WMS\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\24320251211_V1.1.3.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/WMS\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\24320251211_V1.1.3.docx"
new file mode 100644
index 0000000..475a98a
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\261\207\346\200\273\346\226\207\344\273\266/WMS\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\24320251211_V1.1.3.docx"
Binary files differ

--
Gitblit v1.9.3