Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
isoft_psa
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王飞
isoft_psa
Commits
8e11071d
Commit
8e11071d
authored
Mar 31, 2025
by
Mr.Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人事管理-转正人数统计bug修复
parent
1ff0eede
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
112 additions
and
6 deletions
+112
-6
EmploymentApprovalMapper.java
...com/ruoyi/employment/mapper/EmploymentApprovalMapper.java
+24
-6
ApprovalRegularizationController.java
...rization/controller/ApprovalRegularizationController.java
+12
-0
ApprovalRegularizationMapper.java
...i/regularization/mapper/ApprovalRegularizationMapper.java
+3
-0
IApprovalRegularizationService.java
...egularization/service/IApprovalRegularizationService.java
+3
-0
ApprovalRegularizationServiceImpl.java
...ation/service/impl/ApprovalRegularizationServiceImpl.java
+5
-0
ApprovalRegularizationMapper.xml
...es/mapper/regularization/ApprovalRegularizationMapper.xml
+65
-0
No files found.
ruoyi-psa/src/main/java/com/ruoyi/employment/mapper/EmploymentApprovalMapper.java
View file @
8e11071d
...
...
@@ -62,7 +62,10 @@ public interface EmploymentApprovalMapper
*/
public
int
deleteEmploymentApprovalByIds
(
Long
[]
ids
);
/**
* 判断导入数据是否存在 是则更新 不是则插入
*
*/
public
boolean
checkExists
(
EmploymentApproval
employmentApproval
);
...
...
@@ -87,16 +90,31 @@ public interface EmploymentApprovalMapper
public
int
updateEmploymentApprovalDraft
(
EmploymentApproval
employmentApproval
);
/**
* 批准同意
*
*/
public
int
updateApproval
(
EmploymentApproval
employmentApproval
);
/**
* 批准不同意
*
*/
public
int
updateApproval2
(
EmploymentApproval
employmentApproval
);
/**
* 基本信息自动填入
*
*/
public
EmploymentApprovalDTO
selectApprovalWithUser
(
Long
userId
);
/**
* 统计当天的生日人数(hr专有)
*
*/
public
Long
countTodayBirthday
();
/**
* 统计当前季度生日卡人数(hr专有)
*
*/
public
Long
countCurrentQuarterBirthday
();
}
ruoyi-psa/src/main/java/com/ruoyi/regularization/controller/ApprovalRegularizationController.java
View file @
8e11071d
...
...
@@ -126,4 +126,16 @@ public class ApprovalRegularizationController extends BaseController
{
return
toAjax
(
approvalRegularizationService
.
updateRegular2
(
approvalRegularization
));
}
@PreAuthorize
(
"@ss.hasRole('admin') or @ss.hasRole('project-manager') or @ss.hasRole('hr') or @ss.hasRole('general-manager')"
)
@GetMapping
(
"/getCountCurrentRegularizationInTenDays"
)
public
AjaxResult
getCountCurrentRegularizationInTenDays
()
{
return
AjaxResult
.
success
(
approvalRegularizationService
.
countCurrentRegularizationInTenDays
());
}
}
ruoyi-psa/src/main/java/com/ruoyi/regularization/mapper/ApprovalRegularizationMapper.java
View file @
8e11071d
...
...
@@ -64,4 +64,7 @@ public interface ApprovalRegularizationMapper
public
int
updateRegular
(
ApprovalRegularization
approvalRegularization
);
public
int
updateRegular2
(
ApprovalRegularization
approvalRegularization
);
public
Long
countCurrentRegularizationInTenDays
();
}
ruoyi-psa/src/main/java/com/ruoyi/regularization/service/IApprovalRegularizationService.java
View file @
8e11071d
...
...
@@ -63,4 +63,7 @@ public interface IApprovalRegularizationService
public
int
updateRegular
(
ApprovalRegularization
approvalRegularization
);
public
int
updateRegular2
(
ApprovalRegularization
approvalRegularization
);
public
Long
countCurrentRegularizationInTenDays
();
}
ruoyi-psa/src/main/java/com/ruoyi/regularization/service/impl/ApprovalRegularizationServiceImpl.java
View file @
8e11071d
...
...
@@ -104,4 +104,9 @@ public class ApprovalRegularizationServiceImpl implements IApprovalRegularizatio
return
approvalRegularizationMapper
.
updateRegular2
(
approvalRegularization
);
}
@Override
public
Long
countCurrentRegularizationInTenDays
(){
return
approvalRegularizationMapper
.
countCurrentRegularizationInTenDays
();
}
}
ruoyi-psa/src/main/resources/mapper/regularization/ApprovalRegularizationMapper.xml
View file @
8e11071d
...
...
@@ -172,4 +172,69 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<select
id=
"countCurrentRegularizationInTenDays"
resultType=
"Long"
>
SELECT COUNT(*) FROM approval_regularization
<where>
<if
test=
"achievementDescription != null and achievementDescription != ''"
>
and achievement_description = #{achievementDescription}
</if>
<if
test=
"selfEvaluation != null and selfEvaluation != ''"
>
and self_evaluation = #{selfEvaluation}
</if>
<if
test=
"confirmationMaterials != null and confirmationMaterials != ''"
>
and confirmation_materials = #{confirmationMaterials}
</if>
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"applicationTime != null "
>
and application_time = #{applicationTime}
</if>
<if
test=
"workNumber != null and workNumber != ''"
>
and work_number = #{workNumber}
</if>
<if
test=
"serviceDepart != null and serviceDepart != ''"
>
and service_depart = #{serviceDepart}
</if>
<if
test=
"position != null and position != ''"
>
and position = #{position}
</if>
<if
test=
"employmentForm != null and employmentForm != ''"
>
and employment_form = #{employmentForm}
</if>
<if
test=
"idNumber != null and idNumber != ''"
>
and id_number = #{idNumber}
</if>
<if
test=
"serviceDate != null "
>
and service_date = #{serviceDate}
</if>
<if
test=
"proposedDate != null "
>
and proposed_date = #{proposedDate}
</if>
<if
test=
"formalSalary != null "
>
and formal_salary = #{formalSalary}
</if>
<if
test=
"trialPeriodSalary != null "
>
and trial_period_salary = #{trialPeriodSalary}
</if>
<if
test=
"departHead != null and departHead != ''"
>
and depart_head = #{departHead}
</if>
<if
test=
"isPassPeriod != null "
>
and is_pass_period = #{isPassPeriod}
</if>
<if
test=
"departManagerSignature != null and departManagerSignature != ''"
>
and depart_manager_signature = #{departManagerSignature}
</if>
<if
test=
"officialConversionDate != null "
>
and official_conversion_date = #{officialConversionDate}
</if>
<if
test=
"managerConfirm != null "
>
and manager_confirm = #{managerConfirm}
</if>
<if
test=
"confirmationApprovalState != null "
>
and confirmation_approval_state = #{confirmationApprovalState}
</if>
<if
test=
"currentNode != null "
>
and current_node = #{currentNode}
</if>
AND (
-- 情况1:调整到当前年
DATEDIFF(
COALESCE( -- 处理非法日期(如闰年问题)
STR_TO_DATE(
CONCAT(YEAR(CURDATE()), '-', MONTH(proposed_date), '-', DAY(proposed_date)),
'%Y-%m-%d'
),
DATE_ADD( -- 如果日期非法,自动跳到下个月第一天
STR_TO_DATE(
CONCAT(YEAR(CURDATE()), '-', MONTH(proposed_date), '-01'),
'%Y-%m-%d'
),
INTERVAL DAY(proposed_date) DAY
)
),
CURDATE()
) BETWEEN 0 AND 10
OR
-- 情况2:调整到下一年
DATEDIFF(
COALESCE(
STR_TO_DATE(
CONCAT(YEAR(CURDATE()) + 1, '-', MONTH(proposed_date), '-', DAY(proposed_date)),
'%Y-%m-%d'
),
DATE_ADD(
STR_TO_DATE(
CONCAT(YEAR(CURDATE()) + 1, '-', MONTH(proposed_date), '-01'),
'%Y-%m-%d'
),
INTERVAL DAY(proposed_date) DAY
)
),
CURDATE()
) BETWEEN 0 AND 10
)
</where>
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment