分支自 SuZhouGuanHong/TaiYuanTaiZhong

PCS
dengjunjie
2024-01-16 e3a2ea164fa3ccde6a1dfc24e99d4eb9b065f69b
PCS
已修改23个文件
已添加80个文件
3209 ■■■■■ 文件已修改
代码管理/PCS/WCS_Client/config/buttons.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/public/index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/public/pcs.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/public/pcs_log.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/public/pcs_logo.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/public/pcs_x.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/assets/imgs/pcs.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/assets/imgs/pcs_log.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/assets/imgs/pcs_logo.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/assets/imgs/pcs_x.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/extension/widesea_system/system/dt_log_pcs.js 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/extension/widesea_wcs/wcs/VV_Dispatch.js 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/extension/widesea_wcs/wcs/dt_Machineinfo.js 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/router/viewGird.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/Index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/Login.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/Upload.vue 238 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/widesea_system/system/dt_log_pcs.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/widesea_wcs/wcs/VV_Dispatch.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_Machineinfo.vue 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_plcinfodetail.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_plcinfohead.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/DBItem/GDXDB.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/LogInfo/WriteDBLog.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/LogInfo/WriteLog.cs 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_log_pcs.cs 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/partial/dt_log_pcs.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/partial/dt_stationinfo.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/WCS/dt_Machineinfo.cs 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/WCS/dt_plcinfodetail.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/WCS/partial/dt_Machineinfo.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/System/dt_log_pcsMapConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/System/dt_stationinfoMapConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/WCS/dt_MachineinfoMapConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/IRepositories/System/Idt_log_pcsRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/IServices/System/Idt_log_pcsService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/IServices/System/Partial/Idt_log_pcsService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/Repositories/System/dt_log_pcsRepository.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/Services/System/Partial/dt_log_pcsService.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/Services/System/dt_log_pcsService.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IRepositories/WCS/Idt_MachineinfoRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IRepositories/system/Idt_stationinfoRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Idt_MachineinfoService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Partial/IVV_DispatchService.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Partial/Idt_MachineinfoService.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IServices/system/Idt_stationinfoService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IServices/system/Partial/Idt_stationinfoService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/JobBase.cs 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/One_two_unitJob.cs 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/LocationCreation.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Repositories/WCS/dt_MachineinfoRepository.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Repositories/system/dt_stationinfoRepository.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/VV_DispatchService.cs 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_MachineinfoService.cs 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_equipmentinfoService.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/dt_MachineinfoService.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/system/Partial/dt_stationinfoService.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/system/dt_stationinfoService.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/WCSClient/DBExtension.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/WCSClient/DBItemGroup.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/WCSClient/Melsec/MelsecMcClient.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/WCSClient/ModelBus/ModelBusClient.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/WCSClient/PLCClient.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/WCSClient/Siemens/SiemensPLCClient.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/WIDESEA_WCS.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_System/Partial/dt_log_pcsController.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_System/dt_log_pcsController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/Partial/VV_DispatchController.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/Partial/dt_MachineinfoController.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/Partial/dt_stationinfoController.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/dt_MachineinfoController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/dt_stationinfoController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/20231220/Template/调度信息20231220090759.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/20231220/Template/调度信息20231220095958.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/20240108/Template/调度信息20240108151655.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/20240108/Template/调度信息20240108171608.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/20240109/Template/调度信息20240109112529.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/工单信息20240108145121.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/工单信息20240108151140.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/工单信息20240108154639.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/工单信息20240108155539.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/调度信息20240108170025.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/调度信息20240108171108.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/调度信息20240108172416.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/386607d7-fcf9-46bf-9449-0d1d962acc56_太原重工流程疑问.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/3a206465-b647-4a96-8504-0281697d2373_CADReader.exe 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/5a8b9fc7-1ed4-411a-99dc-1e8769650591_太重项目疑问点.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/7c10cb80-b2d0-42f7-a2a4-b75b913a5283_CADReader.exe 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/b2660e45-900f-40ec-8a4a-fb4dc13842da_CADReader.exe 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/VV_Dispatch/_TSW449_3_103_PAR.SPF 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/200d388e-8b66-44a2-8e65-a6656639af41_TSW449_3_103_PAR.SPF 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/35c8a51b-b899-411b-9f3b-e12b2a79e03d_TSW449_3_103_PAR.SPF 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/56cdc468-bdf6-4ae1-b456-1020d7986e76_太原重工.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/a63b0c06-6694-4366-b926-68f2134c4025_TSW449_3_C1_S2.SPF 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/c12e0782-1973-4b9d-b7ac-a1e7d2355bb2_error.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/e007f116-b9d4-493b-899d-783a802069e7_TSW449_3_103_PAR.SPF 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240109/Sys_DictionaryList/_微信图片_20220505095142.jpg 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/wwwroot/Upload/Tables/Sys_User/202401081736421771/微信图片_20220505095142.jpg 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/wwwroot/Upload/Tables/Sys_User/202401091425048266/微信图片_20220505095142.jpg 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/wwwroot/Upload/Tables/T/202401091511391477/微信图片_20220505095142.jpg 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/PCS/WCS_Client/config/buttons.js
@@ -61,16 +61,26 @@
        this.import();
    }
}
    // , {
    // name: "导 å‡º",
    // icon: 'el-icon-bottom',
    // type: 'success',
    // plain: true,
    // value: 'Export',
    // onClick: function () {
    //     this.export();
    // }
// }
    , {
    name: "导 å‡º",
    icon: 'el-icon-bottom',
    type: 'success',
    plain: true,
    value: 'Export',
    onClick: function () {
        this.export();
    }
}
, {
    name: "上 ä¼ ",
    icon: 'el-icon-bottom',
    type: 'success',
    plain: true,
    value: 'Upload',
    onClick: function () {
        this.upload();
    }
}
    // , {
    //     name: "数据结构",
    //     icon: 'ios-cog',
@@ -80,6 +90,7 @@
    //         this.openViewColumns();
    //     }
    // }
]
export default buttons
´úÂë¹ÜÀí/PCS/WCS_Client/public/index.html
@@ -7,7 +7,7 @@
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <meta name="keywords" content=".netccore,dotnet core,vue,element,element plus,vue3" />
  <meta name="description" content="" />
  <link rel="icon" href="<%= BASE_URL %>wcslogo.png">
  <link rel="icon" href="<%= BASE_URL %>pcs_logo.png">
  <title><%= htmlWebpackPlugin.options.title %></title>
</head>
´úÂë¹ÜÀí/PCS/WCS_Client/public/pcs.png
´úÂë¹ÜÀí/PCS/WCS_Client/public/pcs_log.png
´úÂë¹ÜÀí/PCS/WCS_Client/public/pcs_logo.png
´úÂë¹ÜÀí/PCS/WCS_Client/public/pcs_x.png
´úÂë¹ÜÀí/PCS/WCS_Client/src/assets/imgs/pcs.png
´úÂë¹ÜÀí/PCS/WCS_Client/src/assets/imgs/pcs_log.png
´úÂë¹ÜÀí/PCS/WCS_Client/src/assets/imgs/pcs_logo.png
´úÂë¹ÜÀí/PCS/WCS_Client/src/assets/imgs/pcs_x.png
´úÂë¹ÜÀí/PCS/WCS_Client/src/extension/widesea_system/system/dt_log_pcs.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
import logDetial from "@/views/widesea_system/dialog/logDetial.vue"
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: logDetial,
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  buttons: { view: [], box: [], detail: [] }, //扩展的按钮
  methods: {
    //下面这些方法可以保留也可以删除
    onInit() {
      this.setFiexdSearchForm(true);
      //默认查询前7天日志
      let dateNow = this.base.getDate(true);
      let beginDate = this.base.addDays(dateNow, -7);
      beginDate = beginDate.substring(0, 11) + '00:00:00'
      let startDate = this.base.addDays(dateNow, 1);
      this.searchFormFields.createtime = [beginDate, startDate];
      //自定义列颜色
      this.columns.forEach(x => {
        if (x.field == "status") {
          x.getColor = (row, column) => {
            if (row != null) {
              if (row.status == "Sucess") {
                return "success";
              } else if (row.status == "Error") {
                return "error";
              } else {
                return "primary";
              }
            }
          }
        }
      });
      //添加详情列
      let options = {
        field: 'oper',
        title: '操作',
        type: 'text',
        width: 30,
        formatter: (row) => {
          return '<a class="default_a" href="javascript:void(0);">详情</a>'
        },
        click: (row, column, event) => {
          this.$refs.gridHeader.rowData = row;
          this.$refs.gridHeader.showDetialBox = true;
        }
      };
      this.columns.push(options)
    },
    onInited() {
      this.height = this.height - 120;
    },
    searchBefore(param) {
      //界面查询前,可以给param.wheres添加查询参数
      //返回false,则不会执行查询
      return true;
    },
    searchAfter(result) {
      //查询后,result返回的查询数据,可以在显示到表格前处理表格的值
      return true;
    },
    addBefore(formData) {
      //新建保存前formData为对象,包括明细表,可以给给表单设置值,自己输出看formData的值
      return true;
    },
    updateBefore(formData) {
      //编辑保存前formData为对象,包括明细表、删除行的Id
      return true;
    },
    rowClick({ row, column, event }) {
      //查询界面点击行事件
      // this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
    },
    modelOpenAfter(row) {
      //点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
      //(1)判断是编辑还是新建操作: this.currentAction=='Add';
      //(2)给弹出框设置默认值
      //(3)this.editFormFields.字段='xxx';
      //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
      //看不懂就把输出看:console.log(this.editFormOptions)
    }
  }
};
export default extension;
´úÂë¹ÜÀí/PCS/WCS_Client/src/extension/widesea_wcs/wcs/VV_Dispatch.js
@@ -5,12 +5,13 @@
**常用示例见:http://v2.volcore.xyz/document/vueDev
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
import Upload from "@/views/Upload"
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridHeader: Upload,
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
@@ -38,6 +39,15 @@
          this.startServe();
        }
      }
      // , {
      //   name: "上传文件",
      //   // icon: 'el-icon-video-play',
      //   index: 5,
      //   type: 'primary',
      //   onClick: function () {
      //     this.Upload();
      //   }
      // }
    ], box: [], detail: []
  }, //扩展的按钮
  methods: {
@@ -150,23 +160,26 @@
    //启动服务
    startServe() {
      this.http.post('/api/VV_Dispatch/StartServe', {}, true).then((x) => {
        this.search();
        if (!x.status) return this.$error(x.message);
        this.$success(x.message);
        this.search();
        this.$emit("onChangeWCSState", true);
      });
    },
    //关闭服务
    CloseServe() {
      this.http.post('/api/VV_Dispatch/CloseServe', {}, true).then((x) => {
        this.search();
        if (!x.status) return this.$error(x.message);
        this.$success(x.message);
        this.search();
        //重新加载页面
        // location.reload()
        this.$emit("onChangeWCSState", false);
      });
    }
    },
    Upload() {
      this.$refs.gridHeader.detialBox=true;
    },
  }
};
export default extension;
´úÂë¹ÜÀí/PCS/WCS_Client/src/extension/widesea_wcs/wcs/dt_Machineinfo.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,147 @@
/*****************************************************************************************
**  Author:jxx 2022
**  QQ:283591387
**完整文档见:http://v2.volcore.xyz/document/api ã€ä»£ç ç”Ÿæˆé¡µé¢ViewGrid】
**常用示例见:http://v2.volcore.xyz/document/vueDev
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import Upload from "@/views/Upload"
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: Upload,
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  buttons: { view: [
    {
      name: "上传文件",
      // icon: 'el-icon-video-play',
      index: 5,
      type: 'primary',
      onClick: function () {
        this.$refs.gridHeader.detialBox=true;
      }
    }
  ], box: [], detail: [] }, //扩展的按钮
  methods: {
     //下面这些方法可以保留也可以删除
    onInit() {  //框架初始化配置前,
        //示例:在按钮的最前面添加一个按钮
        //   this.buttons.unshift({  //也可以用push或者splice方法来修改buttons数组
        //     name: '按钮', //按钮名称
        //     icon: 'el-icon-document', //按钮图标vue2版本见iview文档icon,vue3版本见element ui文档icon(注意不是element puls文档)
        //     type: 'primary', //按钮样式vue2版本见iview文档button,vue3版本见element ui文档button
        //     onClick: function () {
        //       this.$Message.success('点击了按钮');
        //     }
        //   });
        //示例:设置修改新建、编辑弹出框字段标签的长度
        // this.boxOptions.labelWidth = 150;
        this.columns.push({
          field: '操作',
          title: '操作',
          width: 150,
          fixed: 'right',
          align: 'center',
          render: (h, { row, column, index }) => {
            return h('div', {}, [
              h(
                'span',
                {
                  style: {
                    'cursor': 'pointer',
                    'padding': '5px 10px',
                    'border-radius': '3px',
                    'background-color': '#67c23a',
                    'color': '#fff',
                    'font-size': '13px ',
                  },
                  onClick: (e) => {
                    this.request('UpdateEnable', row);
                    // this.request(row);
                  }
                },
                '允许'
              ),
              h(
                'span',
                {
                  style: {
                    'cursor': 'pointer',
                    'margin-left': "10px",
                    'padding': '5px 10px',
                    'border-radius': '3px',
                    'background-color': '#f56c6c',
                    'color': '#fff',
                    'font-size': '13px ',
                  },
                  onClick: (e) => {
                    this.request('UpdateDisEnable', row);
                    // this.request(row);
                  }
                },
                '禁止'
              )
            ]);
          }
        });
    },
    request(action,row) {
      // let url = `api/VV_Dispatch/${action}`;
      let url = `/api/dt_Machineinfo/${action}`;
      // let params = {
      //   Name: row.Name,
      //   Enable:row.Enable
      // }
      this.http.post(url , row, true).then((x) => {
        if (!x.status) return this.$error(x.message);
        this.$success(x.message);
        // this.refresh();
        this.search();
      });
    },
    onInited() {
      //框架初始化配置后
      //如果要配置明细表,在此方法操作
      //this.detailOptions.columns.forEach(column=>{ });
    },
    searchBefore(param) {
      //界面查询前,可以给param.wheres添加查询参数
      //返回false,则不会执行查询
      return true;
    },
    searchAfter(result) {
      //查询后,result返回的查询数据,可以在显示到表格前处理表格的值
      return true;
    },
    addBefore(formData) {
      //新建保存前formData为对象,包括明细表,可以给给表单设置值,自己输出看formData的值
      return true;
    },
    updateBefore(formData) {
      //编辑保存前formData为对象,包括明细表、删除行的Id
      return true;
    },
    rowClick({ row, column, event }) {
      //查询界面点击行事件
      // this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
    },
    modelOpenAfter(row) {
      //点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
      //(1)判断是编辑还是新建操作: this.currentAction=='Add';
      //(2)给弹出框设置默认值
      //(3)this.editFormFields.字段='xxx';
      //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
      //看不懂就把输出看:console.log(this.editFormOptions)
    }
  }
};
export default extension;
´úÂë¹ÜÀí/PCS/WCS_Client/src/router/viewGird.js
@@ -173,6 +173,14 @@
    path: '/dt_ActualProduction_hty',
    name: 'dt_ActualProduction_hty',
    component: () => import('@/views/Work/widesea_wcs/tomes/dt_ActualProduction_hty.vue')
  }    ,{
        path: '/dt_Machineinfo',
        name: 'dt_Machineinfo',
        component: () => import('@/views/widesea_wcs/wcs/dt_Machineinfo.vue')
    }    ,{
        path: '/dt_log_pcs',
        name: 'dt_log_pcs',
        component: () => import('@/views/widesea_system/system/dt_log_pcs.vue')
  }]
export default viewgird
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/Index.vue
@@ -14,7 +14,7 @@
    </div>
    <div class="vol-container" :style="{ left: menuWidth - 1 + 'px' }">
      <div class="vol-header">
        <div class="project-name">WCS_标准版</div>
        <div class="project-name">PCS</div>
        <div class="header-text">
          <!-- <div class="h-link">
            <a
@@ -120,7 +120,7 @@
import VolMenu from "@/components/basic/VolElementMenu.vue";
import Message from "./index/Message.vue";
import MessageConfig from "./index/MessageConfig.js";
var imgUrl = require("@/assets/imgs/wcs_x.png");
var imgUrl = require("@/assets/imgs/pcs_x.png");
var $this;
var $interval;
var $indexDate;
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/Login.vue
@@ -1,6 +1,6 @@
<template>
  <div class="login-container">
    <div class="project-name">WIDESEA_WCS</div>
    <div class="project-name">WIDESEA_PCS</div>
    <div class="login-form">
      <div class="form-user" @keypress="loginPress">
        <div class="login-text">
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/Upload.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,238 @@
<template>
    <el-dialog v-model="detialBox" title="上传DNC文件" :close-on-press-escape="false" :width="width"
      :fullscreen="fullscreen" :draggable="draggable" :modal="modal" :before-close="handleClose">
    <div class="upload-container">
      <a :href="template.url" ref="template"></a>
      <div class="button-group">
        <el-upload
          style="float: left"
          ref="uploadFile"
          :max-size="maxSize"
          :on-change="clearMsg"
          :before-upload="beforeUpload"
          :action="url"
          :change="handleFileChange"
        >
        <!-- <input type="file"  @change="handleFileChange"> -->
          <el-button size="small"
            ><i class="el-icon-folder-opened"></i>选择文件</el-button
          >
        </el-upload>
        <el-button
          v-if="template.url"
          style="margin-left: 10px"
          type="primary"
          size="small"
          @click="dowloadTemplate"
          :loading="loadingStatus"
        >
       <i class="el-icon-bottom"></i>
          ä¸‹è½½æ¨¡æ¿</el-button
        >
        <el-button
          type="success"
          style="margin-left: 10px"
          size="small"
          @click="upload"
          :loading="loadingStatus"
        >
            <i class="el-icon-top"></i>
          ä¸Šä¼ æ–‡ä»¶</el-button
        >
      </div>
      <div class="alert">
        <el-alert title="上传说明" type="warning" :closable="false" show-icon
          >只能上传<!--excel文件,-->文件大小不超过{{ maxSize }}M的文件</el-alert
        >
      </div>
      <div v-if="file">
        <h3>文件列表</h3>
        <div class="file-info">
          <span>文件名:{{ file.name }}</span>
          <span>大小{{ (file.size / 1024).toFixed(2) }}KB</span>
        </div>
      </div>
      <div v-show="message" class="v-r-message">
        <h3 class="title">上传结果</h3>
        <div class="text" :class="resultClass" v-html="message"></div>
      </div>
      <slot></slot>
    </div>
    </el-dialog>
  </template>
  <script>
  //目前只支持单个Excel上传,其他功能开发中...
  export default {
    components: {},
    props: {
      url: {
        type: String,
        default: ''
      },
      template: {
        //下载模板配置
        type: Object,
        default: () => {
          return {
            url: '', //模板下载路径,如果没有模板路径,则不显示下载模板功能
            fileName: '未定义文件名' //下载模板的文件名
          };
        }
      },
      importExcelBefore: {
        type: Function,
        default: (file) => {
          return true;
        }
      }
    },
    data() {
      return {
        detialBox:false,
        maxSize: 10,
        model: true,
        file: null,
        loadingStatus: false,
        message: '',
        resultClass: ''
      };
    },
    methods: {
      handleFileChange(event) {
      const file = event.target.files[0]; // èŽ·å–ç¬¬ä¸€ä¸ªé€‰å®šçš„æ–‡ä»¶å¯¹è±¡
      console.log('文件路径:', file.path); // è¾“出文件路径到控制台
      // å¦‚果想进行其他操作或者发送文件路径给服务器等,可以在这里编写相应逻辑
    },
      clearMsg() {
        this.message = '';
      },
      reset() {
        this.file = null;
        this.message = '';
        this.resultClass = '';
      },
      getFileType() {
        let fileName =
          this.file.name
            .split('.')
            .pop()
            .toLocaleLowerCase() || '';
        // if (['numbers', 'csv', 'xls', 'xlsx','SPF'].indexOf(fileName) == -1) {
        //   this.$Message.error('只能选择excel文件');
        //   return false;
        // }
        return true;
      },
      beforeUpload(file) {
        this.file = file;
        if (!this.getFileType()) {
          return false;
        }
        return false;
      },
      upload() {
        // let _url = this.url;
        let _url = "http://localhost:8099/api/dt_Machineinfo/Upload";
        if (!_url) {
          return this.$Message.error('没有配置好Url');
        }
        if (!this.file) {
          return this.$Message.error('请选择文件');
        }
        var formData = new FormData();
        formData.append('fileInput', this.file);
        // if (!this.importExcelBefore(formData)) {
        //   return;
        // }
        this.loadingStatus = true;
        this.http.post(_url, formData).then(
          (x) => {
            // this.$refs.uploadFile.clearFiles();
            this.loadingStatus = false;
            this.file = null;
            if (x.status) {
              this.$emit('importExcelAfter', x);
            }
            this.message = x.message;
            this.resultClass = x.status ? 'v-r-success' : 'v-r-error';
          },
          (error) => {
            this.loadingStatus = false;
          }
        );
      },
      dowloadTemplate() {
        let url = this.template.url;
        let xmlResquest = new XMLHttpRequest();
        xmlResquest.open('GET', url, true);
        xmlResquest.setRequestHeader('Content-type', 'application/json');
        xmlResquest.setRequestHeader(
          'Authorization',
          this.$store.getters.getToken()
        );
        let fileName = this.template.fileName + '.xlsx';
        let elink = this.$refs.template;
        xmlResquest.responseType = 'blob';
        let $_vue = this;
        this.loadingStatus = true;
        xmlResquest.onload = function(oEvent) {
          $_vue.loadingStatus = false;
          if (xmlResquest.response.type == 'application/json') {
            return $_vue.message.error('未找到下载文件');
          }
          let content = xmlResquest.response;
          elink.download = fileName;
          let blob = new Blob([content]);
          elink.href = URL.createObjectURL(blob);
          elink.click();
        };
        xmlResquest.send();
      }
    }
  };
  </script>
  <style lang="less" scoped>
  .upload-container {
    min-height: 270px !important;
    display: inline-block;
    width: 100%;
    padding: 10px;
    border: 1px dashed #989898;
    min-height: 250px;
    border-radius: 5px;
    .alert {
      margin-top: 12px;
    }
    .el-button-group > * {
      display: flex;
    }
    h3 {
      margin: 9px 0px;
    }
    .file-info > span {
      margin-right: 20px;
    }
    .v-r-message {
      margin-top: 10px;
      .title {
        margin-bottom: 2px;
      }
      > .text {
        font-size: 13px;
      }
      .v-r-success {
        color: #02b702;
      }
      .v-r-error {
        color: #dc0909;
      }
    }
  }
  </style>
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_system/system/dt_log_pcs.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,68 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wcs/wcs/dt_log.js此处编写
 -->
 <template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/widesea_system/system/dt_log_pcs.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'id',
            footer: "Foots",
            cnName: '日志查询',
            name: 'wcs/dt_log_pcs',
            url: "/dt_log_pcs/",
            sortName: "createtime"
        });
        const editFormFields = ref({});
        const editFormOptions = ref([]);
        const searchFormFields = ref({ "describe": "", "status": "", "info": "", "createtime": "", "createuser": "", "dataForm": "" });
        const searchFormOptions = ref([
            [
                { "title": "名称", "field": "describe", "type": "like" },
                { "title": "详细信息", "field": "info", "type": "like" },
                { "title": "创建用户", "field": "createuser", "type": "like" },
            ],
            [
                { "title": "创建时间", "field": "createtime", "type": "datetime" },
                { "title": "来源", "field": "dataForm", "type": "like" },
                { "dataKey": "LogState", "data": [], "title": "状态", "field": "status", "type": "select" }
            ]
        ]);
        const columns = ref([{ field: 'id', title: 'id', type: 'guid', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'describe', title: '名称', type: 'string', width: 110, align: 'left', sort: true },
        { field: 'info', title: '详细信息', type: 'string', width: 150, align: 'left' },
        { field: 'status', title: '状态', bind: { key: 'LogState' }, type: 'string', width: 40, align: 'left' },
        { field: 'createuser', title: '创建用户', type: 'string', width: 60, align: 'left' },
        { field: 'createtime', title: '创建时间', type: 'string ', width: 90, align: 'left' },
        { field: 'dataForm', title: '来源', type: 'string', width: 60, align: 'left' }]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_wcs/wcs/VV_Dispatch.vue
@@ -73,7 +73,7 @@
        { field: 'ClassName', title: '调度类型', type: 'string', width: 120, require: true, align: 'left' },
        { field: 'IntervalSecond', title: '调度时间(s)', type: 'int', width: 110, require: true, align: 'left' },
        { field: 'Remark', title: '描述', type: 'string', width: 220, align: 'left' },
        { field: 'Enable', title: '是否启用', bind: { key: 'EqStatus' }, type: 'string', width: 110, require: true, align: 'left' },
        { field: 'Enable', title: '是否启用',hidden: true, bind: { key: 'EqStatus' }, type: 'string', width: 110, require: true, align: 'left' },
        { field: 'IsRun', title: '运行状态', type: 'string', width: 110, require: true, align: 'left' },
        ]);
        const detail = ref({
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_Machineinfo.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wcs/wcs/dt_Machineinfo.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/widesea_wcs/wcs/dt_Machineinfo.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '机床信息',
                name: 'wcs/dt_Machineinfo',
                url: "/dt_Machineinfo/",
                sortName: "ID"
            });
            const editFormFields = ref({"Name":"","IP":"","User":"","Password":"","FolderName":""});
            const editFormOptions = ref([[{"title":"机床名","required":true,"field":"Name"}],
                              [{"title":"IP地址","required":true,"field":"IP"}],
                              [{"title":"账号","field":"User"}],
                              [{"title":"密码","field":"Password"}],
                              [{"title":"文件夹名称","required":true,"field":"FolderName"}]]);
            const searchFormFields = ref({"Name":""});
            const searchFormOptions = ref([[{"title":"机床名","field":"Name","type":"like"}]]);
            const columns = ref([{field:'ID',title:'主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Name',title:'机床名',type:'string',sort:true,width:120,require:true,align:'left',sort:true},
                       {field:'IP',title:'IP地址',type:'string',width:120,require:true,align:'left'},
                       {field:'FolderName',title:'文件夹名称',type:'string',width:120,require:true,align:'left'},
                       {field:'User',title:'账号',type:'string',width:120,align:'left'},
                       {field:'Password',title:'密码',type:'string',width:120,align:'left'},
                       {field:'Enable',title:'是否启用',bind: { key: 'Enables' },type:'int',width:110,align:'left'},
                       {field:'remark',title:'备注',type:'string',width:120,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_plcinfodetail.vue
@@ -40,6 +40,7 @@
                       {field:'plcdetail_valtype',title:'数据类型',type:'string',width:110,align:'left'},
                       {field:'plcdetail_len',title:'长度',type:'int',width:110,align:'left'},
                       {field:'plcdetail_name',title:'信号名称',type:'string',width:110,align:'left'},
                       {field:'plcdetail_number',title:'设备名称',type:'string',width:110,align:'left'},
                       {field:'plcdetail_opratortype',title:'处理方法',type:'string',width:110,align:'left'},
                       {field:'plcdetail_remark',title:'备注',type:'string',width:220,align:'left'}]);
            const detail = ref({
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_plcinfohead.vue
@@ -60,6 +60,7 @@
            { field: 'plcdetail_value', title: '偏移地址', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
            { field: 'plcdetail_valtype', title: '数据类型', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
            { field: 'plcdetail_len', title: '长度', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
            // { field: 'plcdetail_number', title: '设备名称', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
            { field: 'plcdetail_opratortype', title: '处理方法', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
            { field: 'plcdetail_remark', title: '备注', type: 'string', width: 90, readonly: true, align: 'left' },
            ],
´úÂë¹ÜÀí/PCS/WCS_Client/vue.config.js
@@ -31,7 +31,7 @@
    config.plugins.delete('prefetch');
    //自下定义title
    config.plugin('html').tap((args) => {
      args[0].title = 'WCS';
      args[0].title = 'PCS';
      return args;
    });
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/DBItem/GDXDB.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Comm.ItemDB
{
    public partial class GDXDB
    {
        public event Action<GDXDB> OnReadSignal;
        /// <summary>
        /// è®¾å¤‡å
        /// </summary>
        public string R_Name { get; set; }
        /// <summary>
        /// è½¦è½®SN号
        /// </summary>
        public string R_wheel_SN { get; set; }
        /// <summary>
        /// è½¦è½®ç±»åž‹
        /// </summary>
        public short R_wheel_type { get; set; }
        /// <summary>
        /// é›¶ä»¶çŠ¶æ€
        /// </summary>
        public byte R_part_status { get; set; }
        /// <summary>
        /// é›¶ä»¶å·¥è‰º
        /// </summary>
        public byte R_part_process { get; set; }
        public bool machine_nr;
        public bool R_machine_nr
        {
            get
            {
                return machine_nr;
            }
            set
            {
                if (value && (R_Name == "4.24" || R_Name == "5.24" || R_Name == "6.24"))
                {
                    ReadSignal(this);
                }
                machine_nr = value;
            }
        }
        public byte R_direction { get; set; }
        public void ReadSignal(GDXDB reader)
        {
            Task.Run(() =>
            {
                OnReadSignal?.Invoke(reader);
            });
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/LogInfo/WriteDBLog.cs
@@ -86,7 +86,8 @@
        {
            try
            {
                dt_log log = new dt_log();
                //dt_log log = new dt_log();
                dt_log_pcs log = new dt_log_pcs();
                log.id = Guid.NewGuid();
                log.createtime = DateTime.Now;
                log.dataForm = dataFrom;
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/LogInfo/WriteLog.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -6,6 +7,7 @@
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Extensions;
namespace WIDESEA_Comm.LogInfo
{
@@ -14,6 +16,11 @@
    /// </summary>
    public partial class WriteLog
    {
        private int fileSize;
        public static WriteLog log;
        static string EquipName;
        private string logFileName;
        public string FileLogPath { set; get; }
        /// <summary>
        /// å†™å…¥æ—¥å¿—(不要多线程操作同一文件,一个设备一个文件夹)
        /// </summary>
@@ -51,5 +58,86 @@
            }
            catch { }
        }
        public static WriteLog Info(string equipName)
        {
            EquipName = equipName;
            //if (log == null)
            log = new WriteLog("Info" + equipName);
            log.FileLogPath = AppContext.BaseDirectory + "\\log\\Info\\" + DateTime.Now.ToString("yyyyMMdd") /*+ "\\" + EquipName + "_" + DateTime.Now.ToString("yyyyMMdd")*/ + "\\";
            return log;
        }
        private WriteLog(string equipName)
        {
            //初始化大于399M日志文件将自动删除;
            this.fileSize = 2048 * 1024 * 200;//50M   2048 * 1024 * 200= 419430000字节(b)=399.9996185兆字节(mb)
            //默认路径
            //this.FileLogPath = AppContext.BaseDirectory + "\\log\\" + EquipName + "\\";
            EquipName = equipName;
            if (!string.IsNullOrEmpty(equipName))
                this.logFileName = equipName + "_log" + DateTime.Now.ToString("yyyyMMdd") + ".log";
            else
                this.logFileName = "log" + DateTime.Now.ToString("yyyyMMdd") + ".log";
            //this.logFileName = EquipName + "_log" + DateTime.Now.ToString("yyyyMMdd") + ".log";
        }
        object flag = new object();
        public void Write(string Message, string equipName)
        {
            lock (flag)
            {
                if (!string.IsNullOrEmpty(equipName))
                    this.logFileName = equipName + "_log" + DateTime.Now.ToString("yyyyMMdd") + ".log";
                else
                    this.logFileName = "log" + DateTime.Now.ToString("yyyyMMdd") + ".log";
                this.Write(this.logFileName, Message, equipName);
            }
        }
        public void Write(string LogFileName, string Message, string equipName)
        {
            //DirectoryInfo path=new DirectoryInfo(LogFileName);
            //如果日志文件目录不存在,则创建
            if (!Directory.Exists(this.FileLogPath))
            {
                Directory.CreateDirectory(this.FileLogPath);
            }
            FileInfo finfo = new FileInfo(this.FileLogPath + LogFileName);
            if (finfo.Exists && finfo.Length > fileSize)
            {
                finfo.Delete();
            }
            try
            {
                FileStream fs = new FileStream(this.FileLogPath + LogFileName, FileMode.Append);
                StreamWriter strwriter = new StreamWriter(fs);
                try
                {
                    DateTime d = DateTime.Now;
                    strwriter.WriteLine("时间:" + d.ToString());
                    strwriter.WriteLine(Message);
                    strwriter.WriteLine();
                    strwriter.Flush();
                }
                catch (Exception ee)
                {
                    //Console.WriteLine("日志文件写入失败信息:" + ee.ToString());
                }
                finally
                {
                    strwriter.Close();
                    strwriter = null;
                    fs.Close();
                    fs = null;
                }
            }
            catch (Exception ee)
            {
                //Console.WriteLine("日志文件没有打开,详细信息如下:");
            }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_log_pcs.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,84 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    [Entity(TableCnName = "日志管理", TableName = "dt_log")]
    public partial class dt_log_pcs : BaseEntity
    {
        /// <summary>
        ///
        /// </summary>
        [Key]
        [Display(Name = "id")]
        [Column(TypeName = "uniqueidentifier")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public Guid id { get; set; }
        /// <summary>
        ///概要
        /// </summary>
        [Display(Name = "概要")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        public string describe { get; set; }
        /// <summary>
        ///详细说明和参数等
        /// </summary>
        [Display(Name = "详细说明和参数等")]
        [Editable(true)]
        public string info { get; set; }
        /// <summary>
        ///成功/失败
        /// </summary>
        [Display(Name = "成功/失败")]
        [MaxLength(255)]
        [Column(TypeName = "varchar(255)")]
        [Editable(true)]
        public string status { get; set; }
        /// <summary>
        ///创建用户
        /// </summary>
        [Display(Name = "创建用户")]
        [MaxLength(255)]
        [Column(TypeName = "varchar(255)")]
        [Editable(true)]
        public string createuser { get; set; }
        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Column(TypeName = "datetime")]
        public DateTime? createtime { get; set; }
        /// <summary>
        ///数据来源
        /// </summary>
        [Display(Name = "数据来源")]
        [MaxLength(255)]
        [Column(TypeName = "varchar(255)")]
        [Editable(true)]
        public string dataForm { get; set; }
        /// <summary>
        /// ç³»ç»Ÿç±»åž‹wcs
        /// </summary>
        //public int systemType { get; set; } = 1;
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,139 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    [Entity(TableCnName = "库位信息",TableName = "dt_stationinfo")]
    public partial class dt_stationinfo:BaseEntity
    {
        /// <summary>
       ///
       /// </summary>
       [Display(Name ="id")]
       [Column(TypeName="uniqueidentifier")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public Guid id { get; set; }
       /// <summary>
       ///缓存架编号
       /// </summary>
       [Display(Name ="缓存架编号")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string stationCode { get; set; }
       /// <summary>
       ///物料类型
       /// </summary>
       [Display(Name ="物料类型")]
       [MaxLength(25)]
       [Column(TypeName="nvarchar(25)")]
       [Editable(true)]
       public string stationType { get; set; }
       /// <summary>
       ///区域
       /// </summary>
       [Display(Name ="区域")]
       [MaxLength(15)]
       [Column(TypeName="nvarchar(15)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string area { get; set; }
       /// <summary>
       ///是否启用
       /// </summary>
       [Display(Name ="是否启用")]
       [Column(TypeName="bit")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public bool enable { get; set; }
       /// <summary>
       ///货位状态
       /// </summary>
       [Display(Name ="货位状态")]
       [MaxLength(255)]
       [Column(TypeName="varchar(255)")]
       [Editable(true)]
       public string location_state { get; set; }
       /// <summary>
       ///最后状态改变时间
       /// </summary>
       [Display(Name ="最后状态改变时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? lastUpdateTime { get; set; }
       /// <summary>
       ///车轮数量
       /// </summary>
       [Display(Name ="车轮数量")]
       [Column(TypeName="int")]
       public int? quantity { get; set; }
       /// <summary>
       ///车轮SN号
       /// </summary>
       [Display(Name ="车轮SN号")]
       [MaxLength(500)]
       [Column(TypeName="nvarchar(500)")]
       public string bindSN { get; set; }
       /// <summary>
       ///托盘状态
       /// </summary>
       [Display(Name ="托盘状态")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       public string tray_status { get; set; }
       /// <summary>
       ///备注
       /// </summary>
       [Display(Name ="备注")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       public string remark { get; set; }
       /// <summary>
       ///主键
       /// </summary>
       [Key]
       [Display(Name ="主键")]
       [Column(TypeName="int")]
       [Required(AllowEmptyStrings=false)]
       public int zj { get; set; }
       /// <summary>
       ///行
       /// </summary>
       [Display(Name ="行")]
       [Column(TypeName="int")]
       public int? line { get; set; }
       /// <summary>
       ///列
       /// </summary>
       [Display(Name ="列")]
       [Column(TypeName="int")]
       public int? column { get; set; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/partial/dt_log_pcs.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    public partial class dt_log_pcs
    {
        //此处配置字段(字段配置见此model的另一个partial),如果表中没有此字段请加上 [NotMapped]属性,否则会异常
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/partial/dt_stationinfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    public partial class dt_stationinfo
    {
        //此处配置字段(字段配置见此model的另一个partial),如果表中没有此字段请加上 [NotMapped]属性,否则会异常
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/WCS/dt_Machineinfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    [Entity(TableCnName = "机床信息",TableName = "dt_Machineinfo")]
    public partial class dt_Machineinfo:BaseEntity
    {
        /// <summary>
       ///主键
       /// </summary>
       [Key]
       [Display(Name ="主键")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int ID { get; set; }
       /// <summary>
       ///机床名
       /// </summary>
       [Display(Name ="机床名")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string Name { get; set; }
       /// <summary>
       ///IP地址
       /// </summary>
       [Display(Name ="IP地址")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string IP { get; set; }
       /// <summary>
       ///文件夹名称
       /// </summary>
       [Display(Name ="文件夹名称")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string FolderName { get; set; }
       /// <summary>
       ///账号
       /// </summary>
       [Display(Name ="账号")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       public string User { get; set; }
       /// <summary>
       ///密码
       /// </summary>
       [Display(Name ="密码")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       public string Password { get; set; }
       /// <summary>
       ///是否启用
       /// </summary>
       [Display(Name ="是否启用")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? Enable { get; set; }
       /// <summary>
       ///备注
       /// </summary>
       [Display(Name ="备注")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       public string remark { get; set; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/WCS/dt_plcinfodetail.cs
@@ -80,6 +80,15 @@
        public string plcdetail_name { get; set; }
        /// <summary>
        ///设备名称
        /// </summary>
        [Display(Name = "设备名称")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string plcdetail_number { get; set; }
        /// <summary>
        ///处理方法
        /// </summary>
        [Display(Name = "处理方法")]
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/WCS/partial/dt_Machineinfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    public partial class dt_Machineinfo
    {
        //此处配置字段(字段配置见此model的另一个partial),如果表中没有此字段请加上 [NotMapped]属性,否则会异常
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/System/dt_log_pcsMapConfig.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using WIDESEA_Entity.MappingConfiguration;
using WIDESEA_Entity.DomainModels;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace WIDESEA_Entity.MappingConfiguration
{
    public class dt_log_pcsMapConfig : EntityMappingConfiguration<dt_log_pcs>
    {
        public override void Map(EntityTypeBuilder<dt_log_pcs>
        builderTable)
        {
          //b.Property(x => x.StorageName).HasMaxLength(45);
        }
     }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/System/dt_stationinfoMapConfig.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using WIDESEA_Entity.MappingConfiguration;
using WIDESEA_Entity.DomainModels;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace WIDESEA_Entity.MappingConfiguration
{
    public class dt_stationinfoMapConfig : EntityMappingConfiguration<dt_stationinfo>
    {
        public override void Map(EntityTypeBuilder<dt_stationinfo>
        builderTable)
        {
          //b.Property(x => x.StorageName).HasMaxLength(45);
        }
     }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/WCS/dt_MachineinfoMapConfig.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using WIDESEA_Entity.MappingConfiguration;
using WIDESEA_Entity.DomainModels;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace WIDESEA_Entity.MappingConfiguration
{
    public class dt_MachineinfoMapConfig : EntityMappingConfiguration<dt_Machineinfo>
    {
        public override void Map(EntityTypeBuilder<dt_Machineinfo>
        builderTable)
        {
          //b.Property(x => x.StorageName).HasMaxLength(45);
        }
     }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/IRepositories/System/Idt_log_pcsRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹Idt_log_pcsRepository编写接口
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Extensions.AutofacManager;
namespace WIDESEA_System.IRepositories
{
    public partial interface Idt_log_pcsRepository : IDependency,IRepository<dt_log_pcs>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/IServices/System/Idt_log_pcsService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_System.IServices
{
    public partial interface Idt_log_pcsService : IService<dt_log_pcs>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/IServices/System/Partial/Idt_log_pcsService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
/*
*所有关于dt_log_pcs类的业务代码接口应在此处编写
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
namespace WIDESEA_System.IServices
{
    public partial interface Idt_log_pcsService
    {
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/Repositories/System/dt_log_pcsRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹dt_log_pcsRepository编写代码
 */
using WIDESEA_System.IRepositories;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_System.Repositories
{
    public partial class dt_log_pcsRepository : RepositoryBase<dt_log_pcs> , Idt_log_pcsRepository
    {
    public dt_log_pcsRepository(VOLContext dbContext)
    : base(dbContext)
    {
    }
    public static Idt_log_pcsRepository Instance
    {
      get {  return AutofacContainerModule.GetService<Idt_log_pcsRepository>(); } }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/Services/System/Partial/dt_log_pcsService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
/*
 *所有关于dt_log_pcs类的业务代码应在此处编写
*可使用repository.调用常用方法,获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*dt_log_pcsService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
using System.Linq;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
using WIDESEA_Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_System.IRepositories;
namespace WIDESEA_System.Services
{
    public partial class dt_log_pcsService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly Idt_log_pcsRepository _repository;//访问数据库
        [ActivatorUtilitiesConstructor]
        public dt_log_pcsService(
            Idt_log_pcsRepository dbRepository,
            IHttpContextAccessor httpContextAccessor
            )
        : base(dbRepository)
        {
            _httpContextAccessor = httpContextAccessor;
            _repository = dbRepository;
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
  }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/Services/System/dt_log_pcsService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
/*
 *Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
 *所有业务编写全部应在Partial文件夹下dt_log_pcsService与Idt_log_pcsService中编写
 */
using WIDESEA_System.IRepositories;
using WIDESEA_System.IServices;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_System.Services
{
    public partial class dt_log_pcsService : ServiceBase<dt_log_pcs, Idt_log_pcsRepository>
    , Idt_log_pcsService, IDependency
    {
    public dt_log_pcsService(Idt_log_pcsRepository repository)
    : base(repository)
    {
    Init(repository);
    }
    public static Idt_log_pcsService Instance
    {
      get { return AutofacContainerModule.GetService<Idt_log_pcsService>(); } }
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IRepositories/WCS/Idt_MachineinfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹Idt_MachineinfoRepository编写接口
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Extensions.AutofacManager;
namespace WIDESEA_WCS.IRepositories
{
    public partial interface Idt_MachineinfoRepository : IDependency,IRepository<dt_Machineinfo>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IRepositories/system/Idt_stationinfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹Idt_stationinfoRepository编写接口
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Extensions.AutofacManager;
namespace WIDESEA_WCS.IRepositories
{
    public partial interface Idt_stationinfoRepository : IDependency,IRepository<dt_stationinfo>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Idt_MachineinfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_MachineinfoService : IService<dt_Machineinfo>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Partial/IVV_DispatchService.cs
@@ -40,6 +40,10 @@
        /// </summary>
        /// <returns></returns>
        public WebResponseContent CheckServeState();
        /// <summary>
        /// ä¸Šä¼ æ–‡ä»¶
        /// </summary>
        /// <returns></returns>
        //public WebResponseContent Upload(List<Microsoft.AspNetCore.Http.IFormFile> files);
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Partial/Idt_MachineinfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
/*
*所有关于dt_Machineinfo类的业务代码接口应在此处编写
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
using Microsoft.AspNetCore.Mvc;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_MachineinfoService
    {
        /// <summary>
        /// ä¿®æ”¹ä¼ è¾“文件状态
        /// </summary>
        /// <returns></returns>
        public WebResponseContent UpdateEnable(string saveModel);
        /// <summary>
        /// ä¼ è¾“文件状态设为禁止
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public WebResponseContent UpdateDisEnable(string saveModel);
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IServices/system/Idt_stationinfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_stationinfoService : IService<dt_stationinfo>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IServices/system/Partial/Idt_stationinfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
/*
*所有关于dt_stationinfo类的业务代码接口应在此处编写
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_stationinfoService
    {
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/JobBase.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,81 @@
using Quartz;
using System.Diagnostics;
using WIDESEA_Comm.LogInfo;
namespace WIDESEA_WCS.Jobs
{
    public class JobBase
    {
        /// <summary>
        /// æ‰§è¡ŒæŒ‡å®šä»»åŠ¡
        /// </summary>
        /// <param name="context"></param>
        /// <param name="action"></param>
        public string ExecuteJob(IJobExecutionContext context, Func<string> func)
        {
            //记录Job时间
            Stopwatch stopwatch = new Stopwatch();
            //JOBID
            string jobid = context.JobDetail.Key.Name;
            //JOB组名
            string groupName = context.JobDetail.Key.Group;
            //日志
            string jobHistory = $"【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}】【执行开始】【Id:{jobid},组别:{groupName}】";
            //耗时
            double taskSeconds = 0;
            try
            {
                stopwatch.Start();
                func();//执行任务
                stopwatch.Stop();
                jobHistory += $",【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}】【执行成功】";
            }
            catch (Exception ex)
            {
                JobExecutionException e2 = new JobExecutionException(ex);
                //true  æ˜¯ç«‹å³é‡æ–°æ‰§è¡Œä»»åŠ¡
                e2.RefireImmediately = true;
                jobHistory += $",【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}】【执行失败:{ex.Message}】";
            }
            finally
            {
                taskSeconds = Math.Round(stopwatch.Elapsed.TotalSeconds, 3);
                jobHistory += $",【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}】【执行结束】(耗时:{taskSeconds}秒)";
            }
            return jobHistory;
        }
        public void ExecuteJob(IJobExecutionContext context, Action<IJobExecutionContext> action)
        {
            //记录Job时间
            Stopwatch stopwatch = new Stopwatch();
            //JOBID
            string jobid = context.JobDetail.Key.Name;
            //JOB组名
            string groupName = context.JobDetail.Key.Group;
            //日志
            string jobHistory = $"【组别:{groupName}】";
            //耗时
            double taskSeconds = 0;
            try
            {
                stopwatch.Start();
                action(context);//执行任务
                stopwatch.Stop();
                jobHistory += $",【执行成功】";
            }
            catch (Exception ex)
            {
                jobHistory += $",【执行失败:{ex.Message}】";
            }
            finally
            {
                taskSeconds = Math.Round(stopwatch.Elapsed.TotalSeconds);
                jobHistory += $"(耗时:{taskSeconds}秒)";
                if (taskSeconds > 1 || jobHistory.Contains("执行失败"))
                    WriteLog.Info(jobid + "执行记录").Write(jobHistory, jobid + "执行记录");
            }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/One_two_unitJob.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,208 @@
using FreeSql;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm.ItemDB;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.IServices;
using WIDESEA_WCS.Repositories;
using WIDESEA_WCS.Services;
using WIDESEA_WCS.WCSClient;
using static System.Collections.Specialized.BitVector32;
namespace WIDESEA_WCS
{
    /// <summary>
    /// ä¸€äºŒå•元调度
    /// </summary>
    [DisallowConcurrentExecution]
    public class One_two_unitJob : IJob
    {
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                var client = context.JobDetail.JobDataMap.Get("JobParams") as PLCClient;
                if (client == null)
                {
                    return Task.CompletedTask;
                }
                //自动重连
                if (!client.IsConnected)
                {
                    client.Connect();
                    return Task.CompletedTask;
                }
                DoAction(client);
            }
            catch { }
            return Task.CompletedTask;
        }
        static List<GDXDB> gDXDBs = new List<GDXDB>();
        private void DoAction(PLCClient client)
        {
            try
            {
                #region è¯»å†™æ–¹æ³•、日志、执行时间
                //client.Write("DB400.DBX0", "123456");
                //client.WriteByOrder("R_wheel_SN", "123456", "4.1");
                //client.WriteByOrder("R_wheel_SN", "666666", "4.2");
                //var res = client.Read<string>("DB400.DBX0", 20);
                //var res1 = client.ReadByOrder<string>("R_wheel_SN", "4.1");
                //var res2 = client.ReadByOrder<string>("R_wheel_SN", "4.2");
                //日志写入
                //WriteDBLog.Info("一二单元调度", "4.1:" + res1 + ";4.2:" + res2, "PCS");
                //执行完成时间
                //Console.WriteLine(DateTime.Now);
                #endregion
                #region     æ·»åŠ PLC地址信息
                //VOLContext Context = new VOLContext();
                //Idt_plcinfodetailRepository dt_PlcinfodetailService = new dt_plcinfodetailRepository(Context);
                //List<dt_plcinfodetail> plcinfodetails = new List<dt_plcinfodetail>();
                //for (int i = 106; i <= 110; i++)
                //{
                //    dt_plcinfodetail dt_Plcinfodetail = new dt_plcinfodetail()
                //    {
                //        plcdetail_id = Guid.NewGuid(),
                //        plcdetail_iotype = "One_two_unit",
                //        plcdetail_db = "DB400",
                //        plcdetail_value = "DBX" + ((i - 1) * 30),
                //        plcdetail_valtype = "string",
                //        plcdetail_len = 20,
                //        plcdetail_name = "R_wheel_SN",
                //        plcdetail_number = "7." + (i - 80),
                //        plcdetail_remark = "读取车轮SN号"
                //    };
                //    plcinfodetails.Add(dt_Plcinfodetail);
                //    dt_plcinfodetail dt_Plcinfodetail1 = new dt_plcinfodetail()
                //    {
                //        plcdetail_id = Guid.NewGuid(),
                //        plcdetail_iotype = "One_two_unit",
                //        plcdetail_db = "DB400",
                //        plcdetail_value = "DBX" + ((i - 1) * 30 + 20),
                //        plcdetail_valtype = "int",
                //        plcdetail_name = "R_wheel_type",
                //        plcdetail_number = "7." + (i - 80),
                //        plcdetail_remark = "读取车轮类型"
                //    };
                //    plcinfodetails.Add(dt_Plcinfodetail1);
                //    dt_plcinfodetail dt_Plcinfodetail2 = new dt_plcinfodetail()
                //    {
                //        plcdetail_id = Guid.NewGuid(),
                //        plcdetail_iotype = "One_two_unit",
                //        plcdetail_db = "DB400",
                //        plcdetail_value = "DBX" + ((i - 1) * 30 + 22),
                //        plcdetail_valtype = "byte",
                //        plcdetail_name = "R_part_status",
                //        plcdetail_number = "7." + (i - 80),
                //        plcdetail_remark = "读取车轮零件状态"
                //    };
                //    plcinfodetails.Add(dt_Plcinfodetail2);
                //    dt_plcinfodetail dt_Plcinfodetail3 = new dt_plcinfodetail()
                //    {
                //        plcdetail_id = Guid.NewGuid(),
                //        plcdetail_iotype = "One_two_unit",
                //        plcdetail_db = "DB400",
                //        plcdetail_value = "DBX" + ((i - 1) * 30 + 23),
                //        plcdetail_valtype = "byte",
                //        plcdetail_name = "R_part_process",
                //        plcdetail_number = "7." + (i - 80),
                //        plcdetail_remark = "读取车轮零件工艺"
                //    };
                //    plcinfodetails.Add(dt_Plcinfodetail3);
                //    dt_plcinfodetail dt_Plcinfodetail4 = new dt_plcinfodetail()
                //    {
                //        plcdetail_id = Guid.NewGuid(),
                //        plcdetail_iotype = "One_two_unit",
                //        plcdetail_db = "DB400",
                //        plcdetail_value = "DBX" + ((i - 1) * 30 + 24),
                //        plcdetail_valtype = "byte",
                //        plcdetail_name = "R_machine_nr",
                //        plcdetail_number = "7." + (i - 80),
                //        plcdetail_remark = "读取辊道machine_nr"
                //    };
                //    plcinfodetails.Add(dt_Plcinfodetail4);
                //    dt_plcinfodetail dt_Plcinfodetail5 = new dt_plcinfodetail()
                //    {
                //        plcdetail_id = Guid.NewGuid(),
                //        plcdetail_iotype = "One_two_unit",
                //        plcdetail_db = "DB400",
                //        plcdetail_value = "DBX" + ((i - 1) * 30 + 25),
                //        plcdetail_valtype = "byte",
                //        plcdetail_name = "R_direction",
                //        plcdetail_number = "7." + (i - 80),
                //        plcdetail_remark = "读取辊道direction"
                //    };
                //    plcinfodetails.Add(dt_Plcinfodetail5);
                //}
                //dt_PlcinfodetailService.AddRange(plcinfodetails, true);
                #endregion
                VOLContext Context = new VOLContext();
                Idt_plcinfoheadRepository repository = new dt_plcinfoheadRepository(Context);
                Idt_plcinfodetailRepository plcRepository = new dt_plcinfodetailRepository(Context);
                PropertyInfo[] propertyInfos = typeof(GDXDB).GetProperties();//获取所有属性
                var plc = repository.FindFirst(x => x.plcinfo_name == client.PLCName);
                var numbers = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep).GroupBy(x => x.plcdetail_number).ToList();
                foreach (var number in numbers)
                {
                    GDXDB dBItem = gDXDBs.Where(x => x.R_Name == number.Key).FirstOrDefault();
                    if (dBItem == null)
                    {
                        dBItem = new();
                        dBItem.OnReadSignal += HandleReadSignal;
                        gDXDBs.Add(dBItem);
                        //object obj = dBItem.R_part_status;
                        //dBItem.R_part_status = client.Read<byte>(number.Key);
                    }
                    List<dt_plcinfodetail> details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == number.Key).ToList();
                    for (int i = 0; i < propertyInfos.Length; i++)
                    {
                        if (i == 0)
                        {
                            dBItem.R_Name = number.Key;
                        }
                        else
                        {
                            object readData = DBExtension.Read(details.Where(x => x.plcdetail_name == propertyInfos[i].Name).FirstOrDefault(), client);
                            if (readData != null) { }
                            object obj = propertyInfos[i].GetValue(dBItem);
                            if (obj != readData)
                                propertyInfos[i].SetValue(dBItem, readData);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        public void HandleReadSignal(GDXDB DBItem)
        {
            VOLContext Context = new VOLContext();
            Idt_ActualProductionRepository repository = new dt_ActualProductionRepository(Context);
            var info = repository.FindFirst(x => x.SN == DBItem.R_wheel_SN);//查询车轮的详细信息
            if (info != null)
            {
                //告诉桁架
            }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_WCS.Jobs;
using WIDESEA_WCS.JobsPart.Common;
using WIDESEA_WCS.WCSClient;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
namespace WIDESEA_WCS
{
    [DisallowConcurrentExecution]
    public class AutoTaskJob : JobBase, IJob
    {
        LocationCreation Creation = new LocationCreation();
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                ExecuteJob(context, DoAction);
            }
            catch { }
            return Task.CompletedTask;
        }
        private void DoAction(IJobExecutionContext context)
        {
            //throw new NotImplementedException();
            Creation.HCJCreation();
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/LocationCreation.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.FreeDB;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.JobsPart.Common
{
    public class LocationCreation
    {
        FreeDB freeDB = new FreeDB();
        public void HCJCreation()
        {
            try
            {
                List<dt_stationinfo> stationinfos = new List<dt_stationinfo>();
                for (int i = 1; i <= 3; i++)
                {
                    for (int j = 1; j <= 3; j++)
                    {
                        dt_stationinfo stationinfo = new dt_stationinfo();
                        stationinfo.id = Guid.NewGuid();
                        stationinfo.stationCode = "X0" + i + (i <= 9 ? "00" + i : "0" + i) + (j <= 9 ? "00" + j : "0" + j);
                        stationinfo.area = "5";
                        stationinfo.enable = true;
                        stationinfo.line = i;
                        stationinfo.column = j;
                        stationinfos.Add(stationinfo);
                    }
                }
                freeDB.AddRange(stationinfos);
            }
            catch (Exception ex)
            {
                throw;
            }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Repositories/WCS/dt_MachineinfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹dt_MachineinfoRepository编写代码
 */
using WIDESEA_WCS.IRepositories;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.Repositories
{
    public partial class dt_MachineinfoRepository : RepositoryBase<dt_Machineinfo> , Idt_MachineinfoRepository
    {
    public dt_MachineinfoRepository(VOLContext dbContext)
    : base(dbContext)
    {
    }
    public static Idt_MachineinfoRepository Instance
    {
      get {  return AutofacContainerModule.GetService<Idt_MachineinfoRepository>(); } }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Repositories/system/dt_stationinfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹dt_stationinfoRepository编写代码
 */
using WIDESEA_WCS.IRepositories;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.Repositories
{
    public partial class dt_stationinfoRepository : RepositoryBase<dt_stationinfo> , Idt_stationinfoRepository
    {
    public dt_stationinfoRepository(VOLContext dbContext)
    : base(dbContext)
    {
    }
    public static Idt_stationinfoRepository Instance
    {
      get {  return AutofacContainerModule.GetService<Idt_stationinfoRepository>(); } }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/VV_DispatchService.cs
@@ -1,11 +1,15 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using Quartz;
using Quartz.Impl.Matchers;
using System.Diagnostics;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Core.Extensions;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Core.FreeDB;
using WIDESEA_Core.ManageUser;
using WIDESEA_Core.Services;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IRepositories;
@@ -65,18 +69,21 @@
                    {
                        if (cooRes.Status)
                        {
                            WriteDBLog.Success($"开启服务", new { æ•°æ® = "服务启动成功!" }, "PCS", UserContext.Current.UserTrueName);
                            return webResponse.OK("服务启动成功!");
                        }
                        else
                        {
                            //返回PLC异常
                            WriteDBLog.Error($"开启服务", new { æ•°æ® = cooRes }, "PCS", UserContext.Current.UserTrueName);
                            return cooRes;
                        }
                    }
                    else
                    {
                        //调度启动失败,关闭全部
                        WriteLog.Write_Log("服务", "服务", "启动服务\n[调度异常]" + startRes.Message);
                        //WriteLog.Write_Log("服务", "服务", "启动服务\n[调度异常]" + startRes.Message);
                        WriteDBLog.Error($"开启服务", new { æ•°æ® = startRes.Message }, "PCS", UserContext.Current.UserTrueName);
                        return startRes;
                    }
                }
@@ -87,7 +94,8 @@
            }
            catch (Exception ex)
            {
                WriteLog.Write_Log("服务", "服务", "启动服务\n[异常]" + ex.Message);
                //WriteLog.Write_Log("服务", "服务", "启动服务\n[异常]" + ex.Message);
                WriteDBLog.Error($"开启服务", new { æ•°æ® = ex.Message }, "PCS", UserContext.Current.UserTrueName);
                return webResponse.Error($"异常,{ex.Message}");
            }
        }
@@ -125,7 +133,8 @@
            var plcList = freeDB.Select<dt_plcinfohead>().Where("EXISTS (select * from dt_equipmentinfo where equipment_state='Enable' and equipment_name=a.plcinfo_name)").ToList();
            if (plcList.Count == 0)
            {
                throw new Exception("未配置任何PLC连接对象!");
                return content.OK();
                //throw new Exception("未配置任何PLC连接对象!");
            }
            var detialList = freeDB.Select<dt_plcinfodetail>().ToList();
@@ -227,6 +236,8 @@
                {
                    order.dbAddress = item.plcdetail_db + "." + item.plcdetail_value;
                }
                order.dataLen = item.plcdetail_len;
                order.Methods = item.plcdetail_number;//
                itmes.Add(order);
            }
            return itmes;
@@ -252,10 +263,13 @@
                scheduler.Shutdown();
                Console.WriteLine("服务关闭成功!");
                WriteLog.Write_Log("服务", "服务", "服务关闭成功!");
                WriteDBLog.Success($"关闭服务", new { æ•°æ® = "服务关闭成功!" }, "PCS", UserContext.Current.UserTrueName);
            }
            catch (Exception ex)
            {
                WriteLog.Write_Log("服务", "服务", "关闭服务\n[异常]" + ex.Message);
                WriteDBLog.Error($"关闭服务", new { æ•°æ® = ex.Message }, "PCS", UserContext.Current.UserTrueName);
                return webResponse.Error(ex.Message);
            }
            return webResponse.OK("服务关闭成功!");
        }
@@ -268,28 +282,40 @@
        public WebResponseContent StartJob(string jobName)
        {
            WebResponseContent webResponse = new WebResponseContent();
            try
            {
            if (!scheduler.IsRun())
            {
                return webResponse.Error("请先启动服务!");
                    throw new Exception("请先启动服务!");
                    //return webResponse.Error("请先启动服务!");
            }
            var jobData = freeDB.Select<VV_Dispatch>().Where(t => t.JobName == jobName).First();
            if (jobData == null)
            {
                webResponse.Error($"调度{jobName}不存在!");
                    throw new Exception($"调度{jobName}不存在!");
                    //webResponse.Error($"调度{jobName}不存在!");
            }
            else
            {
                var job = scheduler.GetJobByJobName(jobName);
                if (job != null)
                {
                    webResponse.Error($"调度{jobName}已是执行状态!");
                        throw new Exception($"调度{jobName}已是执行状态!");
                        //webResponse.Error($"调度{jobName}已是执行状态!");
                }
                else
                {
                    scheduler.AddJob(jobData);
                    webResponse.OK("调度添加成功");
                        webResponse.OK($"调度{jobName}执行成功!");
                }
            }
            }
            catch (Exception ex)
            {
                WriteDBLog.Error($"执行{jobName}调度", new { æ•°æ® = ex.Message }, "PCS", UserContext.Current.UserTrueName);
                return webResponse.Error(ex.Message);
            }
            WriteDBLog.Success($"执行{jobName}调度", new { æ•°æ® = jobName + "执行成功!" }, "PCS", UserContext.Current.UserTrueName);
            return webResponse;
        }
@@ -302,25 +328,37 @@
        public WebResponseContent CloseJob(string jobName)
        {
            WebResponseContent webResponse = new WebResponseContent();
            try
            {
            if (!scheduler.IsRun())
            {
                return webResponse.Error("请先启动服务!");
                    throw new Exception("请先启动服务!");
                    //return webResponse.Error("请先启动服务!");
            }
            var job = scheduler.GetJobByJobName(jobName);
            if (job == null)
            {
                return webResponse.Error($"任务{jobName},不存在!");
                    throw new Exception($"任务{jobName},不存在!");
                    //return webResponse.Error($"任务{jobName},不存在!");
            }
            var res = scheduler.RemoveJob(job);
            if (res)
            {
                webResponse.OK($"调度{jobName}关闭成功!");
                    webResponse.OK($"调度{jobName}暂停成功!");
            }
            else
            {
                webResponse.Error($"调度{jobName}关闭失败!");
                    throw new Exception($"调度{jobName}暂停失败!");
                    //webResponse.Error($"调度{jobName}关闭失败!");
            }
            }
            catch (Exception ex)
            {
                WriteDBLog.Error($"暂停{jobName}调度", new { æ•°æ® = ex.Message }, "PCS", UserContext.Current.UserTrueName);
                return webResponse.Error(ex.Message);
            }
            WriteDBLog.Success($"暂停{jobName}调度", new { æ•°æ® = jobName + "暂停成功!" }, "PCS", UserContext.Current.UserTrueName);
            return webResponse;
        }
@@ -365,5 +403,69 @@
            }
            return data;
        }
        public override WebResponseContent Upload(List<IFormFile> files)
        {
            #region
            WebResponseContent Response = new WebResponseContent();
            if (files == null || files.Count == 0) return Response.Error("请上传文件");
            string msg = "";
            string IP = "\\\\" + "192.168.1.35" + "\\ipc$";
            string password = "971204";
            string User = "dell";
            int i = 0;
            string filePath = $"\\\\192.168.1.35\\TextTest";
            string fullPath = filePath.MapPath(true);
            Process process = new Process();
            try
            {
                process.StartInfo.FileName = "cmd.exe";
                process.StartInfo.UseShellExecute = false;
                process.StartInfo.RedirectStandardInput = true;
                process.StartInfo.RedirectStandardOutput = true;
                process.StartInfo.RedirectStandardError = true;
                process.StartInfo.CreateNoWindow = true;
                process.Start();
                string dosLine = "net use " + IP + " " + password + " /user:" + User;
                process.StandardInput.WriteLine(dosLine);
                process.StandardInput.WriteLine("exit");
                while (!process.HasExited)
                {
                    process.WaitForExit(1000);
                }
                msg = process.StandardError.ReadToEnd();
                process.StandardError.Close();
                if (msg != "")
                    throw new Exception(msg);
                if (!Directory.Exists(fullPath)) Directory.CreateDirectory(fullPath);
                for (i = 0; i < files.Count; i++)
                {
                    string fileName = files[i].FileName;
                    fullPath = fullPath + "/" + fileName;
                    using (var stream = new FileStream(fullPath, FileMode.Create))
                    {
                        files[i].CopyTo(stream);
                    }
                    //FileStream outFileStream = new FileStream(fullPath, FileMode.Create);
                    //files[i].CopyTo(outFileStream);
                }
                return Response.OK("文件上传成功", filePath);
            }
            catch (Exception ex)
            {
                //return Response.Error(ex.Message);
                Logger.Error($"上传文件失败:{typeof(T).GetEntityTableCnName()},路径:{filePath},失败文件:{files[i]},{ex.Message + ex.StackTrace}");
                return Response.Error("文件上传失败");
            }
            finally
            {
                process.Close();
                process.Dispose();
            }
            #endregion
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_MachineinfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,164 @@
/*
 *所有关于dt_Machineinfo类的业务代码应在此处编写
*可使用repository.调用常用方法,获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*dt_MachineinfoService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
using System.Linq;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
using WIDESEA_Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_WCS.IRepositories;
using Newtonsoft.Json;
using Microsoft.AspNetCore.Mvc.RazorPages;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System.Diagnostics;
using WIDESEA_Core.Services;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Core.ManageUser;
namespace WIDESEA_WCS.Services
{
    public partial class dt_MachineinfoService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly Idt_MachineinfoRepository _repository;//访问数据库
        [ActivatorUtilitiesConstructor]
        public dt_MachineinfoService(
            Idt_MachineinfoRepository dbRepository,
            IHttpContextAccessor httpContextAccessor
            )
        : base(dbRepository)
        {
            _httpContextAccessor = httpContextAccessor;
            _repository = dbRepository;
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
        public override WebResponseContent Update(SaveModel saveModel)
        {
            return base.Update(saveModel);
        }
        #region ä¼ è¾“文件状态设为允许
        public WebResponseContent UpdateEnable(string saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            var model = JsonConvert.DeserializeObject<dt_Machineinfo>(saveModel);
            model.Enable = 1;
            var cont = _repository.Update(model, true);
            if (cont > 0)
                content.OK(model.Name + "设置为允许传输文件成功!");
            else
                content.Error(model.Name + "设置为允许传输文件失败!");
            //var
            return content;
        }
        #endregion
        #region ä¼ è¾“文件状态设为禁止
        public WebResponseContent UpdateDisEnable(string saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            var model = JsonConvert.DeserializeObject<dt_Machineinfo>(saveModel);
            model.Enable = 0;
            var cont = _repository.Update(model, true);
            if (cont > 0)
                content.OK(model.Name + "设置为禁止传输文件成功!");
            else
                content.Error(model.Name + "设置为禁止传输文件失败!");
            //var
            return content;
        }
        #endregion
        #region è¿œç¨‹æ–‡ä»¶ä¼ è¾“
        public override WebResponseContent Upload(List<IFormFile> files)
        {
            WebResponseContent Response = new WebResponseContent();
            if (files == null || files.Count == 0) return Response.Error("请上传文件");
            List<string> requestTemps = new List<string>();
            string filePath = "";
            var Machineinfos = _repository.Find(x => x.Enable == 1);
            if (Machineinfos.Count < 1)
                return Response.Error("未找到允许传输文件的机床!");
            try
            {
                foreach (var machineinfo in Machineinfos)
                {
                    Process process = new Process();
                    process.StartInfo.FileName = "cmd.exe";
                    process.StartInfo.UseShellExecute = false;
                    process.StartInfo.RedirectStandardInput = true;
                    process.StartInfo.RedirectStandardOutput = true;
                    process.StartInfo.RedirectStandardError = true;
                    process.StartInfo.CreateNoWindow = true;
                    process.Start();
                    string IP = "\\\\" + machineinfo.IP + "\\ipc$";
                    filePath = $"\\\\" + machineinfo.IP + "\\" + machineinfo.FolderName;
                    string fullPath = filePath.MapPath(true);
                    string fileName = "";
                    try
                    {
                        string dosLine = "net use " + IP + " " + machineinfo.Password + " /user:" + machineinfo.User;
                        process.StandardInput.WriteLine(dosLine);
                        process.StandardInput.WriteLine("exit");
                        while (!process.HasExited)
                        {
                            process.WaitForExit(1000);
                        }
                        string msg = process.StandardError.ReadToEnd();
                        process.StandardError.Close();
                        if (msg != "")
                            throw new Exception(machineinfo.Name + msg);
                        if (!Directory.Exists(fullPath)) Directory.CreateDirectory(fullPath);
                        int i = 0;
                        for (i = 0; i < files.Count; i++)
                        {
                            fileName = files[i].FileName;
                            fullPath = fullPath + "/" + fileName;
                            using (var stream = new FileStream(fullPath, FileMode.Create))
                            {
                                files[i].CopyTo(stream);
                            }
                            //FileStream outFileStream = new FileStream(fullPath, FileMode.Create);
                            //files[i].CopyTo(outFileStream);
                            var requestTemp = machineinfo.Name + ":下载文件路径:" + fullPath + ";下载文件名称:" + fileName + ";下载成功!";
                            requestTemps.Add(requestTemp);
                        }
                    }
                    catch (Exception ex)
                    {
                        var requestTemp = machineinfo.Name + ":下载文件路径:" + fullPath + ";下载文件名称:" + fileName + ";下载失败!" + ex.Message;
                        requestTemps.Add(requestTemp);
                        throw;
                    }
                    finally
                    {
                        process.Close();
                        process.Dispose();
                    }
                }
                WriteDBLog.Success($"机床程序下载", new { æ•°æ® = requestTemps }, "PCS", UserContext.Current.UserTrueName);
                return Response.OK("文件传输成功!", filePath);
            }
            catch (Exception ex)
            {
                WriteDBLog.Error($"机床程序下载", new { æ•°æ® = requestTemps }, "PCS", UserContext.Current.UserTrueName);
                return Response.Error(ex.Message + "文件传输失败!");
            }
        }
        #endregion
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_equipmentinfoService.cs
@@ -20,6 +20,7 @@
using WIDESEA_Core.FreeDB;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Core.ManageUser;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
namespace WIDESEA_WCS.Services
{
@@ -49,6 +50,7 @@
        public WebResponseContent ChangEquipmentState(SaveModel model)
        {
            WebResponseContent content = new WebResponseContent();
            List<dt_equipmentinfo> equipmentinfos = new List<dt_equipmentinfo>();
            try
            {
                FreeDB freeDB = new FreeDB();
@@ -58,12 +60,15 @@
                    keys.Add(Guid.Parse(item.ToString()));
                }
                int res = freeDB.Update<dt_equipmentinfo>().Set(t => t.equipment_state == model.Extra.ToString()).Where(t => keys.Contains(t.equipment_id)).ExecuteAffrows();
                equipmentinfos = freeDB.Select<dt_equipmentinfo>().Where(x => keys.Contains(x.equipment_id)).ToList();
                content.OK();
                WriteLog.Write_Log("基础信息修改", "updateEqState", UserContext.Current.UserName + "修改成功," + res, model);
                //WriteLog.Write_Log("基础信息修改", "updateEqState", UserContext.Current.UserName + "修改成功," + res, model);
                WriteDBLog.Success($"{(model.Extra.ToString() == "Enable" ? "启用设备" : "禁用设备")}", new { æ•°æ® = equipmentinfos }, "PCS", UserContext.Current.UserTrueName);
            }
            catch (Exception ex)
            {
                WriteLog.Write_Log("基础信息修改", "updateEqState", UserContext.Current.UserName + "修改异常," + ex.Message, model);
                //WriteLog.Write_Log("基础信息修改", "updateEqState", UserContext.Current.UserName + "修改异常," + ex.Message, model);
                WriteDBLog.Error($"{(model.Extra.ToString() == "Enable" ? "启用设备" : "禁用设备")}", new { æ•°æ® = equipmentinfos }, "PCS", UserContext.Current.UserTrueName);
                content.Error(ex.Message);
            }
            return content;
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/dt_MachineinfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
/*
 *Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
 *所有业务编写全部应在Partial文件夹下dt_MachineinfoService与Idt_MachineinfoService中编写
 */
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.IServices;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.Services
{
    public partial class dt_MachineinfoService : ServiceBase<dt_Machineinfo, Idt_MachineinfoRepository>
    , Idt_MachineinfoService, IDependency
    {
    public dt_MachineinfoService(Idt_MachineinfoRepository repository)
    : base(repository)
    {
    Init(repository);
    }
    public static Idt_MachineinfoService Instance
    {
      get { return AutofacContainerModule.GetService<Idt_MachineinfoService>(); } }
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/system/Partial/dt_stationinfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
/*
 *所有关于dt_stationinfo类的业务代码应在此处编写
*可使用repository.调用常用方法,获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*dt_stationinfoService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
using System.Linq;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
using WIDESEA_Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_WCS.IRepositories;
namespace WIDESEA_WCS.Services
{
    public partial class dt_stationinfoService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly Idt_stationinfoRepository _repository;//访问数据库
        [ActivatorUtilitiesConstructor]
        public dt_stationinfoService(
            Idt_stationinfoRepository dbRepository,
            IHttpContextAccessor httpContextAccessor
            )
        : base(dbRepository)
        {
            _httpContextAccessor = httpContextAccessor;
            _repository = dbRepository;
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
  }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/system/dt_stationinfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
/*
 *Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
 *所有业务编写全部应在Partial文件夹下dt_stationinfoService与Idt_stationinfoService中编写
 */
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.IServices;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.Services
{
    public partial class dt_stationinfoService : ServiceBase<dt_stationinfo, Idt_stationinfoRepository>
    , Idt_stationinfoService, IDependency
    {
    public dt_stationinfoService(Idt_stationinfoRepository repository)
    : base(repository)
    {
    Init(repository);
    }
    public static Idt_stationinfoService Instance
    {
      get { return AutofacContainerModule.GetService<Idt_stationinfoService>(); } }
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/WCSClient/DBExtension.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.WCSClient
{
    public class DBExtension
    {
        /// <summary>
        ///
        /// </summary>
        /// <param name="detail">设备信息地址</param>
        /// <param name="client"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public static object Read(dt_plcinfodetail detail, PLCClient client)
        {
                if (detail.plcdetail_valtype == typeof(int).Name.ToLower())//4字节,有符号类型
                {
                    return (client.Read<int>(detail.plcdetail_db+"."+detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(uint).Name.ToLower())//4字节,无符号类型
                {
                    return (client.Read<uint>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(short).Name.ToLower())//2字节,有符号类型,最常用
                {
                    return (client.Read<short>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(ushort).Name.ToLower())//2字节,无符号类型
                {
                    return (client.Read<ushort>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(float).Name.ToLower())//浮点型
                {
                    return (client.Read<float>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(bool).Name.ToLower())
                {
                    return (client.Read<bool>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(byte).Name.ToLower())//字节
                {
                    return (client.Read<byte>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(string).Name.ToLower())//字符串
                {
                    return (client.Read<string>(detail.plcdetail_db + "." + detail.plcdetail_value, detail.plcdetail_len.GetValueOrDefault()));
                }
                else
                {
                    throw new Exception($"【{detail.plcdetail_remark}】,DB地址{detail.plcdetail_db + "." + detail.plcdetail_value},未定义数据类型{detail.plcdetail_valtype}");
                }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/WCSClient/DBItemGroup.cs
@@ -26,7 +26,7 @@
        /// <summary>
        /// æ•°æ®é•¿åº¦
        /// </summary>
        public int dataLen { get; set; }
        public int? dataLen { get; set; }
        /// <summary>
        /// å¤„理方法
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/WCSClient/Melsec/MelsecMcClient.cs
@@ -129,7 +129,7 @@
        /// </summary>
        /// <param name="orderName">IO点名称</param>
        /// <returns></returns>
        public override DataType ReadByOrder<DataType>(string orderName)
        public override DataType ReadByOrder<DataType>(string orderName, string Method = null)
        {
            var item = itemGroups.Where(t => t.name.Equals(orderName)).FirstOrDefault();
            if (item == null)
@@ -244,7 +244,7 @@
        /// </summary>
        /// <param name="orderName"></param>
        /// <exception cref="Exception"></exception>
        public override bool WriteByOrder(string orderName, object value)
        public override bool WriteByOrder(string orderName, object value, string Method = null)
        {
            lock (_lockWrite)
            {
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/WCSClient/ModelBus/ModelBusClient.cs
@@ -129,7 +129,7 @@
        /// </summary>
        /// <param name="orderName">IO点名称</param>
        /// <returns></returns>
        public override DataType ReadByOrder<DataType>(string orderName)
        public override DataType ReadByOrder<DataType>(string orderName, string Method = null)
        {
            var item = itemGroups.Where(t => t.name.Equals(orderName)).FirstOrDefault();
            if (item == null)
@@ -244,7 +244,7 @@
        /// </summary>
        /// <param name="orderName"></param>
        /// <exception cref="Exception"></exception>
        public override bool WriteByOrder(string orderName, object value)
        public override bool WriteByOrder(string orderName, object value, string Method = null)
        {
            lock (_lockWrite)
            {
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/WCSClient/PLCClient.cs
@@ -113,11 +113,15 @@
        /// <param name="orderName"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public virtual DataType ReadByOrder<DataType>(string orderName)
        public virtual DataType ReadByOrder<DataType>(string orderName, string Method = null)
        {
            throw new NotImplementedException();
        }
        public object ReadValues(string equipNum)
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// å†™å…¥æ•°æ®ï¼Œæ ¹æ®DB地址
        /// </summary>
@@ -137,7 +141,7 @@
        /// <param name="value"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public virtual bool WriteByOrder(string orderName , object value)
        public virtual bool WriteByOrder(string orderName, object value, string Method = null)
        {
            throw new NotImplementedException();
        }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/WCSClient/Siemens/SiemensPLCClient.cs
@@ -145,9 +145,10 @@
        /// </summary>
        /// <param name="orderName">IO点名称</param>
        /// <returns></returns>
        public override DataType ReadByOrder<DataType>(string orderName)
        public override DataType ReadByOrder<DataType>(string orderName, string Method = null)
        {
            var item = itemGroups.Where(t => t.name.Equals(orderName)).FirstOrDefault();
            if (Method != null) { item = itemGroups.Where(t => t.name.Equals(orderName) && t.Methods.Equals(Method)).FirstOrDefault(); }
            if (item == null)
            {
                throw new Exception($"PLC{PLCName},未定义指令{orderName}");
@@ -188,7 +189,7 @@
            else if (typeof(DataType) == typeof(string))//字符串
            {
                var str = GetContent(siemensPLCClient.ReadString(item.dbAddress, (ushort)item.dataLen), item).ToString();
                str = str.Replace("\0", "");
                str = str.Replace("\0", "")?.Replace("\\", "")?.Replace("\u0014", "")?.Replace("?\u0006", "");
                return (DataType)(str as object);
            }
            else
@@ -264,11 +265,12 @@
        /// </summary>
        /// <param name="orderName"></param>
        /// <exception cref="Exception"></exception>
        public override bool WriteByOrder(string orderName, object value)
        public override bool WriteByOrder(string orderName, object value, string Method = null)
        {
            lock (_lockWrite)
            {
                var item = itemGroups.Where(t => t.name.Equals(orderName)).FirstOrDefault();
                if (Method != null) { item = itemGroups.Where(t => t.name.Equals(orderName) && t.Methods.Equals(Method)).FirstOrDefault(); }
                if (item == null)
                {
                    throw new Exception($"PLC{PLCName},未定义指令{orderName}");
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/WIDESEA_WCS.csproj
@@ -13,10 +13,6 @@
  </ItemGroup>
  <ItemGroup>
    <Folder Include="JobsPart\" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="HslCommunication" Version="11.3.3" />
    <PackageReference Include="Quartz" Version="3.6.3" />
  </ItemGroup>
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_System/Partial/dt_log_pcsController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
/*
 *接口编写处...
*如果接口需要做Action的权限验证,请在Action上使用属性
*如: [ApiActionPermission("dt_log_pcs",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_Entity.DomainModels;
using WIDESEA_System.IServices;
namespace WIDESEA_System.Controllers
{
    public partial class dt_log_pcsController
    {
        private readonly Idt_log_pcsService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;
        [ActivatorUtilitiesConstructor]
        public dt_log_pcsController(
            Idt_log_pcsService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_System/dt_log_pcsController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果要增加方法请在当前目录下Partial文件夹dt_log_pcsController编写
 */
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Controllers.Basic;
using WIDESEA_Entity.AttributeManager;
using WIDESEA_System.IServices;
namespace WIDESEA_System.Controllers
{
    [Route("api/dt_log_pcs")]
    [PermissionTable(Name = "dt_log_pcs")]
    public partial class dt_log_pcsController : ApiBaseController<Idt_log_pcsService>
    {
        public dt_log_pcsController(Idt_log_pcsService service)
        : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/Partial/VV_DispatchController.cs
@@ -81,5 +81,15 @@
        {
            return _service.CheckServeState();
        }
        ///// <summary>
        ///// ä¸Šä¼ æ–‡ä»¶
        ///// </summary>
        ///// <returns></returns>
        //[HttpGet, HttpPost, Route("UploadFile"), AllowAnonymous]
        //public WebResponseContent Upload(List<IFormFile> files)
        //{
        //    return _service.Upload(files);
        //}
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/Partial/dt_MachineinfoController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
/*
 *接口编写处...
*如果接口需要做Action的权限验证,请在Action上使用属性
*如: [ApiActionPermission("dt_Machineinfo",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IServices;
using Microsoft.AspNetCore.Authorization;
using WIDESEA_Core.Utilities;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Newtonsoft.Json;
namespace WIDESEA_WCS.Controllers
{
    public partial class dt_MachineinfoController
    {
        private readonly Idt_MachineinfoService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;
        [ActivatorUtilitiesConstructor]
        public dt_MachineinfoController(
            Idt_MachineinfoService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
        /// <summary>
        /// ä¼ è¾“文件状态设为允许
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("UpdateEnable"), AllowAnonymous]
        public WebResponseContent UpdateEnable([FromBody] object saveModel)
        {
            return _service.UpdateEnable(JsonConvert.SerializeObject(saveModel));
        }
        /// <summary>
        /// ä¼ è¾“文件状态设为禁止
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("UpdateDisEnable"), AllowAnonymous]
        public WebResponseContent UpdateDisEnable([FromBody] object saveModel)
        {
            return _service.UpdateDisEnable(JsonConvert.SerializeObject(saveModel));
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/Partial/dt_stationinfoController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
/*
 *接口编写处...
*如果接口需要做Action的权限验证,请在Action上使用属性
*如: [ApiActionPermission("dt_stationinfo",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IServices;
namespace WIDESEA_WCS.Controllers
{
    public partial class dt_stationinfoController
    {
        private readonly Idt_stationinfoService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;
        [ActivatorUtilitiesConstructor]
        public dt_stationinfoController(
            Idt_stationinfoService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/dt_MachineinfoController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果要增加方法请在当前目录下Partial文件夹dt_MachineinfoController编写
 */
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Controllers.Basic;
using WIDESEA_Entity.AttributeManager;
using WIDESEA_WCS.IServices;
namespace WIDESEA_WCS.Controllers
{
    [Route("api/dt_Machineinfo")]
    [PermissionTable(Name = "dt_Machineinfo")]
    public partial class dt_MachineinfoController : ApiBaseController<Idt_MachineinfoService>
    {
        public dt_MachineinfoController(Idt_MachineinfoService service)
        : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/dt_stationinfoController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果要增加方法请在当前目录下Partial文件夹dt_stationinfoController编写
 */
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Controllers.Basic;
using WIDESEA_Entity.AttributeManager;
using WIDESEA_WCS.IServices;
namespace WIDESEA_WCS.Controllers
{
    [Route("api/dt_stationinfo")]
    [PermissionTable(Name = "dt_stationinfo")]
    public partial class dt_stationinfoController : ApiBaseController<Idt_stationinfoService>
    {
        public dt_stationinfoController(Idt_stationinfoService service)
        : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/20231220/Template/µ÷¶ÈÐÅÏ¢20231220090759.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/20231220/Template/µ÷¶ÈÐÅÏ¢20231220095958.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/20240108/Template/µ÷¶ÈÐÅÏ¢20240108151655.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/20240108/Template/µ÷¶ÈÐÅÏ¢20240108171608.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/20240109/Template/µ÷¶ÈÐÅÏ¢20240109112529.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/¹¤µ¥ÐÅÏ¢20240108145121.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/¹¤µ¥ÐÅÏ¢20240108151140.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/¹¤µ¥ÐÅÏ¢20240108154639.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/¹¤µ¥ÐÅÏ¢20240108155539.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/µ÷¶ÈÐÅÏ¢20240108170025.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/µ÷¶ÈÐÅÏ¢20240108171108.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Download/ExcelExport/20240108/µ÷¶ÈÐÅÏ¢20240108172416.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/386607d7-fcf9-46bf-9449-0d1d962acc56_Ì«Ô­ÖØ¹¤Á÷³ÌÒÉÎÊ.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/3a206465-b647-4a96-8504-0281697d2373_CADReader.exe
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/5a8b9fc7-1ed4-411a-99dc-1e8769650591_Ì«ÖØÏîÄ¿ÒÉÎʵã.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/7c10cb80-b2d0-42f7-a2a4-b75b913a5283_CADReader.exe
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20231220/VV_Dispatch/b2660e45-900f-40ec-8a4a-fb4dc13842da_CADReader.exe
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/VV_Dispatch/_TSW449_3_103_PAR.SPF
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,102 @@
;************************************************
;TYHI
;Wheel: YD918 / TSW_449_3
;************************************************
;PROGRAM-TYPE: Parameter Program
;VERSION:,2023 /10/23
;************************************************
;N1145 N_CHUCK_JAWS=1 ;TYPE OF CHUCK JAWS USED, 0...4 ALLOWED
;************************************************
; DECLARATION OF THE WOKRING RANGE OF THE CHUCK *
;************************************************
N100 DEF REAL L_SPOS_SET
N110 DEF REAL L_OFFSET
N120 DEF REAL L_SPOS_LOWER
N130 DEF REAL L_SPOS_UPPER
N140 L_SPOS_SET=133+180
N150 L_OFFSET=2
N160 CHUCK_S1=90  ;新增参数A面加工时,夹具松紧类型编号
N170 CHUCK_S2=91  ;新增参数A面加工时,夹具松紧类型编号
;**************************************************
;* POSITION OF MAIN SPINDLE FOR AUTOMATIC LOADING *
;**************************************************
N180 L_SPOS_LOWER=L_SPOS_SET-L_OFFSET
N190 L_SPOS_UPPER=L_SPOS_SET+L_OFFSET
N200 IF (L_SPOS_LOWER<0.0) OR (L_SPOS_UPPER>360.0)
N210 AAA:
N220 MSG("给定主轴定向角度上下限值不在0~360度范围内")
N230 M0
N240 GOTOB AAA
N250 ENDIF
N260 N_SPOS_GANTRY_LOWER=L_SPOS_LOWER
N270 N_SPOS_GANTRY_UPPER=L_SPOS_UPPER
N280 N_SPOS_GANTRY_LOWER_OP2=L_SPOS_LOWER
N290 N_SPOS_GANTRY_UPPER_OP2=L_SPOS_UPPER
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(一)        *
;*********************************
N1000 WHEEL_UNMACHINED=138.5      ;未加工车轮轮辋宽度
N1005 WHEEL_MACHINED=131.5        ;加工后的轮辋宽度
N1010 SYM_FACTOR=0.5              ;余量分布系数
N1015 FLAT=0.14                   ;轮缘调整量
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(二)        *
;*********************************
N1020 V_CUT=120     ;           ;粗加工线速度
N1025 V_CUT_FINE=120;           ;精加工线速度
N1030 V_CUT_BORE=120
N1035 BASE_F=1                  ;粗加工进给速度
N1040 BASE_F_FINE=1             ;精加工进给速度
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(三)        *
;*********************************
N1045 TREAD_DIAM_SETPOINT =918.8      ;踏面直径设定值
N1055 TREAD_DIAM = TREAD_DIAM_SETPOINT ;踏面直径
;N1075 TREAD_DIAM_MVAL_OFFSET = 0.0     ;踏面余量
;N1080 TREAD_DIAM_MACH_ALLOWANCE =4.5   ;踏面余量允差
N1085 WHEEL_HEIGHT=WHEEL_MACHINED
N1090 TREAD_HEIGHT_S2=65              ;S2的节圆高度
N1095 TREAD_HEIGHT_S1=WHEEL_HEIGHT-TREAD_HEIGHT_S2
;                                       ;S1的节圆高度
N1100 HUB_DIAM_S1=247.5                ;S1的轮毂直径
N1105 HUB_DIAM_S2=247.5                 ;S2的轮毂直径
N1110 HUB_HEIGHT_S1=160.5                 ;外辋面到内毂的距离
N1115 HUB_HEIGHT_S2=161              ;内辋面到外毂的距离
N1120 BOTTOM_DIAM_S1=803                ;内辋直径
N1125 BOTTOM_DIAM_S2=798                ;外辋直径
N1130 GLOBAL_ALLOWANCE=0                ;全局余量
N1135 TREAD_ALLOWANCE=0.8               ;踏面余量
N1140 BORE_DIAM=183.5                   ;轮毂孔径
;*********************************
;*    é’³å£å‚数设定(不设定)      *
;*********************************
;*******N1145 CLAMPING_JAW_HIGH_S1=126.5  ;S1钳口高度
;*******N1150 CLAMPING_JAW_HIGH_S2=154    ;S2钳口高度
;*********************************
;* PARAMETERS FOR CHUCK FLUSHING *
;*********************************
N300 N_WITH_FLUSHING=1         ;Chuck-Flushing after OP2?
N310 N_WITH_FLUSHING_WPTURN=1  ;Chuck-Flushing after OP1?
N320 N_FLUSHTIME=15            ;flushing time after OP2 (s)
N330 N_FLUSHTIME_WPTURN=10     ;flushing time after OP1 (s)
N340 N_FLUSH_SPSPEED=70        ;spindle speed flushing OP2 (max. 25/min
N350 N_FLUSH_SPSPEED_WPTURN=50;spindle speed flushing OP1 (max. 25/min)
N360 N_FLUSHPOS_XR=500          ;Position X-Axis
N370 N_FLUSHPOS_ZR=580          ;Position Z-Axis
N380 N_FLUSHPOS_XL=500         ;Position U-Axis
N390 N_FLUSHPOS_ZL=580         ;Position W-Axis
;******************
;* AUX PARAMETERS *
;******************
N400 N_WITH_APP_MON=0 ;1       ;pneumatic contact monitoring workpiece/chuck on/off
N410 STOPRE
N420 M17
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/200d388e-8b66-44a2-8e65-a6656639af41_TSW449_3_103_PAR.SPF
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,102 @@
;************************************************
;TYHI
;Wheel: YD918 / TSW_449_3
;************************************************
;PROGRAM-TYPE: Parameter Program
;VERSION:,2023 /10/23
;************************************************
;N1145 N_CHUCK_JAWS=1 ;TYPE OF CHUCK JAWS USED, 0...4 ALLOWED
;************************************************
; DECLARATION OF THE WOKRING RANGE OF THE CHUCK *
;************************************************
N100 DEF REAL L_SPOS_SET
N110 DEF REAL L_OFFSET
N120 DEF REAL L_SPOS_LOWER
N130 DEF REAL L_SPOS_UPPER
N140 L_SPOS_SET=133+180
N150 L_OFFSET=2
N160 CHUCK_S1=90  ;新增参数A面加工时,夹具松紧类型编号
N170 CHUCK_S2=91  ;新增参数A面加工时,夹具松紧类型编号
;**************************************************
;* POSITION OF MAIN SPINDLE FOR AUTOMATIC LOADING *
;**************************************************
N180 L_SPOS_LOWER=L_SPOS_SET-L_OFFSET
N190 L_SPOS_UPPER=L_SPOS_SET+L_OFFSET
N200 IF (L_SPOS_LOWER<0.0) OR (L_SPOS_UPPER>360.0)
N210 AAA:
N220 MSG("给定主轴定向角度上下限值不在0~360度范围内")
N230 M0
N240 GOTOB AAA
N250 ENDIF
N260 N_SPOS_GANTRY_LOWER=L_SPOS_LOWER
N270 N_SPOS_GANTRY_UPPER=L_SPOS_UPPER
N280 N_SPOS_GANTRY_LOWER_OP2=L_SPOS_LOWER
N290 N_SPOS_GANTRY_UPPER_OP2=L_SPOS_UPPER
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(一)        *
;*********************************
N1000 WHEEL_UNMACHINED=138.5      ;未加工车轮轮辋宽度
N1005 WHEEL_MACHINED=131.5        ;加工后的轮辋宽度
N1010 SYM_FACTOR=0.5              ;余量分布系数
N1015 FLAT=0.14                   ;轮缘调整量
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(二)        *
;*********************************
N1020 V_CUT=120     ;           ;粗加工线速度
N1025 V_CUT_FINE=120;           ;精加工线速度
N1030 V_CUT_BORE=120
N1035 BASE_F=1                  ;粗加工进给速度
N1040 BASE_F_FINE=1             ;精加工进给速度
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(三)        *
;*********************************
N1045 TREAD_DIAM_SETPOINT =918.8      ;踏面直径设定值
N1055 TREAD_DIAM = TREAD_DIAM_SETPOINT ;踏面直径
;N1075 TREAD_DIAM_MVAL_OFFSET = 0.0     ;踏面余量
;N1080 TREAD_DIAM_MACH_ALLOWANCE =4.5   ;踏面余量允差
N1085 WHEEL_HEIGHT=WHEEL_MACHINED
N1090 TREAD_HEIGHT_S2=65              ;S2的节圆高度
N1095 TREAD_HEIGHT_S1=WHEEL_HEIGHT-TREAD_HEIGHT_S2
;                                       ;S1的节圆高度
N1100 HUB_DIAM_S1=247.5                ;S1的轮毂直径
N1105 HUB_DIAM_S2=247.5                 ;S2的轮毂直径
N1110 HUB_HEIGHT_S1=160.5                 ;外辋面到内毂的距离
N1115 HUB_HEIGHT_S2=161              ;内辋面到外毂的距离
N1120 BOTTOM_DIAM_S1=803                ;内辋直径
N1125 BOTTOM_DIAM_S2=798                ;外辋直径
N1130 GLOBAL_ALLOWANCE=0                ;全局余量
N1135 TREAD_ALLOWANCE=0.8               ;踏面余量
N1140 BORE_DIAM=183.5                   ;轮毂孔径
;*********************************
;*    é’³å£å‚数设定(不设定)      *
;*********************************
;*******N1145 CLAMPING_JAW_HIGH_S1=126.5  ;S1钳口高度
;*******N1150 CLAMPING_JAW_HIGH_S2=154    ;S2钳口高度
;*********************************
;* PARAMETERS FOR CHUCK FLUSHING *
;*********************************
N300 N_WITH_FLUSHING=1         ;Chuck-Flushing after OP2?
N310 N_WITH_FLUSHING_WPTURN=1  ;Chuck-Flushing after OP1?
N320 N_FLUSHTIME=15            ;flushing time after OP2 (s)
N330 N_FLUSHTIME_WPTURN=10     ;flushing time after OP1 (s)
N340 N_FLUSH_SPSPEED=70        ;spindle speed flushing OP2 (max. 25/min
N350 N_FLUSH_SPSPEED_WPTURN=50;spindle speed flushing OP1 (max. 25/min)
N360 N_FLUSHPOS_XR=500          ;Position X-Axis
N370 N_FLUSHPOS_ZR=580          ;Position Z-Axis
N380 N_FLUSHPOS_XL=500         ;Position U-Axis
N390 N_FLUSHPOS_ZL=580         ;Position W-Axis
;******************
;* AUX PARAMETERS *
;******************
N400 N_WITH_APP_MON=0 ;1       ;pneumatic contact monitoring workpiece/chuck on/off
N410 STOPRE
N420 M17
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/35c8a51b-b899-411b-9f3b-e12b2a79e03d_TSW449_3_103_PAR.SPF
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,102 @@
;************************************************
;TYHI
;Wheel: YD918 / TSW_449_3
;************************************************
;PROGRAM-TYPE: Parameter Program
;VERSION:,2023 /10/23
;************************************************
;N1145 N_CHUCK_JAWS=1 ;TYPE OF CHUCK JAWS USED, 0...4 ALLOWED
;************************************************
; DECLARATION OF THE WOKRING RANGE OF THE CHUCK *
;************************************************
N100 DEF REAL L_SPOS_SET
N110 DEF REAL L_OFFSET
N120 DEF REAL L_SPOS_LOWER
N130 DEF REAL L_SPOS_UPPER
N140 L_SPOS_SET=133+180
N150 L_OFFSET=2
N160 CHUCK_S1=90  ;新增参数A面加工时,夹具松紧类型编号
N170 CHUCK_S2=91  ;新增参数A面加工时,夹具松紧类型编号
;**************************************************
;* POSITION OF MAIN SPINDLE FOR AUTOMATIC LOADING *
;**************************************************
N180 L_SPOS_LOWER=L_SPOS_SET-L_OFFSET
N190 L_SPOS_UPPER=L_SPOS_SET+L_OFFSET
N200 IF (L_SPOS_LOWER<0.0) OR (L_SPOS_UPPER>360.0)
N210 AAA:
N220 MSG("给定主轴定向角度上下限值不在0~360度范围内")
N230 M0
N240 GOTOB AAA
N250 ENDIF
N260 N_SPOS_GANTRY_LOWER=L_SPOS_LOWER
N270 N_SPOS_GANTRY_UPPER=L_SPOS_UPPER
N280 N_SPOS_GANTRY_LOWER_OP2=L_SPOS_LOWER
N290 N_SPOS_GANTRY_UPPER_OP2=L_SPOS_UPPER
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(一)        *
;*********************************
N1000 WHEEL_UNMACHINED=138.5      ;未加工车轮轮辋宽度
N1005 WHEEL_MACHINED=131.5        ;加工后的轮辋宽度
N1010 SYM_FACTOR=0.5              ;余量分布系数
N1015 FLAT=0.14                   ;轮缘调整量
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(二)        *
;*********************************
N1020 V_CUT=120     ;           ;粗加工线速度
N1025 V_CUT_FINE=120;           ;精加工线速度
N1030 V_CUT_BORE=120
N1035 BASE_F=1                  ;粗加工进给速度
N1040 BASE_F_FINE=1             ;精加工进给速度
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(三)        *
;*********************************
N1045 TREAD_DIAM_SETPOINT =918.8      ;踏面直径设定值
N1055 TREAD_DIAM = TREAD_DIAM_SETPOINT ;踏面直径
;N1075 TREAD_DIAM_MVAL_OFFSET = 0.0     ;踏面余量
;N1080 TREAD_DIAM_MACH_ALLOWANCE =4.5   ;踏面余量允差
N1085 WHEEL_HEIGHT=WHEEL_MACHINED
N1090 TREAD_HEIGHT_S2=65              ;S2的节圆高度
N1095 TREAD_HEIGHT_S1=WHEEL_HEIGHT-TREAD_HEIGHT_S2
;                                       ;S1的节圆高度
N1100 HUB_DIAM_S1=247.5                ;S1的轮毂直径
N1105 HUB_DIAM_S2=247.5                 ;S2的轮毂直径
N1110 HUB_HEIGHT_S1=160.5                 ;外辋面到内毂的距离
N1115 HUB_HEIGHT_S2=161              ;内辋面到外毂的距离
N1120 BOTTOM_DIAM_S1=803                ;内辋直径
N1125 BOTTOM_DIAM_S2=798                ;外辋直径
N1130 GLOBAL_ALLOWANCE=0                ;全局余量
N1135 TREAD_ALLOWANCE=0.8               ;踏面余量
N1140 BORE_DIAM=183.5                   ;轮毂孔径
;*********************************
;*    é’³å£å‚数设定(不设定)      *
;*********************************
;*******N1145 CLAMPING_JAW_HIGH_S1=126.5  ;S1钳口高度
;*******N1150 CLAMPING_JAW_HIGH_S2=154    ;S2钳口高度
;*********************************
;* PARAMETERS FOR CHUCK FLUSHING *
;*********************************
N300 N_WITH_FLUSHING=1         ;Chuck-Flushing after OP2?
N310 N_WITH_FLUSHING_WPTURN=1  ;Chuck-Flushing after OP1?
N320 N_FLUSHTIME=15            ;flushing time after OP2 (s)
N330 N_FLUSHTIME_WPTURN=10     ;flushing time after OP1 (s)
N340 N_FLUSH_SPSPEED=70        ;spindle speed flushing OP2 (max. 25/min
N350 N_FLUSH_SPSPEED_WPTURN=50;spindle speed flushing OP1 (max. 25/min)
N360 N_FLUSHPOS_XR=500          ;Position X-Axis
N370 N_FLUSHPOS_ZR=580          ;Position Z-Axis
N380 N_FLUSHPOS_XL=500         ;Position U-Axis
N390 N_FLUSHPOS_ZL=580         ;Position W-Axis
;******************
;* AUX PARAMETERS *
;******************
N400 N_WITH_APP_MON=0 ;1       ;pneumatic contact monitoring workpiece/chuck on/off
N410 STOPRE
N420 M17
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/56cdc468-bdf6-4ae1-b456-1020d7986e76_Ì«Ô­ÖØ¹¤.xlsx
Binary files differ
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/a63b0c06-6694-4366-b926-68f2134c4025_TSW449_3_C1_S2.SPF
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,195 @@
;************************************************
;TYHI
;Wheel: YD1000 / TSW_449_3
;************************************************
;PROGRAM-TYPE: machining program
;CHANNEL: 1 (RIGHT)
;MACHINING SIDE: 2
;VERSION: 2023/10/23
;************************************************
;********
;* INIT *
;********
N1000 DEF BOOL CM_SWORD=0
N1010 CLEARM ;for testing purposes
N1020 N_CHKCH(1) ;in channel 1?
;H11=18812 ;artis program no
;************************************************
;*                       åæ ‡ç³»èµ‹å€¼                       *
;************************************************
N1030 BLANK_STOCK=WHEEL_UNMACHINED-WHEEL_MACHINED
N1040 IF BLANK_STOCK<0.5 GOTOF AA1
N1050 BLANK_STOCK_S2=BLANK_STOCK*SYM_FACTOR
N1060 STOPRE
N1070 $P_UIFR[1,AX2,TR]=CLAMPING_JAW_HIGH_S1+BLANK_STOCK_S2
;通道(1),,G54第2轴赋值
N1080 $P_UIFR[1,AX5,TR]=CLAMPING_JAW_HIGH_S1+BLANK_STOCK_S2
;通道(1),,G54第5轴赋值
N1090 $P_UIFR[2,AX2,TR]=CLAMPING_JAW_HIGH_S2
;;通道(1),,G55第2轴赋值
N1100 $P_UIFR[2,AX2,TR]=CLAMPING_JAW_HIGH_S2
;;通道(1),,G55第5轴赋值
N1110  STOPRE;;停止预读
N1120 IDS=101 DO R60=($AA_TOTAL_OVR[SP]/100)
; ;双通道转速等待程序生效
;************************************************
;*                 åŒé€šé“检查                  *
;************************************************
N1130  STOPRE;
N1140 IF NOT N_TWOCHANNELS
N1150  MSG("WARNING, CHANNEL-SYNC VIA N_TWOCHANNELS DESELECTED! PRESS NC-START TO MACHINE...")
N1160  M0
N1170  MSG("")
N1180  STOPRE
N1190 ENDIF
N1200 DIAMON M41 ;(直径编程,工作台M41)
N1210 CUT_MEM=R119 ;维修标记设定
N1220 STOPRE
N1230 N_WAITM(51)  ;__sync for selection CUT_MEM
N1240 IF (CUT_MEM==0) GOTOF CUT_MEM_0
N1250 IF (CUT_MEM==1) GOTOF CUT_MEM_1
N1260 IF (CUT_MEM==2)
N1270   CM_SWORD=1
N1280   GOTOF CUT_MEM_2
N1290 ENDIF
N1300 IF (CUT_MEM==3) GOTOF CUT_MEM_3
N1310 IF (CUT_MEM==4) GOTOF CUT_MEM_4
N1320 CUT_MEM_0:  ;;正常加工
;************************************************
;   æ¢åˆ€ T1 R12.5
;************************************************
N1330 T1
N1340 M06
N1350 D1
;H12=101 ; artis tool number
N1360 G55
;************************************************
;OUTER TYRE FACE
;************************************************
N1370 IF NOT N_TWOCHANNELS
N1380  G96 S=V_CUT M3
N1390 ELSE
N1400  G95
N1410  LIMS=(V_CUT/($PI*(TREAD_DIAM+2*28)/1000))
N1420 ENDIF
N1430 G0 X=TREAD_DIAM+15*2 Z=WHEEL_HEIGHT-6
N1440 N_WAITM(1) ;__WAIT FOR START MACHINING__
;M136 ; Artis monitoring on
N1450 OFFN=GLOBAL_ALLOWANCE
N1460 G1 G41 X=TREAD_DIAM Z=WHEEL_HEIGHT-6 F=0.8 M50 M8
N1470 G1  Z=WHEEL_HEIGHT ANG=-45
N1480  X=BOTTOM_DIAM_S2-5*2 F=1.15
N1490 G0 G40 X=IC($P_TOOLR*(-2)) Z=IC(GLOBAL_ALLOWANCE+TREAD_ALLOWANCE+3) ;
;************************************************
;TREAD FIRST PART COARSE (VARIABLE WHEEL HEIGHT)
;************************************************
N1500 OFFN=1.5+GLOBAL_ALLOWANCE
N1510 G0  X=TREAD_DIAM Z=WHEEL_HEIGHT+GLOBAL_ALLOWANCE+TREAD_ALLOWANCE+10
N1520 G1 G42 X=TREAD_DIAM-(9.787)*2 Z=WHEEL_HEIGHT F=BASE_F*1.3
N1220  G1  X=TREAD_DIAM-(3.163)*2 Z=TREAD_HEIGHT_S2+60.507 F=BASE_F*1.3
N1225  G1  X=TREAD_DIAM-(0.614)*2 Z=TREAD_HEIGHT_S2+9.521  F=1.3
N1225 G2  X=TREAD_DIAM+(1.009)*2 Z=TREAD_HEIGHT_S2-10.587 CR=330 F=1.3
N1225 G2  X=TREAD_DIAM+(2.378)*2 Z=TREAD_HEIGHT_S2-19.332 CR=100 F=2.5
N1570 G0 G40 G64 X=TREAD_DIAM+30 Z=WHEEL_HEIGHT+50 LIMS=140 M9
;M135 ; Artis monitoring off
;************************************************
;PATH-CTRL-MODE TO OUTER HUB FACE
;************************************************
N1580 N_WAITM(3) ;_SYNC HUB FACE
;************************************************
;OUTER HUB FACE
;************************************************
;M136 ; Artis monitoring on
N1590  X=HUB_DIAM_S2+20*2
N1600 OFFN=GLOBAL_ALLOWANCE
N1610  X=HUB_DIAM_S2+20*2 Z=HUB_HEIGHT_S2+GLOBAL_ALLOWANCE
N1620 G96 S=V_CUT-50 M3
N1630 G1 G41 G64 X=HUB_DIAM_S2+5*2 Z=HUB_HEIGHT_S2 F=1.3 M50 M8
N1640    X=BORE_DIAM-10*2 Z=HUB_HEIGHT_S2 F=BASE_F*1.1
N1650 G0 G40 G97 Z=250 M9
N1660  G0  X=400
;M135 ; Artis monitoring off
N1670 SETM(4) ;__SET HUB FACE MACHINED__
;************************************************
;TOOL CHANGE T2
;************************************************
N1680 G0 G153 D0 X=750*2 Z=580 M9
N1690 G75 X0 Z0 M05
;N1370 N_DISABLE
N1700 STOPRE
N1710 CUT_MEM_1: CUT_MEM=1
N1720 CUT_MEM_2:
N1730 T2
N1740 M06
N1750 D1
;H12=102 ; Artis tool number
N1760 G55
N1770 SETM(5);换刀完成
N1780 N_WAITM(6);等待转é€?
;************************************************
;TREAD 1ND PART FINISH
;************************************************
N1790 G0 G40 X=TREAD_DIAM-($P_TOOLR*2) Z=WHEEL_HEIGHT+100 D1
N1800 IF CM_SWORD==0
N1810   N_WAITFORSPINDLE_VEL(V_CUT_FINE+60,"<")
N1820 ELSE
N1830   G96 S=V_CUT_FINE M3
N1840 ENDIF
;N1425 N_ENABLE
;M136 ; Artis monitoring on
N1850 OFFN=GLOBAL_ALLOWANCE M8 M50
N1860 G0   Z=WHEEL_HEIGHT+GLOBAL_ALLOWANCE+20
N1870 G1 G42 X=TREAD_DIAM-(9.787)*2 Z=WHEEL_HEIGHT F=BASE_F*0.5 ;M826 M791
N1220  G1  X=TREAD_DIAM-(3.163)*2  Z=TREAD_HEIGHT_S2+60.507 F=BASE_F*0.4
N1225  G1  X=TREAD_DIAM-(0.614)*2  Z=TREAD_HEIGHT_S2+9.521-FLAT   F=1.1
N1225 G2  X=TREAD_DIAM+(1.009)*2   Z=TREAD_HEIGHT_S2-10.587-FLAT CR=330
N1225 G2  X=TREAD_DIAM+(2.378)*2   Z=TREAD_HEIGHT_S2-19.332-FLAT CR=100
N1225  G2 X=TREAD_DIAM+(8.168)*2   Z=TREAD_HEIGHT_S2-28.092-FLAT CR=14   F=0.4
N1930 G0 G40 G64 X=TREAD_DIAM+50 Z=WHEEL_HEIGHT+50 LIMS=140 M9 OFFN=0
;M135 ; Artis monitoring off
N1940 SETM(13)
N1950 G75 X0 Z0
N1960 STOPRE
N1970 CUT_MEM_3: CUT_MEM=3
;N1980 N_WAITM(7) ;__WAIT FOR BOTTOM FINISHD
N1990 CUT_MEM_4:
;N2000 SETM(8)  ;  __SET M42
;N2010 N_DISABLE
N2020 N_WAITM(11)
N2030 G95 M3 S20
N2040 M41
N2050 STOPRE
N2060 CUT_MEM=0
;M27 ; ARTIS AUS
;*********************
;**END OF SUBPROGRAM**
;*********************
N2070 M17
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/c12e0782-1973-4b9d-b7ac-a1e7d2355bb2_error.png
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240108/dt_Workinfo/e007f116-b9d4-493b-899d-783a802069e7_TSW449_3_103_PAR.SPF
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,102 @@
;************************************************
;TYHI
;Wheel: YD918 / TSW_449_3
;************************************************
;PROGRAM-TYPE: Parameter Program
;VERSION:,2023 /10/23
;************************************************
;N1145 N_CHUCK_JAWS=1 ;TYPE OF CHUCK JAWS USED, 0...4 ALLOWED
;************************************************
; DECLARATION OF THE WOKRING RANGE OF THE CHUCK *
;************************************************
N100 DEF REAL L_SPOS_SET
N110 DEF REAL L_OFFSET
N120 DEF REAL L_SPOS_LOWER
N130 DEF REAL L_SPOS_UPPER
N140 L_SPOS_SET=133+180
N150 L_OFFSET=2
N160 CHUCK_S1=90  ;新增参数A面加工时,夹具松紧类型编号
N170 CHUCK_S2=91  ;新增参数A面加工时,夹具松紧类型编号
;**************************************************
;* POSITION OF MAIN SPINDLE FOR AUTOMATIC LOADING *
;**************************************************
N180 L_SPOS_LOWER=L_SPOS_SET-L_OFFSET
N190 L_SPOS_UPPER=L_SPOS_SET+L_OFFSET
N200 IF (L_SPOS_LOWER<0.0) OR (L_SPOS_UPPER>360.0)
N210 AAA:
N220 MSG("给定主轴定向角度上下限值不在0~360度范围内")
N230 M0
N240 GOTOB AAA
N250 ENDIF
N260 N_SPOS_GANTRY_LOWER=L_SPOS_LOWER
N270 N_SPOS_GANTRY_UPPER=L_SPOS_UPPER
N280 N_SPOS_GANTRY_LOWER_OP2=L_SPOS_LOWER
N290 N_SPOS_GANTRY_UPPER_OP2=L_SPOS_UPPER
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(一)        *
;*********************************
N1000 WHEEL_UNMACHINED=138.5      ;未加工车轮轮辋宽度
N1005 WHEEL_MACHINED=131.5        ;加工后的轮辋宽度
N1010 SYM_FACTOR=0.5              ;余量分布系数
N1015 FLAT=0.14                   ;轮缘调整量
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(二)        *
;*********************************
N1020 V_CUT=120     ;           ;粗加工线速度
N1025 V_CUT_FINE=120;           ;精加工线速度
N1030 V_CUT_BORE=120
N1035 BASE_F=1                  ;粗加工进给速度
N1040 BASE_F_FINE=1             ;精加工进给速度
;*********************************
;*       åŠ å·¥å‚æ•°è®¾å®š(三)        *
;*********************************
N1045 TREAD_DIAM_SETPOINT =918.8      ;踏面直径设定值
N1055 TREAD_DIAM = TREAD_DIAM_SETPOINT ;踏面直径
;N1075 TREAD_DIAM_MVAL_OFFSET = 0.0     ;踏面余量
;N1080 TREAD_DIAM_MACH_ALLOWANCE =4.5   ;踏面余量允差
N1085 WHEEL_HEIGHT=WHEEL_MACHINED
N1090 TREAD_HEIGHT_S2=65              ;S2的节圆高度
N1095 TREAD_HEIGHT_S1=WHEEL_HEIGHT-TREAD_HEIGHT_S2
;                                       ;S1的节圆高度
N1100 HUB_DIAM_S1=247.5                ;S1的轮毂直径
N1105 HUB_DIAM_S2=247.5                 ;S2的轮毂直径
N1110 HUB_HEIGHT_S1=160.5                 ;外辋面到内毂的距离
N1115 HUB_HEIGHT_S2=161              ;内辋面到外毂的距离
N1120 BOTTOM_DIAM_S1=803                ;内辋直径
N1125 BOTTOM_DIAM_S2=798                ;外辋直径
N1130 GLOBAL_ALLOWANCE=0                ;全局余量
N1135 TREAD_ALLOWANCE=0.8               ;踏面余量
N1140 BORE_DIAM=183.5                   ;轮毂孔径
;*********************************
;*    é’³å£å‚数设定(不设定)      *
;*********************************
;*******N1145 CLAMPING_JAW_HIGH_S1=126.5  ;S1钳口高度
;*******N1150 CLAMPING_JAW_HIGH_S2=154    ;S2钳口高度
;*********************************
;* PARAMETERS FOR CHUCK FLUSHING *
;*********************************
N300 N_WITH_FLUSHING=1         ;Chuck-Flushing after OP2?
N310 N_WITH_FLUSHING_WPTURN=1  ;Chuck-Flushing after OP1?
N320 N_FLUSHTIME=15            ;flushing time after OP2 (s)
N330 N_FLUSHTIME_WPTURN=10     ;flushing time after OP1 (s)
N340 N_FLUSH_SPSPEED=70        ;spindle speed flushing OP2 (max. 25/min
N350 N_FLUSH_SPSPEED_WPTURN=50;spindle speed flushing OP1 (max. 25/min)
N360 N_FLUSHPOS_XR=500          ;Position X-Axis
N370 N_FLUSHPOS_ZR=580          ;Position Z-Axis
N380 N_FLUSHPOS_XL=500         ;Position U-Axis
N390 N_FLUSHPOS_ZL=580         ;Position W-Axis
;******************
;* AUX PARAMETERS *
;******************
N400 N_WITH_APP_MON=0 ;1       ;pneumatic contact monitoring workpiece/chuck on/off
N410 STOPRE
N420 M17
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Upload/20240109/Sys_DictionaryList/_΢ÐÅͼƬ_20220505095142.jpg
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/wwwroot/Upload/Tables/Sys_User/202401081736421771/΢ÐÅͼƬ_20220505095142.jpg
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/wwwroot/Upload/Tables/Sys_User/202401091425048266/΢ÐÅͼƬ_20220505095142.jpg
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/wwwroot/Upload/Tables/T/202401091511391477/΢ÐÅͼƬ_20220505095142.jpg