Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
work_service
Project
Project
Details
Activity
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
licc
work_service
Commits
2f8e33d5
Commit
2f8e33d5
authored
May 14, 2021
by
liaoanyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目是否还有未审批工时的判断
parent
e7c53e59
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
4 deletions
+31
-4
WorkTimeOrderMapper.java
...rc/main/java/cn/wisenergy/mapper/WorkTimeOrderMapper.java
+7
-0
WorkProjectTimeCost.xml
...-mapper/src/main/resources/mapper/WorkProjectTimeCost.xml
+1
-0
WorkTimeOrderMapper.xml
...-mapper/src/main/resources/mapper/WorkTimeOrderMapper.xml
+11
-0
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+4
-4
WorkProjectServiceImpl.java
...ava/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
+8
-0
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/WorkTimeOrderMapper.java
View file @
2f8e33d5
...
...
@@ -129,4 +129,11 @@ public interface WorkTimeOrderMapper extends BaseMapper<WorkTimeOrder> {
int
countByWorkDay
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"enbDate"
)
String
endDate
);
int
addManyLeaveOrder
(
@Param
(
"workTimeOrders"
)
List
<
WorkTimeOrder
>
workTimeOrders
);
/**
* 查询为未审批的项目工时
* @param projectId 项目id
* @return
*/
List
<
WorkTimeOrder
>
selectProjectIsEnd
(
@Param
(
"projectId"
)
Integer
projectId
);
}
wisenergy-mapper/src/main/resources/mapper/WorkProjectTimeCost.xml
View file @
2f8e33d5
...
...
@@ -77,6 +77,7 @@
WHERE
t.work_day >= #{date} AND s.create_time
<
work_day AND s.end_time > work_day
AND t.`status` IN (2, 5)
GROUP BY
`type`,
project_id,
...
...
wisenergy-mapper/src/main/resources/mapper/WorkTimeOrderMapper.xml
View file @
2f8e33d5
...
...
@@ -600,4 +600,15 @@
</if>
</where>
</select>
<select
id=
"selectProjectIsEnd"
parameterType=
"int"
resultMap=
"BaseResultMap"
>
select project_id,user_id,`type`,is_overtime,work_time
from work_time_order
<where>
<if
test=
"projectId != null"
>
project_id =#{projectId}
</if>
and `status` IN(1,3,4)
</where>
</select>
</mapper>
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
2f8e33d5
...
...
@@ -160,8 +160,6 @@ public class StatisticsServiceImpl implements StatisticsService {
double
days1
=
workTimeOrder
.
getWorkTime
();
//统计天数
days
+=
days1
/
8
;
System
.
out
.
println
(
"xxxxxxxxxxxxxxxxxxxxxxxx"
+
days1
);
System
.
out
.
println
(
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+
days
);
}
}
statisticsTableDto
.
setOvertimes
(
overtimes
);
...
...
@@ -452,6 +450,8 @@ public class StatisticsServiceImpl implements StatisticsService {
@Override
public
HSSFWorkbook
exportWorkTimeExcel
(
GetMonthlyCollectParam
param
)
{
log
.
info
(
"StatisticsServiceImpl[]exportWorkTimeExcel[]input.param{}"
+
param
);
//是否为当月,默认为false
boolean
isToday
=
false
;
// 去除分页条件
param
.
setSize
(
null
);
param
.
setCurrentPage
(
null
);
...
...
@@ -472,6 +472,7 @@ public class StatisticsServiceImpl implements StatisticsService {
if
(
year
==
param
.
getYear
()
&&
month
==
param
.
getMonth
())
{
dayCount1
=
DateUtil
.
daysBetween
(
DateUtil
.
getFirstDayOfMonth
(
now
),
now
)
+
1
;
isToday
=
true
;
}
else
{
dayCount1
=
dayCount
;
}
...
...
@@ -497,7 +498,7 @@ public class StatisticsServiceImpl implements StatisticsService {
// 第一列列宽
sheet
.
setColumnWidth
(
1
,
EXCEL_WIDTH
);
// 获取本月应上班日期集合
List
<
Date
>
dates
=
this
.
currentMonthWorkDays
(
date
,
false
);
List
<
Date
>
dates
=
this
.
currentMonthWorkDays
(
date
,
isToday
);
List
<
Integer
>
days
=
new
ArrayList
<>();
for
(
Date
date1
:
dates
)
{
days
.
add
(
DateUtil
.
getDay
(
date1
));
...
...
@@ -545,7 +546,6 @@ public class StatisticsServiceImpl implements StatisticsService {
//加班天数
row_i
.
createCell
(
3
).
setCellValue
(
next
.
getOvertimes
());
row_i
.
getCell
(
3
).
setCellStyle
(
cellStyle
);
//漏报天数
row_i
.
createCell
(
4
).
setCellValue
(
dates
.
size
()-
next
.
getUnderreportings
());
row_i
.
getCell
(
4
).
setCellStyle
(
cellStyle
);
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
View file @
2f8e33d5
...
...
@@ -78,6 +78,9 @@ public class WorkProjectServiceImpl implements WorkProjectService {
@Autowired
private
WorkUserMapper
workUserMapper
;
@Autowired
private
WorkTimeOrderMapper
workTimeOrderMapper
;
// 项目编号
private
static
final
Integer
PROJECT_CODE
=
1
;
...
...
@@ -293,6 +296,11 @@ public class WorkProjectServiceImpl implements WorkProjectService {
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
WORK_PROJECT_IS_NULL
);
}
//判断项目是否存在为审批工时
List
<
WorkTimeOrder
>
workTimeOrders
=
workTimeOrderMapper
.
selectProjectIsEnd
(
projectId
);
if
(
workTimeOrders
.
size
()!=
0
){
return
false
;
}
workProjectMapper
.
updateIsConclusionById
(
projectId
);
// 插入更变日志
...
...
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