Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
b04feb36
Commit
b04feb36
authored
Mar 14, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
5caf7fef
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
112 additions
and
50 deletions
+112
-50
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+3
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+15
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+5
-0
EquipmentMapper.java
...join/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
+3
-0
EquipmentMapper.xml
...ule-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
+14
-0
EquipmentController.java
...s/boot/module/ugp/biz/controller/EquipmentController.java
+2
-2
WelderController.java
...amos/boot/module/ugp/biz/controller/WelderController.java
+2
-2
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+19
-12
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+31
-24
WelderServiceImpl.java
...s/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
+18
-10
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
b04feb36
...
@@ -127,4 +127,7 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
...
@@ -127,4 +127,7 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
Page
<
OrgUsr
>
getWelderByProjectId
(
@Param
(
"page"
)
Page
<
OrgUsr
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
Page
<
OrgUsr
>
getWelderByProjectId
(
@Param
(
"page"
)
Page
<
OrgUsr
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
Page
<
OrgUsr
>
getAllListByProjectId
(
@Param
(
"page"
)
Page
<
OrgUsr
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
Page
<
OrgUsr
>
getAllListByProjectId
(
@Param
(
"page"
)
Page
<
OrgUsr
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
List
<
OrgUsr
>
getWelderListByProjectId
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
b04feb36
...
@@ -912,6 +912,21 @@ LEFT JOIN (
...
@@ -912,6 +912,21 @@ LEFT JOIN (
</where>
</where>
</select>
</select>
<select
id=
"getWelderListByProjectId"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.OrgUsr"
>
SELECT
cou.*
FROM
cb_org_usr cou
LEFT JOIN tz_ugp_project_resource upr ON cou.sequence_nbr = upr.resource_id
<where>
upr.type = 'welder' AND upr.project_id = #{projectId}
AND cou.parent_id = #{companyId}
<if
test=
"name != null and name != ''"
>
and cou.biz_org_name like concat('%', #{name}, '%')
</if>
</where>
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
b04feb36
...
@@ -2486,4 +2486,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -2486,4 +2486,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
this
.
baseMapper
.
getAllListByProjectId
(
page
,
projectId
,
companyId
,
name
);
return
this
.
baseMapper
.
getAllListByProjectId
(
page
,
projectId
,
companyId
,
name
);
}
}
public
List
<
OrgUsr
>
getWelderListByProjectId
(
String
projectId
,
Long
companyId
,
String
name
)
{
return
this
.
baseMapper
.
getWelderListByProjectId
(
projectId
,
companyId
,
name
);
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
View file @
b04feb36
...
@@ -27,4 +27,7 @@ public interface EquipmentMapper extends BaseMapper<Equipment> {
...
@@ -27,4 +27,7 @@ public interface EquipmentMapper extends BaseMapper<Equipment> {
Page
<
EquipmentDto
>
boundWelder
(
@Param
(
"page"
)
IPage
<
EquipmentDto
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
Page
<
EquipmentDto
>
boundWelder
(
@Param
(
"page"
)
IPage
<
EquipmentDto
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
Page
<
EquipmentDto
>
allBoundWelder
(
@Param
(
"page"
)
IPage
<
EquipmentDto
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
Page
<
EquipmentDto
>
allBoundWelder
(
@Param
(
"page"
)
IPage
<
EquipmentDto
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
List
<
EquipmentDto
>
boundWelderList
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
View file @
b04feb36
...
@@ -68,6 +68,20 @@
...
@@ -68,6 +68,20 @@
</where>
</where>
</select>
</select>
<select
id=
"boundWelderList"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto"
>
SELECT
ue.*
FROM
tz_ugp_equipment ue
LEFT JOIN tz_ugp_project_resource upr ON ue.sequence_nbr = upr.resource_id
<where>
upr.type = 'equipment' AND upr.project_id = #{projectId}
AND ue.company_id = #{companyId}
<if
test=
"name != null and name != ''"
>
and ue.name like concat('%', #{name}, '%')
</if>
</where>
</select>
</mapper>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/EquipmentController.java
View file @
b04feb36
...
@@ -293,8 +293,8 @@ public class EquipmentController extends BaseController {
...
@@ -293,8 +293,8 @@ public class EquipmentController extends BaseController {
@GetMapping
(
value
=
"/boundWelder"
)
@GetMapping
(
value
=
"/boundWelder"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询已绑定焊机信息"
,
notes
=
"查询已绑定焊机信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询已绑定焊机信息"
,
notes
=
"查询已绑定焊机信息"
)
public
ResponseModel
<
Object
>
boundWelder
(
@RequestParam
(
value
=
"projectId"
)
String
projectId
,
public
ResponseModel
<
Object
>
boundWelder
(
@RequestParam
(
value
=
"projectId"
)
String
projectId
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
,
required
=
false
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
,
required
=
false
)
Integer
size
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
{
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
{
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
boundWelder
(
projectId
,
current
,
size
,
name
,
null
));
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
boundWelder
(
projectId
,
current
,
size
,
name
,
null
));
}
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/WelderController.java
View file @
b04feb36
...
@@ -287,8 +287,8 @@ public class WelderController extends BaseController {
...
@@ -287,8 +287,8 @@ public class WelderController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询项目已绑定焊工信息"
,
notes
=
"查询项目已绑定焊工信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询项目已绑定焊工信息"
,
notes
=
"查询项目已绑定焊工信息"
)
@GetMapping
(
value
=
"/getWelderByProjectId"
)
@GetMapping
(
value
=
"/getWelderByProjectId"
)
public
ResponseModel
<
Object
>
getWelderByProjectId
(
@RequestParam
(
value
=
"projectId"
)
String
projectId
,
public
ResponseModel
<
Object
>
getWelderByProjectId
(
@RequestParam
(
value
=
"projectId"
)
String
projectId
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
,
required
=
false
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
,
required
=
false
)
Integer
size
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
{
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
{
return
ResponseHelper
.
buildResponse
(
welderServiceImpl
.
getWelderByProjectId
(
projectId
,
current
,
size
,
name
,
null
));
return
ResponseHelper
.
buildResponse
(
welderServiceImpl
.
getWelderByProjectId
(
projectId
,
current
,
size
,
name
,
null
));
}
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
View file @
b04feb36
...
@@ -290,20 +290,28 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
...
@@ -290,20 +290,28 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
@BusinessIdentify
@BusinessIdentify
public
Page
<
EquipmentDto
>
boundWelder
(
String
projectId
,
int
current
,
int
size
,
String
name
,
String
type
)
{
public
Page
<
EquipmentDto
>
boundWelder
(
String
projectId
,
Integer
current
,
Integer
size
,
String
name
,
String
type
)
{
ReginParams
reginParams
=
orgService
.
getReginParams
();
ReginParams
reginParams
=
orgService
.
getReginParams
();
Long
companySequenceNbr
=
reginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
Long
companySequenceNbr
=
reginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
Page
<
EquipmentDto
>
page
=
new
Page
<>(
current
,
size
);
if
(!
ObjectUtils
.
isEmpty
(
current
)
||
!
ObjectUtils
.
isEmpty
(
size
))
{
Page
<
EquipmentDto
>
result
;
Page
<
EquipmentDto
>
result
;
if
(!
ObjectUtils
.
isEmpty
(
type
)
&&
"all"
.
equals
(
type
))
{
Page
<
EquipmentDto
>
page
=
new
Page
<>(
current
,
size
);
result
=
equipmentMapper
.
boundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
);
if
(!
ObjectUtils
.
isEmpty
(
type
)
&&
"all"
.
equals
(
type
))
{
result
=
equipmentMapper
.
allBoundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
);
}
else
{
result
=
equipmentMapper
.
boundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
);
}
result
.
getRecords
().
forEach
(
item
->
{
List
<
JSONObject
>
files
=
attachmentServiceImpl
.
getFilesBySourceId
(
item
.
getSequenceNbr
());
item
.
setFiles
(
files
);
});
return
result
;
}
else
{
}
else
{
result
=
equipmentMapper
.
allBoundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
);
// 不分页时返回全部、定制组件格式统一
Page
<
EquipmentDto
>
listPage
=
new
Page
<>();
List
<
EquipmentDto
>
equipmentDtos
=
equipmentMapper
.
boundWelderList
(
projectId
,
companySequenceNbr
,
name
);
listPage
.
setRecords
(
equipmentDtos
);
return
listPage
;
}
}
result
.
getRecords
().
forEach
(
item
->
{
List
<
JSONObject
>
files
=
attachmentServiceImpl
.
getFilesBySourceId
(
item
.
getSequenceNbr
());
item
.
setFiles
(
files
);
});
return
result
;
}
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
View file @
b04feb36
...
@@ -715,17 +715,21 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -715,17 +715,21 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
private
List
<
Map
<
String
,
Object
>>
data
(
String
type
,
List
<
Map
<
String
,
Object
>>
data
,
List
<
Map
<
String
,
Object
>>
result
,
Date
date
)
{
private
List
<
Map
<
String
,
Object
>>
data
(
String
type
,
List
<
Map
<
String
,
Object
>>
data
,
List
<
Map
<
String
,
Object
>>
result
,
Date
date
)
{
data
.
forEach
(
item
->
{
data
.
forEach
(
item
->
{
HashMap
<
String
,
Object
>
messageData
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
messageData
=
new
HashMap
<>();
messageData
.
put
(
"name"
,
item
.
get
(
"type"
));
messageData
.
put
(
"companyName"
,
item
.
get
(
"type"
));
messageData
.
put
(
"Symbol_key"
,
item
.
get
(
"Symbol_key"
));
messageData
.
put
(
"date"
,
date
);
messageData
.
put
(
"date"
,
date
);
messageData
.
put
(
"type"
,
type
);
messageData
.
put
(
"type"
,
item
.
get
(
type
)
);
List
<
Map
<
String
,
Object
>>
infoList
=
(
List
<
Map
<
String
,
Object
>>)
item
.
get
(
"info"
);
List
<
Map
<
String
,
Object
>>
infoList
=
(
List
<
Map
<
String
,
Object
>>)
item
.
get
(
"info"
);
infoList
.
forEach
(
itemInfo
->
{
messageData
.
put
(
"files"
,
infoList
);
messageData
.
put
(
"fileName"
,
itemInfo
.
get
(
"name"
));
messageData
.
put
(
"status"
,
item
.
getOrDefault
(
"auditStatus"
,
"1"
));
messageData
.
put
(
"fileUrl"
,
itemInfo
.
get
(
"url"
));
result
.
add
(
messageData
);
messageData
.
put
(
"uid"
,
itemInfo
.
get
(
"uid"
));
// infoList.forEach(itemInfo -> {
messageData
.
put
(
"status"
,
itemInfo
.
getOrDefault
(
"auditStatus"
,
"1"
));
// messageData.put("fileName", itemInfo.get("name"));
result
.
add
(
messageData
);
// messageData.put("fileUrl", itemInfo.get("url"));
});
// messageData.put("uid", itemInfo.get("uid"));
// messageData.put("status", itemInfo.getOrDefault("auditStatus", "1"));
// result.add(messageData);
// });
});
});
return
result
;
return
result
;
}
}
...
@@ -807,23 +811,23 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -807,23 +811,23 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
// 保存资源信息
// 保存资源信息
saveResourceMessage
(
equipmentList
,
welderList
,
materialList
,
projectId
);
saveResourceMessage
(
equipmentList
,
welderList
,
materialList
,
projectId
);
// 文件信息
// 文件信息
AttachmentDto
attachmentDto
=
attachmentService
.
getAttachment
(
projectId
);
LambdaQueryWrapper
<
Attachment
>
lambda
=
new
QueryWrapper
<
Attachment
>().
lambda
();
if
(!
ObjectUtils
.
isEmpty
(
attachmentDto
)
&&
!
ObjectUtils
.
isEmpty
(
attachmentDto
.
getInfo
()))
{
lambda
.
eq
(
Attachment:
:
getSourceId
,
projectId
);
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
attachmentDto
.
getInfo
());
List
<
Attachment
>
attachments
=
attachmentMapper
.
selectList
(
lambda
);
Attachment
attachment
=
null
;
if
(!
ObjectUtils
.
isEmpty
(
attachments
)){
attachment
=
attachments
.
get
(
0
);
}
if
(!
ObjectUtils
.
isEmpty
(
attachment
)
&&
!
ObjectUtils
.
isEmpty
(
attachment
.
getInfo
()))
{
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
attachment
.
getInfo
());
List
<
Map
<
String
,
Object
>>
installSubForm
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"installSubForm"
);
List
<
Map
<
String
,
Object
>>
installSubForm
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"installSubForm"
);
// 文件信息json处理
// 文件信息json处理
changeStatus
(
installSubForm
,
fileList
);
changeStatus
(
installSubForm
,
fileList
);
List
<
Map
<
String
,
Object
>>
designSubForm
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"designSubForm"
);
List
<
Map
<
String
,
Object
>>
designSubForm
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"designSubForm"
);
// 文件信息json处理
// 文件信息json处理
changeStatus
(
designSubForm
,
fileList
);
changeStatus
(
designSubForm
,
fileList
);
Attachment
attachment
=
new
Attachment
();
attachment
.
setSourceId
(
projectId
);
attachment
.
setInfo
(
JSON
.
toJSONString
(
map
));
attachment
.
setInfo
(
JSON
.
toJSONString
(
map
));
attachment
.
setType
(
"project"
);
attachmentService
.
saveOrUpdate
(
attachment
);
LambdaQueryWrapper
<
Attachment
>
attachmentLambda
=
new
QueryWrapper
<
Attachment
>().
lambda
();
attachmentLambda
.
eq
(
Attachment:
:
getSourceId
,
projectId
);
attachmentMapper
.
delete
(
attachmentLambda
);
attachmentService
.
save
(
attachment
);
}
}
if
(
"submit"
.
equals
(
type
))
{
if
(
"submit"
.
equals
(
type
))
{
...
@@ -835,11 +839,13 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -835,11 +839,13 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
private
void
changeStatus
(
List
<
Map
<
String
,
Object
>>
data
,
List
<
Map
<
String
,
Object
>>
fileList
)
{
private
void
changeStatus
(
List
<
Map
<
String
,
Object
>>
data
,
List
<
Map
<
String
,
Object
>>
fileList
)
{
data
.
forEach
(
item
->
{
data
.
forEach
(
item
->
{
List
<
Map
<
String
,
Object
>>
installSubFormInfo
=
(
List
<
Map
<
String
,
Object
>>)
item
.
get
(
"info"
);
List
<
Map
<
String
,
Object
>>
collect
=
fileList
.
stream
().
filter
(
itemData
->
itemData
.
get
(
"Symbol_key"
).
equals
(
item
.
get
(
"Symbol_key"
))).
collect
(
Collectors
.
toList
());
installSubFormInfo
.
forEach
(
infoItem
->
{
item
.
put
(
"auditStatus"
,
ObjectUtils
.
isEmpty
(
collect
.
get
(
0
).
get
(
"status"
))
?
""
:
collect
.
get
(
0
).
get
(
"status"
));
List
<
Map
<
String
,
Object
>>
collect
=
fileList
.
stream
().
filter
(
itemData
->
itemData
.
get
(
"uid"
).
equals
(
infoItem
.
get
(
"uid"
))).
collect
(
Collectors
.
toList
());
// List<Map<String, Object>> installSubFormInfo = (List<Map<String, Object>>) item.get("info");
infoItem
.
put
(
"auditStatus"
,
ObjectUtils
.
isEmpty
(
collect
.
get
(
0
).
get
(
"status"
))
?
""
:
collect
.
get
(
0
).
get
(
"status"
));
// installSubFormInfo.forEach(infoItem -> {
});
// List<Map<String, Object>> collect = fileList.stream().filter(itemData -> itemData.get("uid").equals(infoItem.get("uid"))).collect(Collectors.toList());
// infoItem.put("auditStatus", ObjectUtils.isEmpty(collect.get(0).get("status")) ? "" : collect.get(0).get("status"));
// });
});
});
}
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
View file @
b04feb36
...
@@ -219,23 +219,31 @@ public class WelderServiceImpl {
...
@@ -219,23 +219,31 @@ public class WelderServiceImpl {
@BusinessIdentify
@BusinessIdentify
public
Page
<
Map
<
String
,
Object
>>
getWelderByProjectId
(
String
projectId
,
int
current
,
int
size
,
String
name
,
String
type
)
{
public
Page
<
Map
<
String
,
Object
>>
getWelderByProjectId
(
String
projectId
,
Integer
current
,
Integer
size
,
String
name
,
String
type
)
{
String
columnKey
=
"column"
;
String
columnKey
=
"column"
;
String
valueKey
=
"value"
;
String
valueKey
=
"value"
;
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
ArrayList
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
ArrayList
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
ReginParams
reginParams
=
orgService
.
getReginParams
();
ReginParams
reginParams
=
orgService
.
getReginParams
();
Long
companySequenceNbr
=
reginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
Long
companySequenceNbr
=
reginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
Page
<
OrgUsr
>
page
=
new
Page
<>(
current
,
size
);
if
(!
ObjectUtils
.
isEmpty
(
type
)
&&
"all"
.
equals
(
type
))
{
List
<
OrgUsr
>
usrList
;
page
=
orgUsrService
.
getAllListByProjectId
(
page
,
projectId
,
companySequenceNbr
,
name
);
// 分页参数为空时返回全部
if
(!
ObjectUtils
.
isEmpty
(
current
)
||
!
ObjectUtils
.
isEmpty
(
size
))
{
Page
<
OrgUsr
>
page
=
new
Page
<>(
current
,
size
);
if
(!
ObjectUtils
.
isEmpty
(
type
)
&&
"all"
.
equals
(
type
))
{
page
=
orgUsrService
.
getAllListByProjectId
(
page
,
projectId
,
companySequenceNbr
,
name
);
}
else
{
page
=
orgUsrService
.
getWelderByProjectId
(
page
,
projectId
,
companySequenceNbr
,
name
);
}
mapPage
.
setTotal
(
page
.
getTotal
());
mapPage
.
setSize
(
page
.
getSize
());
mapPage
.
setPages
(
page
.
getPages
());
usrList
=
page
.
getRecords
();
}
else
{
}
else
{
page
=
orgUsrService
.
getWelderByProjectId
(
page
,
projectId
,
companySequenceNbr
,
name
);
usrList
=
orgUsrService
.
getWelderListByProjectId
(
projectId
,
companySequenceNbr
,
name
);
}
}
List
<
OrgUsr
>
usrList
=
page
.
getRecords
();
mapPage
.
setTotal
(
page
.
getTotal
());
mapPage
.
setSize
(
page
.
getSize
());
mapPage
.
setPages
(
page
.
getPages
());
usrList
.
forEach
(
item
->
{
usrList
.
forEach
(
item
->
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"status"
,
"1"
);
map
.
put
(
"status"
,
"1"
);
...
@@ -245,7 +253,7 @@ public class WelderServiceImpl {
...
@@ -245,7 +253,7 @@ public class WelderServiceImpl {
if
(
String
.
valueOf
(
dataItem
.
get
(
columnKey
)).
equals
(
"image"
)
&&
!
ObjectUtils
.
isEmpty
(
dataItem
.
get
(
columnKey
))
&&
!
ObjectUtils
.
isEmpty
(
dataItem
.
get
(
valueKey
)))
{
if
(
String
.
valueOf
(
dataItem
.
get
(
columnKey
)).
equals
(
"image"
)
&&
!
ObjectUtils
.
isEmpty
(
dataItem
.
get
(
columnKey
))
&&
!
ObjectUtils
.
isEmpty
(
dataItem
.
get
(
valueKey
)))
{
String
value1
=
String
.
valueOf
(
dataItem
.
get
(
valueKey
));
String
value1
=
String
.
valueOf
(
dataItem
.
get
(
valueKey
));
List
<
Map
<
String
,
Object
>>
imageMap
=
(
List
<
Map
<
String
,
Object
>>)
JSON
.
parse
(
value1
);
List
<
Map
<
String
,
Object
>>
imageMap
=
(
List
<
Map
<
String
,
Object
>>)
JSON
.
parse
(
value1
);
if
(!
ObjectUtils
.
isEmpty
(
imageMap
)){
if
(!
ObjectUtils
.
isEmpty
(
imageMap
))
{
map
.
put
(
"files"
,
imageMap
);
map
.
put
(
"files"
,
imageMap
);
}
}
}
}
...
...
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