已删除1个文件
已修改11个文件
已添加12个文件
| | |
| | | "WorkspaceRootPath": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\", |
| | | "Documents": [ |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{A14242DD-DA06-4DC3-8598-1761AA7C76D1}|WIDESEAWCS_SystemServices\\WIDESEAWCS_SystemServices.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_systemservices\\sys_userservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{A14242DD-DA06-4DC3-8598-1761AA7C76D1}|WIDESEAWCS_SystemServices\\WIDESEAWCS_SystemServices.csproj|solutionrelative:wideseawcs_systemservices\\sys_userservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\gzj\\gzjjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\gzj\\gzjjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\wideseawcs_server\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\oht\\ohtjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\oht\\ohtjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\wideseawcs_tasks.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\wideseawcs_tasks.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\zxj\\zxjjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\zxj\\zxjjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\oht\\ohtreaddata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\oht\\ohtreaddata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\project\\yangjipingku\\\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|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\oht\\ohttaskcommand.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\oht\\ohttaskcommand.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|D:\\project\\YangJiPingKu\\\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:{B17BAF3C-2BAD-4162-B6DC-46ED7A1E3D8D}|WIDESEAWCS_WMSPart\\WIDESEAWCS_WMSPart.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_wmspart\\locationinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{B17BAF3C-2BAD-4162-B6DC-46ED7A1E3D8D}|WIDESEAWCS_WMSPart\\WIDESEAWCS_WMSPart.csproj|solutionrelative:wideseawcs_wmspart\\locationinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_server\\controllers\\system\\sys_dictionarycontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\controllers\\system\\sys_dictionarycontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_server\\controllers\\system\\sys_usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_dto\\basicinfo\\initializationlocationdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\basicinfo\\initializationlocationdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{ADD3F3A3-CDFF-4854-B8C9-058FBDA2CFD4}|WIDESEAWCS_IWMSPart\\WIDESEAWCS_IWMSPart.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_iwmspart\\ilocationinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{ADD3F3A3-CDFF-4854-B8C9-058FBDA2CFD4}|WIDESEAWCS_IWMSPart\\WIDESEAWCS_IWMSPart.csproj|solutionrelative:wideseawcs_iwmspart\\ilocationinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_dto\\stackercarnetaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\stackercarnetaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{A14242DD-DA06-4DC3-8598-1761AA7C76D1}|WIDESEAWCS_SystemServices\\WIDESEAWCS_SystemServices.csproj|D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\wideseawcs_systemservices\\sys_userservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{A14242DD-DA06-4DC3-8598-1761AA7C76D1}|WIDESEAWCS_SystemServices\\WIDESEAWCS_SystemServices.csproj|solutionrelative:wideseawcs_systemservices\\sys_userservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\wideseawcs_server\\controllers\\system\\sys_usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\controllers\\system\\sys_usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|d:\\project\\yangjipingku\\\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:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_server\\wideseawcs_server.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", |
| | | "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\wideseawcs_server.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|d:\\project\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_server\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | } |
| | | ], |
| | | "DocumentGroupContainers": [ |
| | |
| | | "DocumentGroups": [ |
| | | { |
| | | "DockedWidth": 200, |
| | | "SelectedChildIndex": 5, |
| | | "SelectedChildIndex": 0, |
| | | "Children": [ |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 0, |
| | | "Title": "GZJJob.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\GZJ\\GZJJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\GZJ\\GZJJob.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\GZJ\\GZJJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\GZJ\\GZJJob.cs", |
| | | "ViewState": "AQIAAB0AAAAAAAAAAAAxwB0AAAAnAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-25T01:19:59.147Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 3, |
| | | "Title": "WIDESEAWCS_Tasks", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj*", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj*", |
| | | "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", |
| | | "WhenOpened": "2025-02-25T01:16:32.256Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}" |
| | |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 1, |
| | | "DocumentIndex": 2, |
| | | "Title": "OHTJob.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\OHT\\OHTJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\OHT\\OHTJob.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\OHT\\OHTJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\OHT\\OHTJob.cs", |
| | | "ViewState": "AQIAACUAAAAAAAAAAAAYwBwAAAAgAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-25T01:09:35.247Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 4, |
| | | "Title": "ZXJJob.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ZXJ\\ZXJJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\ZXJ\\ZXJJob.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ZXJ\\ZXJJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\ZXJ\\ZXJJob.cs", |
| | | "ViewState": "AQIAACwAAAAAAAAAAAAAADEAAAAlAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-25T00:51:27.292Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 6, |
| | | "Title": "TaskService.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "ViewState": "AQIAAO0AAAAAAAAAAIA6wMgBAABXAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-24T08:02:07.139Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 5, |
| | | "Title": "OHTReadData.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\OHT\\OHTReadData.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\OHT\\OHTReadData.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\OHT\\OHTReadData.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\OHT\\OHTReadData.cs", |
| | | "ViewState": "AQIAADgAAAAAAAAAAAArwD8AAAAUAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-24T07:55:22.813Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 7, |
| | | "Title": "OHTTaskCommand.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\OHT\\OHTTaskCommand.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\OHT\\OHTTaskCommand.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\OHT\\OHTTaskCommand.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\OHT\\OHTTaskCommand.cs", |
| | | "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-24T07:53:49.316Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 11, |
| | | "Title": "InitializationLocationDTO.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\BasicInfo\\InitializationLocationDTO.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_DTO\\BasicInfo\\InitializationLocationDTO.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\BasicInfo\\InitializationLocationDTO.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_DTO\\BasicInfo\\InitializationLocationDTO.cs", |
| | | "ViewState": "AQIAAAMAAAAAAAAAAAAAAA0AAAAPAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-20T06:24:21.85Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 10, |
| | | "Title": "Sys_DictionaryController.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\Controllers\\System\\Sys_DictionaryController.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Server\\Controllers\\System\\Sys_DictionaryController.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\Controllers\\System\\Sys_DictionaryController.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Server\\Controllers\\System\\Sys_DictionaryController.cs", |
| | | "ViewState": "AQIAACQAAAAAAAAAAAAmwCsAAAAMAAAA", |
| | | "ViewState": "AQIAACMAAAAAAAAAAIA5wC0AAAAPAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-18T08:02:00.02Z", |
| | | "WhenOpened": "2025-02-20T03:51:34.737Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 3, |
| | | "DocumentIndex": 13, |
| | | "Title": "StackerCarneTaskDTO.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\StackerCarneTaskDTO.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_DTO\\StackerCarneTaskDTO.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\StackerCarneTaskDTO.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_DTO\\StackerCarneTaskDTO.cs", |
| | | "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-20T03:07:50.105Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 12, |
| | | "Title": "ILocationInfoService.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_IWMSPart\\ILocationInfoService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_IWMSPart\\ILocationInfoService.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_IWMSPart\\ILocationInfoService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_IWMSPart\\ILocationInfoService.cs", |
| | | "ViewState": "AQIAAA4AAAAAAAAAAAAhwBgAAAAAAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-20T03:03:47.551Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 9, |
| | | "Title": "LocationInfoService.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_WMSPart\\LocationInfoService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_WMSPart\\LocationInfoService.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_WMSPart\\LocationInfoService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_WMSPart\\LocationInfoService.cs", |
| | | "ViewState": "AQIAACoAAAAAAAAAAAAqwDYAAAA0AAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-20T02:53:02.073Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 8, |
| | | "Title": "appsettings.json", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Server\\appsettings.json", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json", |
| | | "RelativeToolTip": "WIDESEAWCS_Server\\appsettings.json", |
| | | "ViewState": "AQIAAAcAAAAAAAAAAAAIwBUAAACUAAAA", |
| | | "ViewState": "AQIAAB4AAAAAAAAAAAAYwCgAAAATAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", |
| | | "WhenOpened": "2025-02-18T07:29:50.467Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 0, |
| | | "DocumentIndex": 14, |
| | | "Title": "Sys_UserService.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_SystemServices\\Sys_UserService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_SystemServices\\Sys_UserService.cs", |
| | |
| | | "RelativeToolTip": "WIDESEAWCS_SystemServices\\Sys_UserService.cs", |
| | | "ViewState": "AQIAACgAAAAAAAAAAAAAwC8AAAAQAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-18T07:20:48.526Z", |
| | | "EditorCaption": "" |
| | | "WhenOpened": "2025-02-18T07:20:48.526Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "DocumentIndex": 15, |
| | | "Title": "Sys_UserController.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\Controllers\\System\\Sys_UserController.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Server\\Controllers\\System\\Sys_UserController.cs", |
| | |
| | | "RelativeToolTip": "WIDESEAWCS_Server\\Controllers\\System\\Sys_UserController.cs", |
| | | "ViewState": "AQIAADwAAAAAAAAAAAAewEYAAAAIAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-18T07:12:12.812Z", |
| | | "EditorCaption": "" |
| | | "WhenOpened": "2025-02-18T07:12:12.812Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 4, |
| | | "Title": "WIDESEAWCS_Server", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj", |
| | | "RelativeToolTip": "WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj", |
| | | "ViewState": "AQIAABgAAAAAAAAAAAAAAB8AAAACAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", |
| | | "WhenOpened": "2025-02-18T07:04:34.852Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 5, |
| | | "DocumentIndex": 1, |
| | | "Title": "Program.cs", |
| | | "DocumentMoniker": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\Program.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Server\\Program.cs", |
| | | "ToolTip": "D:\\project\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\Program.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Server\\Program.cs", |
| | | "ViewState": "AQIAAIcAAAAAAAAAAAAlwJEAAAAAAAAA", |
| | | "ViewState": "AQIAAIcAAAAAAAAAAAAnwJQAAAAAAAAA", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-18T06:50:46.477Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 22, |
| | | "Title": "CustomProfile.cs", |
| | | "DocumentMoniker": "E:\\0.\u9879\u76EE\u96C6\\\u682A\u6D32\u4F18\u745E\u79D1\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\Filter\\CustomProfile.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Server\\Filter\\CustomProfile.cs", |
| | | "ToolTip": "E:\\0.\u9879\u76EE\u96C6\\\u682A\u6D32\u4F18\u745E\u79D1\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\Filter\\CustomProfile.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Server\\Filter\\CustomProfile.cs", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAADwvxUAAAArAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2025-02-18T06:25:21.8Z" |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.Const |
| | | { |
| | | public struct HtmlElementType |
| | | { |
| | | public const string drop = "drop"; |
| | | public const string droplist = "droplist"; |
| | | public const string select = "select"; |
| | | public const string selectlist = "selectlist"; |
| | | public const string checkbox = "checkbox"; |
| | | public const string textarea = "textarea"; |
| | | public const string thanorequal = "thanorequal"; |
| | | public const string lessorequal = "lessorequal"; |
| | | |
| | | |
| | | public const string gt = "gt"; |
| | | public const string lt = "lt"; |
| | | public const string GT = ">"; |
| | | public const string LT = "<"; |
| | | public const string like = "like"; |
| | | |
| | | public const string ThanOrEqual = ">="; |
| | | public const string LessOrequal = "<="; |
| | | public const string Contains = "in"; |
| | | public const string Equal = "="; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.Enums |
| | | { |
| | | public enum LinqExpressionType |
| | | { |
| | | Equal = 0,//= |
| | | NotEqual = 1,//!= |
| | | GreaterThan,//> |
| | | LessThan,//< |
| | | ThanOrEqual,//>= |
| | | LessThanOrEqual,//<= |
| | | In, |
| | | Contains,//Contains |
| | | NotContains//NotContains |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.Helper |
| | | { |
| | | internal class Class1 |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Newtonsoft.Json; |
| | | using System.Data; |
| | | using System.Reflection; |
| | | using System.Text.RegularExpressions; |
| | | using System.Web; |
| | | using WIDESEAWCS_Common.Const; |
| | | using WIDESEAWCS_Common.Enums; |
| | | |
| | | namespace WIDESEAWCS_Common.Helper |
| | | { |
| | | public static class UtilConvert |
| | | { |
| | | private static DateTime dateStart = new DateTime(1970, 1, 1, 8, 0, 0); |
| | | |
| | | private static long longTime = 621355968000000000; |
| | | |
| | | private static int samllTime = 10000000; |
| | | /// <summary> |
| | | /// æ¶é´æ³è½¬æ¢ææ¥æ |
| | | /// </summary> |
| | | /// <param name="timeStamp"></param> |
| | | /// <returns></returns> |
| | | public static DateTime GetTimeSpmpToDate(this object timeStamp) |
| | | { |
| | | if (timeStamp == null) return dateStart; |
| | | DateTime dateTime = new DateTime(longTime + Convert.ToInt64(timeStamp) * samllTime, DateTimeKind.Utc).ToLocalTime(); |
| | | return dateTime; |
| | | } |
| | | |
| | | public static string Serialize(this object obj, JsonSerializerSettings formatDate = null) |
| | | { |
| | | if (obj == null) return null; |
| | | formatDate = formatDate ?? new JsonSerializerSettings |
| | | { |
| | | DateFormatString = "yyyy-MM-dd HH:mm:ss" |
| | | }; |
| | | return JsonConvert.SerializeObject(obj, formatDate); |
| | | } |
| | | |
| | | public static T DeserializeObject<T>(this string json) |
| | | { |
| | | if (string.IsNullOrEmpty(json)) |
| | | { |
| | | return default(T); |
| | | } |
| | | if (json == "{}") |
| | | { |
| | | json = "[]"; |
| | | } |
| | | return JsonConvert.DeserializeObject<T>(json); |
| | | } |
| | | |
| | | public static string FirstLetterToLower(this string thisValue) |
| | | { |
| | | if (string.IsNullOrEmpty(thisValue)) return string.Empty; |
| | | string result = thisValue.Substring(0, 1).ToLower() + thisValue.Substring(1, thisValue.Length - 1); |
| | | return result; |
| | | } |
| | | |
| | | public static string FirstLetterToUpper(this string thisValue) |
| | | { |
| | | if (string.IsNullOrEmpty(thisValue)) return string.Empty; |
| | | string result = thisValue.Substring(0, 1).ToUpper() + thisValue.Substring(1, thisValue.Length - 1); |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <returns></returns> |
| | | public static int ObjToInt(this object thisValue) |
| | | { |
| | | int reval = 0; |
| | | if (thisValue == null) return 0; |
| | | if (thisValue is Enum && thisValue != DBNull.Value && Enum.TryParse(thisValue.GetType(), thisValue.ToString(), out var val)) |
| | | { |
| | | return Convert.ToInt32(val.ChangeType(typeof(int))); |
| | | } |
| | | if (thisValue != DBNull.Value && int.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | return reval; |
| | | } |
| | | |
| | | return reval; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <returns></returns> |
| | | public static int DoubleToInt(this double thisValue) |
| | | { |
| | | int reval = 0; |
| | | |
| | | return Convert.ToInt32(thisValue); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <param name="errorValue"></param> |
| | | /// <returns></returns> |
| | | public static int ObjToInt(this object thisValue, int errorValue) |
| | | { |
| | | int reval = 0; |
| | | if (thisValue != null && thisValue != DBNull.Value && int.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | return reval; |
| | | } |
| | | |
| | | return errorValue; |
| | | } |
| | | |
| | | public static long ObjToLong(this object thisValue) |
| | | { |
| | | long reval = 0; |
| | | if (thisValue == null) return 0; |
| | | if (thisValue != DBNull.Value && long.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | return reval; |
| | | } |
| | | |
| | | return reval; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <returns></returns> |
| | | public static double ObjToMoney(this object thisValue) |
| | | { |
| | | double reval = 0; |
| | | if (thisValue != null && thisValue != DBNull.Value && double.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | return reval; |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <param name="errorValue"></param> |
| | | /// <returns></returns> |
| | | public static double ObjToMoney(this object thisValue, double errorValue) |
| | | { |
| | | double reval = 0; |
| | | if (thisValue != null && thisValue != DBNull.Value && double.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | return reval; |
| | | } |
| | | |
| | | return errorValue; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <returns></returns> |
| | | public static string ObjToString(this object thisValue) |
| | | { |
| | | if (thisValue != null) return thisValue.ToString().Trim(); |
| | | return ""; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <returns></returns> |
| | | public static bool IsNotEmptyOrNull(this object thisValue) |
| | | { |
| | | return ObjToString(thisValue) != "" && ObjToString(thisValue) != "undefined" && ObjToString(thisValue) != "null"; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <param name="errorValue"></param> |
| | | /// <returns></returns> |
| | | public static string ObjToString(this object thisValue, string errorValue) |
| | | { |
| | | if (thisValue != null) return thisValue.ToString().Trim(); |
| | | return errorValue; |
| | | } |
| | | |
| | | public static bool IsNullOrEmpty(this object thisValue) => thisValue == null || thisValue == DBNull.Value || string.IsNullOrWhiteSpace(thisValue.ToString()); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <returns></returns> |
| | | public static Decimal ObjToDecimal(this object thisValue) |
| | | { |
| | | Decimal reval = 0; |
| | | if (thisValue != null && thisValue != DBNull.Value && decimal.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | return reval; |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <param name="errorValue"></param> |
| | | /// <returns></returns> |
| | | public static Decimal ObjToDecimal(this object thisValue, decimal errorValue) |
| | | { |
| | | Decimal reval = 0; |
| | | if (thisValue != null && thisValue != DBNull.Value && decimal.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | return reval; |
| | | } |
| | | |
| | | return errorValue; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <returns></returns> |
| | | public static DateTime ObjToDate(this object thisValue) |
| | | { |
| | | DateTime reval = DateTime.MinValue; |
| | | if (thisValue != null && thisValue != DBNull.Value && DateTime.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | reval = Convert.ToDateTime(thisValue); |
| | | } |
| | | |
| | | return reval; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <param name="errorValue"></param> |
| | | /// <returns></returns> |
| | | public static DateTime ObjToDate(this object thisValue, DateTime errorValue) |
| | | { |
| | | DateTime reval = DateTime.MinValue; |
| | | if (thisValue != null && thisValue != DBNull.Value && DateTime.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | return reval; |
| | | } |
| | | |
| | | return errorValue; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <returns></returns> |
| | | public static bool ObjToBool(this object thisValue) |
| | | { |
| | | bool reval = false; |
| | | if (thisValue != null && thisValue != DBNull.Value && bool.TryParse(thisValue.ToString(), out reval)) |
| | | { |
| | | return reval; |
| | | } |
| | | |
| | | return reval; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åå½åæ¶é´çæ¶é´æ³ |
| | | /// </summary> |
| | | /// <param name="thisValue"></param> |
| | | /// <returns></returns> |
| | | public static string DateToTimeStamp(this DateTime thisValue) |
| | | { |
| | | TimeSpan ts = thisValue - new DateTime(1970, 1, 1, 0, 0, 0, 0); |
| | | return Convert.ToInt64(ts.TotalSeconds).ToString(); |
| | | } |
| | | |
| | | public static object ChangeType(this object value, Type type) |
| | | { |
| | | if (value == null && type.IsGenericType) return Activator.CreateInstance(type); |
| | | if (value == null) return null; |
| | | if (type == value.GetType()) return value; |
| | | if (type.IsEnum) |
| | | { |
| | | if (value is string) |
| | | return Enum.Parse(type, value as string); |
| | | else |
| | | return Enum.ToObject(type, value); |
| | | } |
| | | |
| | | if (!type.IsInterface && type.IsGenericType) |
| | | { |
| | | Type innerType = type.GetGenericArguments()[0]; |
| | | object innerValue = ChangeType(value, innerType); |
| | | return Activator.CreateInstance(type, new object[] { innerValue }); |
| | | } |
| | | |
| | | if (value is string && type == typeof(Guid)) return new Guid(value as string); |
| | | if (value is string && type == typeof(Version)) return new Version(value as string); |
| | | if (!(value is IConvertible)) return value; |
| | | return Convert.ChangeType(value, type); |
| | | } |
| | | |
| | | public static object ChangeTypeList(this object value, Type type) |
| | | { |
| | | if (value == null) return default; |
| | | |
| | | var gt = typeof(List<>).MakeGenericType(type); |
| | | dynamic lis = Activator.CreateInstance(gt); |
| | | |
| | | var addMethod = gt.GetMethod("Add"); |
| | | string values = value.ToString(); |
| | | if (values != null && values.StartsWith("(") && values.EndsWith(")")) |
| | | { |
| | | string[] splits; |
| | | if (values.Contains("\",\"")) |
| | | { |
| | | splits = values.Remove(values.Length - 2, 2) |
| | | .Remove(0, 2) |
| | | .Split("\",\""); |
| | | } |
| | | else |
| | | { |
| | | splits = values.Remove(0, 1) |
| | | .Remove(values.Length - 2, 1) |
| | | .Split(","); |
| | | } |
| | | |
| | | foreach (var split in splits) |
| | | { |
| | | var str = split; |
| | | if (split.StartsWith("\"") && split.EndsWith("\"")) |
| | | { |
| | | str = split.Remove(0, 1) |
| | | .Remove(split.Length - 2, 1); |
| | | } |
| | | |
| | | addMethod.Invoke(lis, new object[] { ChangeType(str, type) }); |
| | | } |
| | | } |
| | | |
| | | return lis; |
| | | } |
| | | |
| | | public static string ToJson(this object value) |
| | | { |
| | | return JsonConvert.SerializeObject(value); |
| | | } |
| | | |
| | | public static bool IsNumeric(this object value) |
| | | { |
| | | if (value == null) |
| | | return false; |
| | | bool reslut = decimal.TryParse(value.ToString(), out decimal _number); |
| | | return reslut; |
| | | } |
| | | |
| | | public static bool IsInt(this object obj) |
| | | { |
| | | if (obj == null) |
| | | return false; |
| | | bool reslut = Int32.TryParse(obj.ToString(), out int _number); |
| | | return reslut; |
| | | |
| | | } |
| | | public static bool IsDate(this object str) |
| | | { |
| | | return str.IsDate(out _); |
| | | } |
| | | public static bool IsDate(this object str, out DateTime dateTime) |
| | | { |
| | | dateTime = DateTime.Now; |
| | | if (str == null || str.ToString() == "") |
| | | { |
| | | return false; |
| | | } |
| | | return DateTime.TryParse(str.ToString(), out dateTime); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ä¼ å
¥æ ¼å¼å¤ææ¯å¦ä¸ºå°æ° |
| | | /// </summary> |
| | | /// <param name="str"></param> |
| | | /// <param name="formatString">18,5</param> |
| | | /// <returns></returns> |
| | | public static bool IsNumber(this string str, string formatString) |
| | | { |
| | | if (string.IsNullOrEmpty(str)) return false; |
| | | |
| | | return Regex.IsMatch(str, @"^[+-]?\d*[.]?\d*$"); |
| | | } |
| | | |
| | | public static bool IsGuid(this string guid) |
| | | { |
| | | Guid newId; |
| | | return guid.GetGuid(out newId); |
| | | } |
| | | |
| | | public static bool GetGuid(this string guid, out Guid outId) |
| | | { |
| | | Guid emptyId = Guid.Empty; |
| | | return Guid.TryParse(guid, out outId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 转æ¢ä¸ºçæ´å qy 2024-7-15 |
| | | /// </summary> |
| | | /// <param name="data">æ°æ®</param> |
| | | public static short ToShort(this object data) |
| | | { |
| | | if (data == null) |
| | | return 0; |
| | | short result; |
| | | var success = short.TryParse(data.ToString(), out result); |
| | | if (success) |
| | | return result; |
| | | try |
| | | { |
| | | return Convert.ToInt16(data); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 转æ¢ä¸ºé«ç²¾åº¦æµ®ç¹æ°,å¹¶ææå®çå°æ°ä½4è5å
¥ qy 2024-7-15 |
| | | /// </summary> |
| | | /// <param name="data">æ°æ®</param> |
| | | /// <param name="digits">å°æ°ä½æ°</param> |
| | | public static decimal ToDecimal(this object data, int digits) |
| | | { |
| | | return Math.Round(ObjToDecimal(data), digits); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æä¸¾è½¬List qy 2024-7-15 |
| | | /// </summary> |
| | | /// <typeparam name="T"></typeparam> |
| | | /// <returns></returns> |
| | | public static List<object> GetEnumList<T>() |
| | | { |
| | | List<object> list = new List<object>(); |
| | | var t = typeof(T); |
| | | foreach (var item in Enum.GetValues(typeof(T))) |
| | | { |
| | | FieldInfo f = t.GetField(Enum.GetName(typeof(T), item)); |
| | | var r = (System.ComponentModel.DescriptionAttribute[])f.GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), false); |
| | | list.Add(new { ID = item, value = Enum.GetName(typeof(T), item), name = r[0].Description }); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éªè¯å¨æç±»åå
ç´ æ¯å¦ä¸ºç©º qy 2024-7-15 |
| | | /// </summary> |
| | | /// <param name="obj"></param> |
| | | /// <returns></returns> |
| | | public static bool CheckDynamic(object obj) |
| | | { |
| | | return (obj != null && Convert.ToString(obj) != "") ? true : false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¨æç±»åå
ç´ è½¬å符串并解ç qy 2024-7-15 |
| | | /// </summary> |
| | | /// <param name="obj"></param> |
| | | /// <returns></returns> |
| | | public static string DynamicToString(object obj) |
| | | { |
| | | return CheckDynamic(obj) ? HttpUtility.UrlDecode(Convert.ToString(obj).Trim()) : ""; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// DataTable转为json qy 2024-7-15 |
| | | /// </summary> |
| | | /// <param name="parObjRefDataTable">DataTable</param> |
| | | /// <returns>jsonæ°æ®</returns> |
| | | public static string ToJson(this DataTable parObjRefDataTable) |
| | | { |
| | | List<object> objArrList = new List<object>(); |
| | | |
| | | foreach (DataRow objDataRow in parObjRefDataTable.Rows) |
| | | { |
| | | Dictionary<string, object> objResult = new Dictionary<string, object>(); |
| | | |
| | | foreach (DataColumn objDataColumn in parObjRefDataTable.Columns) |
| | | objResult.Add(objDataColumn.ColumnName, objDataRow[objDataColumn].ToString()); |
| | | |
| | | objArrList.Add(objResult); |
| | | } |
| | | |
| | | return ToJson(objArrList); |
| | | } |
| | | /// <summary> |
| | | /// Json转List qy 2024-7-15 |
| | | /// </summary> |
| | | /// <typeparam name="T"></typeparam> |
| | | /// <param name="parJson"></param> |
| | | /// <returns></returns> |
| | | public static List<T> JsonToList<T>(this string parJson) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(parJson)) |
| | | { |
| | | return new List<T>(); |
| | | } |
| | | else |
| | | { |
| | | return JsonConvert.DeserializeObject<List<T>>(parJson); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æè½¬ä¸ºunixå¼ |
| | | /// </summary> |
| | | /// <param name="dt"></param> |
| | | /// <param name="utc">T:æUTCæ¶é´è®¡ç®(é»è®¤);F:ææ¬å°æ¶é´è®¡ç®</param> |
| | | /// <returns></returns> |
| | | public static double ToUnix(this DateTime dt, bool utc = true) |
| | | { |
| | | double intResult = 0; |
| | | System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); |
| | | intResult = (dt - startTime).TotalSeconds; |
| | | intResult = Math.Round(intResult, 0); |
| | | return intResult; |
| | | } |
| | | |
| | | #region 夿æ¯å¦ä¸ºå符串 qy 2024-7-15 |
| | | /// <summary> |
| | | /// 夿å符串æ¯å¦ä¸ºåæ³çjsonå符串 qy 2024-7-15 |
| | | /// </summary> |
| | | /// <param name="json"></param> |
| | | /// <returns></returns> |
| | | public static bool IsJson(string json) |
| | | { |
| | | int errIndex; |
| | | return IsJson(json, out errIndex); |
| | | } |
| | | public static bool IsJson(string json, out int errIndex) |
| | | { |
| | | errIndex = 0; |
| | | if (IsJsonStart(ref json)) |
| | | { |
| | | CharState cs = new CharState(); |
| | | char c; |
| | | for (int i = 0; i < json.Length; i++) |
| | | { |
| | | c = json[i]; |
| | | if (SetCharState(c, ref cs) && cs.childrenStart)//设置å
³é®ç¬¦å·ç¶æã |
| | | { |
| | | string item = json.Substring(i); |
| | | int err; |
| | | int length = GetValueLength(item, true, out err); |
| | | cs.childrenStart = false; |
| | | if (err > 0) |
| | | { |
| | | errIndex = i + err; |
| | | return false; |
| | | } |
| | | i = i + length - 1; |
| | | } |
| | | if (cs.isError) |
| | | { |
| | | errIndex = i; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | return !cs.arrayStart && !cs.jsonStart; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private static bool IsJsonStart(ref string json) |
| | | { |
| | | if (!string.IsNullOrEmpty(json)) |
| | | { |
| | | json = json.Trim('\r', '\n', ' '); |
| | | if (json.Length > 1) |
| | | { |
| | | char s = json[0]; |
| | | char e = json[json.Length - 1]; |
| | | return (s == '{' && e == '}') || (s == '[' && e == ']'); |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå¼çé¿åº¦ï¼å½Jsonå¼åµå¥ä»¥"{"æ"["å¼å¤´æ¶ï¼ qy 2024-7-15 |
| | | /// </summary> |
| | | private static int GetValueLength(string json, bool breakOnErr, out int errIndex) |
| | | { |
| | | errIndex = 0; |
| | | int len = 0; |
| | | if (!string.IsNullOrEmpty(json)) |
| | | { |
| | | CharState cs = new CharState(); |
| | | char c; |
| | | for (int i = 0; i < json.Length; i++) |
| | | { |
| | | c = json[i]; |
| | | if (!SetCharState(c, ref cs))//设置å
³é®ç¬¦å·ç¶æã |
| | | { |
| | | if (!cs.jsonStart && !cs.arrayStart)//jsonç»æï¼å䏿¯æ°ç»ï¼åéåºã |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | else if (cs.childrenStart)//æ£å¸¸å符ï¼å¼ç¶æä¸ã |
| | | { |
| | | int length = GetValueLength(json.Substring(i), breakOnErr, out errIndex);//éå½åå¼ï¼è¿åä¸ä¸ªé¿åº¦ããã |
| | | cs.childrenStart = false; |
| | | cs.valueStart = 0; |
| | | //cs.state = 0; |
| | | i = i + length - 1; |
| | | } |
| | | if (breakOnErr && cs.isError) |
| | | { |
| | | errIndex = i; |
| | | return i; |
| | | } |
| | | if (!cs.jsonStart && !cs.arrayStart)//è®°å½å½åç»æä½ç½®ã |
| | | { |
| | | len = i + 1;//é¿åº¦æ¯ç´¢å¼+1 |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return len; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åç¬¦ç¶æ qy 2024-7-15 |
| | | /// </summary> |
| | | private class CharState |
| | | { |
| | | internal bool jsonStart = false;//以 "{"å¼å§äº... |
| | | internal bool setDicValue = false;// å¯ä»¥è®¾ç½®åå
¸å¼äºã |
| | | internal bool escapeChar = false;//以"\"转ä¹ç¬¦å·å¼å§äº |
| | | /// <summary> |
| | | /// æ°ç»å¼å§ãä»
第ä¸å¼å¤´æç®ãï¼å¼åµå¥ç以ãchildrenStartãæ¥æ è¯ã |
| | | /// </summary> |
| | | internal bool arrayStart = false;//以"[" 符å·å¼å§äº |
| | | internal bool childrenStart = false;//å级åµå¥å¼å§äºã |
| | | /// <summary> |
| | | /// ã0 åå§ç¶æï¼æ éå°â,âéå·ãï¼ã1 éå°âï¼âåå·ã |
| | | /// </summary> |
| | | internal int state = 0; |
| | | |
| | | /// <summary> |
| | | /// ã-1 åå¼ç»æãã0 æªå¼å§ãã1 æ å¼å·å¼å§ãã2 åå¼å·å¼å§ãã3 åå¼å·å¼å§ã |
| | | /// </summary> |
| | | internal int keyStart = 0; |
| | | /// <summary> |
| | | /// ã-1 åå¼ç»æãã0 æªå¼å§ãã1 æ å¼å·å¼å§ãã2 åå¼å·å¼å§ãã3 åå¼å·å¼å§ã |
| | | /// </summary> |
| | | internal int valueStart = 0; |
| | | internal bool isError = false;//æ¯å¦è¯æ³é误ã |
| | | |
| | | internal void CheckIsError(char c)//åªå½æä¸çº§å¤çï¼å 为GetLengthä¼éå½å°æ¯ä¸ä¸ªå项å¤çï¼ |
| | | { |
| | | if (keyStart > 1 || valueStart > 1) |
| | | { |
| | | return; |
| | | } |
| | | //ç¤ºä¾ ["aa",{"bbbb":123,"fff","ddd"}] |
| | | switch (c) |
| | | { |
| | | case '{'://[{ "[{A}]":[{"[{B}]":3,"m":"C"}]}] |
| | | isError = jsonStart && state == 0;//éå¤å¼å§é误 忶䏿¯å¼å¤çã |
| | | break; |
| | | case '}': |
| | | isError = !jsonStart || (keyStart != 0 && state == 0);//éå¤ç»æé误 æè
æåç»æ{"aa"}ãæ£å¸¸çæ{} |
| | | break; |
| | | case '[': |
| | | isError = arrayStart && state == 0;//éå¤å¼å§é误 |
| | | break; |
| | | case ']': |
| | | isError = !arrayStart || jsonStart;//éå¤å¼å§é误 æè
Json æªç»æ |
| | | break; |
| | | case '"': |
| | | case '\'': |
| | | isError = !(jsonStart || arrayStart); //json ææ°ç»å¼å§ã |
| | | if (!isError) |
| | | { |
| | | //éå¤å¼å§ [""",{"" "}] |
| | | isError = (state == 0 && keyStart == -1) || (state == 1 && valueStart == -1); |
| | | } |
| | | if (!isError && arrayStart && !jsonStart && c == '\'')//['aa',{}] |
| | | { |
| | | isError = true; |
| | | } |
| | | break; |
| | | case ':': |
| | | isError = !jsonStart || state == 1;//éå¤åºç°ã |
| | | break; |
| | | case ',': |
| | | isError = !(jsonStart || arrayStart); //json ææ°ç»å¼å§ã |
| | | if (!isError) |
| | | { |
| | | if (jsonStart) |
| | | { |
| | | isError = state == 0 || (state == 1 && valueStart > 1);//éå¤åºç°ã |
| | | } |
| | | else if (arrayStart)//["aa,] [,] [{},{}] |
| | | { |
| | | isError = keyStart == 0 && !setDicValue; |
| | | } |
| | | } |
| | | break; |
| | | case ' ': |
| | | case '\r': |
| | | case '\n'://[ "a",\r\n{} ] |
| | | case '\0': |
| | | case '\t': |
| | | break; |
| | | default: //å¼å¼å¤´ãã |
| | | isError = (!jsonStart && !arrayStart) || (state == 0 && keyStart == -1) || (valueStart == -1 && state == 1);// |
| | | break; |
| | | } |
| | | //if (isError) |
| | | //{ |
| | | |
| | | //} |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 设置åç¬¦ç¶æ(è¿åtrueå为å
³é®è¯ï¼è¿åfalseåå½ä¸ºæ®éå符å¤çï¼ qy 2024-7-15 |
| | | /// </summary> |
| | | private static bool SetCharState(char c, ref CharState cs) |
| | | { |
| | | cs.CheckIsError(c); |
| | | switch (c) |
| | | { |
| | | case '{'://[{ "[{A}]":[{"[{B}]":3,"m":"C"}]}] |
| | | #region 大æ¬å· |
| | | if (cs.keyStart <= 0 && cs.valueStart <= 0) |
| | | { |
| | | cs.keyStart = 0; |
| | | cs.valueStart = 0; |
| | | if (cs.jsonStart && cs.state == 1) |
| | | { |
| | | cs.childrenStart = true; |
| | | } |
| | | else |
| | | { |
| | | cs.state = 0; |
| | | } |
| | | cs.jsonStart = true;//å¼å§ã |
| | | return true; |
| | | } |
| | | #endregion |
| | | break; |
| | | case '}': |
| | | #region 大æ¬å·ç»æ |
| | | if (cs.keyStart <= 0 && cs.valueStart < 2 && cs.jsonStart) |
| | | { |
| | | cs.jsonStart = false;//æ£å¸¸ç»æã |
| | | cs.state = 0; |
| | | cs.keyStart = 0; |
| | | cs.valueStart = 0; |
| | | cs.setDicValue = true; |
| | | return true; |
| | | } |
| | | // cs.isError = !cs.jsonStart && cs.state == 0; |
| | | #endregion |
| | | break; |
| | | case '[': |
| | | #region 䏿¬å·å¼å§ |
| | | if (!cs.jsonStart) |
| | | { |
| | | cs.arrayStart = true; |
| | | return true; |
| | | } |
| | | else if (cs.jsonStart && cs.state == 1) |
| | | { |
| | | cs.childrenStart = true; |
| | | return true; |
| | | } |
| | | #endregion |
| | | break; |
| | | case ']': |
| | | #region 䏿¬å·ç»æ |
| | | if (cs.arrayStart && !cs.jsonStart && cs.keyStart <= 2 && cs.valueStart <= 0)//[{},333]//è¿æ ·ç»æã |
| | | { |
| | | cs.keyStart = 0; |
| | | cs.valueStart = 0; |
| | | cs.arrayStart = false; |
| | | return true; |
| | | } |
| | | #endregion |
| | | break; |
| | | case '"': |
| | | case '\'': |
| | | #region å¼å· |
| | | if (cs.jsonStart || cs.arrayStart) |
| | | { |
| | | if (cs.state == 0)//keyé¶æ®µ,æå¯è½æ¯æ°ç»["aa",{}] |
| | | { |
| | | if (cs.keyStart <= 0) |
| | | { |
| | | cs.keyStart = (c == '"' ? 3 : 2); |
| | | return true; |
| | | } |
| | | else if ((cs.keyStart == 2 && c == '\'') || (cs.keyStart == 3 && c == '"')) |
| | | { |
| | | if (!cs.escapeChar) |
| | | { |
| | | cs.keyStart = -1; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | cs.escapeChar = false; |
| | | } |
| | | } |
| | | } |
| | | else if (cs.state == 1 && cs.jsonStart)//å¼é¶æ®µå¿
é¡»æ¯Jsonå¼å§äºã |
| | | { |
| | | if (cs.valueStart <= 0) |
| | | { |
| | | cs.valueStart = (c == '"' ? 3 : 2); |
| | | return true; |
| | | } |
| | | else if ((cs.valueStart == 2 && c == '\'') || (cs.valueStart == 3 && c == '"')) |
| | | { |
| | | if (!cs.escapeChar) |
| | | { |
| | | cs.valueStart = -1; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | cs.escapeChar = false; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | #endregion |
| | | break; |
| | | case ':': |
| | | #region åå· |
| | | if (cs.jsonStart && cs.keyStart < 2 && cs.valueStart < 2 && cs.state == 0) |
| | | { |
| | | if (cs.keyStart == 1) |
| | | { |
| | | cs.keyStart = -1; |
| | | } |
| | | cs.state = 1; |
| | | return true; |
| | | } |
| | | // cs.isError = !cs.jsonStart || (cs.keyStart < 2 && cs.valueStart < 2 && cs.state == 1); |
| | | #endregion |
| | | break; |
| | | case ',': |
| | | #region éå· //["aa",{aa:12,}] |
| | | |
| | | if (cs.jsonStart) |
| | | { |
| | | if (cs.keyStart < 2 && cs.valueStart < 2 && cs.state == 1) |
| | | { |
| | | cs.state = 0; |
| | | cs.keyStart = 0; |
| | | cs.valueStart = 0; |
| | | //if (cs.valueStart == 1) |
| | | //{ |
| | | // cs.valueStart = 0; |
| | | //} |
| | | cs.setDicValue = true; |
| | | return true; |
| | | } |
| | | } |
| | | else if (cs.arrayStart && cs.keyStart <= 2) |
| | | { |
| | | cs.keyStart = 0; |
| | | //if (cs.keyStart == 1) |
| | | //{ |
| | | // cs.keyStart = -1; |
| | | //} |
| | | return true; |
| | | } |
| | | #endregion |
| | | break; |
| | | case ' ': |
| | | case '\r': |
| | | case '\n'://[ "a",\r\n{} ] |
| | | case '\0': |
| | | case '\t': |
| | | if (cs.keyStart <= 0 && cs.valueStart <= 0) //cs.jsonStart && |
| | | { |
| | | return true;//è·³è¿ç©ºæ ¼ã |
| | | } |
| | | break; |
| | | default: //å¼å¼å¤´ãã |
| | | if (c == '\\') //转ä¹ç¬¦å· |
| | | { |
| | | if (cs.escapeChar) |
| | | { |
| | | cs.escapeChar = false; |
| | | } |
| | | else |
| | | { |
| | | cs.escapeChar = true; |
| | | return true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | cs.escapeChar = false; |
| | | } |
| | | if (cs.jsonStart || cs.arrayStart) // Json ææ°ç»å¼å§äºã |
| | | { |
| | | if (cs.keyStart <= 0 && cs.state == 0) |
| | | { |
| | | cs.keyStart = 1;//æ å¼å·ç |
| | | } |
| | | else if (cs.valueStart <= 0 && cs.state == 1 && cs.jsonStart)//åªæJsonå¼å§ææå¼ã |
| | | { |
| | | cs.valueStart = 1;//æ å¼å·ç |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | public static LinqExpressionType GetLinqCondition(this string stringType) |
| | | { |
| | | LinqExpressionType linqExpression; |
| | | switch (stringType) |
| | | { |
| | | case HtmlElementType.Contains: |
| | | linqExpression = LinqExpressionType.In; |
| | | break; |
| | | case HtmlElementType.ThanOrEqual: |
| | | linqExpression = LinqExpressionType.ThanOrEqual; |
| | | break; |
| | | case HtmlElementType.LessOrequal: |
| | | linqExpression = LinqExpressionType.LessThanOrEqual; |
| | | break; |
| | | case HtmlElementType.GT: |
| | | linqExpression = LinqExpressionType.GreaterThan; |
| | | break; |
| | | case HtmlElementType.lt: |
| | | linqExpression = LinqExpressionType.LessThan; |
| | | break; |
| | | case HtmlElementType.like: |
| | | linqExpression = LinqExpressionType.Contains; |
| | | break; |
| | | default: |
| | | linqExpression = LinqExpressionType.Equal; |
| | | break; |
| | | } |
| | | return linqExpression; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.LocationEnum |
| | | { |
| | | /// <summary> |
| | | /// è´§ä½ç¶æ |
| | | /// </summary> |
| | | public enum LocationStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// ç©ºé² |
| | | /// </summary> |
| | | [Description("空é²")] |
| | | Free = 0, |
| | | |
| | | /// <summary> |
| | | /// éå® |
| | | /// </summary> |
| | | [Description("éå®")] |
| | | Lock = 1, |
| | | |
| | | /// <summary> |
| | | /// æè´§ |
| | | /// </summary> |
| | | [Description("æè´§")] |
| | | InStock = 2, |
| | | |
| | | /// <summary> |
| | | /// 空æéå® |
| | | /// </summary> |
| | | [Description("空æéå®")] |
| | | PalletLock = 98, |
| | | |
| | | /// <summary> |
| | | /// 空æç |
| | | /// </summary> |
| | | [Description("空æç")] |
| | | Pallet = 99 |
| | | } |
| | | |
| | | public enum EnableStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æ£å¸¸ |
| | | /// </summary> |
| | | [Description("æ£å¸¸")] |
| | | Normal = 0, |
| | | |
| | | /// <summary> |
| | | /// åªå
¥ |
| | | /// </summary> |
| | | [Description("åªå
¥")] |
| | | OnlyIn = 1, |
| | | |
| | | /// <summary> |
| | | /// åªåº |
| | | /// </summary> |
| | | [Description("åªåº")] |
| | | OnlyOut = 2, |
| | | |
| | | /// <summary> |
| | | /// ç¦ç¨ |
| | | /// </summary> |
| | | [Description("ç¦ç¨")] |
| | | Disable = 3 |
| | | } |
| | | |
| | | public enum LocationTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// ç«åº |
| | | /// </summary> |
| | | [Description("ç«åºè´§ä½")] |
| | | Cube = 1, |
| | | |
| | | /// <summary> |
| | | /// å¹³åº |
| | | /// </summary> |
| | | [Description("å¹³åºè´§ä½")] |
| | | Flat = 2 |
| | | } |
| | | } |
| | |
| | | [Description("æ°å»ºå
¥åºä»»å¡")] |
| | | InNew = 200, |
| | | |
| | | ///// <summary> |
| | | ///// AGVå
¥åºæ§è¡ä¸ |
| | | ///// </summary> |
| | | //[Description("AGVå
¥åºæ§è¡ä¸")] |
| | | //AGV_InExecuting = 210, |
| | | |
| | | ///// <summary> |
| | | ///// AGVå
¥åºå®æ |
| | | ///// </summary> |
| | | //[Description("AGVæ¬è¿å®æ")] |
| | | //AGV_InFinish = 215, |
| | | |
| | | /// <summary> |
| | | /// è¾é线å
¥åºæ§è¡ä¸ |
| | | /// 天车å
¥åºæ§è¡ä¸ |
| | | /// </summary> |
| | | [Description("è¾é线å
¥åºæ§è¡ä¸")] |
| | | [Description("天车å
¥åºæ§è¡ä¸")] |
| | | Line_InExecuting = 220, |
| | | |
| | | /// <summary> |
| | | /// è¾é线å
¥åºå®æ |
| | | /// 天车å
¥åºå®æ |
| | | /// </summary> |
| | | [Description("è¾é线è¾é宿")] |
| | | [Description("天车å
¥åºå®æ")] |
| | | Line_InFinish = 225, |
| | | |
| | | /// <summary> |
| | | /// å åæºå
¥åºæ§è¡ä¸ |
| | | /// </summary> |
| | | [Description("å åæºå
¥åºæ§è¡ä¸")] |
| | | SC_InExecuting = 230, |
| | | |
| | | /// <summary> |
| | | /// å åæºå
¥åºå®æ |
| | | /// </summary> |
| | | [Description("å åæºå
¥åºå®æ")] |
| | | SC_InFinish = 235, |
| | | |
| | | /// <summary> |
| | | /// å
¥åºä»»å¡å®æ |
| | |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | |
| | | namespace WIDESEAWCS_DTO.BasicInfo |
| | | { |
| | | [ModelValidate] |
| | | public class InitializationLocationDTO |
| | | { |
| | | /// <summary> |
| | | /// å··éå· |
| | | /// </summary> |
| | | [PropertyValidate("å··éå·", NotNullAndEmpty = true)] |
| | | public string Roadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¡ |
| | | /// </summary> |
| | | [PropertyValidate("è¡", MinValue = 0, IsContainMinValue = false)] |
| | | public int MaxRow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å |
| | | /// </summary> |
| | | [PropertyValidate("å", MinValue = 0, IsContainMinValue = false)] |
| | | public int MaxColumn { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å± |
| | | /// </summary> |
| | | [PropertyValidate("å±", MinValue = 0, IsContainMinValue = false)] |
| | | public int MaxLayer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åæ·±è´§ä½ |
| | | /// </summary> |
| | | [PropertyValidate("æ¯å¦å深货ä½", NotNullAndEmpty = true)] |
| | | public bool IsSingleDepth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 䏿·±è¡å· |
| | | /// </summary> |
| | | [PropertyValidate("䏿·±è¡å·", NotNullAndEmptyWithPropertyAndValue = new string[] { nameof(IsSingleDepth), "false" })] |
| | | public List<int> FirstDepthRows { get; set; } |
| | | } |
| | | } |
| | |
| | | <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="BasicInfo\" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_DTO.BasicInfo; |
| | | |
| | | namespace WIDESEAWCS_IWMSPart |
| | | { |
| | |
| | | WebResponseContent GetLocationLayer(); |
| | | |
| | | WebResponseContent GetLocationConfigs(int layer); |
| | | |
| | | WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO); |
| | | } |
| | | } |
| | |
| | | using WIDESEAWCS_Core.Caches; |
| | | using WIDESEAWCS_QuartzJob.DeviceEnum; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | |
| | | namespace WIDESEAWCS_WCSServer.Controllers.System |
| | | { |
| | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | |
| | | case "enableStatusEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(EnableStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(EnableStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(EnableStatusEnum).GetField(((EnableStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "locationStatusEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(LocationStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(LocationStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(LocationStatusEnum).GetField(((LocationStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "locationTypeEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(LocationTypeEnum); |
| | | List<int> enums = Enum.GetValues(typeof(LocationTypeEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(LocationTypeEnum).GetField(((LocationTypeEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | } |
| | | return result; |
| | | } |
| | |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_DTO.BasicInfo; |
| | | using WIDESEAWCS_IWMSPart; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | { |
| | | return Service.GetLocationLayer(); |
| | | } |
| | | |
| | | [HttpPost, Route("InitializationLocation"), AllowAnonymous] |
| | | public WebResponseContent InitializationLocation([FromBody] InitializationLocationDTO initializationLocationDTO) |
| | | { |
| | | return Service.InitializationLocation(initializationLocationDTO); |
| | | } |
| | | } |
| | | } |
| | |
| | | "Microsoft.AspNetCore": "Warning" |
| | | } |
| | | }, |
| | | "dics": "deviceType,devicePlcType,jobAssembly,jobClassName,deviceStatus,taskType,taskState,inOutType", |
| | | "dics": "deviceType,devicePlcType,jobAssembly,jobClassName,deviceStatus,taskType,taskState,inOutType,enableStatusEnum,locationStatusEnum,locationTypeEnum", |
| | | "AllowedHosts": "*", |
| | | "ConnectionStringsEncryption": false, |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |
| | |
| | | |
| | | //æä¸èèå¤ä¸ªåºåºå£ |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup && task.TaskState == (int)TaskInStatusEnum.SC_InExecuting) |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | //todo |
| | | int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskInStatusEnum>(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Autofac.Core; |
| | | using HslCommunication; |
| | | using HslCommunication.Core; |
| | | using HslCommunication.WebSocket; |
| | | using Microsoft.Extensions.Hosting; |
| | | using Microsoft.VisualBasic.FileIO; |
| | | using Newtonsoft.Json; |
| | | using Quartz; |
| | | using SixLabors.ImageSharp.PixelFormats; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | | using WIDESEAWCS_Tasks.OHT; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class GZJJob : JobBase, IJob |
| | | { |
| | | private readonly ITaskService _taskService; |
| | | WebSocketServer _webSocketServer; |
| | | public GZJJob(ITaskService taskService, WebSocketServer webSocketServer) |
| | | { |
| | | _taskService = taskService;//注å
¥ |
| | | _webSocketServer = webSocketServer; |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | |
| | | bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value); |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | try |
| | | { |
| | | //Example |
| | | //device.GetValue 读å |
| | | //device.SetValue åå
¥ |
| | | //_taskService.Repository; //ä»å¨å±ï¼è¿è¡æ°æ®åºè®¿é® |
| | | OHTReadData oHTReadData = new OHTReadData(); |
| | | //todo:读åè®¾å¤æ°æ®ï¼ |
| | | |
| | | |
| | | //todo:设å¤ç¶ææ°æ®åéç»å端 |
| | | |
| | | |
| | | |
| | | //WriteInfo(device.DeviceName, "infoLog"); |
| | | |
| | | //WriteDebug(device.DeviceName, "debugLog"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(device.DeviceName, "é误", ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | return Task.CompletedTask; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å®ä½è½¬æ¢æå½ä»¤Model |
| | | /// </summary> |
| | | /// <param name="task">ä»»å¡å®ä½</param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public OHTTaskCommand? ConvertToOHTTaskCommand([NotNull] Dt_Task task) |
| | | { |
| | | OHTTaskCommand oHtTaskCommand = new OHTTaskCommand(); |
| | | |
| | | oHtTaskCommand.W_Task_Type = 1; |
| | | oHtTaskCommand.W_Load_Layer = 0; |
| | | oHtTaskCommand.W_Pick_Line = 1; |
| | | |
| | | string[] SourceCodes = task.SourceAddress.Split("-"); |
| | | if (SourceCodes.Length == 3) |
| | | { |
| | | oHtTaskCommand.W_Pick_Line = Convert.ToInt16(SourceCodes[1]); |
| | | oHtTaskCommand.W_Put_Column = Convert.ToInt16(SourceCodes[2]); |
| | | oHtTaskCommand.W_Put_Layer = Convert.ToInt16(SourceCodes[3]); |
| | | } |
| | | else |
| | | { |
| | | //æ°æ®é
ç½®é误 |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"任塿ºå°åé
ç½®é误ï¼"); |
| | | return null; |
| | | } |
| | | string[] targetCodes = task.TargetAddress.Split("-"); |
| | | if (targetCodes.Length == 3) |
| | | { |
| | | oHtTaskCommand.W_Put_Line = Convert.ToInt16(targetCodes[1]); |
| | | oHtTaskCommand.W_Put_Column = Convert.ToInt16(targetCodes[2]); |
| | | oHtTaskCommand.W_Put_Layer = Convert.ToInt16(targetCodes[3]); |
| | | } |
| | | else |
| | | { |
| | | //æ°æ®é
ç½®é误 |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"ä»»å¡ç®æ å°åé
ç½®é误"); |
| | | return null; |
| | | } |
| | | return oHtTaskCommand; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åä»»å¡ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private Dt_Task? GetTask() |
| | | { |
| | | Dt_Task task; |
| | | task = _taskService.QueryStackerCraneTask("R01"); |
| | | return task; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | /// <summary> |
| | | /// è¿è¡æ¨¡å¼ |
| | | /// </summary> |
| | | public enum RunModeEnum |
| | | { |
| | | /// <summary> |
| | | /// æªç¥ |
| | | /// </summary> |
| | | [Description("æªç¥")] |
| | | UnKnown = 0, |
| | | /// <summary> |
| | | /// èªå¨ |
| | | /// </summary> |
| | | [Description("èªå¨")] |
| | | Automatic = 1, |
| | | /// <summary> |
| | | /// åèªå¨ |
| | | /// </summary> |
| | | [Description("åèªå¨")] |
| | | SemiAutomatic = 2, |
| | | /// <summary> |
| | | /// æå¨ |
| | | /// </summary> |
| | | [Description("æå¨")] |
| | | Manual = 3, |
| | | /// <summary> |
| | | /// ç»´ä¿® |
| | | /// </summary> |
| | | [Description("ç»´ä¿®")] |
| | | Maintenance = 4, |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¿è¡ç¶æ |
| | | /// </summary> |
| | | public enum RunStateEnum |
| | | { |
| | | [Description("空é²")] |
| | | Standby=0, |
| | | [Description("åè´§è¡èµ°")] |
| | | PickUp=1, |
| | | [Description("å货请æ±")] |
| | | PickUpRequest=2, |
| | | [Description("åè´§ä¸")] |
| | | PickUping=3, |
| | | [Description("åè´§å®æ")] |
| | | PickUpCompleted=4, |
| | | [Description("æ¾è´§è¡èµ°")] |
| | | Put=5, |
| | | [Description("æ¾è´§è¯·æ±")] |
| | | PutRequest=6, |
| | | [Description("æ¾è´§ä¸")] |
| | | Puting=7, |
| | | [Description("æ¾è´§å®æ")] |
| | | PutCompleted=8, |
| | | [Description("ç§»å¨ä¸")] |
| | | Moving=9, |
| | | [Description("ç§»å¨å®æ")] |
| | | MoveCompleted=10, |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 天车æ¥è¦ä»£ç |
| | | /// </summary> |
| | | public enum AlarmCodeEnum |
| | | { |
| | | [Description("æ£å¸¸")] |
| | | Normal = 0, |
| | | [Description("æ
éæ°å")] |
| | | AlarmCode = 1, |
| | | [Description("空å")] |
| | | EmptyPickUp = 2 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 天车任å¡ç¶æ |
| | | /// </summary> |
| | | public enum TaskStateEnum |
| | | { |
| | | [Description("é»è®¤")] |
| | | Normal = 0, |
| | | [Description("ç¡®è®¤æ¥æ¶ä»»å¡")] |
| | | AcceptTaskConfirm = 1, |
| | | [Description("任塿§è¡ä¸")] |
| | | TaskExcuting = 2, |
| | | [Description("æ£å¸¸å®æä»»å¡")] |
| | | TaskComplete = 3, |
| | | [Description("任塿åä¸")] |
| | | TaskPausing = 4, |
| | | [Description("æ æ³å®æä»»å¡")] |
| | | TaskNOComplete = 5, |
| | | [Description("ä»»å¡è¢«äººå·¥æ¸
é¤")] |
| | | TaskManualClear = 6 |
| | | } |
| | | |
| | | public enum DeviceDBName |
| | | { |
| | | #region 读åDBå |
| | | /// <summary> |
| | | /// å¿è·³ |
| | | /// </summary> |
| | | [Description("å¿è·³")] |
| | | R_HeartBeat, |
| | | /// <summary> |
| | | /// è¿è¡æ¨¡å¼ |
| | | /// </summary> |
| | | [Description("è¿è¡æ¨¡å¼")] |
| | | R_RunMode, |
| | | /// <summary> |
| | | /// è¿è¡ç¶æ |
| | | /// </summary> |
| | | [Description("è¿è¡ç¶æ")] |
| | | R_RunState , |
| | | |
| | | /// <summary> |
| | | /// æ
é代ç |
| | | /// </summary> |
| | | [Description("æ
é代ç ")] |
| | | R_AlarmCode, |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ç¶æ |
| | | /// </summary> |
| | | [Description("ä»»å¡ç¶æ")] |
| | | R_TaskState, |
| | | |
| | | /// <summary> |
| | | /// 天车大车å½åä½ç½® |
| | | /// </summary> |
| | | [Description("天车大车å½åä½ç½®")] |
| | | R_CurrentLine, |
| | | /// <summary> |
| | | /// 天车å°è½¦å½åä½ç½® |
| | | /// </summary> |
| | | [Description("天车å°è½¦å½åä½ç½®")] |
| | | R_CurrentColumn, |
| | | |
| | | /// <summary> |
| | | /// èµ·åå½åä½ç½® |
| | | /// </summary> |
| | | [Description("èµ·åå½åä½ç½®")] |
| | | R_RiseUp_Position, |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | [Description("ä»»å¡å·")] |
| | | R_TaskNumber, |
| | | |
| | | /// <summary> |
| | | /// 1å·è´§çªæ¯å¦æè´§ï¼ä¿çï¼ |
| | | /// </summary> |
| | | [Description("1å·è´§çªæè´§")] |
| | | R_Loaded_1, |
| | | |
| | | /// <summary> |
| | | /// 2å·è´§çªæ¯å¦æè´§ï¼ä¿çï¼ |
| | | /// </summary> |
| | | [Description("2å·è´§çªæè´§")] |
| | | R_Loaded_2, |
| | | |
| | | /// <summary> |
| | | /// 1å·è´§çªæ«ç ç»æ |
| | | /// </summary> |
| | | [Description("1å·è´§çªæ«ç ç»æ")] |
| | | R_Code_1, |
| | | |
| | | /// <summary> |
| | | /// 2å·è´§çªæ«ç ç»æ |
| | | /// </summary> |
| | | [Description("2å·è´§çªæ«ç ç»æ")] |
| | | R_Code_2, |
| | | |
| | | |
| | | /// <summary> |
| | | /// 1å·è£
车ä½è¯·æ± |
| | | /// </summary> |
| | | [Description("1å·è£
车ä½è¯·æ±")] |
| | | R_Load_Requst_1, |
| | | |
| | | /// <summary> |
| | | /// 2å·è£
车ä½è¯·æ± |
| | | /// </summary> |
| | | [Description("2å·è£
车ä½è¯·æ±")] |
| | | R_Load_Requst_2, |
| | | #endregion |
| | | |
| | | #region åDBå |
| | | [Description("å¿è·³")] |
| | | W_HeartBeat, |
| | | [Description("ä»»å¡ç±»å")] |
| | | W_Task_Type, |
| | | [Description("è£
è½¦å±æ°")] |
| | | W_Load_Layer, |
| | | [Description("åè´§è¡")] |
| | | W_Pick_Line, |
| | | [Description("åè´§å")] |
| | | W_Pick_Column, |
| | | [Description("åè´§å±")] |
| | | W_Pick_Layer, |
| | | [Description("æ¾è´§è¡")] |
| | | W_Put_Line, |
| | | [Description("æ¾è´§å")] |
| | | W_Put_Column, |
| | | [Description("æ¾è´§å±")] |
| | | W_Put_Layer, |
| | | [Description("è´§çª1æ¯å¦æè´§")] |
| | | W_Catch_1, |
| | | [Description("è´§çª2æ¯å¦æè´§")] |
| | | W_Catch_2, |
| | | [Description("ä»»å¡å·")] |
| | | W_TaskNumber, |
| | | [Description("æ ¡éªå¼")] |
| | | W_CheckValue, |
| | | [Description("确认信å·")] |
| | | W_ConfirmSignal, |
| | | #endregion |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Autofac.Core; |
| | | using HslCommunication; |
| | | using HslCommunication.Core; |
| | | using HslCommunication.WebSocket; |
| | | using Microsoft.Extensions.Hosting; |
| | | using Microsoft.VisualBasic.FileIO; |
| | | using Newtonsoft.Json; |
| | | using Quartz; |
| | | using SixLabors.ImageSharp.PixelFormats; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | | using WIDESEAWCS_Tasks.OHT; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class OHTJob : JobBase, IJob |
| | | { |
| | | private readonly ITaskService _taskService; |
| | | WebSocketServer _webSocketServer; |
| | | public OHTJob(ITaskService taskService, WebSocketServer webSocketServer) |
| | | { |
| | | _taskService = taskService;//注å
¥ |
| | | _webSocketServer = webSocketServer; |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | |
| | | bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value); |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | try |
| | | { |
| | | //Example |
| | | //device.GetValue 读å |
| | | //device.SetValue åå
¥ |
| | | //_taskService.Repository; //ä»å¨å±ï¼è¿è¡æ°æ®åºè®¿é® |
| | | OHTReadData oHTReadData = new OHTReadData(); |
| | | #region 读åå¤©è½¦è®¾å¤æ°æ® |
| | | oHTReadData.R_HeartBeat = device.GetValue<DeviceDBName, short>(DeviceDBName.R_HeartBeat); |
| | | oHTReadData.R_RunMode = device.GetValue<DeviceDBName, short>(DeviceDBName.R_RunMode); |
| | | oHTReadData.R_RunState = device.GetValue<DeviceDBName, short>(DeviceDBName.R_RunState); |
| | | oHTReadData.R_AlarmCode = device.GetValue<DeviceDBName, short>(DeviceDBName.R_AlarmCode); |
| | | oHTReadData.R_TaskState = device.GetValue<DeviceDBName, short>(DeviceDBName.R_TaskState); |
| | | oHTReadData.R_CurrentLine = device.GetValue<DeviceDBName, short>(DeviceDBName.R_CurrentLine); |
| | | oHTReadData.R_CurrentColumn = device.GetValue<DeviceDBName, short>(DeviceDBName.R_CurrentColumn); |
| | | oHTReadData.R_RiseUp_Position = device.GetValue<DeviceDBName, short>(DeviceDBName.R_RiseUp_Position); |
| | | oHTReadData.R_TaskNumber = device.GetValue<DeviceDBName, short>(DeviceDBName.R_TaskNumber); |
| | | oHTReadData.R_Loaded_1 = device.GetValue<DeviceDBName, short>(DeviceDBName.R_Loaded_1); |
| | | oHTReadData.R_Loaded_2 = device.GetValue<DeviceDBName, short>(DeviceDBName.R_Loaded_2); |
| | | oHTReadData.R_Code_1 = device.GetValue<DeviceDBName, string>(DeviceDBName.R_Code_1); |
| | | oHTReadData.R_Code_2 = device.GetValue<DeviceDBName, string>(DeviceDBName.R_Code_2); |
| | | oHTReadData.R_Load_Requst_1 = device.GetValue<DeviceDBName, bool>(DeviceDBName.R_Load_Requst_1); |
| | | oHTReadData.R_Load_Requst_2 = device.GetValue<DeviceDBName, bool>(DeviceDBName.R_Load_Requst_2); |
| | | #region æµè¯ç¨ |
| | | //oHTReadData.R_HeartBeat = 1; |
| | | //oHTReadData.R_RunMode = 2; |
| | | //oHTReadData.R_RunState = 3; |
| | | //oHTReadData.R_AlarmCode = 4; |
| | | //oHTReadData.R_TaskState = 5; |
| | | //oHTReadData.R_CurrentLine = 6; |
| | | //oHTReadData.R_CurrentColumn = 7; |
| | | //oHTReadData.R_RiseUp_Position = 8; |
| | | //oHTReadData.R_TaskNumber = 9; |
| | | //oHTReadData.R_Loaded_1 =10; |
| | | //oHTReadData.R_Loaded_2 = 11; |
| | | //oHTReadData.R_Code_1 = "12"; |
| | | //oHTReadData.R_Code_2 = "13"; |
| | | //oHTReadData.R_Load_Requst_1 =true; |
| | | //oHTReadData.R_Load_Requst_2 = false; |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | //ç¶ææ°æ®åéç»å端 |
| | | string ohtData = JsonConvert.SerializeObject(oHTReadData); |
| | | _webSocketServer.PublishAllClientPayload(ohtData); |
| | | |
| | | if (oHTReadData.R_RunMode == (int)RunModeEnum.Automatic && oHTReadData.R_AlarmCode == (int)AlarmCodeEnum.Normal) |
| | | { |
| | | if (oHTReadData.R_RunState == (int)RunStateEnum.Standby) |
| | | { |
| | | Dt_Task? task = GetTask(); |
| | | if (task != null) |
| | | { |
| | | OHTTaskCommand? oHTTaskCommand = ConvertToOHTTaskCommand(task); |
| | | if (oHTTaskCommand != null) |
| | | { |
| | | //todoï¼åå
¥ä»»å¡å½ä»¤ |
| | | device.SetValue(DeviceDBName.W_Task_Type, oHTTaskCommand.W_Task_Type); |
| | | device.SetValue(DeviceDBName.W_Pick_Line, oHTTaskCommand.W_Pick_Line); |
| | | device.SetValue(DeviceDBName.W_Pick_Column, oHTTaskCommand.W_Pick_Column); |
| | | device.SetValue(DeviceDBName.W_Pick_Layer, oHTTaskCommand.W_Pick_Layer); |
| | | device.SetValue(DeviceDBName.W_Put_Line, oHTTaskCommand.W_Put_Line); |
| | | device.SetValue(DeviceDBName.W_Put_Column, oHTTaskCommand.W_Put_Column); |
| | | device.SetValue(DeviceDBName.W_Put_Layer, oHTTaskCommand.W_Put_Layer); |
| | | device.SetValue(DeviceDBName.W_Catch_1, oHTTaskCommand.W_Catch_1); |
| | | device.SetValue(DeviceDBName.W_Catch_2, oHTTaskCommand.W_Catch_2); |
| | | device.SetValue(DeviceDBName.W_TaskNumber, oHTTaskCommand.W_TaskNumber); |
| | | device.SetValue(DeviceDBName.W_TaskNumber, oHTTaskCommand.W_TaskNumber); |
| | | device.SetValue(DeviceDBName.W_CheckValue, oHTTaskCommand.W_CheckValue); |
| | | //确认信å·åå
¥1ï¼ä»»å¡ä¸è¾¾å®æ |
| | | device.SetValue(DeviceDBName.W_ConfirmSignal, 1); |
| | | //WCSæ£æµå°å¤©è½¦çR_TaskState=1ï¼éè¿W_ConfirmSignalç½®2表示让天车å¼å§æ§è¡ä»»å¡ |
| | | int R_TaskState = device.GetValue<DeviceDBName, short>(DeviceDBName.R_TaskState); |
| | | if (R_TaskState == 1) |
| | | { |
| | | device.SetValue(DeviceDBName.W_ConfirmSignal, 2); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | WriteInfo(device.DeviceName, "infoLog"); |
| | | |
| | | WriteDebug(device.DeviceName, "debugLog"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(device.DeviceName, "é误", ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | return Task.CompletedTask; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å®ä½è½¬æ¢æå½ä»¤Model |
| | | /// </summary> |
| | | /// <param name="task">ä»»å¡å®ä½</param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public OHTTaskCommand? ConvertToOHTTaskCommand([NotNull] Dt_Task task) |
| | | { |
| | | OHTTaskCommand oHtTaskCommand = new OHTTaskCommand(); |
| | | |
| | | oHtTaskCommand.W_Task_Type = 1; |
| | | oHtTaskCommand.W_Load_Layer = 0; |
| | | oHtTaskCommand.W_Pick_Line = 1; |
| | | |
| | | string[] SourceCodes = task.SourceAddress.Split("-"); |
| | | if (SourceCodes.Length == 3) |
| | | { |
| | | oHtTaskCommand.W_Pick_Line = Convert.ToInt16(SourceCodes[1]); |
| | | oHtTaskCommand.W_Put_Column = Convert.ToInt16(SourceCodes[2]); |
| | | oHtTaskCommand.W_Put_Layer = Convert.ToInt16(SourceCodes[3]); |
| | | } |
| | | else |
| | | { |
| | | //æ°æ®é
ç½®é误 |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"任塿ºå°åé
ç½®é误ï¼"); |
| | | return null; |
| | | } |
| | | string[] targetCodes = task.TargetAddress.Split("-"); |
| | | if (targetCodes.Length == 3) |
| | | { |
| | | oHtTaskCommand.W_Put_Line = Convert.ToInt16(targetCodes[1]); |
| | | oHtTaskCommand.W_Put_Column = Convert.ToInt16(targetCodes[2]); |
| | | oHtTaskCommand.W_Put_Layer = Convert.ToInt16(targetCodes[3]); |
| | | } |
| | | else |
| | | { |
| | | //æ°æ®é
ç½®é误 |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"ä»»å¡ç®æ å°åé
ç½®é误"); |
| | | return null; |
| | | } |
| | | return oHtTaskCommand; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åä»»å¡ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private Dt_Task? GetTask() |
| | | { |
| | | Dt_Task task; |
| | | task = _taskService.QueryStackerCraneTask("R01"); |
| | | return task; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Tasks.OHT |
| | | { |
| | | public class OHTReadData |
| | | { |
| | | /// <summary> |
| | | /// å¿è·³ |
| | | /// </summary> |
| | | public short R_HeartBeat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å½åè¿è¡æ¨¡å¼ |
| | | /// </summary> |
| | | public short R_RunMode { get; set; } |
| | | /// <summary> |
| | | /// è¿è¡ç¶æ |
| | | /// </summary> |
| | | public short R_RunState { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¦ä»£ç |
| | | /// </summary> |
| | | public short R_AlarmCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ç¶æ |
| | | /// </summary> |
| | | public short R_TaskState { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 天车大车å½åä½ç½® |
| | | /// </summary> |
| | | public short R_CurrentLine { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 天车å°è½¦å½åä½ç½® |
| | | /// </summary> |
| | | public short R_CurrentColumn { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èµ·åå½åä½ç½® |
| | | /// </summary> |
| | | public short R_RiseUp_Position { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | public short R_TaskNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 1å·è´§çªæ¯å¦æè´§ |
| | | /// </summary> |
| | | public short R_Loaded_1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 2å·è´§çªæ¯å¦æè´§ |
| | | /// </summary> |
| | | public short R_Loaded_2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 1å·è´§çªæ«ç ç»æ |
| | | /// </summary> |
| | | public string R_Code_1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 2å·è´§çªæ«ç ç»æ |
| | | /// </summary> |
| | | public string R_Code_2 { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 1å·è£
车ä½è¯·æ± |
| | | /// </summary> |
| | | public bool R_Load_Requst_1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 2å·è£
车ä½è¯·æ± |
| | | /// </summary> |
| | | public bool R_Load_Requst_2 { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Tasks.OHT |
| | | { |
| | | public class OHTTaskCommand |
| | | { |
| | | /// <summary> |
| | | /// å¿è·³ |
| | | /// </summary> |
| | | public short W_HeartBeat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ç±»å |
| | | /// </summary> |
| | | public short W_Task_Type { get; set; } |
| | | /// <summary> |
| | | /// è£
è½¦å±æ° |
| | | /// </summary> |
| | | public short W_Load_Layer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè´§è¡ |
| | | /// </summary> |
| | | public short W_Pick_Line { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè´§å |
| | | /// </summary> |
| | | public short W_Pick_Column { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè´§å± |
| | | /// </summary> |
| | | public short W_Pick_Layer { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¾è´§è¡ |
| | | /// </summary> |
| | | public short W_Put_Line { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¾è´§å |
| | | /// </summary> |
| | | public short W_Put_Column { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¾è´§å± |
| | | /// </summary> |
| | | public short W_Put_Layer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 1å·æ¯å¦æå |
| | | /// </summary> |
| | | public short W_Catch_1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 2å·æ¯å¦æå |
| | | /// </summary> |
| | | public short W_Catch_2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | public short W_TaskNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ ¡éªå¼ (ä»»å¡ç±»å+è£
è½¦å±æ°+åè¡+åå+åå±+æ¾è¡+æ¾å+æ¾å±+W_Catch_1+W_Catch_2+ä»»å¡å·) |
| | | /// </summary> |
| | | public short W_CheckValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¡®è®¤ä¿¡å· |
| | | /// </summary> |
| | | public int W_ConfirmSignal { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Autofac.Core; |
| | | using HslCommunication; |
| | | using HslCommunication.Core; |
| | | using HslCommunication.WebSocket; |
| | | using Microsoft.Extensions.Hosting; |
| | | using Microsoft.VisualBasic.FileIO; |
| | | using Newtonsoft.Json; |
| | | using Quartz; |
| | | using SixLabors.ImageSharp.PixelFormats; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | | using WIDESEAWCS_Tasks.OHT; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class ZXJJob : JobBase, IJob |
| | | { |
| | | private readonly ITaskService _taskService; |
| | | WebSocketServer _webSocketServer; |
| | | public ZXJJob(ITaskService taskService, WebSocketServer webSocketServer) |
| | | { |
| | | _taskService = taskService;//注å
¥ |
| | | _webSocketServer = webSocketServer; |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | |
| | | bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value); |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | try |
| | | { |
| | | //Example |
| | | //device.GetValue 读å |
| | | //device.SetValue åå
¥ |
| | | //_taskService.Repository; //ä»å¨å±ï¼è¿è¡æ°æ®åºè®¿é® |
| | | OHTReadData oHTReadData = new OHTReadData(); |
| | | //todo:读åè®¾å¤æ°æ®ï¼ |
| | | |
| | | |
| | | //todo:设å¤ç¶ææ°æ®åéç»å端 |
| | | |
| | | |
| | | |
| | | //WriteInfo(device.DeviceName, "infoLog"); |
| | | |
| | | //WriteDebug(device.DeviceName, "debugLog"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(device.DeviceName, "é误", ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | return Task.CompletedTask; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å®ä½è½¬æ¢æå½ä»¤Model |
| | | /// </summary> |
| | | /// <param name="task">ä»»å¡å®ä½</param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public OHTTaskCommand? ConvertToOHTTaskCommand([NotNull] Dt_Task task) |
| | | { |
| | | OHTTaskCommand oHtTaskCommand = new OHTTaskCommand(); |
| | | |
| | | oHtTaskCommand.W_Task_Type = 1; |
| | | oHtTaskCommand.W_Load_Layer = 0; |
| | | oHtTaskCommand.W_Pick_Line = 1; |
| | | |
| | | string[] SourceCodes = task.SourceAddress.Split("-"); |
| | | if (SourceCodes.Length == 3) |
| | | { |
| | | oHtTaskCommand.W_Pick_Line = Convert.ToInt16(SourceCodes[1]); |
| | | oHtTaskCommand.W_Put_Column = Convert.ToInt16(SourceCodes[2]); |
| | | oHtTaskCommand.W_Put_Layer = Convert.ToInt16(SourceCodes[3]); |
| | | } |
| | | else |
| | | { |
| | | //æ°æ®é
ç½®é误 |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"任塿ºå°åé
ç½®é误ï¼"); |
| | | return null; |
| | | } |
| | | string[] targetCodes = task.TargetAddress.Split("-"); |
| | | if (targetCodes.Length == 3) |
| | | { |
| | | oHtTaskCommand.W_Put_Line = Convert.ToInt16(targetCodes[1]); |
| | | oHtTaskCommand.W_Put_Column = Convert.ToInt16(targetCodes[2]); |
| | | oHtTaskCommand.W_Put_Layer = Convert.ToInt16(targetCodes[3]); |
| | | } |
| | | else |
| | | { |
| | | //æ°æ®é
ç½®é误 |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"ä»»å¡ç®æ å°åé
ç½®é误"); |
| | | return null; |
| | | } |
| | | return oHtTaskCommand; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åä»»å¡ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private Dt_Task? GetTask() |
| | | { |
| | | Dt_Task task; |
| | | task = _taskService.QueryStackerCraneTask("R01"); |
| | | return task; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | |  |
| | | |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.Utilities; |
| | | using WIDESEAWCS_DTO.BasicInfo; |
| | | using WIDESEAWCS_IWMSPart; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO) |
| | | { |
| | | try |
| | | { |
| | | (bool, string, object?) result = ModelValidate.ValidateModelData(initializationLocationDTO); |
| | | if (!result.Item1) return WebResponseContent.Instance.Error(result.Item2); |
| | | |
| | | int side = 1; |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | for (int i = 0; i < initializationLocationDTO.MaxRow; i++) |
| | | { |
| | | for (int j = 0; j < initializationLocationDTO.MaxColumn; j++) |
| | | { |
| | | for (int k = 0; k < initializationLocationDTO.MaxLayer; k++) |
| | | { |
| | | Dt_LocationInfo locationInfo = new Dt_LocationInfo() |
| | | { |
| | | Column = j + 1, |
| | | EnableStatus = EnableStatusEnum.Normal.ObjToInt(), |
| | | Layer = k + 1, |
| | | LocationStatus = LocationStatusEnum.Free.ObjToInt(), |
| | | LocationType = LocationTypeEnum.Cube.ObjToInt(), |
| | | RoadwayNo = initializationLocationDTO.Roadway, |
| | | Row = i + 1, |
| | | }; |
| | | |
| | | |
| | | locationInfo.Depth = 1; |
| | | locationInfo.LocationCode = $"{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}"; |
| | | locationInfo.LocationName = $"{locationInfo.Row.ToString().PadLeft(3, '0')}è¡{locationInfo.Column.ToString().PadLeft(3, '0')}å{locationInfo.Layer.ToString().PadLeft(3, '0')}å±"; |
| | | |
| | | |
| | | |
| | | locationInfos.Add(locationInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | BaseDal.AddData(locationInfos); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public class LocationConfig |