|
@@ -601,3 +601,27 @@ INSERT INTO `cf_menu` (`MENUID`, `APPLICATIONID`, `PARENTMENUID`, `MNUSYSTEM`, `
|
|
|
INSERT INTO `cf_menu` (`MENUID`, `APPLICATIONID`, `PARENTMENUID`, `MNUSYSTEM`, `MENUORDER`, `MENUNO`, `MENUNAME`, `MENUPROGRAM`, `MENUPIC`, `MENUDESC`, `ISVISIBLE`, `ISLEAF`, `ISBLANK`) VALUES ('a30bc101-0008-0003-0001-557a666c7ff8', 'f0c4fa7f9f3c4fb6bd56aac608b7ad3f', 'a30bc101-0000-0003-0001-557a666c7ff8', NULL, 2, 'home.leaderAssessEdit2', '编辑干部试用期届满考核', '', '', '', 0, 0, NULL);
|
|
|
INSERT INTO `cf_menu` (`MENUID`, `APPLICATIONID`, `PARENTMENUID`, `MNUSYSTEM`, `MENUORDER`, `MENUNO`, `MENUNAME`, `MENUPROGRAM`, `MENUPIC`, `MENUDESC`, `ISVISIBLE`, `ISLEAF`, `ISBLANK`) VALUES ('a30bc101-0009-0003-0001-557a666c7ff8', 'f0c4fa7f9f3c4fb6bd56aac608b7ad3f', 'a30bc101-0000-0003-0001-557a666c7ff8', NULL, 3, 'home.leaderAssessDetail2', '查看干部试用期届满考核详情', '', '', '', 0, 0, NULL);
|
|
|
INSERT INTO `cf_menu` (`MENUID`, `APPLICATIONID`, `PARENTMENUID`, `MNUSYSTEM`, `MENUORDER`, `MENUNO`, `MENUNAME`, `MENUPROGRAM`, `MENUPIC`, `MENUDESC`, `ISVISIBLE`, `ISLEAF`, `ISBLANK`) VALUES ('a30bc101-0000-0003-0001-557a666c7ff8', 'f0c4fa7f9f3c4fb6bd56aac608b7ad3f', 'a30bc101-0000-0000-0001-557a666c7ff8', NULL, 3, 'home.leaderAssessList2', '干部试用期届满考核', '', '', '', 1, 0, NULL);
|
|
|
+
|
|
|
+
|
|
|
+-- 年龄计算函数
|
|
|
+set global log_bin_trust_function_creators=TRUE;
|
|
|
+
|
|
|
+DELIMITER $$
|
|
|
+CREATE FUNCTION `calculate_age` (birthdate DATE)
|
|
|
+RETURNS INTEGER
|
|
|
+BEGIN
|
|
|
+
|
|
|
+declare age int;
|
|
|
+set age =0;
|
|
|
+if month(current_date) > MONTH(birthdate) then
|
|
|
+ set age= year(current_date) - YEAR(birthdate) ;
|
|
|
+ elseif month(current_date) = MONTH(birthdate) and day(current_date) > DAY(birthdate) then
|
|
|
+ set age = year(current_date) - YEAR(birthdate);
|
|
|
+ else set age = year(current_date) - YEAR(birthdate) - 1;
|
|
|
+end if;
|
|
|
+
|
|
|
+return age;
|
|
|
+
|
|
|
+END$$
|
|
|
+
|
|
|
+DELIMITER ;
|