From fc16c867aa1f065f98e7d6ab4793665cc30ea4fe Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Thu, 9 Jan 2025 14:07:35 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BC=96=E7=A8=8B?= =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/__manifest__.py | 1 + sf_manufacturing/models/mrp_production.py | 51 +++++++++++++++++ sf_manufacturing/security/ir.model.access.csv | 5 +- .../views/mrp_production_addional_change.xml | 23 ++++++++ sf_manufacturing/wizard/__init__.py | 1 + .../wizard/sf_programming_reason.py | 55 +++++++++++++++++++ .../wizard/sf_programming_reason_views.xml | 44 +++++++++++++++ 7 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 sf_manufacturing/wizard/sf_programming_reason.py create mode 100644 sf_manufacturing/wizard/sf_programming_reason_views.xml diff --git a/sf_manufacturing/__manifest__.py b/sf_manufacturing/__manifest__.py index 936afaaf..460fa63c 100644 --- a/sf_manufacturing/__manifest__.py +++ b/sf_manufacturing/__manifest__.py @@ -25,6 +25,7 @@ 'wizard/production_technology_wizard_views.xml', 'wizard/production_technology_re_adjust_wizard_views.xml', 'wizard/mrp_workorder_batch_replan_wizard_views.xml', + 'wizard/sf_programming_reason_views.xml', 'views/mrp_views_menus.xml', 'views/agv_scheduling_views.xml', 'views/stock_lot_views.xml', diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index af0f0aa9..a078a573 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1600,6 +1600,57 @@ class MrpProduction(models.Model): raise UserError( _('You must enter a serial number for each line of %s') % sml.product_id.display_name) return True + + reprogramming_count = fields.Integer(string='重新编程次数', default=0) + + # 申请编程 + def action_apply_programming(self): + """ + 检查前置条件:制造订单【状态】=“待排程、待加工”,制造订单的【编程状态】=“已编程”。 + """ + print('申请编程') + if len(self) > 1: + raise UserError('仅支持选择单个制造订单进行编程申请,请重新选择') + # problem_productions = [] + # for production in self: + # if production.state not in ['待排程', '待加工'] or production.programming_state != '已编程': + # problem_productions.append(production.name) + # if problem_productions: + # raise UserError('以下制造订单状态或编程状态不符合要求: %s' % ', '.join(problem_productions)) + + # 上述通过后,返回一个action id为sf_programming_reason_action,用作二次确认wizard,显示“重新编程原因:XXXXX(用户录入)注意:该制造订单产品已申请重新编程次数为N,且当前编程状态为XXX” + cloud_programming = self._cron_get_programming_state() + return { + 'type': 'ir.actions.act_window', + 'res_model': 'sf.programming.reason', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_production_id': self.id, + 'active_id': self.id, + # 传当前时间 + 'default_apply_time': fields.Datetime.now(), + }, + 'view_id': self.env.ref('sf_manufacturing.sf_programming_reason_form_view').id, + } + + # 编程记录 + programming_record_ids = fields.One2many('sf.programming.record', 'production_id') + +# 编程记录 +class sf_programming_record(models.Model): + _name = 'sf.programming.record' + _description = "编程记录" + + production_id = fields.Many2one('mrp.production') + # 编号、编程原因、编程方式、当前编程次数、目标制造单号、申请时间、下发时间 + number = fields.Char('编号') + reason = fields.Text('重新编程原因') + programming_method = fields.Selection([('人工编程', '人工编程'), ('自动编程', '自动编程')], string="编程方式") + current_programming_count = fields.Integer('当前编程次数') + target_production_id = fields.Char('目标制造单号') + apply_time = fields.Datetime('申请时间') + send_time = fields.Datetime('下发时间') class sf_detection_result(models.Model): diff --git a/sf_manufacturing/security/ir.model.access.csv b/sf_manufacturing/security/ir.model.access.csv index b8862b8d..dea45f2a 100644 --- a/sf_manufacturing/security/ir.model.access.csv +++ b/sf_manufacturing/security/ir.model.access.csv @@ -186,4 +186,7 @@ access_sf_detection_result_manager,sf_detection_result_manager,model_sf_detectio access_mrp_workorder_batch_replan_wizard_group_plan_dispatch,mrp_workorder_batch_replan_wizard_group_plan_dispatch,model_mrp_workorder_batch_replan_wizard,sf_base.group_plan_dispatch,1,1,1,0 access_mrp_workorder_group_purchase_director,mrp_workorder,model_mrp_workorder,sf_base.group_purchase_director,1,1,0,0 -access_mrp_workorder_group_purchase,mrp_workorder,model_mrp_workorder,sf_base.group_purchase,1,1,0,0 \ No newline at end of file +access_mrp_workorder_group_purchase,mrp_workorder,model_mrp_workorder,sf_base.group_purchase,1,1,0,0 + +access_sf_programming_reason,sf_programming_reason,model_sf_programming_reason,base.group_user,1,1,1,0 +access_sf_programming_record,sf_programming_record,model_sf_programming_record,base.group_user,1,1,1,0 \ No newline at end of file diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml index 8a44b621..60d88a21 100644 --- a/sf_manufacturing/views/mrp_production_addional_change.xml +++ b/sf_manufacturing/views/mrp_production_addional_change.xml @@ -7,6 +7,10 @@ mrp.production + + + @@ -81,6 +85,10 @@ mrp.production + + + @@ -397,6 +405,21 @@ position="replace"> 子MO + + + + + + + + + + + + + + + diff --git a/sf_manufacturing/wizard/__init__.py b/sf_manufacturing/wizard/__init__.py index 89bdc09b..6a0af9e5 100644 --- a/sf_manufacturing/wizard/__init__.py +++ b/sf_manufacturing/wizard/__init__.py @@ -4,3 +4,4 @@ from . import production_wizard from . import production_technology_wizard from . import production_technology_re_adjust_wizard from . import mrp_workorder_batch_replan_wizard +from . import sf_programming_reason diff --git a/sf_manufacturing/wizard/sf_programming_reason.py b/sf_manufacturing/wizard/sf_programming_reason.py new file mode 100644 index 00000000..a8bad5d0 --- /dev/null +++ b/sf_manufacturing/wizard/sf_programming_reason.py @@ -0,0 +1,55 @@ +from odoo import models, fields, api + +class sf_programming_reason(models.TransientModel): + _name = 'sf.programming.reason' + _description = '重新编程原因' + + production_id = fields.Many2one('mrp.production') + reason = fields.Text('重新编程原因') + reprogramming_count = fields.Integer(string='重新编程次数') + programming_state = fields.Char(string='编程状态') + + @api.model + def default_get(self, fields): + res = super(sf_programming_reason, self).default_get(fields) + if self._context.get('active_id'): + production = self.env['mrp.production'].browse(self._context.get('active_id')) + res.update({ + 'reprogramming_count': production._cron_get_programming_state()['reprogramming_num'], + 'programming_state': production.programming_state, # 假设制造订单模型中有这个字段 + }) + return res + + def action_confirm(self): + print('self.production_id.programming_state:', self.production_id.programming_state) + self.production_id.update_programming_state() + self.production_id.write( + {'programming_state': '编程中', 'work_state': '编程中'}) + + cloud_programming = self.production_id._cron_get_programming_state() + + self.production_id.programming_record_ids.create({ + 'number': len(self.production_id.programming_record_ids) + 1, + 'production_id': self.production_id.id, + 'reason': self.reason, + 'programming_method': cloud_programming['programme_way'], + 'current_programming_count': cloud_programming['reprogramming_num'], + 'target_production_id': cloud_programming['production_order_no'], + 'apply_time': self._context.get('apply_time'), + 'send_time': cloud_programming['programming_time'], + }) + + # 返回弹窗提示“已下达编程任务和消息,请等待编程单下发” + return { + 'type': 'ir.actions.act_window', + 'res_model': 'sf.programming.reason', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_production_id': self.production_id.id, + 'active_id': self.production_id.id, + }, + 'view_id': self.env.ref('sf_manufacturing.sf_programming_reason_message_view').id, + } + + diff --git a/sf_manufacturing/wizard/sf_programming_reason_views.xml b/sf_manufacturing/wizard/sf_programming_reason_views.xml new file mode 100644 index 00000000..5b9e15a8 --- /dev/null +++ b/sf_manufacturing/wizard/sf_programming_reason_views.xml @@ -0,0 +1,44 @@ + + + + sf.programming.reason.form.view + sf.programming.reason + + + + + + 注意:该制造订单产品已申请重新编程次数为,且当前编程状态为 + + + + + + + + + sf.programming.reason.message.view + sf.programming.reason + + + 已下达编程任务和消息,请等待编程单下发! + + + + + + + 重新编程原因 + ir.actions.act_window + sf.programming.reason + form + + new + + + From aaf72d5e35ebc2aa243979d7686ad160fb26be34 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Thu, 9 Jan 2025 16:12:54 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 4 +++- sf_manufacturing/wizard/sf_programming_reason.py | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index a078a573..7278d24f 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1646,7 +1646,9 @@ class sf_programming_record(models.Model): # 编号、编程原因、编程方式、当前编程次数、目标制造单号、申请时间、下发时间 number = fields.Char('编号') reason = fields.Text('重新编程原因') - programming_method = fields.Selection([('人工编程', '人工编程'), ('自动编程', '自动编程')], string="编程方式") + programming_method = fields.Selection([ + ('auto', '自动'), + ('manual operation', '人工')], string="编程方式") current_programming_count = fields.Integer('当前编程次数') target_production_id = fields.Char('目标制造单号') apply_time = fields.Datetime('申请时间') diff --git a/sf_manufacturing/wizard/sf_programming_reason.py b/sf_manufacturing/wizard/sf_programming_reason.py index a8bad5d0..f3f54e4d 100644 --- a/sf_manufacturing/wizard/sf_programming_reason.py +++ b/sf_manufacturing/wizard/sf_programming_reason.py @@ -27,7 +27,6 @@ class sf_programming_reason(models.TransientModel): {'programming_state': '编程中', 'work_state': '编程中'}) cloud_programming = self.production_id._cron_get_programming_state() - self.production_id.programming_record_ids.create({ 'number': len(self.production_id.programming_record_ids) + 1, 'production_id': self.production_id.id, @@ -35,8 +34,8 @@ class sf_programming_reason(models.TransientModel): 'programming_method': cloud_programming['programme_way'], 'current_programming_count': cloud_programming['reprogramming_num'], 'target_production_id': cloud_programming['production_order_no'], - 'apply_time': self._context.get('apply_time'), - 'send_time': cloud_programming['programming_time'], + 'apply_time': self._context.get('default_apply_time'), + 'send_time': cloud_programming['send_time'], }) # 返回弹窗提示“已下达编程任务和消息,请等待编程单下发” From 8589da1b4d79c4b0713d9f71b82d4a3430f198bf Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Fri, 10 Jan 2025 09:34:38 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=9A=E7=A7=8D?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=AF=B9=E7=BC=96=E7=A8=8B=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 64 ++++++++++++++++++- sf_manufacturing/wizard/production_wizard.py | 2 +- sf_manufacturing/wizard/rework_wizard.py | 2 +- .../wizard/sf_programming_reason.py | 2 +- sf_tool_management/models/mrp_workorder.py | 3 +- 5 files changed, 68 insertions(+), 5 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 5a2315ab..76bf6a41 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -591,7 +591,8 @@ class MrpProduction(models.Model): logging.info('cron_get_programming_state error:%s' % e) # 编程单更新 - def update_programming_state(self): + # 增加触发时间参数 + def update_programming_state(self, trigger_time=None): try: manufacturing_type = 'rework' if self.is_scrap: @@ -613,6 +614,45 @@ class MrpProduction(models.Model): self.write({'is_rework': True}) else: raise UserError(ret['message']) + + # 增加对编程记录的更新 + cloud_programming = self._cron_get_programming_state() + if manufacturing_type == 'rework': + self.programming_record_ids.create({ + 'number': len(self.programming_record_ids) + 1, + 'production_id': self.id, + 'reason': '返工', + 'programming_method': cloud_programming['programme_way'], + 'current_programming_count': cloud_programming['reprogramming_num'], + 'target_production_id': cloud_programming['production_order_no'], + 'apply_time': trigger_time, + 'send_time': cloud_programming['send_time'], + }) + elif manufacturing_type == 'scrap': + self.programming_record_ids.create({ + 'number': len(self.programming_record_ids) + 1, + 'production_id': self.id, + 'reason': '报废', + 'programming_method': cloud_programming['programme_way'], + 'current_programming_count': cloud_programming['reprogramming_num'], + 'target_production_id': cloud_programming['production_order_no'], + 'apply_time': trigger_time, + 'send_time': cloud_programming['send_time'], + }) + elif manufacturing_type == 'invalid_tool_rework': + self.programming_record_ids.create({ + 'number': len(self.programming_record_ids) + 1, + 'production_id': self.id, + 'reason': '无效功能刀具', + 'programming_method': cloud_programming['programme_way'], + 'current_programming_count': cloud_programming['reprogramming_num'], + 'target_production_id': cloud_programming['production_order_no'], + 'apply_time': trigger_time, + 'send_time': cloud_programming['send_time'], + }) + else: + logging.info('无对应状态,不需更新编程记录') + except Exception as e: logging.info('update_programming_state error:%s' % e) raise UserError("更新编程单状态失败,请联系管理员") @@ -1609,6 +1649,28 @@ class MrpProduction(models.Model): # 编程记录 programming_record_ids = fields.One2many('sf.programming.record', 'production_id') + # 编程单更新 + def re_programming_update_programming_state(self): + try: + res = {'programming_no': self.programming_no, + 'manufacturing_type': ''} + logging.info('res=%s:' % res) + configsettings = self.env['res.config.settings'].get_values() + config_header = Common.get_headers(self, configsettings['token'], configsettings['sf_secret_key']) + url = '/api/intelligent_programming/reset_state_again' + config_url = configsettings['sf_url'] + url + ret = requests.post(config_url, json=res, data=None, headers=config_header) + ret = ret.json() + result = json.loads(ret['result']) + logging.info('update_programming_state-ret:%s' % result) + if result['status'] == 1: + self.write({'is_rework': True}) + else: + raise UserError(ret['message']) + except Exception as e: + logging.info('update_programming_state error:%s' % e) + raise UserError("更新编程单状态失败,请联系管理员") + # 编程记录 class sf_programming_record(models.Model): _name = 'sf.programming.record' diff --git a/sf_manufacturing/wizard/production_wizard.py b/sf_manufacturing/wizard/production_wizard.py index e3e07f80..aa2a4075 100644 --- a/sf_manufacturing/wizard/production_wizard.py +++ b/sf_manufacturing/wizard/production_wizard.py @@ -51,6 +51,6 @@ class ProductionWizard(models.TransientModel): if self.is_remanufacture is True: ret = {'programming_list': [], 'is_reprogramming': self.is_reprogramming} if self.is_reprogramming is True: - self.mrp_production_id.update_programming_state() + self.mrp_production_id.update_programming_state(trigger_time=datetime.now().strftime('%Y-%m-%d %H:%M:%S')) new_production = self.mrp_production_id.recreateManufacturing(ret) self.mrp_production_id.write({'remanufacture_production_id': new_production.id}) diff --git a/sf_manufacturing/wizard/rework_wizard.py b/sf_manufacturing/wizard/rework_wizard.py index 148967be..90697391 100644 --- a/sf_manufacturing/wizard/rework_wizard.py +++ b/sf_manufacturing/wizard/rework_wizard.py @@ -284,7 +284,7 @@ class ReworkWizard(models.TransientModel): 'is_rework': False}) # ==================申请重新编程======================= if self.is_reprogramming is True: - self.production_id.update_programming_state() + self.production_id.update_programming_state(trigger_time=datetime.now().strftime('%Y-%m-%d %H:%M:%S')) self.production_id.write( {'programming_state': '编程中', 'work_state': '编程中', 'state': 'progress'}) # ================= 返工完成,制造订单状态置为加工中 ============== diff --git a/sf_manufacturing/wizard/sf_programming_reason.py b/sf_manufacturing/wizard/sf_programming_reason.py index f3f54e4d..5e7ec706 100644 --- a/sf_manufacturing/wizard/sf_programming_reason.py +++ b/sf_manufacturing/wizard/sf_programming_reason.py @@ -22,7 +22,7 @@ class sf_programming_reason(models.TransientModel): def action_confirm(self): print('self.production_id.programming_state:', self.production_id.programming_state) - self.production_id.update_programming_state() + self.production_id.re_programming_update_programming_state() self.production_id.write( {'programming_state': '编程中', 'work_state': '编程中'}) diff --git a/sf_tool_management/models/mrp_workorder.py b/sf_tool_management/models/mrp_workorder.py index 655d759f..89d37e81 100644 --- a/sf_tool_management/models/mrp_workorder.py +++ b/sf_tool_management/models/mrp_workorder.py @@ -1,6 +1,7 @@ import json import requests import logging +from datetime import datetime from odoo import fields, models, api from odoo.exceptions import ValidationError from odoo.addons.sf_base.commons.common import Common @@ -196,7 +197,7 @@ class MrpProduction(models.Model): }) # 自动调用重新获取编程的方法 logging.info('cnc用刀校验到无效刀自动调用重新编程方法:update_programming_state()') - self[0].update_programming_state() + self[0].update_programming_state(trigger_time=datetime.now().strftime('%Y-%m-%d %H:%M:%S')) self[0].write({'is_rework': False}) # 修改制造订单 编程状态变为“编程中” self.write({'programming_state': '编程中', 'work_state': '编程中'}) From 28d3d6fe60df88b011deb241c6504d6bf0a9f91f Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Fri, 10 Jan 2025 10:20:23 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BC=96=E7=A8=8B?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_mrs_connect/controllers/controllers.py | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sf_mrs_connect/controllers/controllers.py b/sf_mrs_connect/controllers/controllers.py index 85b3d5fa..5506e7f6 100644 --- a/sf_mrs_connect/controllers/controllers.py +++ b/sf_mrs_connect/controllers/controllers.py @@ -97,6 +97,32 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): {'processing_drawing': base64.b64encode(open(panel_file_path, 'rb').read())}) productions.write({'programming_state': '已编程', 'work_state': '已编程'}) logging.info('已更新制造订单编程状态:%s' % productions.ids) + + # 更新编程记录 + for production in productions: + if ret['reprogramming_num'] == 0: + production.programming_record_ids.create({ + 'number': 1, + 'production_id': production.id, + 'reason': '', + 'programming_method': ret['programme_way'], + 'current_programming_count': ret['reprogramming_num'], + 'target_production_id': ret['production_order_no'], + 'apply_time': '', + 'send_time': ret['send_time'], + }) + if ret['reset_flag']: + production.programming_record_ids.create({ + 'number': len(production.programming_record_ids) + 1, + 'production_id': production.id, + 'reason': '重置状态', + 'programming_method': ret['programme_way'], + 'current_programming_count': ret['reprogramming_num'], + 'target_production_id': ret['production_order_no'], + 'apply_time': '', + 'send_time': ret['send_time'], + }) + res.update({ 'production_ids': productions.ids }) From 6b6f091da87b41b31ff98607bef34f263253c1ac Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Mon, 13 Jan 2025 11:11:09 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BC=96=E7=A8=8B?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/wizard/sf_programming_reason.py | 2 +- sf_manufacturing/wizard/sf_programming_reason_views.xml | 7 ++++--- sf_mrs_connect/controllers/controllers.py | 7 +++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sf_manufacturing/wizard/sf_programming_reason.py b/sf_manufacturing/wizard/sf_programming_reason.py index 5e7ec706..d6744bed 100644 --- a/sf_manufacturing/wizard/sf_programming_reason.py +++ b/sf_manufacturing/wizard/sf_programming_reason.py @@ -35,7 +35,7 @@ class sf_programming_reason(models.TransientModel): 'current_programming_count': cloud_programming['reprogramming_num'], 'target_production_id': cloud_programming['production_order_no'], 'apply_time': self._context.get('default_apply_time'), - 'send_time': cloud_programming['send_time'], + 'send_time': False, }) # 返回弹窗提示“已下达编程任务和消息,请等待编程单下发” diff --git a/sf_manufacturing/wizard/sf_programming_reason_views.xml b/sf_manufacturing/wizard/sf_programming_reason_views.xml index 5b9e15a8..02193bf6 100644 --- a/sf_manufacturing/wizard/sf_programming_reason_views.xml +++ b/sf_manufacturing/wizard/sf_programming_reason_views.xml @@ -25,10 +25,11 @@ 已下达编程任务和消息,请等待编程单下发! + - + diff --git a/sf_mrs_connect/controllers/controllers.py b/sf_mrs_connect/controllers/controllers.py index 5506e7f6..186cc7a5 100644 --- a/sf_mrs_connect/controllers/controllers.py +++ b/sf_mrs_connect/controllers/controllers.py @@ -100,6 +100,9 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): # 更新编程记录 for production in productions: + record_ids_obj = production.programming_record_ids.filtered(lambda r: r.current_programming_count == ret['reprogramming_num']) + if record_ids_obj: + record_ids_obj.write({'send_time': ret['send_time']}) if ret['reprogramming_num'] == 0: production.programming_record_ids.create({ 'number': 1, @@ -108,7 +111,7 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): 'programming_method': ret['programme_way'], 'current_programming_count': ret['reprogramming_num'], 'target_production_id': ret['production_order_no'], - 'apply_time': '', + 'apply_time': False, 'send_time': ret['send_time'], }) if ret['reset_flag']: @@ -119,7 +122,7 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): 'programming_method': ret['programme_way'], 'current_programming_count': ret['reprogramming_num'], 'target_production_id': ret['production_order_no'], - 'apply_time': '', + 'apply_time': False, 'send_time': ret['send_time'], })
注意:该制造订单产品已申请重新编程次数为,且当前编程状态为
已下达编程任务和消息,请等待编程单下发!