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
c6e6724f
Commit
c6e6724f
authored
Jun 01, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查询项目数量出错
parent
2f8e33d5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
88 deletions
+40
-88
DayWorkTimeAndType.java
.../main/java/cn/wisenergy/model/dto/DayWorkTimeAndType.java
+2
-2
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+32
-35
WorkProjectServiceImpl.java
...ava/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
+1
-1
ShiroConfig.java
.../src/main/java/cn/wisenergy/shiro/config/ShiroConfig.java
+4
-4
application-dev.yml
wisenergy-web-admin/src/main/resources/application-dev.yml
+1
-46
No files found.
wisenergy-model/src/main/java/cn/wisenergy/model/dto/DayWorkTimeAndType.java
View file @
c6e6724f
...
...
@@ -36,9 +36,9 @@ public class DayWorkTimeAndType implements Serializable {
private
String
type
;
/**
*
工时类型,正常,请假,调休
*
是否加班
*/
@ApiModelProperty
(
name
=
"type"
,
value
=
"
工时类型,正常,请假,调休
"
)
@ApiModelProperty
(
name
=
"type"
,
value
=
"
是否加班
"
)
private
String
isOvertime
;
/**
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
c6e6724f
...
...
@@ -135,31 +135,31 @@ public class StatisticsServiceImpl implements StatisticsService {
//获取用户加班天数和漏报天数
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
6
);
map
.
put
(
"deptId"
,
deptId
);
map
.
put
(
"month"
,
month
);
map
.
put
(
"year"
,
year
);
// map.put("deptId",
deptId);
map
.
put
(
"month"
,
month
);
map
.
put
(
"year"
,
year
);
for
(
StatisticsTableDto
statisticsTableDto
:
statisticsTableDtos
)
{
map
.
put
(
"userId"
,
statisticsTableDto
.
getUserId
());
map
.
put
(
"userId"
,
statisticsTableDto
.
getUserId
());
//员工的加班天数
double
overtimes
=
0.000
;
double
overtimes
=
0.000
;
//正常天数
double
days
=
0.000
;
double
days
=
0.000
;
List
<
WorkTimeOrder
>
isOvertime
=
workTimeOrderMapper
.
getIsOvertime
(
map
);
for
(
WorkTimeOrder
workTimeOrder
:
isOvertime
)
{
if
(
workTimeOrder
.
getIsOvertime
()
==
1
)
{
if
(
workTimeOrder
.
getIsOvertime
()
==
1
)
{
//当前天数
double
overtimes1
=
workTimeOrder
.
getWorkTime
();
double
overtimes1
=
workTimeOrder
.
getWorkTime
();
//统计天数
overtimes
+=
overtimes1
/
8
;
overtimes
+=
overtimes1
/
8
;
continue
;
}
if
(
workTimeOrder
.
getIsOvertime
()
==
0
)
{
if
(
workTimeOrder
.
getIsOvertime
()
==
0
)
{
//当前天数
double
days1
=
workTimeOrder
.
getWorkTime
();
double
days1
=
workTimeOrder
.
getWorkTime
();
//统计天数
days
+=
days1
/
8
;
days
+=
days1
/
8
;
}
}
statisticsTableDto
.
setOvertimes
(
overtimes
);
...
...
@@ -451,7 +451,7 @@ public class StatisticsServiceImpl implements StatisticsService {
public
HSSFWorkbook
exportWorkTimeExcel
(
GetMonthlyCollectParam
param
)
{
log
.
info
(
"StatisticsServiceImpl[]exportWorkTimeExcel[]input.param{}"
+
param
);
//是否为当月,默认为false
boolean
isToday
=
false
;
boolean
isToday
=
false
;
// 去除分页条件
param
.
setSize
(
null
);
param
.
setCurrentPage
(
null
);
...
...
@@ -468,12 +468,12 @@ public class StatisticsServiceImpl implements StatisticsService {
Date
now
=
new
Date
();
int
dayCount1
;
int
year
=
DateUtil
.
getYear
(
now
);
int
month
=
DateUtil
.
getMonth
(
now
)
+
1
;
int
month
=
DateUtil
.
getMonth
(
now
)
+
1
;
if
(
year
==
param
.
getYear
()
&&
month
==
param
.
getMonth
())
{
dayCount1
=
DateUtil
.
daysBetween
(
DateUtil
.
getFirstDayOfMonth
(
now
),
now
)
+
1
;
isToday
=
true
;
}
else
{
isToday
=
true
;
}
else
{
dayCount1
=
dayCount
;
}
...
...
@@ -547,7 +547,7 @@ 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
.
createCell
(
4
).
setCellValue
(
dates
.
size
()
-
next
.
getUnderreportings
());
row_i
.
getCell
(
4
).
setCellStyle
(
cellStyle
);
// 日期与工时集合
List
<
DayWorkTimeAndType
>
timeAndTypes
=
next
.
getDayWorkTimeAndTypeList
();
...
...
@@ -593,7 +593,6 @@ public class StatisticsServiceImpl implements StatisticsService {
// cell.setCellStyle(cellStyle);
// }
}
}
this
.
closeSheets
(
sheets
);
...
...
@@ -734,19 +733,19 @@ public class StatisticsServiceImpl implements StatisticsService {
map
.
remove
(
"isAll"
);
for
(
UserWorkTimeStatisticsByProject
userProjectWorkTimeStatistic
:
userProjectWorkTimeStatistics
)
{
//项目数
Integer
projectNumbers
=
0
;
Integer
projectNumbers
=
0
;
//商机数
Integer
businessNumbers
=
0
;
map
.
put
(
"userId"
,
userProjectWorkTimeStatistic
.
getUserId
());
Integer
businessNumbers
=
0
;
map
.
put
(
"userId"
,
userProjectWorkTimeStatistic
.
getUserId
());
//查询出用户项目和商机并分类统计
List
<
WorkTimeOrder
>
workTimeOrders
=
workTimeOrderMapper
.
selectPeojectNumbers
(
map
);
for
(
WorkTimeOrder
workTimeOrder
:
workTimeOrders
)
{
if
(
workTimeOrder
.
getType
()
==
1
)
{
projectNumbers
+=
1
;
if
(
workTimeOrder
.
getType
()
==
1
)
{
projectNumbers
+=
1
;
}
if
(
workTimeOrder
.
getType
()
==
2
)
{
businessNumbers
+=
1
;
if
(
workTimeOrder
.
getType
()
==
2
)
{
businessNumbers
+=
1
;
}
}
ProjectNumbers
projectNumbers1
=
new
ProjectNumbers
();
...
...
@@ -936,8 +935,6 @@ public class StatisticsServiceImpl implements StatisticsService {
row_1Cell4
.
setCellValue
(
"参与商机数"
);
// 合计行
HSSFRow
totalRow1
=
sheet1
.
createRow
(
userWorkTimeStatisticsReport
.
size
()
+
1
);
totalRow1
.
createCell
(
0
).
setCellValue
(
"合计"
);
...
...
@@ -1004,9 +1001,9 @@ public class StatisticsServiceImpl implements StatisticsService {
for
(
ProjectWorkTimeAndType
projectWorkTimeAndType2
:
projectWorkTimeAndType1
)
{
// 累加用户参与项目和商机数量
if
(
projectWorkTimeAndType2
.
getWorkTimeType
()
==
1
)
{
projectCount
++;
}
else
if
(
projectWorkTimeAndType2
.
getWorkTimeType
()
==
2
)
{
boCount
++;
projectCount
++;
}
else
if
(
projectWorkTimeAndType2
.
getWorkTimeType
()
==
2
)
{
boCount
++;
}
/**
* 这里k从2变为4
...
...
@@ -1079,7 +1076,7 @@ public class StatisticsServiceImpl implements StatisticsService {
short
lastCellNum
=
row_2
.
getLastCellNum
();
for
(
int
i
=
2
;
i
<
lastCellNum
/
2
;
i
++)
{
CellRangeAddress
cellRangeAddress4
=
new
CellRangeAddress
(
userWorkTimeStatisticsReport
.
size
()
+
2
,
userWorkTimeStatisticsReport
.
size
()
+
2
,
i
*
2
,
i
*
2
+
1
);
CellRangeAddress
cellRangeAddress4
=
new
CellRangeAddress
(
userWorkTimeStatisticsReport
.
size
()
+
2
,
userWorkTimeStatisticsReport
.
size
()
+
2
,
i
*
2
,
i
*
2
+
1
);
sheet1
.
addMergedRegion
(
cellRangeAddress4
);
setBorderStyle
(
cellRangeAddress4
,
sheet1
);
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
View file @
c6e6724f
...
...
@@ -246,7 +246,7 @@ public class WorkProjectServiceImpl implements WorkProjectService {
}
}
if
(
isCentre
==
0
)
{
deptAndManager
-=
1
0
;
deptAndManager
-=
1
;
}
}
}
...
...
wisenergy-shiro/src/main/java/cn/wisenergy/shiro/config/ShiroConfig.java
View file @
c6e6724f
...
...
@@ -68,13 +68,13 @@ public class ShiroConfig {
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"/login"
,
"anon"
);
//
map.put("/swagger-ui.html","anon");
//
map.put("/swagger/**","anon");
map
.
put
(
"/swagger-ui.html"
,
"anon"
);
map
.
put
(
"/swagger/**"
,
"anon"
);
map
.
put
(
"/webjars/**"
,
"anon"
);
//
map.put("/swagger-resources/**","anon");
map
.
put
(
"/swagger-resources/**"
,
"anon"
);
map
.
put
(
"/v2/**"
,
"anon"
);
map
.
put
(
"/static/**"
,
"anon"
);
//
map.put("/**", "kickout");
//
map.put("/**", "kickout");
map
.
put
(
"/wxLogout"
,
"wxLogout"
);
shiroFilterFactoryBean
.
setFilterChainDefinitionMap
(
map
);
...
...
wisenergy-web-admin/src/main/resources/application-dev.yml
View file @
c6e6724f
...
...
@@ -32,52 +32,7 @@ spring:
password
:
admin!@#123
driver-class-name
:
com.mysql.cj.jdbc.Driver
type
:
com.alibaba.druid.pool.DruidDataSource
# oa-datasource:
# type: com.alibaba.druid.pool.DruidDataSource
# druid:
# driver-class-name: com.mysql.cj.jdbc.Driver
# jdbc-url: jdbc:mysql://172.18.1.12:3306/view_wh?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
# username: wh_read
# password: 8ik,*IK<
# initial-size: 10
# max-active: 100
# min-idle: 10
# max-wait: 60000
# datasource:
# type: com.alibaba.druid.pool.DruidDataSource
# druid:
# driver-class-name: com.mysql.cj.jdbc.Driver
# jdbc-url: jdbc:mysql://192.168.110.84:3306/work_test?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
# username: root
# password: admin!@#123
# initial-size: 10
# max-active: 100
# min-idle: 10
# max-wait: 60000
# # 打开PSCache,并且指定每个连接上PSCache的大小
# pool-prepared-statements: true
# max-pool-prepared-statement-per-connection-size: 20
# time-between-eviction-runs-millis: 60000
# min-evictable-idle-time-millis: 300000
# #Oracle需要打开注释
# #validation-query: SELECT 1 FROM DUAL
# test-while-idle: true
# test-on-borrow: false
# test-on-return: false
# stat-view-servlet:
# enabled: true
# url-pattern: /druid/*
# #login-username: admin
# #login-password: admin
# # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
# filter:
# stat:
# log-slow-sql: true
# slow-sql-millis: 1000
# merge-sql: false
# wall:
# config:
# multi-statement-allow: true
# #文件上传配置
servlet
:
multipart
:
...
...
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