1、重构cnc用刀校验方法,优化下发编程单后校验cnc用刀的逻辑;2、优化CAM创建方法;3、优化获取mrs编程单接口、优化编程单更新接口;

This commit is contained in:
yuxianghui
2024-10-09 17:52:20 +08:00
parent 62a2aed7d9
commit f18c0e3eaf
4 changed files with 111 additions and 33 deletions

View File

@@ -296,8 +296,13 @@ class MrpProduction(models.Model):
# 编程单更新
def update_programming_state(self):
try:
manufacturing_type = 'rework'
if self.is_scrap is False:
manufacturing_type = 'scrap'
elif self.tool_state == '2':
manufacturing_type = 'invalid_tool_rework'
res = {'programming_no': self.programming_no,
'manufacturing_type': 'rework' if self.is_scrap is False else 'scrap'}
'manufacturing_type': 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'])