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
905e94b2
Commit
905e94b2
authored
Mar 18, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善工时统计
parent
81514b6f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
WorkProjectMapper.xml
...gy-mapper/src/main/resources/mapper/WorkProjectMapper.xml
+4
-3
WorkProject.java
...del/src/main/java/cn/wisenergy/model/app/WorkProject.java
+4
-5
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+1
-1
No files found.
wisenergy-mapper/src/main/resources/mapper/WorkProjectMapper.xml
View file @
905e94b2
...
...
@@ -23,7 +23,7 @@
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, oa_project_id, project_name,business_id,business_name, type, manager_id, dept_id, work_time, cost_budget, is_conclusion,start_time,end_time, create_time, modify_time
id, oa_project_id, project_name,business_id,business_name, type, manager_id, dept_id, work_time, cost_budget, is_conclusion,start_time,end_time, create_time, modify_time
,conclusion_time
</sql>
<sql
id=
"table"
>
...
...
@@ -46,12 +46,13 @@
<if
test=
"endTime != null"
>
and end_time =#{endTime}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"modifyTime != null"
>
and modify_time
>
= modifyTime
</if>
<if
test=
"conclusionTime != null"
>
and conclusion_time
>
= conclusionTime
</if>
</sql>
<update
id=
"updateIsConclusionById"
>
UPDATE
<include
refid=
"table"
/>
SET is_conclusion = 0,
modify
_time = now()
SET is_conclusion = 0,
conclusion
_time = now()
WHERE id = #{id}
</update>
<update
id=
"updateProject"
>
...
...
@@ -225,7 +226,7 @@
AND manager_id = #{managerId}
</if>
<if
test=
"year != null"
>
AND YEAR (create_time)
<
= #{year} AND(
(is_conclusion = 0 AND year(modify_time) >= #{year}) or (is_conclusion = 1)
)
AND YEAR (create_time)
<
= #{year} AND(
year(conclusion_time) >= #{year} or is_conclusion = 1
)
</if>
</where>
</select>
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/WorkProject.java
View file @
905e94b2
...
...
@@ -62,11 +62,11 @@ public class WorkProject implements Serializable {
private
Integer
isConclusion
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
name
=
"startTime"
,
value
=
"项目开始时间"
)
@ApiModelProperty
(
name
=
"startTime"
,
value
=
"项目
预计
开始时间"
)
private
Date
startTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
name
=
"endTime"
,
value
=
"项目结束时间"
)
@ApiModelProperty
(
name
=
"endTime"
,
value
=
"项目
预计
结束时间"
)
private
Date
endTime
;
@ApiModelProperty
(
name
=
"createTime"
,
value
=
"创建时间"
)
...
...
@@ -75,7 +75,6 @@ public class WorkProject implements Serializable {
@ApiModelProperty
(
name
=
"modifyTime"
,
value
=
"修改时间"
)
private
Date
modifyTime
;
@ApiModelProperty
(
name
=
"conclusionTime"
,
value
=
"结项时间"
)
private
Date
conclusionTime
;
}
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
905e94b2
...
...
@@ -914,7 +914,7 @@ public class StatisticsServiceImpl implements StatisticsService {
setBorderStyle
(
BorderStyle
.
THIN
,
cellRangeAddress3
,
sheet1
);
// 项目行和总计行,正常工时和加班工时表头列数
short
lastCellNum
=
row_2
.
getLastCellNum
();
for
(
int
i
=
0
;
i
<
lastCellNum
/
2
;
i
++)
{
for
(
int
i
=
0
;
i
<
lastCellNum
/
2
-
1
;
i
++)
{
// 总计行
CellRangeAddress
cellRangeAddress4
=
new
CellRangeAddress
(
userWorkTimeStatisticsReport
.
size
()
+
2
,
userWorkTimeStatisticsReport
.
size
()
+
2
,
i
*
2
,
i
*
2
+
1
);
sheet1
.
addMergedRegion
(
cellRangeAddress4
);
...
...
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