Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
0fdecba0
Commit
0fdecba0
authored
Mar 08, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产值统计导出bug修复
parent
b4e3c2c5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
39 deletions
+41
-39
NonStandardApplyMapper.xml
.../sc/cement/business/mapper/xml/NonStandardApplyMapper.xml
+3
-5
NonStandardApprovalMapper.xml
.../cement/business/mapper/xml/NonStandardApprovalMapper.xml
+3
-4
NonStandardApplyServiceImpl.java
...nt/business/service/impl/NonStandardApplyServiceImpl.java
+34
-29
NonStandardApprovalServiceImpl.java
...business/service/impl/NonStandardApprovalServiceImpl.java
+1
-1
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardApplyMapper.xml
View file @
0fdecba0
...
@@ -45,8 +45,8 @@
...
@@ -45,8 +45,8 @@
IF(ISNULL(na.id),'',na.id) as 序号,
IF(ISNULL(na.id),'',na.id) as 序号,
IF(ISNULL(su.name),'',su.name) as 姓名,
IF(ISNULL(su.name),'',su.name) as 姓名,
IF(ISNULL(su.username),'',su.username) as 账户,
IF(ISNULL(su.username),'',su.username) as 账户,
IF(ISNULL(na.statistical),'',na.statistical) as 起止
日期
,
IF(ISNULL(na.statistical),'',na.statistical) as 起止
时间
,
IF(ISNULL(
t
na.reported_hours),'',na.reported_hours) as 上报工日,
IF(ISNULL(na.reported_hours),'',na.reported_hours) as 上报工日,
(
(
CASE na.status
CASE na.status
WHEN 0 THEN '未申请'
WHEN 0 THEN '未申请'
...
@@ -55,9 +55,7 @@
...
@@ -55,9 +55,7 @@
WHEN 3 THEN '未通过'
WHEN 3 THEN '未通过'
ELSE ''
ELSE ''
END
END
)as 状态,
)as 状态
na.work_type as 工作类别,
na.work_description as 工作描述
FROM nonstandard_apply na
FROM nonstandard_apply na
LEFT JOIN sys_user su ON su.id = na.user_id
LEFT JOIN sys_user su ON su.id = na.user_id
<include
refid=
"where"
/>
<include
refid=
"where"
/>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardApprovalMapper.xml
View file @
0fdecba0
...
@@ -48,9 +48,10 @@
...
@@ -48,9 +48,10 @@
IF(ISNULL(na.id),'',na.id) as 序号,
IF(ISNULL(na.id),'',na.id) as 序号,
IF(ISNULL(su.name),'',su.name) as 姓名,
IF(ISNULL(su.name),'',su.name) as 姓名,
IF(ISNULL(su.username),'',su.username) as 账户,
IF(ISNULL(su.username),'',su.username) as 账户,
IF(ISNULL(na.statistical),'',na.statistical) as
起止
日期,
IF(ISNULL(na.statistical),'',na.statistical) as
统计
日期,
IF(ISNULL(na.reported_hours),'',na.reported_hours) as 上报工日,
IF(ISNULL(na.reported_hours),'',na.reported_hours) as 上报工日,
IF(ISNULL(na.approval_hours),'',na.approval_hours) as 审批工日,
IF(ISNULL(na.approval_hours),'',na.approval_hours) as 审批工日,
IF(ISNULL(na.final_value),'',na.final_value) as 最终产值,
(
(
CASE na.status
CASE na.status
WHEN 0 THEN '未提交'
WHEN 0 THEN '未提交'
...
@@ -58,9 +59,7 @@
...
@@ -58,9 +59,7 @@
WHEN 3 THEN '未通过'
WHEN 3 THEN '未通过'
ELSE '已通过'
ELSE '已通过'
END
END
)as 状态,
)as 状态
IF(ISNULL(na.final_value),'',na.final_value) as 最终产值,
IF(ISNULL(na.final_rejection),'',na.final_rejection) as 驳回意见
FROM nonstandard_apply na
FROM nonstandard_apply na
left join sys_user su on na.user_id = su.id
left join sys_user su on na.user_id = su.id
<include
refid=
"where"
/>
<include
refid=
"where"
/>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardApplyServiceImpl.java
View file @
0fdecba0
...
@@ -143,39 +143,44 @@ public class NonStandardApplyServiceImpl extends ServiceImpl<NonStandardApplyMap
...
@@ -143,39 +143,44 @@ public class NonStandardApplyServiceImpl extends ServiceImpl<NonStandardApplyMap
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
LoginUser
loginUser
=
userService
.
getLoginUser
();
LoginUser
loginUser
=
userService
.
getLoginUser
();
params
.
put
(
"userId"
,
loginUser
.
getId
());
if
(
loginUser
!=
null
){
params
.
put
(
"name"
,
name
);
if
(!
loginUser
.
getRoleList
().
getName
().
equals
(
"系统管理员"
)){
List
<
Map
<
String
,
Object
>>
list
=
nonStandardApplyMapper
.
exportList
(
params
);
params
.
put
(
"userId"
,
loginUser
.
getId
());
}
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
params
.
put
(
"name"
,
name
);
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
List
<
Map
<
String
,
Object
>>
list
=
nonStandardApplyMapper
.
exportList
(
params
);
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
0
]
=
"序号"
;
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
headers
[
1
]
=
"姓名"
;
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
headers
[
2
]
=
"账户"
;
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
3
]
=
"起止日期"
;
headers
[
0
]
=
"序号"
;
headers
[
4
]
=
"上报工日"
;
headers
[
1
]
=
"姓名"
;
headers
[
5
]
=
"状态"
;
headers
[
2
]
=
"账户"
;
headers
[
6
]
=
"工作类别"
;
headers
[
3
]
=
"起止时间"
;
headers
[
7
]
=
"工作描述"
;
headers
[
4
]
=
"上报工日"
;
headers
[
5
]
=
"状态"
;
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
headers
[
6
]
=
"工作类别"
;
for
(
Map
<
String
,
Object
>
m
:
list
)
{
headers
[
7
]
=
"工作描述"
;
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
String
obj
=
m
.
get
(
headers
[
j
])
==
null
?
""
:
m
.
get
(
headers
[
j
]).
toString
();
for
(
Map
<
String
,
Object
>
m
:
list
)
{
if
(
j
==
0
&&
obj
!=
null
)
{
Object
[]
objects
=
new
Object
[
headers
.
length
];
obj
=
obj
.
split
(
"\\."
)[
0
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
])
==
null
?
""
:
m
.
get
(
headers
[
j
]).
toString
();
if
(
j
==
0
&&
obj
!=
null
)
{
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
}
}
objects
[
j
]
=
obj
;
}
datas
.
add
(
objects
);
datas
.
add
(
objects
);
}
ExcelUtil
.
excelExport
(
filename
==
null
||
filename
.
trim
().
length
()
<=
0
?
"非标产值申请"
:
filename
,
headers
,
datas
,
response
);
}
}
ExcelUtil
.
excelExport
(
filename
==
null
||
filename
.
trim
().
length
()
<=
0
?
"非标产值申请"
:
filename
,
headers
,
datas
,
response
);
}
}
}
}
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardApprovalServiceImpl.java
View file @
0fdecba0
...
@@ -161,7 +161,7 @@ public class NonStandardApprovalServiceImpl extends ServiceImpl<NonStandardAppro
...
@@ -161,7 +161,7 @@ public class NonStandardApprovalServiceImpl extends ServiceImpl<NonStandardAppro
headers
[
0
]
=
"序号"
;
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"姓名"
;
headers
[
1
]
=
"姓名"
;
headers
[
2
]
=
"账户"
;
headers
[
2
]
=
"账户"
;
headers
[
3
]
=
"
起止
日期"
;
headers
[
3
]
=
"
统计
日期"
;
headers
[
4
]
=
"上报工日"
;
headers
[
4
]
=
"上报工日"
;
headers
[
5
]
=
"审批工日"
;
headers
[
5
]
=
"审批工日"
;
headers
[
6
]
=
"状态"
;
headers
[
6
]
=
"状态"
;
...
...
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