|
@@ -2,7 +2,7 @@
|
|
|
# @Author: privacy
|
|
|
# @Date: 2022-07-07 13:12:17
|
|
|
# @Last Modified by: privacy
|
|
|
-# @Last Modified time: 2022-07-18 13:50:39
|
|
|
+# @Last Modified time: 2022-07-18 14:09:48
|
|
|
|
|
|
# 内部人才市场简历模板
|
|
|
|
|
@@ -198,6 +198,109 @@ class Inner(object):
|
|
|
else:
|
|
|
result[k] = [d]
|
|
|
|
|
|
+ ### 时间格式化
|
|
|
+ if result.get("出生年月"):
|
|
|
+ dates = re.findall(r'\d+' , result["出生年月"])
|
|
|
+ if len(dates) == 1:
|
|
|
+ result["出生年月"] = "{:4d}-01-01".format(int(dates[0]))
|
|
|
+ elif len(dates) == 2:
|
|
|
+ result["出生年月"] = "{:4d}-{:02d}-01".format(int(dates[0]), int(dates[1]))
|
|
|
+ elif len(dates) == 3:
|
|
|
+ result["出生年月"] = "{:4d}-{:02d}-{:02d}".format(int(dates[0]), int(dates[1]), int(dates[2]))
|
|
|
+
|
|
|
+ if result.get("任职时间"):
|
|
|
+ dates = re.findall(r'\d+' , result["任职时间"])
|
|
|
+ if len(dates) == 1:
|
|
|
+ result["任职时间"] = "{:4d}-01-01".format(int(dates[0]))
|
|
|
+ elif len(dates) == 2:
|
|
|
+ result["任职时间"] = "{:4d}-{:02d}-01".format(int(dates[0]), int(dates[1]))
|
|
|
+ elif len(dates) == 3:
|
|
|
+ result["任职时间"] = "{:4d}-{:02d}-{:02d}".format(int(dates[0]), int(dates[1]), int(dates[2]))
|
|
|
+
|
|
|
+ if result.get("参加工作时间"):
|
|
|
+ dates = re.findall(r'\d+' , result["参加工作时间"])
|
|
|
+ if len(dates) == 1:
|
|
|
+ result["参加工作时间"] = "{:4d}-01-01".format(int(dates[0]))
|
|
|
+ elif len(dates) == 2:
|
|
|
+ result["参加工作时间"] = "{:4d}-{:02d}-01".format(int(dates[0]), int(dates[1]))
|
|
|
+ elif len(dates) == 3:
|
|
|
+ result["参加工作时间"] = "{:4d}-{:02d}-{:02d}".format(int(dates[0]), int(dates[1]), int(dates[2]))
|
|
|
+
|
|
|
+ if result.get("最高学历毕业院校及毕业时间"):
|
|
|
+ dates = re.findall(r'\d+' , result["最高学历毕业院校及毕业时间"])
|
|
|
+ ws = re.findall(r'\w+' , result["最高学历毕业院校及毕业时间"])
|
|
|
+ if len(ws) > 0:
|
|
|
+ result["最高学历毕业院校"] = ws[0]
|
|
|
+ if len(dates) == 1:
|
|
|
+ result["最高学历毕业时间"] = "{:4d}-01-01".format(int(dates[0]))
|
|
|
+ elif len(dates) == 2:
|
|
|
+ result["最高学历毕业时间"] = "{:4d}-{:02d}-01".format(int(dates[0]), int(dates[1]))
|
|
|
+ elif len(dates) == 3:
|
|
|
+ result["最高学历毕业时间"] = "{:4d}-{:02d}-{:02d}".format(int(dates[0]), int(dates[1]), int(dates[2]))
|
|
|
+ result.pop("最高学历毕业院校及毕业时间")
|
|
|
+
|
|
|
+ if result.get("初始学历毕业院校及毕业时间"):
|
|
|
+ dates = re.findall(r'\d+' , result["初始学历毕业院校及毕业时间"])
|
|
|
+ ws = re.findall(r'\w+' , result["初始学历毕业院校及毕业时间"])
|
|
|
+ if len(ws) > 0:
|
|
|
+ result["初始学历毕业院校"] = ws[0]
|
|
|
+ if len(dates) == 1:
|
|
|
+ result["初始学历毕业时间"] = "{:4d}-01-01".format(int(dates[0]))
|
|
|
+ elif len(dates) == 2:
|
|
|
+ result["初始学历毕业时间"] = "{:4d}-{:02d}-01".format(int(dates[0]), int(dates[1]))
|
|
|
+ elif len(dates) == 3:
|
|
|
+ result["初始学历毕业时间"] = "{:4d}-{:02d}-{:02d}".format(int(dates[0]), int(dates[1]), int(dates[2]))
|
|
|
+ result.pop("初始学历毕业院校及毕业时间")
|
|
|
+
|
|
|
+ if result.get("学习经历"):
|
|
|
+ for idx, edu in enumerate(result["学习经历"]):
|
|
|
+ if edu.get("起止时间"):
|
|
|
+ dates = re.findall(r'\d+' , edu["起止时间"])
|
|
|
+ if len(dates) == 4:
|
|
|
+ result["学习经历"][idx]["起止时间"] = "{:4d}-{:02d}~{:4d}-{:02d}".format(int(dates[0]), int(dates[1]), int(dates[2]), int(dates[3]))
|
|
|
+
|
|
|
+ if result.get("培训经历"):
|
|
|
+ for idx, edu in enumerate(result["培训经历"]):
|
|
|
+ if edu.get("起止时间"):
|
|
|
+ dates = re.findall(r'\d+' , edu["起止时间"])
|
|
|
+ if len(dates) == 4:
|
|
|
+ result["培训经历"][idx]["起止时间"] = "{:4d}-{:02d}~{:4d}-{:02d}".format(int(dates[0]), int(dates[1]), int(dates[2]), int(dates[3]))
|
|
|
+
|
|
|
+ if result.get("工作经历"):
|
|
|
+ for idx, edu in enumerate(result["工作经历"]):
|
|
|
+ if edu.get("起止时间"):
|
|
|
+ dates = re.findall(r'\d+' , edu["起止时间"])
|
|
|
+ if len(dates) == 4:
|
|
|
+ result["工作经历"][idx]["起止时间"] = "{:4d}-{:02d}~{:4d}-{:02d}".format(int(dates[0]), int(dates[1]), int(dates[2]), int(dates[3]))
|
|
|
+
|
|
|
+ if result.get("项目经历"):
|
|
|
+ for idx, edu in enumerate(result["项目经历"]):
|
|
|
+ if edu.get("起止时间"):
|
|
|
+ dates = re.findall(r'\d+' , edu["起止时间"])
|
|
|
+ if len(dates) == 4:
|
|
|
+ result["项目经历"][idx]["起止时间"] = "{:4d}-{:02d}~{:4d}-{:02d}".format(int(dates[0]), int(dates[1]), int(dates[2]), int(dates[3]))
|
|
|
+
|
|
|
+ if result.get("获得职业资格证书情况"):
|
|
|
+ for idx, edu in enumerate(result["获得职业资格证书情况"]):
|
|
|
+ if edu.get("获得日期"):
|
|
|
+ dates = re.findall(r'\d+' , edu["获得日期"])
|
|
|
+ if len(dates) == 2:
|
|
|
+ result["获得职业资格证书情况"][idx]["获得日期"] = "{:4d}-{:02d}-01".format(int(dates[0]), int(dates[1]))
|
|
|
+
|
|
|
+ if result.get("奖惩情况"):
|
|
|
+ for idx, edu in enumerate(result["奖惩情况"]):
|
|
|
+ if edu.get("时间"):
|
|
|
+ dates = re.findall(r'\d+' , edu["时间"])
|
|
|
+ if len(dates) == 2:
|
|
|
+ result["奖惩情况"][idx]["时间"] = "{:4d}-{:02d}-01".format(int(dates[0]), int(dates[1]))
|
|
|
+
|
|
|
+ if result.get("主要家庭成员及社会关系"):
|
|
|
+ for idx, fam in enumerate(result["主要家庭成员及社会关系"]):
|
|
|
+ if fam.get("出生年月"):
|
|
|
+ dates = re.findall(r'\d+' , fam["出生年月"])
|
|
|
+ if len(dates) == 2:
|
|
|
+ result["主要家庭成员及社会关系"][idx]["出生年月"] = "{:4d}-{:02d}-01".format(int(dates[0]), int(dates[1]))
|
|
|
+
|
|
|
normal = self.json_obj["base"]
|
|
|
itenormal = self.json_obj["base"]
|
|
|
edunormal = self.json_obj["tal_training_experience"]
|