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
d089079d
Commit
d089079d
authored
Oct 15, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/zhutianwei/tianjin-cement
parents
516822b9
6165377f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
44 deletions
+107
-44
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+14
-24
QualityApply.java
.../java/cn/wise/sc/cement/business/entity/QualityApply.java
+12
-9
QualityDetailVo.java
.../cn/wise/sc/cement/business/model/vo/QualityDetailVo.java
+1
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+1
-0
QualityApplyServiceImpl.java
...cement/business/service/impl/QualityApplyServiceImpl.java
+79
-11
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/ReportController.java
View file @
d089079d
...
@@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.PathVariable;
...
@@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -103,15 +102,14 @@ public class ReportController {
...
@@ -103,15 +102,14 @@ public class ReportController {
//六元素导出
//六元素导出
List
<
SixElementReport
>
list
=
iEntrustService
.
getSampleSixElementCheck
(
entrustId
);
List
<
SixElementReport
>
list
=
iEntrustService
.
getSampleSixElementCheck
(
entrustId
);
list
.
forEach
(
this
::
initMapStr2AlongPro
);
list
.
forEach
(
this
::
initMapStr2AlongPro
);
List
<
SixElementReport
>
Al2O3AndTiO
2List
=
list
.
stream
()
List
<
SixElementReport
>
al2o3AndTio
2List
=
list
.
stream
()
.
filter
(
arg
->
!
"-"
.
equals
(
arg
.
getAl2o3AndTio2
()))
.
filter
(
arg
->
!
"-"
.
equals
(
arg
.
getAl2o3AndTio2
()))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
SixElementReport
>
Al2O3SplitTiO
2List
=
list
.
stream
()
List
<
SixElementReport
>
al2o3SplitTio
2List
=
list
.
stream
()
.
filter
(
arg
->
"-"
.
equals
(
arg
.
getAl2o3AndTio2
()))
.
filter
(
arg
->
"-"
.
equals
(
arg
.
getAl2o3AndTio2
()))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
beanParams
.
put
(
"list1"
,
Al2O3AndTiO2List
);
beanParams
.
put
(
"list1"
,
al2o3AndTio2List
);
beanParams
.
put
(
"list2"
,
Al2O3SplitTiO2List
);
beanParams
.
put
(
"list2"
,
al2o3SplitTio2List
);
WordUtil
.
writeWordReport
(
rts
.
getProjectName
()
+
"(报告).xls"
,
"report.ftl"
,
WordUtil
.
writeWordReport
(
rts
.
getProjectName
()
+
"(报告).xls"
,
"report.ftl"
,
beanParams
,
response
);
beanParams
,
response
);
...
@@ -124,7 +122,7 @@ public class ReportController {
...
@@ -124,7 +122,7 @@ public class ReportController {
* @param sixElement 带转换的六元素检测结果
* @param sixElement 带转换的六元素检测结果
* @return 已转换结果
* @return 已转换结果
*/
*/
private
SixElementReport
initMapStr2AlongPro
(
SixElementReport
sixElement
)
{
private
void
initMapStr2AlongPro
(
SixElementReport
sixElement
)
{
String
countResult
=
sixElement
.
getCountResult
();
String
countResult
=
sixElement
.
getCountResult
();
HashMap
<
String
,
String
>
countResultMap
=
JSON
.
parseObject
(
countResult
,
HashMap
.
class
);
HashMap
<
String
,
String
>
countResultMap
=
JSON
.
parseObject
(
countResult
,
HashMap
.
class
);
...
@@ -136,25 +134,17 @@ public class ReportController {
...
@@ -136,25 +134,17 @@ public class ReportController {
if
(
countResultMap
.
containsKey
(
SixElementKey
.
Al2O3AndTiO2
.
getKey
()))
{
if
(
countResultMap
.
containsKey
(
SixElementKey
.
Al2O3AndTiO2
.
getKey
()))
{
sixElement
.
setAl2o3AndTio2
(
countResultMap
.
get
(
SixElementKey
.
Al2O3AndTiO2
.
getKey
()));
sixElement
.
setAl2o3AndTio2
(
countResultMap
.
get
(
SixElementKey
.
Al2O3AndTiO2
.
getKey
()));
}
else
{
}
else
{
sixElement
.
setAl2o3
(
!
countResultMap
.
containsKey
(
SixElementKey
.
Al2O3
.
getKey
())
?
"0"
:
countResultMap
.
get
(
SixElementKey
.
Al2O3
.
getKey
()
));
sixElement
.
setAl2o3
(
countResultMap
.
getOrDefault
(
SixElementKey
.
Al2O3
.
getKey
(),
"0"
));
sixElement
.
setTio2
(
!
countResultMap
.
containsKey
(
SixElementKey
.
TiO2
.
getKey
())
?
"0"
:
countResultMap
.
get
(
SixElementKey
.
TiO2
.
getKey
()
));
sixElement
.
setTio2
(
countResultMap
.
getOrDefault
(
SixElementKey
.
TiO2
.
getKey
(),
"0"
));
}
}
sixElement
.
setCao
(!
countResultMap
.
containsKey
(
SixElementKey
.
CaO
.
getKey
())
?
"0"
:
countResultMap
.
get
(
SixElementKey
.
CaO
.
getKey
()));
sixElement
.
setCao
(
countResultMap
.
getOrDefault
(
SixElementKey
.
CaO
.
getKey
(),
"0"
));
sixElement
.
setCl
(!
countResultMap
.
containsKey
(
SixElementKey
.
Cl
.
getKey
())
?
"0"
:
countResultMap
.
get
(
SixElementKey
.
Cl
.
getKey
()));
sixElement
.
setCl
(
countResultMap
.
getOrDefault
(
SixElementKey
.
Cl
.
getKey
(),
"0"
));
sixElement
.
setFe2o3
(!
countResultMap
.
containsKey
(
SixElementKey
.
Fe2O3
.
getKey
())
?
"0"
:
countResultMap
.
get
(
SixElementKey
.
Fe2O3
.
getKey
()));
sixElement
.
setFe2o3
(
countResultMap
.
getOrDefault
(
SixElementKey
.
Fe2O3
.
getKey
(),
"0"
));
sixElement
.
setLoi
(!
countResultMap
.
containsKey
(
SixElementKey
.
LOI
.
getKey
())
?
"0"
:
countResultMap
.
get
(
SixElementKey
.
LOI
.
getKey
()));
sixElement
.
setLoi
(
countResultMap
.
getOrDefault
(
SixElementKey
.
LOI
.
getKey
(),
"0"
));
sixElement
.
setMgo
(!
countResultMap
.
containsKey
(
SixElementKey
.
MgO
.
getKey
())
?
"0"
:
countResultMap
.
get
(
SixElementKey
.
MgO
.
getKey
()));
sixElement
.
setMgo
(
countResultMap
.
getOrDefault
(
SixElementKey
.
MgO
.
getKey
(),
"0"
));
sixElement
.
setSio2
(!
countResultMap
.
containsKey
(
SixElementKey
.
SiO2
.
getKey
())
?
"0"
:
countResultMap
.
get
(
SixElementKey
.
SiO2
.
getKey
()));
sixElement
.
setSio2
(
countResultMap
.
getOrDefault
(
SixElementKey
.
SiO2
.
getKey
(),
"0"
));
sixElement
.
setSo3
(!
countResultMap
.
containsKey
(
SixElementKey
.
SO3
.
getKey
())
?
"0"
:
countResultMap
.
get
(
SixElementKey
.
SO3
.
getKey
()));
sixElement
.
setSo3
(
countResultMap
.
getOrDefault
(
SixElementKey
.
SO3
.
getKey
(),
"0"
));
return
sixElement
;
}
public
static
void
main
(
String
[]
args
)
{
String
str
=
"{\"Al2O3+TiO2\":\"-1488450.00\",\"CaO\":\"3650.00\",\"MgO\":\"0.00\",\"L.O.I\":\"10218.00\",\"SiO2\":\"2750.00\",\"Al2O3\":\"-1902250.00\",\"Fe2O3\":\"2100.00\"}"
;
Map
<
String
,
String
>
map
=
JSON
.
parseObject
(
str
,
HashMap
.
class
);
System
.
out
.
println
(
map
.
toString
());
}
}
private
String
set2String
(
Set
<
String
>
source
)
{
private
String
set2String
(
Set
<
String
>
source
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/QualityApply.java
View file @
d089079d
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -29,13 +30,11 @@ import lombok.experimental.Accessors;
...
@@ -29,13 +30,11 @@ import lombok.experimental.Accessors;
public
class
QualityApply
implements
Serializable
{
public
class
QualityApply
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 项目名
* 项目名
*/
*/
@ApiModelProperty
(
"项目名字"
)
@ApiModelProperty
(
"项目名字"
)
private
String
projectName
;
private
String
projectName
;
/**
/**
* 项目id
* 项目id
*/
*/
...
@@ -44,43 +43,42 @@ public class QualityApply implements Serializable {
...
@@ -44,43 +43,42 @@ public class QualityApply implements Serializable {
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 来样编号
* 来样编号
*/
*/
@ApiModelProperty
(
"来样编号"
)
@ApiModelProperty
(
"来样编号"
)
private
String
sampleCode
;
private
String
sampleCode
;
/**
/**
* 本所编号
* 本所编号
*/
*/
@ApiModelProperty
(
"本所编号"
)
@ApiModelProperty
(
"本所编号"
)
private
String
cementCode
;
private
String
cementCode
;
/**
* 部门名
*/
@ApiModelProperty
(
"部门名"
)
@TableField
(
exist
=
false
)
private
String
groupName
;
/**
/**
* 样品状态
* 样品状态
*/
*/
@ApiModelProperty
(
"样品状态"
)
@ApiModelProperty
(
"样品状态"
)
private
String
sampleForm
;
private
String
sampleForm
;
/**
/**
* 计算结果
* 计算结果
*/
*/
@ApiModelProperty
(
"输入结果"
)
@ApiModelProperty
(
"输入结果"
)
private
String
inputResult
;
private
String
inputResult
;
/**
/**
* 检测项id
* 检测项id
*/
*/
@ApiModelProperty
(
"检测项id"
)
@ApiModelProperty
(
"检测项id"
)
private
Integer
teamGroupId
;
private
Integer
teamGroupId
;
/**
/**
* 时间
* 时间
*/
*/
@ApiModelProperty
(
"项目时间"
)
@ApiModelProperty
(
"项目时间"
)
private
LocalDate
createTime
;
private
LocalDate
createTime
;
/**
/**
* 1:人工检测 2:标准 3:误差
* 1:人工检测 2:标准 3:误差
*/
*/
...
@@ -99,4 +97,9 @@ public class QualityApply implements Serializable {
...
@@ -99,4 +97,9 @@ public class QualityApply implements Serializable {
private
String
teams
;
private
String
teams
;
@ApiModelProperty
(
"检测人"
)
@ApiModelProperty
(
"检测人"
)
private
String
userName
;
private
String
userName
;
@ApiModelProperty
(
"userId"
)
private
Integer
userId
;
@ApiModelProperty
(
"部门"
)
@TableField
(
exist
=
false
)
private
String
positionName
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/QualityDetailVo.java
View file @
d089079d
...
@@ -46,6 +46,7 @@ public class QualityDetailVo implements Serializable {
...
@@ -46,6 +46,7 @@ public class QualityDetailVo implements Serializable {
public
static
class
SampleOriginal
{
public
static
class
SampleOriginal
{
private
String
cementCode
;
private
String
cementCode
;
private
String
userName
;
private
String
userName
;
private
Integer
userId
;
private
String
teamValues
;
private
String
teamValues
;
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
d089079d
...
@@ -2163,6 +2163,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -2163,6 +2163,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
sampleOriginal
.
setCementCode
(
param
.
getEntrustCode
());
sampleOriginal
.
setCementCode
(
param
.
getEntrustCode
());
sampleOriginal
.
setTeamValues
(
param
.
getInputResult
());
sampleOriginal
.
setTeamValues
(
param
.
getInputResult
());
sampleOriginal
.
setUserName
(
param
.
getUserName
());
sampleOriginal
.
setUserName
(
param
.
getUserName
());
sampleOriginal
.
setUserId
(
param
.
getUserId
());
qualitySample
.
getSampleOriginals
().
add
(
sampleOriginal
);
qualitySample
.
getSampleOriginals
().
add
(
sampleOriginal
);
qualitySample
.
setCementCode
(
param
.
getCementCode
());
qualitySample
.
setCementCode
(
param
.
getCementCode
());
qualitySample
.
setSampleCode
(
param
.
getSampleCode
());
qualitySample
.
setSampleCode
(
param
.
getSampleCode
());
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/QualityApplyServiceImpl.java
View file @
d089079d
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.QualityApply
;
import
cn.wise.sc.cement.business.entity.QualityApply
;
import
cn.wise.sc.cement.business.entity.SysGroup
;
import
cn.wise.sc.cement.business.entity.SysUser
;
import
cn.wise.sc.cement.business.mapper.QualityApplyMapper
;
import
cn.wise.sc.cement.business.mapper.QualityApplyMapper
;
import
cn.wise.sc.cement.business.service.IQualityApplyService
;
import
cn.wise.sc.cement.business.service.IQualityApplyService
;
import
cn.wise.sc.cement.business.service.ISysGroupService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
cn.wise.sc.cement.business.util.RedisUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.poi.ss.usermodel.Header
;
import
org.apache.poi.ss.usermodel.Header
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -32,6 +40,21 @@ import java.util.stream.Collectors;
...
@@ -32,6 +40,21 @@ import java.util.stream.Collectors;
public
class
QualityApplyServiceImpl
extends
ServiceImpl
<
QualityApplyMapper
,
QualityApply
>
public
class
QualityApplyServiceImpl
extends
ServiceImpl
<
QualityApplyMapper
,
QualityApply
>
implements
IQualityApplyService
{
implements
IQualityApplyService
{
final
RedisUtil
redisUtil
;
final
ISysUserService
iSysUserService
;
final
ISysGroupService
iSysGroupService
;
public
QualityApplyServiceImpl
(
RedisUtil
redisUtil
,
ISysUserService
iSysUserService
,
ISysGroupService
iSysGroupService
)
{
this
.
redisUtil
=
redisUtil
;
this
.
iSysUserService
=
iSysUserService
;
this
.
iSysGroupService
=
iSysGroupService
;
}
@Override
@Override
public
Set
<
Integer
>
selectQualityApplyStatusByProIds
(
List
<
Integer
>
projectIds
)
{
public
Set
<
Integer
>
selectQualityApplyStatusByProIds
(
List
<
Integer
>
projectIds
)
{
if
(
projectIds
.
size
()
==
0
)
{
if
(
projectIds
.
size
()
==
0
)
{
...
@@ -59,8 +82,42 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
...
@@ -59,8 +82,42 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
List
<
QualityApply
>
list
=
this
.
list
(
qw
);
List
<
QualityApply
>
list
=
this
.
list
(
qw
);
//找到所有项目id归类
//找到所有项目id归类
Set
<
Integer
>
projectIds
=
list
.
stream
().
map
(
QualityApply:
:
getProjectId
).
collect
(
Collectors
.
toSet
());
Set
<
Integer
>
projectIds
=
list
.
stream
().
map
(
QualityApply:
:
getProjectId
).
collect
(
Collectors
.
toSet
());
String
[]
headers
=
n
ew
String
[
30
]
;
String
[]
headers
=
n
ull
;
List
<
Object
[]>
datas
=
new
ArrayList
<>();
List
<
Object
[]>
datas
=
new
ArrayList
<>();
//关联部门名字
Set
<
Integer
>
userIds
=
list
.
stream
()
.
filter
(
arg
->
!
"误差"
.
equals
(
arg
.
getUserName
())
&&
!
"标准样"
.
equals
(
arg
.
getUserName
()))
.
map
(
QualityApply:
:
getUserId
)
.
collect
(
Collectors
.
toSet
());
//获取所以用户
final
String
userCache
=
"SYS_USER:CACHE"
;
final
String
groupCache
=
"SYS_GROUP:CACHE"
;
if
(!
redisUtil
.
existsKey
(
userCache
))
{
List
<
SysUser
>
sysUsers
=
iSysUserService
.
list
();
redisUtil
.
setString
(
userCache
,
JSON
.
toJSONString
(
sysUsers
),
600
);
}
if
(!
redisUtil
.
existsKey
(
groupCache
))
{
List
<
SysGroup
>
sysGroups
=
iSysGroupService
.
list
();
redisUtil
.
setString
(
groupCache
,
JSON
.
toJSONString
(
sysGroups
),
600
);
}
//会有临界值问题
List
<
SysUser
>
sysUsers
=
JSON
.
parseArray
(
redisUtil
.
getString
(
userCache
)
+
""
,
SysUser
.
class
);
List
<
SysGroup
>
sysGroups
=
JSON
.
parseArray
(
redisUtil
.
getString
(
groupCache
)
+
""
,
SysGroup
.
class
);
Map
<
Integer
,
String
>
userGroupMap
=
new
HashMap
<>(
userIds
.
size
());
sysUsers
.
stream
()
.
filter
(
arg
->
userIds
.
contains
(
arg
.
getId
()))
.
forEach
(
arg
->
sysGroups
.
forEach
(
opt
->
{
if
(
opt
.
getId
().
intValue
()
==
arg
.
getGroupId
())
{
userGroupMap
.
put
(
arg
.
getId
(),
opt
.
getName
());
}
}));
if
(
userGroupMap
.
size
()
==
0
)
{
return
;
}
for
(
Integer
projectId
:
projectIds
)
{
for
(
Integer
projectId
:
projectIds
)
{
//找到每个项目的检测组 以检测组归类
//找到每个项目的检测组 以检测组归类
Set
<
Integer
>
teamIds
=
list
.
stream
()
Set
<
Integer
>
teamIds
=
list
.
stream
()
...
@@ -78,26 +135,31 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
...
@@ -78,26 +135,31 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
//写每个样品的表头
//写每个样品的表头
list
.
stream
()
list
.
stream
()
.
filter
(
arg
->
arg
.
getTeamGroupId
().
intValue
()
==
teamId
)
.
filter
(
arg
->
arg
.
getTeamGroupId
().
intValue
()
==
teamId
)
.
findFirst
().
ifPresent
(
arg
->
{
.
findFirst
().
ifPresent
(
arg
->
{
List
<
String
>
teams
=
JSON
.
parseArray
(
arg
.
getTeams
(),
String
.
class
);
List
<
String
>
teams
=
JSON
.
parseArray
(
arg
.
getTeams
(),
String
.
class
);
Object
[]
objs
=
new
Object
[
teams
.
size
()
+
7
];
Object
[]
objs
=
new
Object
[
teams
.
size
()
+
8
];
objs
[
0
]
=
"项目名称"
;
objs
[
0
]
=
"项目名称"
;
objs
[
1
]
=
"项目编号"
;
objs
[
1
]
=
"项目编号"
;
objs
[
2
]
=
"样品名称"
;
objs
[
2
]
=
"样品名称"
;
objs
[
3
]
=
"样品状态"
;
objs
[
3
]
=
"样品状态"
;
objs
[
4
]
=
"来样编号"
;
objs
[
4
]
=
"来样编号"
;
objs
[
5
]
=
"本所编号"
;
objs
[
5
]
=
"本所编号"
;
objs
[
6
]
=
"分析"
;
objs
[
6
]
=
"部门"
;
objs
[
7
]
=
"分析"
;
for
(
int
i
=
0
;
i
<
teams
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
teams
.
size
();
i
++)
{
objs
[
7
+
i
]
=
teams
.
get
(
i
);
String
teamName
=
teams
.
get
(
i
);
if
(
teamName
.
contains
(
"\""
))
{
teamName
=
teamName
.
replace
(
"\""
,
""
);
}
objs
[
8
+
i
]
=
teamName
;
}
}
datas
.
add
(
objs
);
datas
.
add
(
objs
);
});
});
//为每个样品写值
//为每个样品写值
samples
.
forEach
(
arg
->
{
samples
.
forEach
(
arg
->
{
List
<
String
>
inputValus
=
JSON
.
parseArray
(
arg
.
getInputResult
(),
String
.
class
);
List
<
String
>
inputValus
=
JSON
.
parseArray
(
arg
.
getInputResult
(),
String
.
class
);
Object
[]
objs
=
new
Object
[
inputValus
.
size
()
+
7
];
Object
[]
objs
=
new
Object
[
inputValus
.
size
()
+
8
];
if
(!
"误差"
.
equals
(
arg
.
getUserName
()))
{
if
(!
"误差"
.
equals
(
arg
.
getUserName
()))
{
objs
[
0
]
=
arg
.
getProjectName
();
objs
[
0
]
=
arg
.
getProjectName
();
objs
[
1
]
=
arg
.
getProjectId
();
objs
[
1
]
=
arg
.
getProjectId
();
...
@@ -105,15 +167,21 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
...
@@ -105,15 +167,21 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
objs
[
3
]
=
arg
.
getSampleForm
();
objs
[
3
]
=
arg
.
getSampleForm
();
objs
[
4
]
=
arg
.
getSampleCode
();
objs
[
4
]
=
arg
.
getSampleCode
();
objs
[
5
]
=
arg
.
getCementCode
();
objs
[
5
]
=
arg
.
getCementCode
();
objs
[
6
]
=
userGroupMap
.
get
(
arg
.
getUserId
());
}
}
//添加名字
//添加名字
objs
[
6
]
=
arg
.
getUserName
();
objs
[
7
]
=
arg
.
getUserName
();
for
(
int
i
=
0
;
i
<
inputValus
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
inputValus
.
size
();
i
++)
{
objs
[
7
+
i
]
=
inputValus
.
get
(
i
);
String
value
=
inputValus
.
get
(
i
);
}
if
(
value
==
null
){
for
(
int
i
=
0
;
i
<
inputValus
.
size
();
i
++)
{
value
=
"0"
;
objs
[
7
+
i
]
=
inputValus
.
get
(
i
);
}
if
(
value
.
contains
(
"\""
))
{
value
=
value
.
replace
(
"\""
,
""
);
}
objs
[
8
+
i
]
=
value
;
}
}
datas
.
add
(
objs
);
datas
.
add
(
objs
);
});
});
...
...
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