|
@@ -52,18 +52,18 @@ class ExcelParseFileDto:
|
|
|
|
|
|
class ExcelParseDto:
|
|
|
def __init__(
|
|
|
- self,
|
|
|
- task_id: int,
|
|
|
- version: str,
|
|
|
- project_id: str,
|
|
|
- project_name: str,
|
|
|
- project_stage: str,
|
|
|
- selected_zgs_id: int,
|
|
|
- zgs_list: list[ExcelParseZgsDto],
|
|
|
- selected_chapter: list[ExcelParseItemDto],
|
|
|
- # hierarchy: list[ExcelParseItemDto],
|
|
|
- # components: list[ExcelParseItemDto],
|
|
|
- files: list[ExcelParseFileDto],
|
|
|
+ self,
|
|
|
+ task_id: int,
|
|
|
+ version: str,
|
|
|
+ project_id: str,
|
|
|
+ project_name: str,
|
|
|
+ project_stage: str,
|
|
|
+ selected_zgs_id: int,
|
|
|
+ zgs_list: list[ExcelParseZgsDto],
|
|
|
+ selected_chapter: list[ExcelParseItemDto],
|
|
|
+ # hierarchy: list[ExcelParseItemDto],
|
|
|
+ # components: list[ExcelParseItemDto],
|
|
|
+ files: list[ExcelParseFileDto],
|
|
|
):
|
|
|
self.task_id = task_id
|
|
|
self.version = version
|
|
@@ -112,21 +112,21 @@ class ExcelParseResultDataDto:
|
|
|
# "ex_amount": excel中给出的数量, // number
|
|
|
# }
|
|
|
def __init__(
|
|
|
- self,
|
|
|
- zgs_id: int, # 总概算id
|
|
|
- zgs_code: str, # 总概算编号
|
|
|
- item_id: int, # 条⽬序号
|
|
|
- item_code: str, # 条⽬编码
|
|
|
- entry_name: str, # ⼯程或费⽤项⽬名称,来⾃于定额表,
|
|
|
- dinge_code: str, # 定额编号,
|
|
|
- units: str, # 单位,
|
|
|
- amount: float, # 数量,
|
|
|
- target_id: int, # ⽤户数据库中条⽬的id,-1表示没有,
|
|
|
- ex_file_id: str, # excel⽂件id,
|
|
|
- ex_cell: str, # 数量单元格位置,例如 "C17",
|
|
|
- ex_row: str, # 该⾏内容,由逗号连接多个单元格得到,
|
|
|
- ex_unit: str, # excel中给出的单位,
|
|
|
- ex_amount: float, # excel中给出的数量,
|
|
|
+ self,
|
|
|
+ zgs_id: int, # 总概算id
|
|
|
+ zgs_code: str, # 总概算编号
|
|
|
+ item_id: int, # 条⽬序号
|
|
|
+ item_code: str, # 条⽬编码
|
|
|
+ entry_name: str, # ⼯程或费⽤项⽬名称,来⾃于定额表,
|
|
|
+ dinge_code: str, # 定额编号,
|
|
|
+ units: str, # 单位,
|
|
|
+ amount: float, # 数量,
|
|
|
+ target_id: int, # ⽤户数据库中条⽬的id,-1表示没有,
|
|
|
+ ex_file_id: str, # excel⽂件id,
|
|
|
+ ex_cell: str, # 数量单元格位置,例如 "C17",
|
|
|
+ ex_row: str, # 该⾏内容,由逗号连接多个单元格得到,
|
|
|
+ ex_unit: str, # excel中给出的单位,
|
|
|
+ ex_amount: float, # excel中给出的数量,
|
|
|
):
|
|
|
self.zgs_id = zgs_id
|
|
|
self.zgs_code = zgs_code
|
|
@@ -192,11 +192,11 @@ class ExcelParseResultDataDto:
|
|
|
|
|
|
class ExcelParseResultDto:
|
|
|
def __init__(
|
|
|
- self,
|
|
|
- task_id: int,
|
|
|
- result: int = -1,
|
|
|
- reason: str = "",
|
|
|
- data: list[ExcelParseResultDataDto] = None,
|
|
|
+ self,
|
|
|
+ task_id: int,
|
|
|
+ result: int = -1,
|
|
|
+ reason: str = "",
|
|
|
+ data: list[ExcelParseResultDataDto] = None,
|
|
|
):
|
|
|
self.task_id = task_id
|
|
|
self.result = result # -1-失败;0-运行中;1-成功
|