Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
f272d2f1
Commit
f272d2f1
authored
Jan 27, 2021
by
qinhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
质量管理报告--下标去掉null
parent
cdd1a981
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
353 additions
and
351 deletions
+353
-351
QualityController.java
...wise/sc/cement/business/controller/QualityController.java
+46
-47
QualityApplyServiceImpl.java
...cement/business/service/impl/QualityApplyServiceImpl.java
+9
-8
ExcelUtil.java
.../main/java/cn/wise/sc/cement/business/util/ExcelUtil.java
+298
-296
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/QualityController.java
View file @
f272d2f1
...
...
@@ -33,56 +33,55 @@ import java.util.stream.Collectors;
@RequestMapping
(
"/business/quality"
)
public
class
QualityController
{
final
IEntrustService
iEntrustService
;
final
IQualityApplyService
iQualityApplyService
;
final
IEntrustService
iEntrustService
;
final
IQualityApplyService
iQualityApplyService
;
public
QualityController
(
IEntrustService
iEntrustService
,
IQualityApplyService
iQualityApplyService
)
{
this
.
iEntrustService
=
iEntrustService
;
this
.
iQualityApplyService
=
iQualityApplyService
;
}
public
QualityController
(
IEntrustService
iEntrustService
,
IQualityApplyService
iQualityApplyService
)
{
this
.
iEntrustService
=
iEntrustService
;
this
.
iQualityApplyService
=
iQualityApplyService
;
}
@ApiOperation
(
value
=
"质量检测分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"clientId"
,
value
=
"委托单位id"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"projectName"
,
value
=
"项目名称"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"projectCode"
,
value
=
"项目编号"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getPage"
)
public
BaseResponse
<
IPage
<
EntrustVo
>>
page
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
)
{
BaseResponse
<
IPage
<
EntrustVo
>>
baseResponse
=
iEntrustService
.
getQualityPage
(
pageQuery
,
startDate
,
endDate
,
clientId
,
projectName
,
projectCode
);
@ApiOperation
(
value
=
"质量检测分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"clientId"
,
value
=
"委托单位id"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"projectName"
,
value
=
"项目名称"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"projectCode"
,
value
=
"项目编号"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getPage"
)
public
BaseResponse
<
IPage
<
EntrustVo
>>
page
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
)
{
BaseResponse
<
IPage
<
EntrustVo
>>
baseResponse
=
iEntrustService
.
getQualityPage
(
pageQuery
,
startDate
,
endDate
,
clientId
,
projectName
,
projectCode
);
//判断是否已经评审过
if
(
baseResponse
.
getCode
()
==
200
)
{
//判断是否已经评审过
if
(
baseResponse
.
getCode
()
==
200
)
{
List
<
EntrustVo
>
records
=
baseResponse
.
getData
().
getRecords
();
if
(
records
.
size
()
==
0
)
{
return
BaseResponse
.
okData
(
new
Page
<>());
}
List
<
Integer
>
projectIds
=
records
.
stream
().
map
(
EntrustVo:
:
getId
).
collect
(
Collectors
.
toList
());
Set
<
Integer
>
qualityApplyIds
=
iQualityApplyService
.
selectQualityApplyStatusByProIds
(
projectIds
);
records
.
forEach
(
arg
->
{
if
(
qualityApplyIds
.
contains
(
arg
.
getId
()))
{
arg
.
setStatusValue
(
"审核完成"
);
arg
.
setStatus
(
10
);
}
else
{
arg
.
setStatusValue
(
"待审核"
);
arg
.
setStatus
(
9
);
}
});
}
return
baseResponse
;
}
@GetMapping
(
"/{entrustId}"
)
@ApiOperation
(
"获取质量详情"
)
public
BaseResponse
<
QualityDetailVo
>
getReportDetail
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
)
{
return
BaseResponse
.
okData
(
iEntrustService
.
getQualityDetail
(
entrustId
));
}
List
<
EntrustVo
>
records
=
baseResponse
.
getData
().
getRecords
();
if
(
records
.
size
()
==
0
)
{
return
BaseResponse
.
okData
(
new
Page
<>());
}
List
<
Integer
>
projectIds
=
records
.
stream
().
map
(
EntrustVo:
:
getId
).
collect
(
Collectors
.
toList
());
Set
<
Integer
>
qualityApplyIds
=
iQualityApplyService
.
selectQualityApplyStatusByProIds
(
projectIds
);
records
.
forEach
(
arg
->
{
if
(
qualityApplyIds
.
contains
(
arg
.
getId
()))
{
arg
.
setStatusValue
(
"审核完成"
);
arg
.
setStatus
(
10
);
}
else
{
arg
.
setStatusValue
(
"待审核"
);
arg
.
setStatus
(
9
);
}
});
}
return
baseResponse
;
}
@GetMapping
(
"/{entrustId}"
)
@ApiOperation
(
"获取质量详情"
)
public
BaseResponse
<
QualityDetailVo
>
getReportDetail
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
)
{
return
BaseResponse
.
okData
(
iEntrustService
.
getQualityDetail
(
entrustId
));
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/QualityApplyServiceImpl.java
View file @
f272d2f1
...
...
@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSON;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -154,22 +155,22 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
List
<
String
>
inputValus
=
JSON
.
parseArray
(
arg
.
getInputResult
(),
String
.
class
);
Object
[]
objs
=
new
Object
[
inputValus
.
size
()
+
8
];
if
(!
"误差"
.
equals
(
arg
.
getUserName
()))
{
objs
[
0
]
=
arg
.
getProjectName
();
objs
[
1
]
=
arg
.
getProjectId
();
objs
[
2
]
=
arg
.
getSampleName
();
objs
[
3
]
=
arg
.
getSampleForm
();
objs
[
4
]
=
arg
.
getSampleCode
();
objs
[
5
]
=
arg
.
getCementCode
();
objs
[
0
]
=
arg
.
getProjectName
()
==
null
?
""
:
arg
.
getProjectName
()
;
objs
[
1
]
=
arg
.
getProjectId
()
==
null
?
""
:
arg
.
getProjectId
()
;
objs
[
2
]
=
arg
.
getSampleName
()
==
null
?
""
:
arg
.
getSampleName
()
;
objs
[
3
]
=
arg
.
getSampleForm
()
==
null
?
""
:
arg
.
getSampleForm
()
;
objs
[
4
]
=
arg
.
getSampleCode
()
==
null
?
""
:
arg
.
getSampleCode
()
;
objs
[
5
]
=
arg
.
getCementCode
()
==
null
?
""
:
arg
.
getCementCode
()
;
objs
[
6
]
=
userGroupMap
.
get
(
arg
.
getUserId
());
}
//添加名字
objs
[
7
]
=
arg
.
getUserName
();
for
(
int
i
=
0
;
i
<
inputValus
.
size
();
i
++)
{
String
value
=
inputValus
.
get
(
i
);
if
(
value
==
null
){
if
(
value
==
null
)
{
value
=
"0"
;
}
if
(
value
.
contains
(
"\""
))
{
if
(
value
.
contains
(
"\""
))
{
value
=
value
.
replace
(
"\""
,
""
);
}
objs
[
8
+
i
]
=
value
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/ExcelUtil.java
View file @
f272d2f1
This diff is collapsed.
Click to expand it.
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