|
@@ -45,6 +45,7 @@ async def create_pattern(
|
|
|
id=new_guid(),
|
|
|
serial_number=info['serial_number'],
|
|
|
declaration_id = new_declaration.id,
|
|
|
+ warehouse_id = info['warehouse_id'],
|
|
|
material_type = info['material_type'],
|
|
|
material_code = info['material_code'],
|
|
|
material_quantity = info['material_quantity'],
|
|
@@ -84,6 +85,7 @@ async def update_pattern(
|
|
|
id=new_guid(),
|
|
|
serial_number=info['serial_number'],
|
|
|
declaration_id=update_declaration.id,
|
|
|
+ warehouse_id = info['warehouse_id'],
|
|
|
material_type=info['material_type'],
|
|
|
material_code=info['material_code'],
|
|
|
material_quantity=info['material_quantity'],
|
|
@@ -100,6 +102,7 @@ async def update_pattern(
|
|
|
id=new_guid(),
|
|
|
serial_number=info['serial_number'],
|
|
|
declaration_id=update_declaration.id,
|
|
|
+ warehouse_id = info['warehouse_id'],
|
|
|
material_type=info['material_type'],
|
|
|
material_code=info['material_code'],
|
|
|
material_quantity=info['material_quantity'],
|
|
@@ -111,6 +114,7 @@ async def update_pattern(
|
|
|
detail_list.append(new_detail.id)
|
|
|
else:
|
|
|
detail.serial_number = info['serial_number']
|
|
|
+ detail.warehouse_id = info['warehouse_id']
|
|
|
detail.material_type = info['material_type']
|
|
|
detail.material_code = info['material_code']
|
|
|
detail.material_quantity = info['material_quantity']
|
|
@@ -158,8 +162,11 @@ async def get_pattern_info(
|
|
|
for detail_info in declaration_id_get_declaration_detail_list(db,id):
|
|
|
material_type_info = type_id_get_material_type_info(db,detail_info.material_type)
|
|
|
material_into = material_id_get_material_info(db,detail_info.material_code)
|
|
|
+ warehouse_info = warehouse_id_get_warehouse_info(db,detail_info.warehouse_id)
|
|
|
detail.append({"id":detail_info.id,
|
|
|
"serial_number":detail_info.serial_number,
|
|
|
+ "warehouse_id":detail_info.warehouse_id,
|
|
|
+ "warehouse_name":warehouse_info.warehouse_name,
|
|
|
"material_type":detail_info.material_type,
|
|
|
"material_category_name":material_type_info.material_category_name,
|
|
|
"material_code":detail_info.material_code,
|