From 1142400e9c448c8ecae5e0cf82be1335233f5456 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Thu, 22 Feb 2024 15:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BA=93=E4=BD=8D=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=88=E5=90=AF=E8=B1=AA=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/controllers/controllers.py | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sf_manufacturing/controllers/controllers.py b/sf_manufacturing/controllers/controllers.py index 29ab2f94..8e835e81 100644 --- a/sf_manufacturing/controllers/controllers.py +++ b/sf_manufacturing/controllers/controllers.py @@ -307,3 +307,26 @@ class Manufacturing_Connect(http.Controller): res = {'Succeed': False, 'ErrorCode': 202, 'Error': e} logging.info('NCProgDolod error:%s' % e) return json.JSONEncoder().encode(res) + + @http.route('/AutoDeviceApi/LocationChange', type='json', auth='sf_token', methods=['GET', 'POST'], csrf=False, + cors="*") + def NCProgDolod(self, **kw): + """ + 库位变更 + :param kw: + :return: + """ + logging.info('NCProgDolod:%s' % kw) + try: + res = {'Succeed': True, 'Datas': []} + datas = request.httprequest.data + ret = json.loads(datas) + if ret: + print(ret) + return json.JSONEncoder().encode(res) + else: + res = {'Succeed': False, 'ErrorCode': 201, 'Error': '未传RfidCode字段'} + except Exception as e: + res = {'Succeed': False, 'ErrorCode': 202, 'Error': e} + logging.info('NCProgDolod error:%s' % e) + return json.JSONEncoder().encode(res)