From 3d8966ba2c81e7e0365c8b123e861d18ee4f94f5 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 09 9月 2025 17:24:32 +0800 Subject: [PATCH] 增加方法 --- SiemensWarehouse/siemens2-api/app/public/webServiceHelper.ts | 54 +++++++++++++++++++++++++++ SiemensWarehouse/siemens2-api/app/controller/task.ts | 50 +++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 0 deletions(-) diff --git a/SiemensWarehouse/siemens2-api/app/controller/task.ts b/SiemensWarehouse/siemens2-api/app/controller/task.ts index 7709a57..45bf780 100644 --- a/SiemensWarehouse/siemens2-api/app/controller/task.ts +++ b/SiemensWarehouse/siemens2-api/app/controller/task.ts @@ -597,6 +597,56 @@ } ctx.body = this.info; } + //鍒嗛〉鏌ヨ PO鏄庣粏绌虹墿鏂欏彿淇℃伅 [EditBy shaocx,2022-09-13] + @Post() + public async QueryPagePurchaseEmptyMaterialCode() { + + let { ctx } = this; + siemensApi.domainUrl = this.app.config.domainUrl; + let result: any; + var params = this.ctx.body; + var par = JSON.stringify(params); + result = await siemensApi.QueryPagePurchaseEmptyMaterialCode({ + par + }); + var resultInfo = JSON.parse(result); + + if (resultInfo.status == 200) { + this.info.data = resultInfo.date; + this.info.data2 = resultInfo.allDate;//澧炲姞 銆怑ditBy shaocx,2022-03-07銆� + this.info.result = true; + this.info.countPrint = resultInfo.total; + this.info.statusCode = resultInfo.status; + } else { + this.info.result = false; + } + ctx.body = this.info; + } + //鍒嗛〉鏌ヨ 鍫嗗灈鏈鸿繍琛岀粺璁� [EditBy shaocx,2022-09-13] + @Post() + public async QueryPageDeviceGeneralInfo() { + + let { ctx } = this; + siemensApi.domainUrl = this.app.config.domainUrl; + let result: any; + var params = this.ctx.body; + var par = JSON.stringify(params); + result = await siemensApi.QueryPageDeviceGeneralInfo({ + par + }); + var resultInfo = JSON.parse(result); + + if (resultInfo.status == 200) { + this.info.data = resultInfo.date; + this.info.data2 = resultInfo.allDate;//澧炲姞 銆怑ditBy shaocx,2022-03-07銆� + this.info.result = true; + this.info.countPrint = resultInfo.total; + this.info.statusCode = resultInfo.status; + } else { + this.info.result = false; + } + ctx.body = this.info; + } //鍒嗛〉鏌ヨ 闂叉椂绉诲簱 [EditBy shaocx,2022-09-13] @Post() public async QueryPageFreeTimeMoveLocationTask() { diff --git a/SiemensWarehouse/siemens2-api/app/public/webServiceHelper.ts b/SiemensWarehouse/siemens2-api/app/public/webServiceHelper.ts index 65e85aa..68c7f40 100644 --- a/SiemensWarehouse/siemens2-api/app/public/webServiceHelper.ts +++ b/SiemensWarehouse/siemens2-api/app/public/webServiceHelper.ts @@ -1473,6 +1473,60 @@ }); }); }, + //鍒嗛〉鏌ヨ PO鏄庣粏绌虹墿鏂欏彿淇℃伅 [EditBy shaocx,2025-09-09] + async QueryPagePurchaseEmptyMaterialCode(params) { + return new Promise(resolve => { + var args = { + param: params.par + }; + soap.createClient(this.url(), (err, client) => { + if (err) { + resolve({ + result: true, + msg: err.message + }); + return; + } + client.QueryPagePurchaseEmptyMaterialCode(args, (err, result) => { + if (!err) { + resolve(result.QueryPagePurchaseEmptyMaterialCodeResult); + } else { + resolve({ + result: false, + msg: "閿欒锛�" + err.message + }); + } + }); + }); + }); + }, + //鍒嗛〉鏌ヨ 鍫嗗灈鏈鸿繍琛岀粺璁� [EditBy shaocx,2025-09-09] + async QueryPageDeviceGeneralInfo(params) { + return new Promise(resolve => { + var args = { + param: params.par + }; + soap.createClient(this.url(), (err, client) => { + if (err) { + resolve({ + result: true, + msg: err.message + }); + return; + } + client.QueryPageDeviceGeneralInfo(args, (err, result) => { + if (!err) { + resolve(result.QueryPageDeviceGeneralInfoResult); + } else { + resolve({ + result: false, + msg: "閿欒锛�" + err.message + }); + } + }); + }); + }); + }, //闂叉椂绉诲簱 //鍒嗛〉鏌ヨ 闂叉椂绉诲簱 [EditBy shaocx,2022-09-13] async QueryPageFreeTimeMoveLocationTask(params) { -- Gitblit v1.9.3