Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
fbacf05f
Commit
fbacf05f
authored
Apr 16, 2025
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试bug修改
parent
87d7c09a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
11 deletions
+88
-11
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceStatServiceImpl.java
...le/attendance/service/impl/AttendanceStatServiceImpl.java
+1
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/ibatis/StaffCareDaoImpl.java
...mortals/xhx/module/staff/dao/ibatis/StaffCareDaoImpl.java
+38
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/model/vo/StaffCareVo.java
...va/com/mortals/xhx/module/staff/model/vo/StaffCareVo.java
+10
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffCareController.java
...com/mortals/xhx/module/staff/web/StaffCareController.java
+14
-0
attendance-performance-manager/src/main/resources/sqlmap/module/staff/StaffCareMapperExt.xml
...main/resources/sqlmap/module/staff/StaffCareMapperExt.xml
+25
-10
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceStatServiceImpl.java
View file @
fbacf05f
...
@@ -359,7 +359,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
...
@@ -359,7 +359,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
statMap
.
put
(
temp
.
getStaffId
(),
temp
);
statMap
.
put
(
temp
.
getStaffId
(),
temp
);
}
}
String
attendanceSummary
=
""
;
String
attendanceSummary
=
""
;
int
normal
=
4
;
//正常次数
int
normal
=
2
;
//正常次数
if
(
item
.
getMorningTimes
()
>
0
)
{
if
(
item
.
getMorningTimes
()
>
0
)
{
attendanceSummary
+=
"缺卡*"
+
item
.
getMorningTimes
()
+
"次;"
;
attendanceSummary
+=
"缺卡*"
+
item
.
getMorningTimes
()
+
"次;"
;
normal
=
normal
-
item
.
getMorningTimes
();
normal
=
normal
-
item
.
getMorningTimes
();
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/ibatis/StaffCareDaoImpl.java
View file @
fbacf05f
...
@@ -2,10 +2,15 @@ package com.mortals.xhx.module.staff.dao.ibatis;
...
@@ -2,10 +2,15 @@ package com.mortals.xhx.module.staff.dao.ibatis;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.ParamDto
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.module.staff.dao.StaffCareDao
;
import
com.mortals.xhx.module.staff.dao.StaffCareDao
;
import
com.mortals.xhx.module.staff.model.StaffCareEntity
;
import
com.mortals.xhx.module.staff.model.StaffCareEntity
;
import
org.apache.ibatis.session.RowBounds
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 员工关怀信息DaoImpl DAO接口
* 员工关怀信息DaoImpl DAO接口
...
@@ -32,5 +37,38 @@ public class StaffCareDaoImpl extends BaseCRUDDaoMybatis<StaffCareEntity,Long> i
...
@@ -32,5 +37,38 @@ public class StaffCareDaoImpl extends BaseCRUDDaoMybatis<StaffCareEntity,Long> i
return
this
.
getSqlSession
().
update
(
this
.
getSqlId
(
"initSendStatus"
));
return
this
.
getSqlSession
().
update
(
this
.
getSqlId
(
"initSendStatus"
));
}
}
@Override
public
Result
<
StaffCareEntity
>
getList
(
StaffCareEntity
params
,
PageInfo
pageInfo
)
{
Result
result
=
new
Result
();
List
list
=
null
;
if
(
pageInfo
.
isCountPage
())
{
int
count
=
this
.
getStaffCareListCount
(
params
);
if
(
count
==
0
)
{
list
=
new
ArrayList
();
}
else
if
(
pageInfo
.
getPrePageResult
()
==
-
1
)
{
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffCareList"
),
params
);
}
else
{
RowBounds
rowBounds
=
new
RowBounds
(
pageInfo
.
getBeginIndex
(),
pageInfo
.
getPrePageResult
());
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffCareList"
),
params
,
rowBounds
);
}
pageInfo
.
setTotalResult
(
count
);
result
.
setPageInfo
(
pageInfo
);
result
.
setList
((
List
)
list
);
}
else
{
if
(
pageInfo
.
getPrePageResult
()
==
-
1
)
{
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffCareList"
),
params
);
}
else
{
RowBounds
rowBounds
=
new
RowBounds
(
pageInfo
.
getBeginIndex
(),
pageInfo
.
getPrePageResult
());
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getStaffCareList"
),
params
,
rowBounds
);
}
pageInfo
.
setTotalResult
(-
1
);
result
.
setPageInfo
(
pageInfo
);
result
.
setList
(
list
);
}
return
result
;
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/model/vo/StaffCareVo.java
View file @
fbacf05f
...
@@ -31,4 +31,14 @@ public class StaffCareVo extends BaseEntityLong {
...
@@ -31,4 +31,14 @@ public class StaffCareVo extends BaseEntityLong {
/** 参数值 */
/** 参数值 */
private
Integer
paramValue
;
private
Integer
paramValue
;
/** 开始 出生日期 */
private
String
birthdayStart
;
/** 结束 出生日期 */
private
String
birthdayEnd
;
/** 开始 入职时间 */
private
String
entryDateStart
;
/** 结束 入职时间 */
private
String
entryDateEnd
;
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffCareController.java
View file @
fbacf05f
package
com.mortals.xhx.module.staff.web
;
package
com.mortals.xhx.module.staff.web
;
import
cn.hutool.core.date.DateUtil
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -37,6 +38,8 @@ import com.mortals.xhx.module.staff.service.StaffCareService;
...
@@ -37,6 +38,8 @@ import com.mortals.xhx.module.staff.service.StaffCareService;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
java.time.YearMonth
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -116,6 +119,16 @@ public class StaffCareController extends BaseCRUDJsonBodyMappingController<Staff
...
@@ -116,6 +119,16 @@ public class StaffCareController extends BaseCRUDJsonBodyMappingController<Staff
if
(
query
.
getMonth
()==
null
){
if
(
query
.
getMonth
()==
null
){
query
.
setMonth
(
month
);
query
.
setMonth
(
month
);
}
}
// YearMonth yearMonth = YearMonth.of(year,month);
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// if(query.getCareType()==1){
// query.setBirthdayStart(yearMonth.atDay(1).format(formatter));
// query.setBirthdayEnd(yearMonth.atEndOfMonth().format(formatter));
// }
// if(query.getCareType()==2){
// query.setEntryDateStart(yearMonth.atDay(1).format(formatter));
// query.setEntryDateEnd(yearMonth.atEndOfMonth().format(formatter));
// }
}
}
...
@@ -166,4 +179,5 @@ public class StaffCareController extends BaseCRUDJsonBodyMappingController<Staff
...
@@ -166,4 +179,5 @@ public class StaffCareController extends BaseCRUDJsonBodyMappingController<Staff
ret
.
put
(
"data"
,
model
);
ret
.
put
(
"data"
,
model
);
return
ret
.
toJSONString
();
return
ret
.
toJSONString
();
}
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/staff/StaffCareMapperExt.xml
View file @
fbacf05f
...
@@ -4,25 +4,32 @@
...
@@ -4,25 +4,32 @@
<mapper
namespace=
"com.mortals.xhx.module.staff.dao.ibatis.StaffCareDaoImpl"
>
<mapper
namespace=
"com.mortals.xhx.module.staff.dao.ibatis.StaffCareDaoImpl"
>
<!-- 获取列表 -->
<!-- 获取列表 -->
<select
id=
"getStaffCareList"
parameterType=
"com.mortals.xhx.module.staff.model.StaffCareEntity"
resultMap=
"StaffCareEntity-Map"
>
<select
id=
"getStaffCareList"
parameterType=
"com.mortals.xhx.module.staff.model.StaffCareEntity"
resultMap=
"StaffCareEntity-Map"
>
select
<include
refid=
"_columns"
/>
select
a.*
from mortals_xhx_staff_care as a
from mortals_xhx_staff_care as a
where 1=1
where 1=1
<if
test=
"careType != null and careType ==1"
>
<if
test=
"careType != null and careType ==1"
>
and MONTH(birthday) = #{month}
and a.careType = 1
and MONTH(a.birthday) = #{month}
<if
test=
"day != null"
>
<if
test=
"day != null"
>
and DAY(birthday) = #{day}
and DAY(a.birthday) = #{day}
</if>
<if
test=
"staffName != null and staffName != ''"
>
and a.staffName like #{staffName}
</if>
</if>
</if>
</if>
<if
test=
"careType != null and careType ==2"
>
<if
test=
"careType != null and careType ==2"
>
and MONTH(entryDate) = #{month}
and a.careType = 2
and MONTH(a.entryDate) = #{month}
<if
test=
"day != null"
>
<if
test=
"day != null"
>
and DAY(entryDate) = #{day}
and DAY(a.entryDate) = #{day}
</if>
<if
test=
"staffName != null and staffName != ''"
>
and a.staffName like #{staffName}
</if>
</if>
</if>
</if>
</select>
</select>
<!-- 获取 -->
<!-- 获取 -->
<select
id=
"getStaffCareListCount"
parameterType=
"com.mortals.xhx.module.staff.model.StaffCareEntity"
resultType=
"int"
>
<select
id=
"getStaffCareListCount"
parameterType=
"com.mortals.xhx.module.staff.model.StaffCareEntity"
resultType=
"int"
>
select count(1)
select count(1)
...
@@ -30,15 +37,23 @@
...
@@ -30,15 +37,23 @@
where 1=1
where 1=1
<if
test=
"careType != null and careType ==1"
>
<if
test=
"careType != null and careType ==1"
>
and MONTH(birthday) = #{month}
and a.careType = 1
and MONTH(a.birthday) = #{month}
<if
test=
"day != null"
>
<if
test=
"day != null"
>
and DAY(birthday) = #{day}
and DAY(a.birthday) = #{day}
</if>
<if
test=
"staffName != null and staffName != ''"
>
and a.staffName like #{staffName}
</if>
</if>
</if>
</if>
<if
test=
"careType != null and careType ==2"
>
<if
test=
"careType != null and careType ==2"
>
and MONTH(entryDate) = #{month}
and a.careType = 2
and MONTH(a.entryDate) = #{month}
<if
test=
"day != null"
>
<if
test=
"day != null"
>
and DAY(entryDate) = #{day}
and DAY(a.entryDate) = #{day}
</if>
<if
test=
"staffName != null and staffName != ''"
>
and a.staffName like #{staffName}
</if>
</if>
</if>
</if>
</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