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
7eda2e22
Commit
7eda2e22
authored
Oct 11, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检测项 资质范围 分为资质内 和资质外,
导出委托列表是,检测项目如果是资质外的 就不允许导出
parent
52d1d3ba
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
23 deletions
+55
-23
Team.java
...src/main/java/cn/wise/sc/cement/business/entity/Team.java
+2
-2
TeamMapper.xml
...java/cn/wise/sc/cement/business/mapper/xml/TeamMapper.xml
+16
-2
TeamQuery.java
...ava/cn/wise/sc/cement/business/model/query/TeamQuery.java
+2
-2
TeamVo.java
...main/java/cn/wise/sc/cement/business/model/vo/TeamVo.java
+3
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+24
-14
ExcelUtil.java
.../main/java/cn/wise/sc/cement/business/util/ExcelUtil.java
+8
-3
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/entity/Team.java
View file @
7eda2e22
...
...
@@ -51,8 +51,8 @@ public class Team extends BaseEntity implements Serializable {
@ApiModelProperty
(
"建议产值"
)
private
BigDecimal
proCharge
;
@ApiModelProperty
(
"资质范围"
)
private
String
qualifications
;
@ApiModelProperty
(
"资质范围
(1资质内,0资质外)
"
)
private
Integer
qualifications
;
@ApiModelProperty
(
"状态 0:禁用 1:激活"
)
private
Integer
status
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/TeamMapper.xml
View file @
7eda2e22
...
...
@@ -17,7 +17,14 @@
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.TeamVo"
>
SELECT t.*, tg.name as groupName,
m.name as methodName, m.standard as standard, m.number as number
m.name as methodName, m.standard as standard, m.number as number,
(
CASE t.qualifications
WHEN 0 THEN '资质范围外'
WHEN 1 THEN '资质范围内'
ELSE ''
END
) as qualificationsValue
FROM team t
left join team_group tg on tg.id = t.group_id
left join method m on m.id = t.method_id
...
...
@@ -37,7 +44,14 @@
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.TeamVo"
>
SELECT t.*, tg.name as groupName,
m.name as methodName, m.standard as standard, m.number as number
m.name as methodName, m.standard as standard, m.number as number,
(
CASE t.qualifications
WHEN 0 THEN '资质范围外'
WHEN 1 THEN '资质范围内'
ELSE ''
END
) as qualificationsValue
FROM team t
left join team_group tg on tg.id = t.group_id
left join method m on m.id = t.method_id
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/TeamQuery.java
View file @
7eda2e22
...
...
@@ -33,8 +33,8 @@ public class TeamQuery {
@ApiModelProperty
(
"建议产值"
)
private
BigDecimal
proCharge
;
@ApiModelProperty
(
"资质范围"
)
private
String
qualifications
;
@ApiModelProperty
(
"资质范围
(1资质内,0资质外)
"
)
private
Integer
qualifications
;
@ApiModelProperty
(
"是否可见 0:不可见 1:可见"
)
private
Integer
isDisplay
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/TeamVo.java
View file @
7eda2e22
...
...
@@ -50,6 +50,9 @@ public class TeamVo{
@ApiModelProperty
(
"资质范围"
)
private
String
qualifications
;
@ApiModelProperty
(
"资质范围(1资质内,0资质外)"
)
private
String
qualificationsValue
;
@ApiModelProperty
(
"状态 0:禁用 1:激活"
)
private
String
status
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
7eda2e22
...
...
@@ -576,6 +576,17 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if
(
query
.
getId
()
==
null
||
query
.
getIsAgree
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"参数错误"
);
}
LoginUser
loginUser
=
userService
.
getLoginUser
();
if
(
loginUser
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请登录账号"
);
}
Integer
approvalId
=
sysApprovalMapper
.
getApprovalId
(
"委托评审"
);
if
(
approvalId
==
null
)
{
return
BaseResponse
.
errorMsg
(
"委托评审信息错误"
);
}
if
(
loginUser
.
getId
()
!=
approvalId
)
{
return
BaseResponse
.
errorMsg
(
"没有评审权限"
);
}
EntrustVo
entrustVo
=
entrustMapper
.
getDetail
(
query
.
getId
());
if
(
entrustVo
==
null
)
{
return
BaseResponse
.
errorMsg
(
"信息错误"
);
...
...
@@ -656,7 +667,6 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
//记录审批信息
EntrustApproval
entrustApproval
=
new
EntrustApproval
();
LoginUser
loginUser
=
userService
.
getLoginUser
();
entrustApproval
.
setEntrustId
(
entrust
.
getId
())
.
setUserId
(
loginUser
.
getId
())
.
setOpinion
(
query
.
getAuditReason
())
...
...
@@ -2233,38 +2243,38 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
//样品名称 列表中的拼接
for
(
SampleTmp
sampleTmp
:
sampleTmpList
)
{
// sampleNames = sampleNames.equals("") ? sampleTmp.getName() : (sampleNames + "、" + sampleTmp.getName());
String
teamIds
=
sampleTmp
.
getTeamIds
();
String
checkTeam
=
""
;
if
(
teamIds
!=
null
)
{
String
[]
teamIdS
=
teamIds
.
split
(
"、"
);
for
(
String
teamId
:
teamIdS
)
{
Team
team
=
teamMapper
.
selectById
(
Integer
.
valueOf
(
teamId
));
if
(
team
!=
null
)
{
if
(
team
!=
null
&&
team
.
getQualifications
()
==
1
)
{
checkTeam
=
checkTeam
.
equals
(
""
)
?
team
.
getName
()
:
(
checkTeam
+
"、"
+
team
.
getName
());
}
}
}
String
spampe_checkTeam
=
sampleTmp
.
getName
()+
":"
+
checkTeam
;
checkTeamStr
=
checkTeamStr
.
equals
(
""
)
?
spampe_checkTeam
:
(
checkTeamStr
+
"\n"
+
spampe_checkTeam
);
;
checkMethodStr
=
checkMethodStr
.
equals
(
""
)
?
sampleTmp
.
getMethodNumbers
()
:
(
checkMethodStr
+
"\n"
+
sampleTmp
.
getMethodNumbers
());
String
spampe_checkMethod
=
sampleTmp
.
getName
()+
":"
+
sampleTmp
.
getMethodNumbers
();
checkMethodStr
=
checkMethodStr
.
equals
(
""
)
?
spampe_checkMethod
:
(
checkMethodStr
+
"\n"
+
spampe_checkMethod
);
}
}
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
]).
toString
();
//如果序号带小数点 去除.0,保留整数
if
(
j
==
0
)
{
obj
=
obj
.
split
(
"\\."
)[
0
];
}
String
obj
=
""
;
if
(
j
==
9
){
obj
=
checkTeamStr
;
obj
=
checkTeamStr
;
}
else
if
(
j
==
10
){
obj
=
checkMethodStr
;
}
else
{
obj
=
m
.
get
(
headers
[
j
]).
toString
();
//如果序号带小数点 去除.0,保留整数
if
(
j
==
0
)
{
obj
=
obj
.
split
(
"\\."
)[
0
];
}
}
if
(
j
==
10
){
obj
=
checkMethodStr
;
}
objects
[
j
]
=
obj
;
}
datas
.
add
(
objects
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/ExcelUtil.java
View file @
7eda2e22
...
...
@@ -129,13 +129,15 @@ public class ExcelUtil {
Sheet
sheet
=
workbook
.
createSheet
();
Row
row
=
null
;
Cell
cell
=
null
;
CellStyle
style
=
workbook
.
createCellStyle
();
style
.
setAlignment
(
HorizontalAlignment
.
CENTER_SELECTION
);
Font
font
=
workbook
.
createFont
();
int
line
=
0
,
maxColumn
=
0
;
if
(
headers
!=
null
&&
headers
.
length
>
0
)
{
// 设置列头
if
(
headers
!=
null
&&
headers
.
length
>
0
)
{
// 设置列头
CellStyle
style
=
workbook
.
createCellStyle
();
style
.
setAlignment
(
HorizontalAlignment
.
CENTER_SELECTION
);
row
=
sheet
.
createRow
(
line
++);
row
.
setHeightInPoints
(
23
);
font
.
setBold
(
true
);
...
...
@@ -151,6 +153,7 @@ public class ExcelUtil {
}
if
(
datas
!=
null
&&
datas
.
size
()
>
0
)
{
// 渲染数据
CellStyle
style
=
workbook
.
createCellStyle
();
for
(
int
index
=
0
,
size
=
datas
.
size
();
index
<
size
;
index
++)
{
Object
[]
data
=
datas
.
get
(
index
);
if
(
data
!=
null
&&
data
.
length
>
0
)
{
...
...
@@ -163,8 +166,10 @@ public class ExcelUtil {
}
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
style
.
setWrapText
(
true
);
//关键
cell
=
row
.
createCell
(
i
);
cell
.
setCellValue
(
data
[
i
]
==
null
?
null
:
data
[
i
].
toString
());
cell
.
setCellStyle
(
style
);
}
}
}
...
...
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