feat(adopt): 决策273 单价行 Total 采纳逻辑迁回 API 侧并调整 x_side 读取
This commit is contained in:
@@ -36,7 +36,7 @@ def _free_port():
|
||||
# ------------------------------------------------------------------ 造数
|
||||
def make_cos4(path, proj_name, bills, lmes=(), build_unit="测试建设单位",
|
||||
proj_lmes=None, uw_lmes=None, zip_ts=None, uw_lme_attrs=None,
|
||||
lme_rot=False):
|
||||
lme_rot=False, norm_extra=""):
|
||||
"""构造最小可解析的 .cos4(zip 内 Project.xml + 单位工程 xml)。
|
||||
|
||||
bills: [(编码, 名称, 特征, 单位, 工程量, 单价)] —— 分部分项清单(自动配 1 条定额 + 定额消耗)
|
||||
@@ -71,12 +71,13 @@ def make_cos4(path, proj_name, bills, lmes=(), build_unit="测试建设单位",
|
||||
return (
|
||||
'<WorkElement Number=%s Name=%s Attr=%s Unit=%s Quantity=%s Price=%s Total=%s>'
|
||||
'<Norm Number="N-%d" Name=%s Unit=%s Quantity=%s Price="80" Total=%s>'
|
||||
'<LabourMaterialsEquipmentsMachinesElement Number=%s Quantity="1.5"/>'
|
||||
'<LabourMaterialsEquipmentsMachinesElement Number=%s Quantity="1.5"/>%s'
|
||||
'</Norm></WorkElement>'
|
||||
% (quoteattr(num), quoteattr(name), quoteattr(attr), quoteattr(unit),
|
||||
quoteattr(str(qty)), quoteattr(str(price)), quoteattr(str(qty * price)),
|
||||
i + 1, quoteattr(name + "安装"), quoteattr(unit),
|
||||
quoteattr(str(qty)), quoteattr(str(qty * 80)), quoteattr(lme0)))
|
||||
quoteattr(str(qty)), quoteattr(str(qty * 80)), quoteattr(lme0),
|
||||
norm_extra))
|
||||
|
||||
uw = (
|
||||
'<UnitWorks Number="UW1" Name="1号楼" Total="999999" Specialty="建筑工程">'
|
||||
|
||||
Reference in New Issue
Block a user