1、优化货位信息接口、库位变更接口。
This commit is contained in:
@@ -436,6 +436,7 @@ class Manufacturing_Connect(http.Controller):
|
||||
DeciveId)))
|
||||
total_data = request.env['sf.shelf.location.datasync'].sudo().get_total_data()
|
||||
for item in shelfinfo:
|
||||
logging.info('货架已获取信息:%s' % item)
|
||||
shelf_barcode = request.env['sf.shelf.location.datasync'].sudo().find_our_code(
|
||||
total_data, item['Postion'])
|
||||
location_id = request.env['sf.shelf.location'].sudo().search(
|
||||
@@ -450,15 +451,15 @@ class Manufacturing_Connect(http.Controller):
|
||||
if tool:
|
||||
location_id.product_sn_id = tool.barcode_id.id
|
||||
# 修改功能刀具状态
|
||||
tool_state = {'Nomal': '正常', 'Warning': '报警'}
|
||||
if tool_state.get(item.get('State')):
|
||||
if tool_state.get(item.get('State')) != tool.functional_tool_status:
|
||||
if item.get('State') == '报警':
|
||||
if tool.functional_tool_status != item.get('State'):
|
||||
tool.write({
|
||||
'functional_tool_status': tool_state.get(item['State'])
|
||||
'functional_tool_status': item['State']
|
||||
})
|
||||
else:
|
||||
location_id.product_sn_id = False
|
||||
logging.info('货架已获取信息:%s' % item)
|
||||
if item['RfidCode']:
|
||||
logging.info('Rfid为【%s】的功能刀具在系统中不存在!' % item['RfidCode'])
|
||||
else:
|
||||
equipment_id = request.env['maintenance.equipment'].sudo().search([('name', '=', DeciveId)])
|
||||
if equipment_id:
|
||||
|
||||
Reference in New Issue
Block a user