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
324e39f3
Commit
324e39f3
authored
Apr 28, 2025
by
‘老张’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
员工年假修改
parent
48c48c83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
6 deletions
+31
-6
EmployeeBalance.java
...i-psa/src/main/java/com/ruoyi/domain/EmployeeBalance.java
+13
-0
EmployeeBalanceServiceImpl.java
...va/com/ruoyi/service/impl/EmployeeBalanceServiceImpl.java
+6
-0
EmployeeBalanceMapper.xml
...in/resources/mapper/application/EmployeeBalanceMapper.xml
+12
-6
No files found.
ruoyi-psa/src/main/java/com/ruoyi/domain/EmployeeBalance.java
View file @
324e39f3
...
@@ -25,6 +25,10 @@ public class EmployeeBalance extends BaseEntity
...
@@ -25,6 +25,10 @@ public class EmployeeBalance extends BaseEntity
@Excel
(
name
=
"员工ID"
)
@Excel
(
name
=
"员工ID"
)
private
Long
employeeId
;
private
Long
employeeId
;
/** 员工姓名(关联到员工表) */
@Excel
(
name
=
"员工姓名"
)
private
String
name
;
/** 年假余额 */
/** 年假余额 */
@Excel
(
name
=
"年假余额/天"
)
@Excel
(
name
=
"年假余额/天"
)
private
BigDecimal
annualLeaveBalance
;
private
BigDecimal
annualLeaveBalance
;
...
@@ -59,6 +63,14 @@ public class EmployeeBalance extends BaseEntity
...
@@ -59,6 +63,14 @@ public class EmployeeBalance extends BaseEntity
this
.
employeeId
=
employeeId
;
this
.
employeeId
=
employeeId
;
}
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
BigDecimal
getAnnualLeaveBalance
()
{
public
BigDecimal
getAnnualLeaveBalance
()
{
return
annualLeaveBalance
;
return
annualLeaveBalance
;
}
}
...
@@ -96,6 +108,7 @@ public class EmployeeBalance extends BaseEntity
...
@@ -96,6 +108,7 @@ public class EmployeeBalance extends BaseEntity
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"id"
,
getId
())
.
append
(
"employeeId"
,
getEmployeeId
())
.
append
(
"employeeId"
,
getEmployeeId
())
.
append
(
"name"
,
getName
())
.
append
(
"annualLeaveBalance"
,
getAnnualLeaveBalance
())
.
append
(
"annualLeaveBalance"
,
getAnnualLeaveBalance
())
.
append
(
"overtimeHoursBalance"
,
getOvertimeHoursBalance
())
.
append
(
"overtimeHoursBalance"
,
getOvertimeHoursBalance
())
.
append
(
"createdAt"
,
getCreatedAt
())
.
append
(
"createdAt"
,
getCreatedAt
())
...
...
ruoyi-psa/src/main/java/com/ruoyi/service/impl/EmployeeBalanceServiceImpl.java
View file @
324e39f3
package
com
.
ruoyi
.
service
.
impl
;
package
com
.
ruoyi
.
service
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -64,6 +66,10 @@ public class EmployeeBalanceServiceImpl implements IEmployeeBalanceService
...
@@ -64,6 +66,10 @@ public class EmployeeBalanceServiceImpl implements IEmployeeBalanceService
@Override
@Override
public
int
updateEmployeeBalance
(
EmployeeBalance
employeeBalance
)
public
int
updateEmployeeBalance
(
EmployeeBalance
employeeBalance
)
{
{
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
formattedDate
=
dateFormat
.
format
(
new
Date
());
java
.
sql
.
Date
sqlDate
=
java
.
sql
.
Date
.
valueOf
(
formattedDate
);
employeeBalance
.
setUpdatedAt
(
sqlDate
);
return
employeeBalanceMapper
.
updateEmployeeBalance
(
employeeBalance
);
return
employeeBalanceMapper
.
updateEmployeeBalance
(
employeeBalance
);
}
}
...
...
ruoyi-psa/src/main/resources/mapper/application/EmployeeBalanceMapper.xml
View file @
324e39f3
...
@@ -16,14 +16,20 @@
...
@@ -16,14 +16,20 @@
select id, employee_id, annual_leave_balance, overtime_hours_balance, created_at, updated_at from employee_balance
select id, employee_id, annual_leave_balance, overtime_hours_balance, created_at, updated_at from employee_balance
</sql>
</sql>
<sql
id=
"selectEmployeeBalanceVo1"
>
select eb.id, eb.employee_id, ea.name, eb.annual_leave_balance, eb.overtime_hours_balance, eb.created_at, eb.updated_at
from employee_balance eb
join employment_approval ea on eb.employee_id = ea.id
</sql>
<select
id=
"selectEmployeeBalanceList"
parameterType=
"EmployeeBalance"
resultMap=
"EmployeeBalanceResult"
>
<select
id=
"selectEmployeeBalanceList"
parameterType=
"EmployeeBalance"
resultMap=
"EmployeeBalanceResult"
>
<include
refid=
"selectEmployeeBalanceVo"
/>
<include
refid=
"selectEmployeeBalanceVo
1
"
/>
<where>
<where>
<if
test=
"employeeId != null "
>
and employee_id = #{employeeId}
</if>
<if
test=
"employeeId != null "
>
and e
b.e
mployee_id = #{employeeId}
</if>
<if
test=
"annualLeaveBalance != null "
>
and annual_leave_balance = #{annualLeaveBalance}
</if>
<if
test=
"annualLeaveBalance != null "
>
and
eb.
annual_leave_balance = #{annualLeaveBalance}
</if>
<if
test=
"overtimeHoursBalance != null "
>
and overtime_hours_balance = #{overtimeHoursBalance}
</if>
<if
test=
"overtimeHoursBalance != null "
>
and
eb.
overtime_hours_balance = #{overtimeHoursBalance}
</if>
<if
test=
"createdAt != null "
>
and created_at = #{createdAt}
</if>
<if
test=
"createdAt != null "
>
and
eb.
created_at = #{createdAt}
</if>
<if
test=
"updatedAt != null "
>
and updated_at = #{updatedAt}
</if>
<if
test=
"updatedAt != null "
>
and
eb.
updated_at = #{updatedAt}
</if>
</where>
</where>
</select>
</select>
...
...
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