From d325cca91328031262c0e6134c37cac441192ee4 Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期六, 16 八月 2025 11:27:38 +0800 Subject: [PATCH] 代码提交 --- 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json | 178 ++++++++ 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json | 3 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 98 ++- 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/.suo | 0 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.backup.json | 178 ++++++++ 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs | 78 ++- 项目代码/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue | 1 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs | 4 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user | 2 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/Enum/TaskStatusEnum.cs | 4 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/IDeviceInfoService.cs | 7 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 14 项目代码/WCS/WIDESEAWCS_Client/src/views/basicinfo/Dt_StationManager.vue | 54 +- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceInfoController.cs | 6 项目代码/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue | 31 + 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/.futdcache.v2 | 0 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 30 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs | 41 + 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs | 504 ++++++++++----------- 项目代码/WCS/WIDESEAWCS_Client/src/views/Home.vue | 59 +- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob/CommonRGVJob.cs | 8 21 files changed, 867 insertions(+), 433 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/Home.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/Home.vue" index 2e9ad25..a1f2232 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/Home.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/Home.vue" @@ -79,7 +79,7 @@ url="api/Equipment/GetLineInfoByNo" /> </div> </div> - <div style="margin-top: 118px;"></div> + <div style="margin-top: 108px;"></div> <div v-for="(group, index) in groupedLines(linescopy2)" :key="index"> <div class="positionY-group"> <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex" @@ -88,7 +88,7 @@ url="api/Equipment/GetLineInfoByNo" /> </div> </div> - <div style="margin-top: 50px;"></div> + <div style="margin-top: 58px;"></div> <div v-for="(group, index) in groupedLines(linescopy3)" :key="index"> <div class="positionY-group"> <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex" @@ -97,7 +97,7 @@ url="api/Equipment/GetLineInfoByNo" /> </div> </div> - <div style="margin-top: 50px;"></div> + <div style="margin-top: 58px;"></div> <div v-for="(group, index) in groupedLines(linescopy4)" :key="index"> <div class="positionY-group"> <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex" @@ -105,7 +105,7 @@ :positionY="line.positionY" :condition="line.condition" /> </div> </div> - <div style="margin-top: 109px;"></div> + <div style="margin-top: 115px;"></div> <div v-for="(group, index) in groupedLines(linescopy5)" :key="index"> <div class="positionY-group"> <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex" @@ -113,7 +113,7 @@ :positionY="line.positionY" :condition="line.condition" /> </div> </div> - <div style="margin-top: 107px;"></div> + <div style="margin-top: 115px;"></div> <div v-for="(group, index) in groupedLines(linescopy6)" :key="index"> <div class="positionY-group"> <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex" @@ -750,14 +750,14 @@ }, { equipNo: "2002", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2001", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, @@ -765,14 +765,14 @@ { equipNo: "2004", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, { equipNo: "2003", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, @@ -816,28 +816,28 @@ }, { equipNo: "2006", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2005", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2008", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, { equipNo: "2007", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, @@ -881,28 +881,28 @@ }, { equipNo: "2010", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2009", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2012", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, { equipNo: "2011", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, @@ -939,28 +939,28 @@ }, { equipNo: "2014", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2013", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2016", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, { equipNo: "2015", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, @@ -997,28 +997,28 @@ }, { equipNo: "2018", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2017", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2020", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, { equipNo: "2019", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, @@ -1055,28 +1055,28 @@ }, { equipNo: "2022", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2021", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 8, condition: false, }, { equipNo: "2024", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, { equipNo: "2023", imgType: "1", - positionX: 28, + positionX: 27.5, positionY: 20, condition: false, }, @@ -1666,6 +1666,7 @@ this.StackerCrane.LevelPoint = eventData.data.levelPoint; this.StackerCrane.DeviceName = eventData.data.deviceName; this.StackerCrane.DeviceCode = eventData.data.deviceCode; + this.StackerCrane.CurrentTaskNum = eventData.data.currentTaskNum; this.StackerCrane.StackerAlarm = eventData.data.stackerAlarm; this.$nextTick(() => { diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue" index 6b8ebb3..26ce7ef 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue" @@ -78,7 +78,7 @@ <el-col :span="12" :offset="0" :push="0" :pull="0" tag="div"> <el-form-item label="褰撳墠琛屽垪灞傦細"> <j-el-description - :value="StackerCrane.CurrentRow + '-' + StackerCrane.CurrentColumn + '-' + StackerCrane.CurrentLayer" + :value="StackerCrane.CurrentRow + '-' + StackerCrane.CurrentLayer + '-' + StackerCrane.CurrentColumn " type="primary" ellipsis></j-el-description> </el-form-item> </el-col> @@ -133,19 +133,23 @@ </el-form> <el-divider /> <el-row :gutter="20" type="flex" justify="start" align="top" tag="div"> - <el-col :span="8" :offset="0" :push="0" :pull="0" tag="div"> + <el-col :span="6" :offset="0" :push="0" :pull="0" tag="div"> <el-button type="primary" size="small" plain @click="start"> <i class="el-icon-check">鍚姩</i> </el-button> </el-col> - <el-col :span="8" :offset="0" :push="0" :pull="0" tag="div"> + <el-col :span="6" :offset="0" :push="0" :pull="0" tag="div"> <el-button type="warning" size="small" plain @click="reset"> <i class="el-icon-check">澶嶄綅</i> </el-button> - </el-col> - <el-col :span="8" :offset="0" :push="0" :pull="0" tag="div"> + <el-col :span="6" :offset="0" :push="0" :pull="0" tag="div"> + <el-button type="danger" size="small" plain @click="disconnected"> + <i class="el-icon-check">涓柇</i> + </el-button> + </el-col> + <el-col :span="6" :offset="0" :push="0" :pull="0" tag="div"> <el-button type="danger" size="small" plain @click="emergencyStop"> <i class="el-icon-check">鎬ュ仠</i> </el-button> @@ -218,6 +222,7 @@ this.StackerCrane.CurrentLayer = x.CurrentLayer == undefined ? 1 : x.CurrentLayer; this.StackerCrane.LevelPoint = x.LevelPoint; this.StackerCrane.DeviceName = x.DeviceName; + this.StackerCrane.CurrentTaskNum = x.CurrentTaskNum; this.StackerCrane.StackerAlarm = x.StackerAlarm; this.form.DeviceCode = x.DeviceCode; }, @@ -271,7 +276,7 @@ this.fullscreenLoading = false; }); }, - + emergencyStop() { this.fullscreenLoading = true; this.http.post("api/DeviceInfo/StackerEmergencyStop?DeviceCode=" + this.form.DeviceCode) @@ -288,6 +293,20 @@ .finally(() => { this.fullscreenLoading = false; }); + }, + disconnected() { + this.fullscreenLoading = true; + this.http.post("api/DeviceInfo/StackerDisconnected?DeviceCode=" + this.form.DeviceCode) + .then((x) => { + if (!x.status) { + this.$message.error(x.message); + } else { + this.$Message.success("涓柇鍫嗗灈鏈轰换鍔�"); + } + }) + .finally(() => { + this.fullscreenLoading = false; + }); } }, }; diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue" index 9bf9bf0..338a8f0 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue" @@ -169,7 +169,6 @@ .then((x) => { if (x.status) { this.lineItemInfo = x.data; - console.log(this.lineItemInfo.taskNum); } else { this.$message({ type: "error", diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/basicinfo/Dt_StationManager.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/basicinfo/Dt_StationManager.vue" index 20c642a..f1e0b46 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/basicinfo/Dt_StationManager.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/basicinfo/Dt_StationManager.vue" @@ -24,51 +24,51 @@ sortName: "AreaCode" }); const editFormFields = ref({ - stationStatus:"", - stationType:"", - stationPLC:"", - roadway:"", - stationChildCode:"", - stationArea:"", - remark:"", - stationRemark:"", - stationNextChildCode:"", - stationLocation:"", - stationFloor:"", - rGVName:"", - levelPointFist:"", - levelPointSecond:"" + stationStatus: "", + stationType: "", + stationPLC: "", + roadway: "", + stationChildCode: "", + stationArea: "", + remark: "", + stationRemark: "", + stationNextChildCode: "", + stationLocation: "", + stationFloor: "", + rGVName: "", + levelPointFist: "", + levelPointSecond: "" }); const editFormOptions = ref([ - [ - { "title": "鐘舵��", "field": "stationStatus",type: "select",dataKey: "deviceStatus",data: [],}, - - + [ + { "title": "鐘舵��", "field": "stationStatus", type: "select", dataKey: "deviceStatus", data: [], }, + + ], ]); const searchFormFields = ref({}); const searchFormOptions = ref([ [ + { "title": "杈撻�佺嚎缂栧彿", "field": "stationChildCode", type: "text" }, { "title": "绔欏彴绫诲瀷", "field": "stationType", type: "text" }, - { "title": "鎵�灞濸LC", "field": "stationPLC", type: "text" }, { "title": "宸烽亾鍙�", "field": "roadway", type: "text" }, - + ] ]); const columns = ref([{ field: 'stationID', title: '涓婚敭', type: 'int', sort: true, hidden: true, width: 110, readonly: true, require: true, align: 'left' }, { field: 'stationType', title: '绔欏彴绫诲瀷', type: 'int', sort: true, width: 110, require: true, align: 'left', sort: true }, { field: 'stationPLC', title: '鎵�灞濸LC', type: 'string', sort: true, width: 110, align: 'left' }, - { field: 'roadway', title: '宸烽亾鍙�', type: 'string', sort: true, width: 110, align: 'left' }, - { field: 'stationLocation', title: '鍫嗗灈鏈哄嚭鍏ュ簱鍧愭爣', type: 'string', sort: true, width: 110, align: 'left' }, + { field: 'roadway', title: '宸烽亾鍙�', type: 'string', sort: true, width: 110, align: 'left' }, + { field: 'stationLocation', title: '鍫嗗灈鏈哄嚭鍏ュ簱鍧愭爣', type: 'string', sort: true, width: 110, align: 'left' }, { field: 'stationChildCode', title: '绾夸綋缂栧彿', type: 'string', sort: true, width: 110, align: 'left' }, - { field: 'stationArea', title: '璁惧鍖哄煙', type: 'int', sort: true, width: 100, align: 'left' }, - { field: 'stationNextChildCode', title: '涓嬩竴绔欏彴', type: 'string', sort: true, width: 110, align: 'left' }, - { field: 'stationRemark', title: '宸ヤ綅', type: 'int', sort: true, width: 110, align: 'left', }, + { field: 'stationArea', title: '璁惧鍖哄煙', type: 'int', sort: true, width: 100, align: 'left' }, + { field: 'stationNextChildCode', title: '涓嬩竴绔欏彴', type: 'string', sort: true, width: 110, align: 'left' }, + { field: 'stationRemark', title: '宸ヤ綅', type: 'int', sort: true, width: 110, align: 'left', }, { field: 'stationStatus', title: '鐘舵��', type: 'int', sort: true, width: 110, align: 'left', bind: { key: "deviceStatus", data: [] }, }, { field: 'creater', title: '鍒涘缓浜�', type: 'string', sort: true, width: 110, align: 'left' }, { field: 'createDate', title: '鍒涘缓鏃堕棿', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }, - { field: 'modifier', title: '淇敼浜�', type: 'string', sort: true, width: 100, align: 'left' }, - { field: 'modifyDate', title: '淇敼鏃堕棿', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }, + { field: 'modifier', title: '淇敼浜�', type: 'string', sort: true, width: 100, align: 'left' }, + { field: 'modifyDate', title: '淇敼鏃堕棿', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }, ]); const detail = ref({ cnName: "#detailCnName", diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/.futdcache.v2" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/.futdcache.v2" new file mode 100644 index 0000000..60d4ace --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/.futdcache.v2" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/.suo" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/.suo" new file mode 100644 index 0000000..7842d3d --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/.suo" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.backup.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.backup.json" new file mode 100644 index 0000000..8fba643 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.backup.json" @@ -0,0 +1,178 @@ +{ + "Version": 1, + "WorkspaceRootPath": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\rgvjob_firstfloor\\commonrgv_firstfloorjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\rgvjob_firstfloor\\commonrgv_firstfloorjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_dto\\enum\\taskstatusenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\enum\\taskstatusenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\service\\deviceinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\service\\deviceinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\conveyorlinejob\\task\\requestinbound.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\conveyorlinejob\\task\\requestinbound.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\conveyorlinejob\\commonconveyorlinejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\conveyorlinejob\\commonconveyorlinejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_server\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\rgvjob\\commonrgvjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\rgvjob\\commonrgvjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 6, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "TaskStatusEnum.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\Enum\\TaskStatusEnum.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_DTO\\Enum\\TaskStatusEnum.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\Enum\\TaskStatusEnum.cs", + "RelativeToolTip": "WIDESEAWCS_DTO\\Enum\\TaskStatusEnum.cs", + "ViewState": "AgIAADsAAAAAAAAAAADwv1IAAAAgAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-15T07:23:01.305Z", + "EditorCaption": "" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "DeviceInfoService.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\Service\\DeviceInfoService.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\Service\\DeviceInfoService.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\Service\\DeviceInfoService.cs", + "RelativeToolTip": "WIDESEAWCS_QuartzJob\\Service\\DeviceInfoService.cs", + "ViewState": "AgIAAEQAAAAAAAAAAAAQwDQCAAAjAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-14T04:59:11.955Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "CommonConveyorLineJob.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", + "RelativeToolTip": "WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", + "ViewState": "AgIAAJcAAAAAAAAAAAAAwLQAAAAQAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-24T03:47:03.579Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "RequestInbound.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\Task\\RequestInbound.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\ConveyorLineJob\\Task\\RequestInbound.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\Task\\RequestInbound.cs", + "RelativeToolTip": "WIDESEAWCS_Tasks\\ConveyorLineJob\\Task\\RequestInbound.cs", + "ViewState": "AgIAADAAAAAAAAAAAAAQwEUAAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-06T01:22:38.368Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "CommonRGV_FirstFloorJob.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RGVJob_FirstFloor\\CommonRGV_FirstFloorJob.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\RGVJob_FirstFloor\\CommonRGV_FirstFloorJob.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RGVJob_FirstFloor\\CommonRGV_FirstFloorJob.cs*", + "RelativeToolTip": "WIDESEAWCS_Tasks\\RGVJob_FirstFloor\\CommonRGV_FirstFloorJob.cs*", + "ViewState": "AgIAALkCAAAAAAAAAAAQwP8BAAD7AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-30T09:52:26.156Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "CommonStackerCraneJob.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", + "RelativeToolTip": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", + "ViewState": "AgIAAHEAAAAAAAAAAAAIwIYAAAAmAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-14T05:52:42.454Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "TaskService.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\TaskService.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", + "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\TaskService.cs", + "ViewState": "AgIAACsCAAAAAAAAAADwv1MCAAAXAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-31T01:00:10.426Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "appsettings.json", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json", + "RelativeDocumentMoniker": "WIDESEAWCS_Server\\appsettings.json", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json", + "RelativeToolTip": "WIDESEAWCS_Server\\appsettings.json", + "ViewState": "AgIAAAAAAAAAAAAAAADwvw0AAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-08-14T05:23:47.142Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "CommonRGVJob.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RGVJob\\CommonRGVJob.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\RGVJob\\CommonRGVJob.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RGVJob\\CommonRGVJob.cs", + "RelativeToolTip": "WIDESEAWCS_Tasks\\RGVJob\\CommonRGVJob.cs", + "ViewState": "AgIAALIAAAAAAAAAAAAjwOMAAABzAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-28T04:13:17.74Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json" new file mode 100644 index 0000000..3f124fa --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json" @@ -0,0 +1,178 @@ +{ + "Version": 1, + "WorkspaceRootPath": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\rgvjob_firstfloor\\commonrgv_firstfloorjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\rgvjob_firstfloor\\commonrgv_firstfloorjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_dto\\enum\\taskstatusenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\enum\\taskstatusenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\service\\deviceinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\service\\deviceinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\conveyorlinejob\\task\\requestinbound.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\conveyorlinejob\\task\\requestinbound.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\conveyorlinejob\\commonconveyorlinejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\conveyorlinejob\\commonconveyorlinejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_server\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|e:\\get\\aotansiwcs\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\rgvjob\\commonrgvjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\rgvjob\\commonrgvjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 7, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "TaskStatusEnum.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\Enum\\TaskStatusEnum.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_DTO\\Enum\\TaskStatusEnum.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\Enum\\TaskStatusEnum.cs", + "RelativeToolTip": "WIDESEAWCS_DTO\\Enum\\TaskStatusEnum.cs", + "ViewState": "AgIAACAAAAAAAAAAAADwvy0AAAAjAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-15T07:23:01.305Z", + "EditorCaption": "" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "DeviceInfoService.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\Service\\DeviceInfoService.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\Service\\DeviceInfoService.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\Service\\DeviceInfoService.cs", + "RelativeToolTip": "WIDESEAWCS_QuartzJob\\Service\\DeviceInfoService.cs", + "ViewState": "AgIAAEQAAAAAAAAAAAAQwDQCAAAjAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-14T04:59:11.955Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "CommonConveyorLineJob.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", + "RelativeToolTip": "WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs", + "ViewState": "AgIAAJcAAAAAAAAAAAAAwLQAAAAQAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-24T03:47:03.579Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "RequestInbound.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\Task\\RequestInbound.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\ConveyorLineJob\\Task\\RequestInbound.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\Task\\RequestInbound.cs", + "RelativeToolTip": "WIDESEAWCS_Tasks\\ConveyorLineJob\\Task\\RequestInbound.cs", + "ViewState": "AgIAADAAAAAAAAAAAAAQwEUAAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-06T01:22:38.368Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "CommonRGV_FirstFloorJob.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RGVJob_FirstFloor\\CommonRGV_FirstFloorJob.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\RGVJob_FirstFloor\\CommonRGV_FirstFloorJob.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RGVJob_FirstFloor\\CommonRGV_FirstFloorJob.cs", + "RelativeToolTip": "WIDESEAWCS_Tasks\\RGVJob_FirstFloor\\CommonRGV_FirstFloorJob.cs", + "ViewState": "AgIAAKcDAAAAAAAAAAAewAgEAABHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-30T09:52:26.156Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "CommonStackerCraneJob.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", + "RelativeToolTip": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", + "ViewState": "AgIAAJIAAAAAAAAAAAAIwKMAAAAUAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-14T05:52:42.454Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "TaskService.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\TaskService.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", + "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\TaskService.cs", + "ViewState": "AgIAACsCAAAAAAAAAADwv1MCAAAXAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-31T01:00:10.426Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "appsettings.json", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json", + "RelativeDocumentMoniker": "WIDESEAWCS_Server\\appsettings.json", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json", + "RelativeToolTip": "WIDESEAWCS_Server\\appsettings.json", + "ViewState": "AgIAAAAAAAAAAAAAAADwvw0AAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-08-14T05:23:47.142Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "CommonRGVJob.cs", + "DocumentMoniker": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RGVJob\\CommonRGVJob.cs", + "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\RGVJob\\CommonRGVJob.cs", + "ToolTip": "E:\\GET\\AoTanSiWCS\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RGVJob\\CommonRGVJob.cs", + "RelativeToolTip": "WIDESEAWCS_Tasks\\RGVJob\\CommonRGVJob.cs", + "ViewState": "AgIAALIAAAAAAAAAAAAjwOMAAABzAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-28T04:13:17.74Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/Enum/TaskStatusEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/Enum/TaskStatusEnum.cs" index 9c5febd..85c7ce6 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/Enum/TaskStatusEnum.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/Enum/TaskStatusEnum.cs" @@ -74,13 +74,13 @@ /// 鍏ュ簱涓浆 /// </summary> [Description("鍏ュ簱涓浆")] - RGV_TransFer = 250, + RGV_TransFer = 216, /// <summary> /// 鍏ュ簱涓浆瀹屾垚 /// </summary> [Description("鍏ュ簱涓浆瀹屾垚")] - RGV_TransFerFInish = 255, + RGV_TransFerFInish = 217, /// <summary> /// 鍏ュ簱浠诲姟瀹屾垚 diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs" index 7742cf6..7b047c0 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs" @@ -257,7 +257,38 @@ { CommonStackerCrane commonStackerCrane = (CommonStackerCrane)device; - commonStackerCrane.SetValue(StackerCraneDBName.WorkType, Convert.ToSByte(2)); + commonStackerCrane.SetValue(StackerCraneDBName.WorkType, Convert.ToSByte(4)); + return content.OK(); + } + else + { + return content.Error("鏈壘鍒拌澶囦俊鎭鑱旂郴IT"); + } + } + catch (Exception ex) + { + return content.Error(ex.Message); + } + } + public WebResponseContent StackerDisconnected(string DeviceCode) + { + WriteLog.GetLog("鍫嗗灈鏈烘墜鍔ㄤ换鍔�").Write($"銆愪腑鏂懡浠ゃ�憑JsonConvert.SerializeObject(DeviceCode)}", "鍫嗗灈鏈烘墜鍔ㄤ换鍔�"); + WebResponseContent content = new WebResponseContent(); + try + { + IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == DeviceCode); + + if (device != null) + { + CommonStackerCrane commonStackerCrane = (CommonStackerCrane)device; + DeviceProDTO? devicePro = commonStackerCrane.DeviceProDTOs.Where(x => x.DeviceChildCode == commonStackerCrane.DeviceCode && x.DeviceProParamName == "WorkType").FirstOrDefault(); + + byte valueToWrite = 1; + + byte[] buffer = new byte[] { valueToWrite }; + + commonStackerCrane.Communicator.Write(devicePro.DeviceProAddress, buffer); + return content.OK(); } else @@ -314,19 +345,19 @@ public int GetRowCode(int number) { - if (number == 1 || number == 15 || number == 11 || number == 19) + if (number == 1 || number == 15 || number == 11 || number == 18) { return 1; } - else if (number == 2 || number == 5 || number == 8 || number == 12 || number == 16 || number == 20) + else if (number == 2 || number == 5 || number == 8 || number == 12 || number == 16 || number == 19) { return 2; } - else if (number == 3 || number == 6 || number == 9 || number == 13 || number == 17 || number == 21) + else if (number == 3 || number == 6 || number == 9 || number == 13 || number == 17 || number == 20) { return 3; } - else if (number == 4 || number == 7 || number == 10 || number == 14 || number == 18 || number == 22) + else if (number == 4 || number == 7 || number == 10 || number == 14 || number == 21) { return 4; } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/IDeviceInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/IDeviceInfoService.cs" index 9e81b48..bc6be5c 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/IDeviceInfoService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/IDeviceInfoService.cs" @@ -51,6 +51,13 @@ WebResponseContent StackerEmergencyStop(string DeviceCode); /// <summary> + /// 鍫嗗灈鏈轰换鍔′腑鏂� + /// </summary> + /// <param name="DeviceCode"></param> + /// <returns></returns> + WebResponseContent StackerDisconnected(string DeviceCode); + + /// <summary> /// 鍫嗗灈鏈哄浣� /// </summary> /// <param name="DeviceCode"></param> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceInfoController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceInfoController.cs" index 747819a..4a3051a 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceInfoController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceInfoController.cs" @@ -45,6 +45,12 @@ { return Service.StackerEmergencyStop(DeviceCode); } + [HttpPost, Route("StackerDisconnected"), AllowAnonymous] + public WebResponseContent StackerDisconnected(string DeviceCode) + { + return Service.StackerDisconnected(DeviceCode); + } + [HttpPost, Route("GetConveyorLineInfo"), AllowAnonymous] public WebResponseContent GetConveyorLineInfo(string DeviceChildCode) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user" index 4a58657..4270762 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile2.pubxml.user" @@ -3,7 +3,7 @@ <Project> <PropertyGroup> <_PublishTargetUrl>E:\GET\AoTanSiWCS\椤圭洰浠g爜\WCS\WIDESEAWCS_Server\WIDESEAWCS_Server\bin\Release\net6.0\publish\</_PublishTargetUrl> - <History>True|2025-08-07T08:09:37.4325511Z||;True|2025-08-07T15:03:02.4443822+08:00||;True|2025-08-07T14:51:02.2746340+08:00||;True|2025-08-07T14:50:52.4634781+08:00||;True|2025-08-07T14:44:25.7952161+08:00||;True|2025-08-06T16:05:13.6764446+08:00||;True|2025-08-06T15:48:26.9347397+08:00||;True|2025-08-06T15:24:30.4982821+08:00||;True|2025-08-06T15:23:27.4513567+08:00||;True|2025-08-06T14:57:04.0476264+08:00||;True|2025-08-06T14:43:06.1306795+08:00||;True|2025-08-06T14:30:32.8125962+08:00||;True|2025-08-06T14:22:42.8305756+08:00||;True|2025-08-06T14:08:24.3056726+08:00||;True|2025-08-06T12:49:07.0122619+08:00||;True|2025-08-06T09:53:47.1995016+08:00||;True|2025-08-06T09:23:43.4599118+08:00||;True|2025-08-06T09:17:41.5263742+08:00||;True|2025-08-01T13:15:58.0733845+08:00||;</History> + <History>True|2025-08-16T03:23:35.5640992Z||;True|2025-08-16T11:02:59.2985083+08:00||;True|2025-08-16T10:27:02.8633285+08:00||;True|2025-08-16T10:10:08.1477861+08:00||;True|2025-08-15T16:44:40.1716233+08:00||;True|2025-08-15T16:37:15.4095592+08:00||;True|2025-08-15T16:10:23.4132871+08:00||;True|2025-08-15T15:39:23.4095856+08:00||;True|2025-08-15T15:28:40.1757665+08:00||;True|2025-08-15T15:17:03.4120137+08:00||;True|2025-08-14T14:56:07.9836766+08:00||;True|2025-08-14T13:46:14.8376860+08:00||;True|2025-08-14T13:40:06.1474672+08:00||;True|2025-08-14T13:35:01.0314827+08:00||;True|2025-08-14T13:30:22.4451955+08:00||;True|2025-08-14T13:01:53.0152050+08:00||;True|2025-08-14T09:25:26.2041015+08:00||;True|2025-08-14T08:52:03.5944496+08:00||;True|2025-08-13T16:03:14.7435997+08:00||;True|2025-08-13T15:45:41.5991008+08:00||;True|2025-08-13T15:16:36.2021682+08:00||;True|2025-08-13T09:09:27.8499524+08:00||;True|2025-08-13T09:06:29.1371955+08:00||;True|2025-08-12T16:20:01.1810979+08:00||;True|2025-08-12T15:15:58.7445192+08:00||;True|2025-08-12T14:56:43.1314180+08:00||;True|2025-08-07T16:09:37.4325511+08:00||;True|2025-08-07T15:03:02.4443822+08:00||;True|2025-08-07T14:51:02.2746340+08:00||;True|2025-08-07T14:50:52.4634781+08:00||;True|2025-08-07T14:44:25.7952161+08:00||;True|2025-08-06T16:05:13.6764446+08:00||;True|2025-08-06T15:48:26.9347397+08:00||;True|2025-08-06T15:24:30.4982821+08:00||;True|2025-08-06T15:23:27.4513567+08:00||;True|2025-08-06T14:57:04.0476264+08:00||;True|2025-08-06T14:43:06.1306795+08:00||;True|2025-08-06T14:30:32.8125962+08:00||;True|2025-08-06T14:22:42.8305756+08:00||;True|2025-08-06T14:08:24.3056726+08:00||;True|2025-08-06T12:49:07.0122619+08:00||;True|2025-08-06T09:53:47.1995016+08:00||;True|2025-08-06T09:23:43.4599118+08:00||;True|2025-08-06T09:17:41.5263742+08:00||;True|2025-08-01T13:15:58.0733845+08:00||;</History> <LastFailureDetails /> </PropertyGroup> </Project> \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" index fe7c6c0..0941042 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" @@ -11,7 +11,8 @@ "ConnectionStringsEncryption": false, "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue //杩炴帴瀛楃涓� - "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_OTS;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", + //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_OTS;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", + "ConnectionString": "Data Source=192.168.32.240;Initial Catalog=WIDESEAWCS_OTS;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", //璺ㄥ煙 "Cors": { "PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index e39ead0..14f5eda 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -113,7 +113,7 @@ Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.EndPoint); if (stationManagerStart == null) { - return content.Error("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�"); + throw new Exception("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�"); } task = new Dt_Task() { @@ -140,10 +140,10 @@ if (taskDTOs.EndPoint == "3004") { - var newTask = BaseDal.QueryFirst(x => x.SourceAddress == "3001" && x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState != (int)TaskInStatusEnum.HoistNew && x.TaskState != (int)TaskInStatusEnum.HoistInExecuting && x.TaskState > 225); + var newTask = BaseDal.QueryFirst(x => x.SourceAddress == "3002" && x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState != (int)TaskInStatusEnum.HoistNew && x.TaskState != (int)TaskInStatusEnum.HoistInExecuting && x.TaskState > 225); if (newTask != null) { - return content.Error("宸插瓨鍦ㄥ叆搴撲换鍔★紝鍑哄簱浠诲姟涓嶅彲涓嬪彂"); + throw new Exception("宸插瓨鍦ㄥ叆搴撲换鍔★紝鍑哄簱浠诲姟涓嶅彲涓嬪彂"); } } @@ -151,7 +151,7 @@ Dt_StationManager stationManagerEnd = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.EndPoint); if (stationManagerEnd == null) { - return content.Error("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�"); + throw new Exception("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�"); } Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.Roadway == GetScCode(Convert.ToInt32(targetCodes[0])) && x.stationType == 2 && x.stationFloor == stationManagerEnd.stationFloor); @@ -188,7 +188,7 @@ } if(taskDTOs.EndPoint == "1004") { - return content.Error("璇ョ偣浣嶄笉鏄嚭搴撶偣浣�"); + throw new Exception("璇ョ偣浣嶄笉鏄嚭搴撶偣浣�"); } if (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && taskDTOs.EndPoint == "1002") { @@ -235,7 +235,7 @@ Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.BeginPoint); if (stationManagerStart == null) { - return content.Error("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�"); + throw new Exception("鏈壘鍒板嚭搴撶珯鍙颁俊鎭�"); } task = new Dt_Task() { @@ -290,14 +290,14 @@ task.TargetStation = stationManager.stationRemark; - if (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC01" && (taskDTOs.BeginPoint == "1030" || taskDTOs.EndPoint == "1029")) + if ((GetScCode(Convert.ToInt32(targetCodes[0])) == "SC01" && (taskDTOs.BeginPoint == "1030" || taskDTOs.EndPoint == "1029")) || (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC01" && task.RGVName == "RGV02")) { Dt_StationManager stationTransfer = _stationManagerRepository.QueryFirst(x => x.stationChildCode == "1026"); task.TargetStation = stationTransfer.stationRemark; task.Remark = "1026"; } - if (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && (taskDTOs.BeginPoint == "1002" || taskDTOs.BeginPoint == "1004")) + if ((GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && (taskDTOs.BeginPoint == "1002" || taskDTOs.BeginPoint == "1004")) || (GetScCode(Convert.ToInt32(targetCodes[0])) == "SC06" && task.RGVName == "RGV01")) { Dt_StationManager stationTransfer = _stationManagerRepository.QueryFirst(x => x.stationChildCode == "1026"); task.TargetStation = stationTransfer.stationRemark; @@ -307,7 +307,7 @@ } else { - return content.Error($"鏈壘鍒拌鎵樼洏銆恵taskDTOs.TPbarcode}銆戜换鍔�"); + throw new Exception($"鏈壘鍒拌鎵樼洏銆恵taskDTOs.TPbarcode}銆戜换鍔�"); } } } @@ -341,7 +341,7 @@ Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.SourceAddress); if (stationManager == null) { - return content.Error("鏈壘鍒拌捣鐐圭珯鍙�"); + throw new Exception("鏈壘鍒拌捣鐐圭珯鍙�"); } if (task != null) @@ -442,11 +442,11 @@ { return "SC04"; } - else if (number >= 15 && number <= 18) + else if (number >= 15 && number <= 17) { return "SC05"; } - else if (number >= 19 && number <= 22) + else if (number >= 18 && number <= 21) { return "SC06"; } @@ -595,7 +595,7 @@ /// <returns></returns> public Dt_Task QueryRGVExecutingTask(string deviceNo) { - return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish|| x.TaskState == (int)TaskInStatusEnum.RGV_InAwaitWMS|| x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish) && x.RGVName == deviceNo); + return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish|| x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish) && x.RGVName == deviceNo); } /// <summary> @@ -606,7 +606,7 @@ /// <returns></returns> public Dt_Task QueryRGVExecutingTask(string deviceNo,int taskNum) { - return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish || x.TaskState == (int)TaskInStatusEnum.RGV_InAwaitWMS) && x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish && x.RGVName == deviceNo&&x.TaskNum==taskNum); + return BaseDal.QueryFirst(x => (x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) && x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish && x.RGVName == deviceNo&&x.TaskNum==taskNum); } /// <summary> @@ -662,7 +662,7 @@ public List<Dt_Task> QueryRGVTask() { - return BaseDal.QueryData(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish) && x.Floor == "1F"), TaskOrderBy); + return BaseDal.QueryData(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish)) && x.Floor == "1F", TaskOrderBy); } /// <summary> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" index 4c64d14..24c5e66 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" @@ -107,8 +107,6 @@ try { ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(station.stationChildCode); - //var x = conveyorLine.Communicator.Read("DB1103.2",5); - //string Barcode = Encoding.UTF8.GetString(x); if (command != null) { #region 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇 @@ -132,7 +130,7 @@ foreach (var item in deviceProtocolDetails) { int itemValue = Convert.ToInt32(item.ProtocalDetailValue); - _noticeService.LineData(userIds?.FirstOrDefault(), userTokenIds, new { station.stationChildCode,InStock= structs[itemValue] , Roadway =station.Roadway+station.stationFloor}); + _noticeService.LineData(userIds?.FirstOrDefault(), userTokenIds, new { station.stationChildCode, InStock = structs[itemValue], Roadway = station.Roadway + station.stationFloor }); if (structs[itemValue] == true) { MethodInfo? method = GetType().GetMethod(item.ProtocolDetailType); @@ -167,8 +165,8 @@ if (station.stationChildCode == "3004") { - var taskIn = _taskRepository.QueryFirst(x => x.TaskNum == command.TaskNum && x.NextAddress == station.stationChildCode && x.TaskType == (int)TaskInboundTypeEnum.Inbound&&x.TaskState==(int)TaskInStatusEnum.HoistInExecuting); - if(taskIn != null) + var taskIn = _taskRepository.QueryFirst(x => x.TaskNum == command.TaskNum && x.NextAddress == station.stationChildCode && x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState == (int)TaskInStatusEnum.HoistInExecuting); + if (taskIn != null) { Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.Roadway == taskIn.Roadway && x.stationType == 3 && x.stationFloor == taskIn.Floor); taskIn.CurrentAddress = station.stationChildCode; @@ -179,7 +177,7 @@ } var task = _taskService.QueryConveyorLineTask(station.stationChildCode, command.TaskNum); - + await HandleNewTaskAsync(conveyorLine, command, station.stationChildCode, task); } catch (Exception ex) @@ -205,7 +203,7 @@ var task = _taskService.QueryConveyorLineFinishTask(stationManager.stationChildCode, command.TaskNum); //鏀规煡璇㈡柟娉� - if(stationManager.stationType==5||stationManager.stationType==4) + if (stationManager.stationType == 5 || stationManager.stationType == 4) { // 濡傛灉浠诲姟瀛樺湪 if (task != null) @@ -251,7 +249,7 @@ { Thread.Sleep(1000); _taskService.UpdateTaskStatusToNext(task); - + } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs" index 1b1ddb0..4ba6cfe 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs" @@ -32,8 +32,8 @@ public short TargetAddress { get; set; } - [DataLength(25)] - public string Barcode { get; set; } + //[DataLength(10)] + //public string Barcode { get; set; } } public class ConveyorLineTaskCommandWrite : DeviceCommand diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs" index 67756a3..6bd64f6 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs" @@ -5,10 +5,12 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; +using WIDESEA_Common.Log; using WIDESEAWCS_Common; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core; using WIDESEAWCS_Core.Helper; +using WIDESEAWCS_DTO.StackerHandTask; using WIDESEAWCS_DTO.TaskInfo; using WIDESEAWCS_Model.BasicInfo; using WIDESEAWCS_Model.Models; @@ -54,41 +56,53 @@ private async Task RequestTask(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, Dt_StationManager stationManager) { - var hasTask = await _taskRepository.QueryFirstAsync(x => x.SourceAddress == childDeviceCode && x.TaskState < (int)TaskInStatusEnum.RGV_InExecutingFinish && x.TaskState >= (int)TaskInStatusEnum.InNew); - if (hasTask != null) + try { - var log = $"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵hasTask.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵hasTask.PalletCode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎瀛樺湪浠诲姟"; + var hasTask = await _taskRepository.QueryFirstAsync(x => x.SourceAddress == childDeviceCode && x.TaskState < (int)TaskInStatusEnum.RGV_InExecutingFinish && x.TaskState >= (int)TaskInStatusEnum.InNew); + if (hasTask != null) + { + var log = $"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵hasTask.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵hasTask.PalletCode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎瀛樺湪浠诲姟"; + ConsoleHelper.WriteWarningLine(log); + + await _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" }); + WriteInfo(conveyorLine.DeviceName, log); + return; + } + var RGVName = string.Empty; + if (stationManager.stationFloor == "1F") + { + RGVName = stationManager.RGVName; + } + else + { + RGVName = "RGV03"; + } + Dt_Task task = new Dt_Task() + { + TaskNum = _taskRepository.GetTaskNo().Result, + TaskType = (int)TaskInboundTypeEnum.Inbound, + TaskState = (int)TaskInStatusEnum.InNew, + SourceAddress = childDeviceCode, + Dispatchertime = DateTime.Now, + Grade = 1, + Creater = "System", + Floor = stationManager.stationFloor, + RGVName = RGVName, + SourceStation = stationManager.remark, + TargetStation = 0, + }; + + _taskRepository.AddData(task); + } + catch (Exception ex) + { + var log = $"銆恵conveyorLine._deviceName}銆戣緭閫佺嚎銆恵childDeviceCode}銆戙�恵ex.Message}銆�"; ConsoleHelper.WriteWarningLine(log); await _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" }); WriteInfo(conveyorLine.DeviceName, log); - return; } - var RGVName = string.Empty; - if (stationManager.stationFloor == "1F") - { - RGVName = stationManager.RGVName; - } - else - { - RGVName = "RGV03"; - } - Dt_Task task = new Dt_Task() - { - TaskNum = _taskRepository.GetTaskNo().Result, - TaskType = (int)TaskInboundTypeEnum.Inbound, - TaskState = (int)TaskInStatusEnum.InNew, - SourceAddress = childDeviceCode, - Dispatchertime = DateTime.Now, - Grade = 1, - Creater = "System", - Floor = stationManager.stationFloor, - RGVName = RGVName, - SourceStation = stationManager.remark, - TargetStation = 0, - }; - - _taskRepository.AddData(task); + } private void RequestWMSTask(CommonConveyorLine conveyorLine, Dt_StationManager stationManager) { @@ -145,6 +159,7 @@ } var wmsIpAddress = wmsBase + requestTask; var result = WIDESEA_Comm.Http.HttpHelper.PostAsync(wmsIpAddress, taskDTO.ToJsonString()).Result; + WriteLog.GetLog("WMS鎺ュ彛杩斿洖淇℃伅").Write(JsonConvert.SerializeObject(result), "WMS鎺ュ彛杩斿洖淇℃伅"); } } else @@ -153,6 +168,7 @@ var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 10); string Barcode = Encoding.UTF8.GetString(x); + if (Barcode == null || Barcode == "" || Barcode.Trim().Contains("\0")) { conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, Convert.ToSByte(3), stationManager.stationChildCode); @@ -160,7 +176,8 @@ var task = _taskRepository.QueryFirst(x => x.PalletCode == Barcode); if (task != null) { - + var log = $"銆恵conveyorLine._deviceName}銆戠珯鍙般�恵stationManager.stationChildCode}銆戣姹傚彇璐с�佸凡瀛樺湪浠诲姟浠诲姟鍙穥task.TaskNum}"; + LogAndWarn(conveyorLine.DeviceName, log); } else { @@ -180,6 +197,7 @@ } var wmsIpAddress = wmsBase + requestTask; var result = WIDESEA_Comm.Http.HttpHelper.PostAsync(wmsIpAddress, taskDTO.ToJsonString()).Result; + WriteLog.GetLog("WMS鎺ュ彛杩斿洖淇℃伅").Write(JsonConvert.SerializeObject(result), "WMS鎺ュ彛杩斿洖淇℃伅"); } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob/CommonRGVJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob/CommonRGVJob.cs" index be996c1..9b79e18 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob/CommonRGVJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob/CommonRGVJob.cs" @@ -186,8 +186,12 @@ var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 5); string Barcode = Encoding.UTF8.GetString(x); - if (Barcode == null || Barcode == "" || Barcode.Trim().Contains("\0")) + short y = conveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.InteractiveSignal, stationManager.stationChildCode); + var structs = BitConverter.GetBytes(y).ToArray().ToBoolArray(); + + if (Barcode == null || Barcode == "" || Barcode.Trim().Contains("\0") || structs[5]) { + WriteInfo("鍏ュ簱寮傚父淇℃伅", $"鎵樼洏鍙枫�恵Barcode}銆戞灏恒�恵structs[5]}銆戜换鍔″彿銆恵TaskNum}銆�"); commonRGV.SetValue(StackerCraneDBName.PutcargoLocation, Convert.ToSByte(stationManager.stationRemark)); commonRGV.SetValue(StackerCraneDBName.TaskNum, Convert.ToInt16(task.TaskNum)); commonRGV.SetValue(StackerCraneDBName.TaskType, Convert.ToSByte(4)); @@ -221,7 +225,7 @@ Thread.Sleep(100); conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, Convert.ToInt16(stationManager.stationNextChildCode), stationManager.stationChildCode); Thread.Sleep(100); - conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTaskNum, Convert.ToInt16(1000), stationManager.stationChildCode); + conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTaskNum, Convert.ToInt16(1), stationManager.stationChildCode); Thread.Sleep(100); conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, Convert.ToSByte(2), stationManager.stationChildCode); } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs" index 7525ca9..2eef594 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RGVJob_FirstFloor/CommonRGV_FirstFloorJob.cs" @@ -104,44 +104,47 @@ } if (FirstRgv.GetValue<RGVDBName, bool>(RGVDBName.Automatic) && !FirstRgv.GetValue<RGVDBName, bool>(RGVDBName.Fault) && !FirstRgv.GetValue<RGVDBName, bool>(RGVDBName.Running)) { - Dt_Task? task = GetTask(FirstRgv, FirstRgv.GetValue<RGVDBName, bool>(RGVDBName.InStock)); - if (task != null) + if (FirstRgv.GetValue<RGVDBName, bool>(RGVDBName.InStock)) { - var IsExecutingTask = DispatchExecutingTask(FirstRgv, task); - if (IsExecutingTask != null) + Dt_Task? task = GetTask(FirstRgv, FirstRgv.GetValue<RGVDBName, bool>(RGVDBName.InStock)); + if (task != null) { - RGVTaskCommand? rgvTaskCommand = ConvertToRGVTaskCommand(IsExecutingTask); - if (rgvTaskCommand != null) + var IsExecutingTask = DispatchExecutingTask(FirstRgv, task); + if (IsExecutingTask != null) { - Thread.Sleep(1000); - bool sendFlag = SendCommand(FirstRgv, rgvTaskCommand); - if (sendFlag) + RGVTaskCommand? rgvTaskCommand = ConvertToRGVTaskCommand(IsExecutingTask); + if (rgvTaskCommand != null) { - if (IsExecutingTask.Remark != null) + Thread.Sleep(1000); + bool sendFlag = SendCommand(FirstRgv, rgvTaskCommand); + if (sendFlag) { - IsExecutingTask.RGVName = "RGV02"; - IsExecutingTask.CurrentAddress = IsExecutingTask.Remark; - IsExecutingTask.Remark = ""; - Dt_StationManager station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == IsExecutingTask.NextAddress); - IsExecutingTask.SourceStation = IsExecutingTask.CurrentAddress=="1025"?10:7; - if (IsExecutingTask.TaskType == (int)TaskInboundTypeEnum.Inbound) + if (IsExecutingTask.Remark != null) { - IsExecutingTask.TargetStation = station.stationRemark; + IsExecutingTask.RGVName = "RGV02"; + IsExecutingTask.CurrentAddress = IsExecutingTask.Remark; + IsExecutingTask.Remark = ""; + Dt_StationManager station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == IsExecutingTask.NextAddress); + IsExecutingTask.SourceStation = IsExecutingTask.CurrentAddress == "1025" ? 10 : 7; + if (IsExecutingTask.TaskType == (int)TaskInboundTypeEnum.Inbound) + { + IsExecutingTask.TargetStation = station.stationRemark; + } + else + { + IsExecutingTask.TargetStation = station.remark; + } + IsExecutingTask.TaskState = (int)TaskInStatusEnum.RGV_TransFer; + _taskRepository.UpdateData(IsExecutingTask); + Thread.Sleep(1000); } else { - IsExecutingTask.TargetStation = station.remark; + IsExecutingTask.RGVName = FirstRgv.DeviceCode; + _taskRepository.UpdateData(IsExecutingTask); + _taskService.UpdateTaskStatusToNext(IsExecutingTask.TaskNum); + Thread.Sleep(1000); } - IsExecutingTask.TaskState = (int)TaskInStatusEnum.RGV_TransFer; - _taskRepository.UpdateData(IsExecutingTask); - Thread.Sleep(1000); - } - else - { - IsExecutingTask.RGVName = FirstRgv.DeviceCode; - _taskRepository.UpdateData(IsExecutingTask); - _taskService.UpdateTaskStatusToNext(IsExecutingTask.TaskNum); - Thread.Sleep(1000); } } } @@ -265,34 +268,48 @@ } if (SecondRgv.GetValue<RGVDBName, bool>(RGVDBName.Automatic) && !SecondRgv.GetValue<RGVDBName, bool>(RGVDBName.Fault) && !SecondRgv.GetValue<RGVDBName, bool>(RGVDBName.Running)) { - Dt_Task? task = GetTask(SecondRgv, SecondRgv.GetValue<RGVDBName, bool>(RGVDBName.InStock)); - if (task != null) + if (SecondRgv.GetValue<RGVDBName, bool>(RGVDBName.InStock)) { - var IsExecutingTask = DispatchExecutingTask(SecondRgv, task); - if (IsExecutingTask != null) + Dt_Task? task = GetTask(SecondRgv, SecondRgv.GetValue<RGVDBName, bool>(RGVDBName.InStock)); + if (task != null) { - RGVTaskCommand? rgvTaskCommand = ConvertToRGVTaskCommand(IsExecutingTask); - if (rgvTaskCommand != null) + var IsExecutingTask = DispatchExecutingTask(SecondRgv, task); + if (IsExecutingTask != null) { - Thread.Sleep(1000); - bool sendFlag = SendCommand(SecondRgv, rgvTaskCommand); - if (sendFlag) + RGVTaskCommand? rgvTaskCommand = ConvertToRGVTaskCommand(IsExecutingTask); + if (rgvTaskCommand != null) { - if (IsExecutingTask.Remark != null) + Thread.Sleep(1000); + bool sendFlag = SendCommand(SecondRgv, rgvTaskCommand); + if (sendFlag) { - IsExecutingTask.RGVName = "RGV01"; - IsExecutingTask.CurrentAddress = IsExecutingTask.Remark; - IsExecutingTask.Remark = ""; - IsExecutingTask.TaskState = (int)TaskInStatusEnum.RGV_TransFer; - _taskRepository.UpdateData(IsExecutingTask); - Thread.Sleep(1000); - } - else - { - IsExecutingTask.RGVName = SecondRgv.DeviceCode; - _taskRepository.UpdateData(IsExecutingTask); - _taskService.UpdateTaskStatusToNext(IsExecutingTask.TaskNum); - Thread.Sleep(1000); + if (IsExecutingTask.Remark != null) + { + IsExecutingTask.RGVName = "RGV01"; + IsExecutingTask.CurrentAddress = IsExecutingTask.Remark; + IsExecutingTask.Remark = ""; + IsExecutingTask.TaskState = (int)TaskInStatusEnum.RGV_TransFer; + Dt_StationManager station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == IsExecutingTask.NextAddress); + IsExecutingTask.SourceStation = IsExecutingTask.CurrentAddress == "1025" ? 10 : 7; + if (IsExecutingTask.TaskType == (int)TaskInboundTypeEnum.Inbound) + { + IsExecutingTask.TargetStation = station.stationRemark; + } + else + { + IsExecutingTask.TargetStation = station.remark; + } + + _taskRepository.UpdateData(IsExecutingTask); + Thread.Sleep(1000); + } + else + { + IsExecutingTask.RGVName = SecondRgv.DeviceCode; + _taskRepository.UpdateData(IsExecutingTask); + _taskService.UpdateTaskStatusToNext(IsExecutingTask.TaskNum); + Thread.Sleep(1000); + } } } } @@ -416,6 +433,7 @@ { if (commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic) && !commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)) { + var taskSecond = _taskRepository.QueryFirst(x => x.RGVName == "RGV02" && x.TaskNum == commonRGVSecond.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum) && ((x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState < 230) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound))); if (taskSecond != null) { @@ -423,14 +441,15 @@ { if (task.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || task.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) { - if (task.TargetStation- taskSecond.SourceStation > 1 && task.TargetStation - taskSecond.TargetStation > 1) + if (task.TargetStation - taskSecond.SourceStation > 1 && task.TargetStation - taskSecond.TargetStation > 1) { LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGV.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); + Thread.Sleep(1000); if (task.Remark != null) { - return GetDispatchExecutingTask(taskSecond); + return GetDispatchExecutingTask(task); } return task; @@ -447,7 +466,7 @@ Thread.Sleep(1000); if (task.Remark != null) { - return GetDispatchExecutingTask(taskSecond); + return GetDispatchExecutingTask(task); } return task; } @@ -457,17 +476,25 @@ } else { + if (commonRGVSecond.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.WorkCompleted)) + { + RGVTaskFinish(commonRGVSecond, commonRGVSecond.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + } if (commonRGVSecond.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) > 35000) { RGVTaskCommand command = new RGVTaskCommand() { PickupLocation = (byte)Convert.ToSByte(15), - TaskNum = Convert.ToInt16(1000), + TaskNum = Convert.ToInt16(1), TaskType = (byte)Convert.ToSByte(1) }; SendCommand(commonRGVSecond, command); + Thread.Sleep(1000); + if (!commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)) + { + return null; + } } - LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGV.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); Thread.Sleep(1000); return task; } @@ -480,13 +507,11 @@ CommonRGV_FirstFloor? commonRGVFirst = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "RGV01") as CommonRGV_FirstFloor; if (commonRGVFirst != null) { - if (commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic) && !commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)) { - var taskSecond = _taskRepository.QueryFirst(x => x.RGVName == "RGV01" && x.TaskNum == commonRGVFirst.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)&&((x.TaskType==(int)TaskInboundTypeEnum.Inbound&&x.TaskState<230)||(x.TaskType == (int)TaskOutboundTypeEnum.Outbound))); + var taskSecond = _taskRepository.QueryFirst(x => x.RGVName == "RGV01" && x.TaskNum == commonRGVFirst.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum) && ((x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState < 230) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound))); if (taskSecond != null) { - if (taskSecond.TaskState == (int)TaskOutStatusEnum.RGV_Outdispatch || taskSecond.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || taskSecond.TaskState == (int)TaskInStatusEnum.RGV_Indispatch || taskSecond.TaskState == (int)TaskInStatusEnum.RGV_InAwaitWMS || taskSecond.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) { if (task.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || task.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) @@ -498,7 +523,7 @@ if (task.Remark != null) { - return GetDispatchExecutingTask(taskSecond); + return GetDispatchExecutingTask(task); } return task; } @@ -515,7 +540,7 @@ if (task.Remark != null) { - return GetDispatchExecutingTask(taskSecond); + return GetDispatchExecutingTask(task); } return task; } @@ -525,17 +550,25 @@ } else { + if (commonRGVFirst.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.WorkCompleted)) + { + RGVTaskFinish(commonRGVFirst, commonRGVFirst.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + } if (commonRGVFirst.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) < 420000) { RGVTaskCommand command = new RGVTaskCommand() { PickupLocation = (byte)Convert.ToSByte(26), - TaskNum = Convert.ToInt16(1000), + TaskNum = Convert.ToInt16(1), TaskType = (byte)Convert.ToSByte(1) }; SendCommand(commonRGVFirst, command); + Thread.Sleep(1000); + if (!commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)) + { + return null; + } } - LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGV.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); Thread.Sleep(1000); return task; } @@ -568,90 +601,53 @@ { if (commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic) && !commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)) { - var taskSecond = _taskRepository.QueryFirst(x => x.RGVName == "RGV02" && x.TaskNum == commonRGVSecond.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + var taskSecond = _taskRepository.QueryFirst(x => x.RGVName == "RGV02" && x.TaskNum == commonRGVSecond.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum) && ((x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState < 230) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound))); if (taskSecond != null) { - #region - //if (taskSecond.TaskState == (int)TaskOutStatusEnum.RGV_Outdispatch || taskSecond.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || taskSecond.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) - //{ - - // //task = tasks.FirstOrDefault(x =>(x.SourceStation- taskSecond.TargetStation > 1 && x.SourceStation - taskSecond.SourceStation > 1&&x.TaskType==(int)TaskInboundTypeEnum.Inbound) ||(x.SourceStation - taskSecond.TargetStation > 1 && x.TargetStation - taskSecond.SourceStation > 1 && x.SourceStation - taskSecond.SourceStation > 1 && x.TargetStation - taskSecond.TargetStation > 1&&x.TaskType== (int)TaskOutboundTypeEnum.Outbound)); - // //if (task == null) - // //{ - // // task = tasks.FirstOrDefault(x => (x.SourceStation - taskSecond.TargetStation > 1 && x.SourceStation - taskSecond.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - taskSecond.TargetStation > 1 && x.TargetStation - taskSecond.SourceStation > 1 && x.SourceStation - taskSecond.SourceStation > 1 && x.TargetStation - taskSecond.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound)); - // //} - - // task = GetDispatchTask(tasks, taskSecond); - - // LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGV.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); - - // Thread.Sleep(1000); - // return task; - //} - //else if (taskSecond.TaskState == (int)TaskOutStatusEnum.RGV_OutExecuting || taskSecond.TaskState == (int)TaskInStatusEnum.RGV_InExecuting) - //{ - // task = tasks.FirstOrDefault(x => x.SourceStation - taskSecond.TargetStation> 1 &&x.TargetStation - taskSecond.TargetStation > 1); - - // LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); - // Thread.Sleep(1000); - // return task; - //} - //return null; - #endregion - task = GetDispatchTask(tasks, taskSecond); - LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); + LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); Thread.Sleep(1000); return task; } - else + } + var taskNews = tasks.Where(x => (x.TaskType == (int)TaskInboundTypeEnum.Inbound && Convert.ToInt32(x.SourceAddress) < 1015) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound && (x.Roadway == "SC01" || x.Roadway == "SC02" || x.Roadway == "SC03")) || x.RGVName == "RGV01").ToList(); + if (taskNews.Count == 0) + { + return null; + } + if (commonRGVSecond.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.WorkCompleted)) + { + RGVTaskFinish(commonRGVSecond, commonRGVSecond.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + } + if (commonRGVSecond.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) > 35000) + { + RGVTaskCommand command = new RGVTaskCommand() { - var taskNews = tasks.Where(x => (x.TaskType == (int)TaskInboundTypeEnum.Inbound && Convert.ToInt32(x.SourceAddress) < 1015) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound && (x.Roadway == "SC01" || x.Roadway == "SC02" || x.Roadway == "SC03"))||x.RGVName=="RGV01").ToList(); - if (taskNews.Count== 0) - { - return null; - } - - if (commonRGVSecond.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) > 35000) - { - RGVTaskCommand command = new RGVTaskCommand() - { - PickupLocation = (byte)Convert.ToSByte(15), - TaskNum = Convert.ToInt16(1000), - TaskType = (byte)Convert.ToSByte(1) - }; - SendCommand(commonRGVSecond, command); - } - if (tasks.FirstOrDefault(x => x.RGVName == "RGV01") != null) - { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV01").TaskNum)}銆戙��"); - Thread.Sleep(1000); - return taskNews.FirstOrDefault(x => x.RGVName == "RGV01"); - } - else - { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName != "RGV02").TaskNum)}銆戙��"); - Thread.Sleep(1000); - return taskNews.FirstOrDefault(x => x.RGVName != "RGV02"); - } + PickupLocation = (byte)Convert.ToSByte(15), + TaskNum = Convert.ToInt16(1), + TaskType = (byte)Convert.ToSByte(1) + }; + SendCommand(commonRGVSecond, command); + Thread.Sleep(1000); + if (!commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)) + { + return null; } + } + + if (tasks.FirstOrDefault(x => x.RGVName == "RGV01") != null) + { + LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(taskNews.FirstOrDefault(x => x.RGVName == "RGV01").TaskNum)}銆戙��"); + Thread.Sleep(1000); + return taskNews.FirstOrDefault(x => x.RGVName == "RGV01"); } else { - if (tasks.FirstOrDefault(x => x.RGVName == "RGV01") != null) - { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV01").TaskNum)}銆戙��"); - Thread.Sleep(1000); - return tasks.FirstOrDefault(x => x.RGVName == "RGV01"); - } - else - { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName != "RGV02").TaskNum)}銆戙��"); - Thread.Sleep(1000); - return tasks.FirstOrDefault(x => x.RGVName != "RGV02"); - } + LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(taskNews.FirstOrDefault(x => x.RGVName != "RGV02").TaskNum)}銆戙��"); + Thread.Sleep(1000); + return taskNews.FirstOrDefault(x => x.RGVName != "RGV02"); } } else @@ -677,33 +673,10 @@ { if (commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic) && !commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)) { - var taskFirst = _taskRepository.QueryFirst(x => x.RGVName == "RGV01" && x.TaskNum == commonRGVFirst.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + + var taskFirst = _taskRepository.QueryFirst(x => x.RGVName == "RGV01" && x.TaskNum == commonRGVFirst.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum) && ((x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState < 230) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound))); if (taskFirst != null) { - #region - //if (taskFirst.TaskState == (int)TaskOutStatusEnum.RGV_Outdispatch || taskFirst.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || taskFirst.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) - //{ - - // //task = tasks.FirstOrDefault(x => (x.SourceStation - taskFirst.TargetStation > 1 && x.SourceStation - taskFirst.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - taskFirst.TargetStation > 1 && x.TargetStation - taskFirst.SourceStation > 1 && x.SourceStation - taskFirst.SourceStation > 1 && x.TargetStation - taskFirst.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound)); - - // task = GetDispatchTask(tasks, taskFirst); - - // LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); - // Thread.Sleep(1000); - - // return task; - //} - //else if (taskFirst.TaskState == (int)TaskOutStatusEnum.RGV_OutExecuting || taskFirst.TaskState == (int)TaskInStatusEnum.RGV_InExecuting) - //{ - // task = tasks.FirstOrDefault(x => taskFirst.TargetStation - x.SourceStation > 1 && taskFirst.TargetStation - x.TargetStation > 1); - - // LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); - // Thread.Sleep(1000); - // return task; - //} - //return null; - #endregion - task = GetDispatchTask(tasks, taskFirst); LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); @@ -711,54 +684,45 @@ return task; } - else + + } + var taskNews = tasks.Where(x => (x.TaskType == (int)TaskInboundTypeEnum.Inbound && Convert.ToInt32(x.SourceAddress) > 1014) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound && (x.Roadway == "SC04" || x.Roadway == "SC05" || x.Roadway == "SC06")) || x.RGVName == "RGV02").ToList(); + if (taskNews.Count == 0) + { + return null; + } + if (commonRGVFirst.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.WorkCompleted)) + { + RGVTaskFinish(commonRGVFirst, commonRGVFirst.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + } + if (commonRGVFirst.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) < 420000) + { + RGVTaskCommand command = new RGVTaskCommand() { - var taskNews = tasks.Where(x => (x.TaskType == (int)TaskInboundTypeEnum.Inbound && Convert.ToInt32(x.SourceAddress) > 1015) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound && (x.Roadway == "SC04" || x.Roadway == "SC05" || x.Roadway == "SC06"))||x.RGVName=="RGV02").ToList(); - if (taskNews.Count == 0) - { - return null; - } - if (commonRGVFirst.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) < 420000) - { - RGVTaskCommand command = new RGVTaskCommand() - { - PickupLocation = (byte)Convert.ToSByte(26), - TaskNum = Convert.ToInt16(1000), - TaskType = (byte)Convert.ToSByte(1) - }; - SendCommand(commonRGVFirst, command); - } - if (tasks.FirstOrDefault(x => x.RGVName == "RGV02") != null) - { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV02").TaskNum)}銆戙��"); - - Thread.Sleep(1000); - return tasks.FirstOrDefault(x => x.RGVName == "RGV02"); - } - else - { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName != "RGV01").TaskNum)}銆戙��"); - - Thread.Sleep(1000); - return tasks.FirstOrDefault(x => x.RGVName != "RGV01"); - } + PickupLocation = (byte)Convert.ToSByte(26), + TaskNum = Convert.ToInt16(1), + TaskType = (byte)Convert.ToSByte(1) + }; + SendCommand(commonRGVFirst, command); + Thread.Sleep(1000); + if (!commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)) + { + return null; } + } + + if (tasks.FirstOrDefault(x => x.RGVName == "RGV02") != null) + { + LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(taskNews.FirstOrDefault(x => x.RGVName == "RGV02").TaskNum)}銆戙��"); + Thread.Sleep(1000); + return taskNews.FirstOrDefault(x => x.RGVName == "RGV02"); } else { - if (tasks.FirstOrDefault(x => x.RGVName == "RGV02") != null) - { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV02").TaskNum)}銆戙��"); - Thread.Sleep(1000); - return tasks.FirstOrDefault(x => x.RGVName == "RGV02"); - } - else - { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName != "RGV01").TaskNum)}銆戙��"); + LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(taskNews.FirstOrDefault(x => x.RGVName != "RGV01").TaskNum)}銆戙��"); - Thread.Sleep(1000); - return tasks.FirstOrDefault(x => x.RGVName != "RGV01"); - } + Thread.Sleep(1000); + return taskNews.FirstOrDefault(x => x.RGVName != "RGV01"); } } else @@ -791,7 +755,7 @@ { try { - var tasks = _taskRepository.QueryData(x=>x.TaskState==(int)TaskInStatusEnum.RGV_TransFerFInish|| x.TaskState == (int)TaskOutStatusEnum.RGV_TransFerFInish); + var tasks = _taskRepository.QueryData(x => x.Floor == "1F" && (x.TaskState == (int)TaskInStatusEnum.RGV_TransFerFInish || x.TaskState == (int)TaskOutStatusEnum.RGV_TransFerFInish)); Dt_Task task; if (tasks.Count() == 0) { @@ -804,15 +768,16 @@ { if (commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic) && !commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)) { - var taskSecond = _taskRepository.QueryFirst(x => x.RGVName == "RGV02" && x.TaskNum == commonRGVSecond.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + + var taskSecond = _taskRepository.QueryFirst(x => x.RGVName == "RGV02" && x.TaskNum == commonRGVSecond.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum) && ((x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState < 230) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound))); if (taskSecond != null) { if (taskSecond.TaskState == (int)TaskOutStatusEnum.RGV_Outdispatch || taskSecond.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || taskSecond.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) { - task = tasks.FirstOrDefault(x => ((x.SourceStation - taskSecond.TargetStation > 1 && x.SourceStation - taskSecond.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - taskSecond.TargetStation > 1 && x.TargetStation - taskSecond.SourceStation > 1 && x.SourceStation - taskSecond.SourceStation > 1 && x.TargetStation - taskSecond.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound))&&x.RGVName=="RGV01"); + task = tasks.FirstOrDefault(x => ((x.SourceStation - taskSecond.TargetStation > 1 && x.SourceStation - taskSecond.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - taskSecond.TargetStation > 1 && x.TargetStation - taskSecond.SourceStation > 1 && x.SourceStation - taskSecond.SourceStation > 1 && x.TargetStation - taskSecond.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound)) && x.RGVName == "RGV01"); - LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGV.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGV.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); Thread.Sleep(1000); return task; @@ -821,7 +786,7 @@ { task = tasks.FirstOrDefault(x => x.SourceStation - taskSecond.TargetStation > 1 && x.TargetStation - taskSecond.TargetStation > 1 && x.RGVName == "RGV01"); - LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆恵commonRGV.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVSecond.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskSecond)}銆憑commonRGVSecond.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); Thread.Sleep(1000); return task; } @@ -829,19 +794,29 @@ } else { + if (commonRGVSecond.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.WorkCompleted)) + { + RGVTaskFinish(commonRGVSecond, commonRGVSecond.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + } if (commonRGVSecond.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) > 35000) { RGVTaskCommand command = new RGVTaskCommand() { PickupLocation = (byte)Convert.ToSByte(15), - TaskNum = Convert.ToInt16(1000), + TaskNum = Convert.ToInt16(1), TaskType = (byte)Convert.ToSByte(1) }; SendCommand(commonRGVSecond, command); + Thread.Sleep(1000); + if (!commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)) + { + return null; + } } + if (tasks.FirstOrDefault(x => x.RGVName == "RGV01") != null) { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV01").TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV01").TaskNum)}銆戙��"); Thread.Sleep(1000); return tasks.FirstOrDefault(x => x.RGVName == "RGV01"); } @@ -851,18 +826,17 @@ { if (tasks.FirstOrDefault(x => x.RGVName == "RGV01") != null) { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV01").TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆恵commonRGVSecond.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVSecond.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV01").TaskNum)}銆戙��"); Thread.Sleep(1000); return tasks.FirstOrDefault(x => x.RGVName == "RGV01"); } - } } else { if (tasks.FirstOrDefault(x => x.RGVName == "RGV01") != null) { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆愭湭鎵惧埌RGV02璁惧淇℃伅銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV01").TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆愭湭鎵惧埌RGV02璁惧淇℃伅銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV01").TaskNum)}銆戙��"); Thread.Sleep(1000); return tasks.FirstOrDefault(x => x.RGVName == "RGV01"); } @@ -876,17 +850,17 @@ { if (commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic) && !commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)) { - var taskFirst = _taskRepository.QueryFirst(x => x.RGVName == "RGV01" && x.TaskNum == commonRGVFirst.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + + var taskFirst = _taskRepository.QueryFirst(x => x.RGVName == "RGV01" && x.TaskNum == commonRGVFirst.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum) && ((x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState < 230) || (x.TaskType == (int)TaskOutboundTypeEnum.Outbound))); if (taskFirst != null) { if (taskFirst.TaskState == (int)TaskOutStatusEnum.RGV_Outdispatch || taskFirst.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || taskFirst.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) { - task = tasks.FirstOrDefault(x => ((x.SourceStation - taskFirst.TargetStation > 1 && x.SourceStation - taskFirst.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - taskFirst.TargetStation > 1 && x.TargetStation - taskFirst.SourceStation > 1 && x.SourceStation - taskFirst.SourceStation > 1 && x.TargetStation - taskFirst.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound))&&x.RGVName=="RGV02"); + task = tasks.FirstOrDefault(x => ((x.SourceStation - taskFirst.TargetStation > 1 && x.SourceStation - taskFirst.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - taskFirst.TargetStation > 1 && x.TargetStation - taskFirst.SourceStation > 1 && x.SourceStation - taskFirst.SourceStation > 1 && x.TargetStation - taskFirst.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound)) && x.RGVName == "RGV02"); - task = GetDispatchTask(tasks, taskFirst); - LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); Thread.Sleep(1000); return task; @@ -895,7 +869,7 @@ { task = tasks.FirstOrDefault(x => taskFirst.TargetStation - x.SourceStation > 1 && taskFirst.TargetStation - x.TargetStation > 1 && x.RGVName == "RGV02"); - LogAndWarn("鎵ц璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戙�恵commonRGVFirst.DeviceCode}銆戜换鍔°�恵JsonConvert.SerializeObject(taskFirst)}銆憑commonRGVFirst.DeviceCode}杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(task.TaskNum)}銆戙��"); Thread.Sleep(1000); return task; } @@ -903,19 +877,29 @@ } else { + if (commonRGVFirst.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.WorkCompleted)) + { + RGVTaskFinish(commonRGVFirst, commonRGVFirst.GetValue<RGVDBName, short>(RGVDBName.RGVTaskNum)); + } if (commonRGVFirst.GetValue<RGVDBName, int>(RGVDBName.LevelPoint) < 420000) { RGVTaskCommand command = new RGVTaskCommand() { PickupLocation = (byte)Convert.ToSByte(26), - TaskNum = Convert.ToInt16(1000), + TaskNum = Convert.ToInt16(1), TaskType = (byte)Convert.ToSByte(1) }; SendCommand(commonRGVFirst, command); + Thread.Sleep(1000); + if (!commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)) + { + return null; + } } + if (tasks.FirstOrDefault(x => x.RGVName == "RGV02") != null) { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV02").TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV02").TaskNum)}銆戙��"); Thread.Sleep(1000); return tasks.FirstOrDefault(x => x.RGVName == "RGV02"); @@ -926,7 +910,7 @@ { if (tasks.FirstOrDefault(x => x.RGVName == "RGV02") != null) { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV02").TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆恵commonRGVFirst.DeviceCode}宸ヤ綔妯″紡锛氥�恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Automatic)}銆戜綔涓氱姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Running)}銆戣澶囩姸鎬侊細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.Fault)}銆戞槸鍚︽湁璐э細銆恵commonRGVFirst.GetValue<RGVDBName, bool>(RGVDBName.InStock)}銆戣繑鍥炰换鍔★細銆恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV02").TaskNum)}銆戙��"); Thread.Sleep(1000); return tasks.FirstOrDefault(x => x.RGVName == "RGV02"); } @@ -936,7 +920,7 @@ { if (tasks.FirstOrDefault(x => x.RGVName == "RGV02") != null) { - LogAndWarn("璋冨害浠诲姟鎺у埗", $"銆愭湭鎵惧埌RGV01璁惧淇℃伅銆� 杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV02").TaskNum)}銆戙��"); + LogAndWarn("涓浆璋冨害浠诲姟鎺у埗", $"銆愭湭鎵惧埌RGV01璁惧淇℃伅銆� 杩斿洖浠诲姟锛氥�恵JsonConvert.SerializeObject(tasks.FirstOrDefault(x => x.RGVName == "RGV02").TaskNum)}銆戙��"); Thread.Sleep(1000); return tasks.FirstOrDefault(x => x.RGVName == "RGV02"); @@ -981,8 +965,12 @@ string Barcode = Encoding.UTF8.GetString(x); - if (Barcode == null || Barcode == "" || Barcode.Trim().Contains("\0")) + short y = conveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.InteractiveSignal, stationManager.stationChildCode); + var structs = BitConverter.GetBytes(y).ToArray().ToBoolArray(); + + if (Barcode == null || Barcode == "" || Barcode.Trim().Contains("\0")|| structs[5]) { + WriteInfo("鍏ュ簱寮傚父淇℃伅", $"鎵樼洏鍙枫�恵Barcode}銆戞灏恒�恵structs[5]}銆戜换鍔″彿銆恵TaskNum}銆�"); commonRGV.SetValue(StackerCraneDBName.PutcargoLocation, Convert.ToSByte(stationManager.stationRemark)); commonRGV.SetValue(StackerCraneDBName.TaskNum, Convert.ToInt16(task.TaskNum)); commonRGV.SetValue(StackerCraneDBName.TaskType, Convert.ToSByte(4)); @@ -1016,7 +1004,7 @@ Thread.Sleep(100); conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, Convert.ToInt16(stationManager.stationNextChildCode), stationManager.stationChildCode); Thread.Sleep(100); - conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTaskNum, Convert.ToInt16(1000), stationManager.stationChildCode); + conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTaskNum, Convert.ToInt16(1), stationManager.stationChildCode); Thread.Sleep(100); conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, Convert.ToSByte(2), stationManager.stationChildCode); } @@ -1044,7 +1032,7 @@ public Dt_Task? GetDispatchTask(List<Dt_Task> tasks, Dt_Task oldtask) { - Dt_Task y = tasks.Where(x => x.Remark != null && ((x.SourceStation - oldtask.TargetStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.SourceStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TargetStation - oldtask.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound))).First(); + Dt_Task y = tasks.Where(x => x.Remark != null && ((x.SourceStation - oldtask.TargetStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TaskType == (int)TaskInboundTypeEnum.Inbound) || (x.SourceStation - oldtask.TargetStation > 1 && x.TargetStation - oldtask.SourceStation > 1 && x.SourceStation - oldtask.SourceStation > 1 && x.TargetStation - oldtask.TargetStation > 1 && x.TaskType == (int)TaskOutboundTypeEnum.Outbound))).FirstOrDefault(); if (y == null) { if (oldtask.TaskState == (int)TaskOutStatusEnum.RGV_Outdispatch || oldtask.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || oldtask.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) @@ -1060,30 +1048,24 @@ } else { - IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1001"); - if (device != null) + var stationManager = _stationManagerRepository.QueryData(x => x.stationType == 15); + if (stationManager.Count() > 0) { - CommonConveyorLine conveyorLine = (CommonConveyorLine)device; - var stationManager = _stationManagerRepository.QueryData(x => x.stationType == 15); - if (stationManager.Count() > 0) + string next = null; + foreach (var item in stationManager) { - string next = null; - foreach (var item in stationManager) + var x = _taskRepository.QueryFirst(x => x.NextAddress == item.stationChildCode || x.CurrentAddress == item.stationChildCode); + if (x == null) { - short x = conveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.InteractiveSignal, item.stationChildCode); - var structs = BitConverter.GetBytes(x).ToArray().ToBoolArray(); - if (structs[2]) - { - next = item.stationChildCode; - break; - } + next = item.stationChildCode; + break; } - if (next != null) - { - oldtask.Remark = next; - _taskRepository.UpdateData(y); - return y; - } + } + if (next != null) + { + oldtask.Remark = next; + _taskRepository.UpdateData(oldtask); + return oldtask; } } if (oldtask.TaskState == (int)TaskOutStatusEnum.RGV_Outdispatch || oldtask.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish || oldtask.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish) @@ -1101,32 +1083,28 @@ public Dt_Task? GetDispatchExecutingTask(Dt_Task oldtask) { - IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1001"); - if (device != null) + + var stationManager = _stationManagerRepository.QueryData(x => x.stationType == 15); + if (stationManager.Count() > 0) { - CommonConveyorLine conveyorLine = (CommonConveyorLine)device; - var stationManager = _stationManagerRepository.QueryData(x => x.stationType == 15); - if (stationManager.Count() > 0) + string next = null; + foreach (var item in stationManager) { - string next = null; - foreach (var item in stationManager) + var x = _taskRepository.QueryFirst(x => x.NextAddress == item.stationChildCode || x.CurrentAddress == item.stationChildCode); + if (x == null) { - short x = conveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.InteractiveSignal, item.stationChildCode); - var structs = BitConverter.GetBytes(x).ToArray().ToBoolArray(); - if (structs[2]) - { - next = item.stationChildCode; - break; - } - } - if (next != null) - { - oldtask.Remark = next; - _taskRepository.UpdateData(oldtask); - return oldtask; + next = item.stationChildCode; + break; } } + if (next != null) + { + oldtask.Remark = next; + _taskRepository.UpdateData(oldtask); + return oldtask; + } } + return null; } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" index 637c7ee..55f5a0c 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" @@ -28,6 +28,7 @@ using WIDESEAWCS_Tasks.ConveyorLineJob; using WIDESEAWCS_TaskInfoRepository; using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database; +using System.Collections; namespace WIDESEAWCS_Tasks { @@ -122,42 +123,7 @@ true => "鏁呴殰", false => "姝e父", }; - string StackerCraneAlarm(uint alarm) => alarm switch - { - 0 => "鎸囦护鎴栧湴鍧�閿欒", - 1 => "鎬ュ仠", - 2 => "鍏夐�氳涓柇", - 3 => "缁勬�佸け鑱�", - 4 => "琛岃蛋鍙橀鏁呴殰", - 5 => "琛岃蛋鏋侀檺瑙﹀彂", - 6 => "琛岃蛋杩愯瓒呮椂", - 7 => "鎻愬崌鍙橀鏁呴殰", - 8 => "鎻愬崌鏋侀檺瑙﹀彂", - 9 => "鎻愬崌杩愯瓒呮椂", - 10 => "杞借揣鍙拌秴杞�", - 11 => "杞借揣鍙版瑺杞斤紙鏉剧怀)", - 12 => "杞借揣鍙板け閫�", - 13 => "璐у弶鍙橀鎶ヨ", - 14 => "璐у弶杩愯瓒呮椂", - 15 => "璐у弶鏋侀檺瑙﹀彂", - 16 => "璐у弶涓嶅眳涓�", - 17 => "宸︿晶瓒呴珮", - 18 => "鍙充晶瓒呴珮", - 19 => "宸︿晶瓒呭", - 20 => "鍙充晶瓒呭", - 21 => "宸﹁秴鍑�", - 22 => "鍙宠秴鍑�", - 23 => "鍙栬揣鏃惰浇璐у彴鏈夎揣", - 24 => "鍙栬揣鍚庤浇璐у彴鏃犺揣", - 25 => "鍙栨繁璐т綅鏃舵祬璐т綅鏈夎揣", - 26 => "鏀捐揣鏃惰浇璐у彴鏃犺揣", - 27 => "鏀捐揣鏃惰揣鏋舵湁璐�", - 28 => "鏀捐揣鍚庤浇璐у彴鏈夎揣", - 29 => "鏀炬繁璐ф椂娴呰揣浣嶆湁璐�", - 30 => "", - 31 => "", - _ => $"鏈煡鎶ヨ({alarm})" - }; + object obj = new { Automatic = StackerCraneAutoStatus(commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.Automatic)), @@ -167,7 +133,7 @@ CurrentLayer = Convert.ToInt32(commonStackerCrane.GetValue<StackerCraneDBName, byte>(StackerCraneDBName.CurrentLayer)), LevelPoint = commonStackerCrane.GetValue<StackerCraneDBName, int>(StackerCraneDBName.LevelPoint), CurrentTaskNum = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CurrentTaskNum), - StackerAlarm = StackerCraneAlarm(commonStackerCrane.GetValue<StackerCraneDBName, uint>(StackerCraneDBName.StackerAlarm)), + StackerAlarm = GetAlarm(commonStackerCrane.GetValue<StackerCraneDBName, uint>(StackerCraneDBName.StackerAlarm)), commonStackerCrane.DeviceCode, commonStackerCrane.DeviceName, @@ -183,6 +149,56 @@ } return Task.CompletedTask; } + public string GetAlarm(uint value) + { + byte[] bytes = BitConverter.GetBytes(value); + BitArray bits = new BitArray(bytes); + + for (int i = 0; i < bits.Length; i++) + { + if (bits[i]) + { + return StackerCraneAlarm(i); + } + } + return ""; + } + public string StackerCraneAlarm(int alarm) => alarm switch + { + 0 => "鎸囦护鎴栧湴鍧�閿欒", + 1 => "鎬ュ仠", + 2 => "鍏夐�氳涓柇", + 3 => "缁勬�佸け鑱�", + 4 => "琛岃蛋鍙橀鏁呴殰", + 5 => "琛岃蛋鏋侀檺瑙﹀彂", + 6 => "琛岃蛋杩愯瓒呮椂", + 7 => "鎻愬崌鍙橀鏁呴殰", + 8 => "鎻愬崌鏋侀檺瑙﹀彂", + 9 => "鎻愬崌杩愯瓒呮椂", + 10 => "杞借揣鍙拌秴杞�", + 11 => "杞借揣鍙版瑺杞斤紙鏉剧怀)", + 12 => "杞借揣鍙板け閫�", + 13 => "璐у弶鍙橀鎶ヨ", + 14 => "璐у弶杩愯瓒呮椂", + 15 => "璐у弶鏋侀檺瑙﹀彂", + 16 => "璐у弶涓嶅眳涓�", + 17 => "宸︿晶瓒呴珮", + 18 => "鍙充晶瓒呴珮", + 19 => "宸︿晶瓒呭", + 20 => "鍙充晶瓒呭", + 21 => "宸﹁秴鍑�", + 22 => "鍙宠秴鍑�", + 23 => "鍙栬揣鏃惰浇璐у彴鏈夎揣", + 24 => "鍙栬揣鍚庤浇璐у彴鏃犺揣", + 25 => "鍙栨繁璐т綅鏃舵祬璐т綅鏈夎揣", + 26 => "鏀捐揣鏃惰浇璐у彴鏃犺揣", + 27 => "鏀捐揣鏃惰揣鏋舵湁璐�", + 28 => "鏀捐揣鍚庤浇璐у彴鏈夎揣", + 29 => "鏀炬繁璐ф椂娴呰揣浣嶆湁璐�", + 30 => "", + 31 => "", + _ => $"鏈煡鎶ヨ({alarm})" + }; /// <summary> /// 浠诲姟瀹屾垚浜嬩欢璁㈤槄鐨勬柟娉� @@ -501,19 +517,19 @@ public int GetRowCode(int number) { - if (number == 1 || number == 15 || number == 11 || number == 19) + if (number == 1 || number == 15 || number == 11 || number == 18) { return 1; } - else if (number == 2 || number == 5 || number == 8 || number == 12 || number == 16 || number == 20) + else if (number == 2 || number == 5 || number == 8 || number == 12 || number == 16 || number == 19) { return 2; } - else if (number == 3 || number == 6 || number == 9 || number == 13 || number == 17 || number == 21) + else if (number == 3 || number == 6 || number == 9 || number == 13 || number == 17 || number == 20) { return 3; } - else if (number == 4 || number == 7 || number == 10 || number == 14 || number == 18 || number == 22) + else if (number == 4 || number == 7 || number == 10 || number == 14 || number == 21) { return 4; } -- Gitblit v1.9.3