处理设备字段类型相关缺陷
This commit is contained in:
@@ -106,6 +106,7 @@ class MachineTool(models.Model):
|
||||
lead_screw = fields.Char('丝杆')
|
||||
workbench_L = fields.Char('工作台长度(mm)')
|
||||
workbench_W = fields.Char('工作台宽度(mm)')
|
||||
workbench_H = fields.Char('工作台高度(mm)')
|
||||
guide_rail = fields.Char('导轨')
|
||||
machine_tool_L = fields.Char('机床长度(mm)')
|
||||
machine_tool_W = fields.Char('机床宽度(mm)')
|
||||
@@ -193,6 +194,7 @@ class MachineTool(models.Model):
|
||||
item.lead_screw = item.type_id.lead_screw
|
||||
item.workbench_L = item.type_id.workbench_L
|
||||
item.workbench_W = item.type_id.workbench_W
|
||||
item.workbench_H = item.type_id.workbench_H
|
||||
item.guide_rail = item.type_id.guide_rail
|
||||
item.machine_tool_L = item.type_id.machine_tool_L
|
||||
item.machine_tool_W = item.type_id.machine_tool_W
|
||||
@@ -280,6 +282,7 @@ class MachineToolType(models.Model):
|
||||
workpiece_load = fields.Char('工件最大负载(kg)')
|
||||
workbench_L = fields.Char('工作台长度(mm)')
|
||||
workbench_W = fields.Char('工作台宽度(mm)')
|
||||
workbench_H = fields.Char('工作台高度(mm)')
|
||||
machine_tool_L = fields.Char('机床长度(mm)')
|
||||
machine_tool_W = fields.Char('机床宽度(mm)')
|
||||
machine_tool_H = fields.Char('机床高度(mm)')
|
||||
@@ -295,8 +298,9 @@ class MachineToolType(models.Model):
|
||||
x_axis = fields.Integer('X轴')
|
||||
y_axis = fields.Integer('Y轴')
|
||||
z_axis = fields.Integer('Z轴')
|
||||
b_axis = fields.Integer('B轴')
|
||||
c_axis = fields.Integer('C轴')
|
||||
a_axis = fields.Char('a轴')
|
||||
b_axis = fields.Char('B轴')
|
||||
c_axis = fields.Char('C轴')
|
||||
remark = fields.Char('备注')
|
||||
control_system_id = fields.Many2one('sf.machine.control_system',
|
||||
string="控制系统")
|
||||
@@ -309,7 +313,7 @@ class MachineToolType(models.Model):
|
||||
default="", string="轴数")
|
||||
|
||||
# 1212新增字段
|
||||
a_axis = fields.Integer('a轴')
|
||||
|
||||
function_type = fields.Selection(
|
||||
[("ZXJGZX", "钻铣加工中心"), ("CXJGZX", "车削加工中心"), ("FHJGZX", "复合加工中心")],
|
||||
default="", string="功能类型")
|
||||
@@ -335,23 +339,23 @@ class MachineToolType(models.Model):
|
||||
straight_cutting_feed_rate = fields.Char('直线切削进给速度(mm/min)')
|
||||
rotary_cutting_feed_rate = fields.Char('回转切削进给速度(mm/min)')
|
||||
|
||||
X_precision = fields.Float('X轴定位精度(mm)', digits=(12, 3))
|
||||
X_precision_repeat = fields.Float('X轴重复定位精度(mm)', digits=(12, 3))
|
||||
Y_precision = fields.Float('Y轴定位精度(mm)', digits=(12, 3))
|
||||
Y_precision_repeat = fields.Float('Y轴重复定位精度(mm)', digits=(12, 3))
|
||||
Z_precision = fields.Float('Z轴定位精度(mm)', digits=(12, 3))
|
||||
Z_precision_repeat = fields.Float('Z轴重复定位精度(mm)', digits=(12, 3))
|
||||
a_precision = fields.Float('a轴定位精度(mm)', digits=(12, 3))
|
||||
a_precision_repeat = fields.Float('a轴重复定位精度(mm)', digits=(12, 3))
|
||||
b_precision = fields.Float('b轴定位精度(mm)', digits=(12, 3))
|
||||
b_precision_repeat = fields.Float('b轴重复定位精度(mm)', digits=(12, 3))
|
||||
c_precision = fields.Float('c轴定位精度(mm)', digits=(12, 3))
|
||||
c_precision_repeat = fields.Float('c轴重复定位精度(mm)', digits=(12, 3))
|
||||
X_precision = fields.Char('X轴定位精度(mm)')
|
||||
X_precision_repeat = fields.Char('X轴重复定位精度(mm)')
|
||||
Y_precision = fields.Char('Y轴定位精度(mm)')
|
||||
Y_precision_repeat = fields.Char('Y轴重复定位精度(mm)')
|
||||
Z_precision = fields.Char('Z轴定位精度(mm)')
|
||||
Z_precision_repeat = fields.Char('Z轴重复定位精度(mm)')
|
||||
a_precision = fields.Char('a轴定位精度(mm)')
|
||||
a_precision_repeat = fields.Char('a轴重复定位精度(mm)')
|
||||
b_precision = fields.Char('b轴定位精度(mm)')
|
||||
b_precision_repeat = fields.Char('b轴重复定位精度(mm)')
|
||||
c_precision = fields.Char('c轴定位精度(mm)')
|
||||
c_precision_repeat = fields.Char('c轴重复定位精度(mm)')
|
||||
|
||||
tool_full_diameter_max = fields.Float('刀具满刀最大直径(mm)')
|
||||
tool_perimeter_diameter_max = fields.Float('刀具邻空刀最大直径(mm)')
|
||||
T_tool_time = fields.Integer('T-T换刀时间(s)')
|
||||
C_tool_time = fields.Integer('C-C换刀时间(s)')
|
||||
T_tool_time = fields.Float('T-T换刀时间(s)', digits=(12, 1))
|
||||
C_tool_time = fields.Float('C-C换刀时间(s)', digits=(12, 1))
|
||||
|
||||
jg_image_id = fields.Many2many('maintenance.equipment.image', 'jg_equipment_id', string='加工能力',
|
||||
domain="[('type', '=', '加工能力')]")
|
||||
|
||||
@@ -173,6 +173,10 @@
|
||||
<label for="workbench_W" string="宽"/>
|
||||
<field name="workbench_W" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="workbench_H" string="高"/>
|
||||
<field name="workbench_H" class="o_address_zip" required="1"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="workpiece_load"/>
|
||||
<label for="machine_tool_L" string="机床尺寸(mm)"/>
|
||||
@@ -239,15 +243,15 @@
|
||||
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="b_axis" string="b"
|
||||
<label for="c_axis" string="c"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"/>
|
||||
<field name="b_axis" class="o_address_zip"
|
||||
<field name="c_axis" class="o_address_zip"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="c_axis" string="c"
|
||||
<label for="b_axis" string="b"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴','五轴'])]}"/>
|
||||
<field name="c_axis" class="o_address_zip"
|
||||
<field name="b_axis" class="o_address_zip"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴','五轴'])]}"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
|
||||
@@ -47,7 +47,7 @@ class SfMaintenanceEquipment(models.Model):
|
||||
default="", string="轴数")
|
||||
|
||||
# 1212新增字段
|
||||
a_axis = fields.Integer('a轴')
|
||||
|
||||
function_type = fields.Selection(
|
||||
[("ZXJGZX", "钻铣加工中心"), ("CXJGZX", "车削加工中心"), ("FHJGZX", "复合加工中心")],
|
||||
default="", string="功能类型")
|
||||
@@ -73,23 +73,23 @@ class SfMaintenanceEquipment(models.Model):
|
||||
straight_cutting_feed_rate = fields.Char('直线切削进给速度(mm/min)')
|
||||
rotary_cutting_feed_rate = fields.Char('回转切削进给速度(mm/min)')
|
||||
|
||||
X_precision = fields.Float('X轴定位精度(mm)', digits=(12, 3))
|
||||
X_precision_repeat = fields.Float('X轴重复定位精度(mm)', digits=(12, 3))
|
||||
Y_precision = fields.Float('Y轴定位精度(mm)', digits=(12, 3))
|
||||
Y_precision_repeat = fields.Float('Y轴重复定位精度(mm)', digits=(12, 3))
|
||||
Z_precision = fields.Float('Z轴定位精度(mm)', digits=(12, 3))
|
||||
Z_precision_repeat = fields.Float('Z轴重复定位精度(mm)', digits=(12, 3))
|
||||
a_precision = fields.Float('a轴定位精度(mm)', digits=(12, 3))
|
||||
a_precision_repeat = fields.Float('a轴重复定位精度(mm)', digits=(12, 3))
|
||||
b_precision = fields.Float('b轴定位精度(mm)', digits=(12, 3))
|
||||
b_precision_repeat = fields.Float('b轴重复定位精度(mm)', digits=(12, 3))
|
||||
c_precision = fields.Float('c轴定位精度(mm)', digits=(12, 3))
|
||||
c_precision_repeat = fields.Float('c轴重复定位精度(mm)', digits=(12, 3))
|
||||
X_precision = fields.Char('X轴定位精度(mm)')
|
||||
X_precision_repeat = fields.Char('X轴重复定位精度(mm)')
|
||||
Y_precision = fields.Char('Y轴定位精度(mm)')
|
||||
Y_precision_repeat = fields.Char('Y轴重复定位精度(mm)')
|
||||
Z_precision = fields.Char('Z轴定位精度(mm)')
|
||||
Z_precision_repeat = fields.Char('Z轴重复定位精度(mm)')
|
||||
a_precision = fields.Char('a轴定位精度(mm)')
|
||||
a_precision_repeat = fields.Char('a轴重复定位精度(mm)')
|
||||
b_precision = fields.Char('b轴定位精度(mm)')
|
||||
b_precision_repeat = fields.Char('b轴重复定位精度(mm)')
|
||||
c_precision = fields.Char('c轴定位精度(mm)')
|
||||
c_precision_repeat = fields.Char('c轴重复定位精度(mm)')
|
||||
|
||||
tool_full_diameter_max = fields.Float('刀具满刀最大直径(mm)')
|
||||
tool_perimeter_diameter_max = fields.Float('刀具邻空刀最大直径(mm)')
|
||||
T_tool_time = fields.Integer('T-T换刀时间(s)')
|
||||
C_tool_time = fields.Integer('C-C换刀时间(s)')
|
||||
T_tool_time = fields.Float('T-T换刀时间(s)', digits=(12, 1))
|
||||
C_tool_time = fields.Float('C-C换刀时间(s)', digits=(12, 1))
|
||||
|
||||
# 待删除字段
|
||||
precision_min = fields.Float('X轴定位精度min(mm)', digits=(12, 3))
|
||||
@@ -164,11 +164,12 @@ class SfMaintenanceEquipment(models.Model):
|
||||
number_of_knife_library = fields.Integer('刀库数量(把)')
|
||||
rotate_speed = fields.Integer('转速')
|
||||
# 加工进程
|
||||
a_axis = fields.Char('a轴')
|
||||
x_axis = fields.Integer('X轴')
|
||||
y_axis = fields.Integer('Y轴')
|
||||
z_axis = fields.Integer('Z轴')
|
||||
b_axis = fields.Integer('B轴')
|
||||
c_axis = fields.Integer('C轴')
|
||||
b_axis = fields.Char('B轴')
|
||||
c_axis = fields.Char('C轴')
|
||||
remark = fields.Char('备注')
|
||||
is_binding = fields.Boolean('是否绑定机床', default=False)
|
||||
control_system_id = fields.Many2one('sf.machine.control_system',
|
||||
@@ -191,6 +192,7 @@ class SfMaintenanceEquipment(models.Model):
|
||||
workpiece_load = fields.Char('工件最大负载(kg)')
|
||||
workbench_L = fields.Char('工作台长度(mm)')
|
||||
workbench_W = fields.Char('工作台宽度(mm)')
|
||||
workbench_H = fields.Char('工作台高度(mm)')
|
||||
machine_tool_L = fields.Char('机床长度(mm)')
|
||||
machine_tool_W = fields.Char('机床宽度(mm)')
|
||||
machine_tool_H = fields.Char('机床高度(mm)')
|
||||
@@ -518,6 +520,7 @@ class SfMaintenanceEquipment(models.Model):
|
||||
'lead_screw': item.lead_screw,
|
||||
'workbench_L': item.workbench_L,
|
||||
'workbench_W': item.workbench_W,
|
||||
'workbench_H': item.workbench_H,
|
||||
'guide_rail': item.guide_rail,
|
||||
'machine_tool_L': item.machine_tool_L,
|
||||
'machine_tool_W': item.machine_tool_W,
|
||||
|
||||
@@ -85,6 +85,11 @@
|
||||
<field name="workbench_W" class="o_address_zip"
|
||||
attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="workbench_H" string="高"/>
|
||||
<field name="workbench_H" class="o_address_zip"
|
||||
attrs="{'required': [('equipment_type', '=', '机床')]}"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="workpiece_load"/>
|
||||
<label for="machine_tool_L" string="机床尺寸(mm)"/>
|
||||
@@ -155,15 +160,15 @@
|
||||
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="b_axis" string="b"
|
||||
<label for="c_axis" string="c"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"/>
|
||||
<field name="b_axis" class="o_address_zip"
|
||||
<field name="c_axis" class="o_address_zip"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="c_axis" string="c"
|
||||
<label for="b_axis" string="b"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴','五轴'])]}"/>
|
||||
<field name="c_axis" class="o_address_zip"
|
||||
<field name="b_axis" class="o_address_zip"
|
||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴','五轴'])]}"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
|
||||
@@ -657,6 +657,7 @@ class MachineToolType(models.Model):
|
||||
# "lead_screw": item['lead_screw'],
|
||||
"workbench_L": item['workbench_L'],
|
||||
"workbench_W": item['workbench_W'],
|
||||
"workbench_H": item['workbench_H'],
|
||||
# "guide_rail": item['guide_rail'],
|
||||
"machine_tool_L": item['machine_tool_L'],
|
||||
"machine_tool_W": item['machine_tool_W'],
|
||||
@@ -739,6 +740,7 @@ class MachineToolType(models.Model):
|
||||
# "lead_screw": item['lead_screw'],
|
||||
"workbench_L": item['workbench_L'],
|
||||
"workbench_W": item['workbench_W'],
|
||||
"workbench_H": item['workbench_H'],
|
||||
# "guide_rail": item['guide_rail'],
|
||||
"machine_tool_L": item['machine_tool_L'],
|
||||
"machine_tool_W": item['machine_tool_W'],
|
||||
@@ -852,6 +854,7 @@ class MachineToolType(models.Model):
|
||||
# "lead_screw": item['lead_screw'],
|
||||
"workbench_L": item['workbench_L'],
|
||||
"workbench_W": item['workbench_W'],
|
||||
"workbench_H": item['workbench_H'],
|
||||
# "guide_rail": item['guide_rail'],
|
||||
"machine_tool_L": item['machine_tool_L'],
|
||||
"machine_tool_W": item['machine_tool_W'],
|
||||
@@ -934,6 +937,7 @@ class MachineToolType(models.Model):
|
||||
# "lead_screw": item['lead_screw'],
|
||||
"workbench_L": item['workbench_L'],
|
||||
"workbench_W": item['workbench_W'],
|
||||
"workbench_H": item['workbench_H'],
|
||||
# "guide_rail": item['guide_rail'],
|
||||
"machine_tool_L": item['machine_tool_L'],
|
||||
"machine_tool_W": item['machine_tool_W'],
|
||||
|
||||
@@ -8,7 +8,7 @@ class Common(models.Model):
|
||||
_description = u'公用类'
|
||||
|
||||
def print_zpl(self, zpl_str):
|
||||
WinDll_path = "D://桌面//pythonZPL//tsc_python_sdk_example//TSC_Python_SDK_Example//tsc_sample//libs//TSCLIB.dll"
|
||||
WinDll_path = "D://桌面//pythonZPL//zebra_zpl//libs//TSCLIB.dll"
|
||||
try:
|
||||
tsclibrary = ctypes.WinDLL(WinDll_path)
|
||||
tsclibrary.openportW("USB")
|
||||
|
||||
Reference in New Issue
Block a user