|
@@ -3111,8 +3111,10 @@ def update_document_from_dynamic(_proj):
|
|
|
def to_project_json(projects):
|
|
|
|
|
|
list_proj = []
|
|
|
+ used_uuid = set()
|
|
|
for _proj in projects:
|
|
|
_uuid = _proj.get(project_uuid,"")
|
|
|
+
|
|
|
update_uuid = _proj.get("update_uuid","")
|
|
|
_project_uuid = _proj.get("project_uuid","")
|
|
|
if "enterprise" in _proj:
|
|
@@ -3123,7 +3125,12 @@ def to_project_json(projects):
|
|
|
list_update_uuid.append(_project_uuid)
|
|
|
list_update_uuid = list(set(list_update_uuid))
|
|
|
if len(list_uuid)>0:
|
|
|
- _proj["keep_uuid"] = list_uuid[0]
|
|
|
+ _proj["keep_uuid"] = ""
|
|
|
+ for _uuid in list_uuid:
|
|
|
+ if _uuid not in used_uuid:
|
|
|
+ used_uuid.add(_uuid)
|
|
|
+ _proj["keep_uuid"] = list_uuid[0]
|
|
|
+
|
|
|
_proj["delete_uuid"] = ",".join(list_uuid[1:])
|
|
|
list_update_uuid.extend(list_uuid[1:])
|
|
|
_proj["update_uuid"] = ",".join(list_update_uuid)
|
|
@@ -3144,6 +3151,17 @@ def to_project_json(projects):
|
|
|
if "project_uuid" in _proj:
|
|
|
_proj.pop("project_uuid")
|
|
|
update_document_from_dynamic(_proj)
|
|
|
+ for _proj in projects:
|
|
|
+ delete_uuid = _proj.get("delete_uuid","")
|
|
|
+ _find = False
|
|
|
+ l_uuid = []
|
|
|
+ for _uuid in delete_uuid.split(","):
|
|
|
+ if _uuid in used_uuid:
|
|
|
+ _find = True
|
|
|
+ else:
|
|
|
+ l_uuid.append(_uuid)
|
|
|
+ if _find:
|
|
|
+ _proj["delete_uuid"] = ",".join(l_uuid)
|
|
|
return json.dumps(list_proj,cls=MyEncoder,ensure_ascii=False)
|
|
|
|
|
|
def get_page_time_dis(page_time,n_page_time):
|