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
557b2681
Commit
557b2681
authored
Mar 15, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
3a97f8c6
60f2a3c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
35 deletions
+47
-35
FileDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/FileDto.java
+16
-0
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+0
-1
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+31
-32
WelderServiceImpl.java
...s/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
+0
-2
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/FileDto.java
0 → 100644
View file @
557b2681
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.alibaba.fastjson.JSONArray
;
import
lombok.Data
;
@Data
public
class
FileDto
{
private
String
instanceId
;
private
String
status
;
private
JSONArray
installSubForm
;
private
JSONArray
designSubForm
;
}
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 @
557b2681
...
...
@@ -27,7 +27,6 @@ import org.springframework.stereotype.Service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 设备信息表服务实现类
...
...
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 @
557b2681
...
...
@@ -14,10 +14,7 @@ import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WhetherItPassEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.PipeDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectProcessDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
...
...
@@ -95,6 +92,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
@Autowired
AttachmentMapper
attachmentMapper
;
static
final
String
symbolKey
=
"Symbol_key"
;
static
final
String
status
=
"status"
;
public
ProjectDto
saveProjectInfo
(
ProjectDto
model
,
String
submitType
){
String
regionName
=
""
,
regionCode
=
""
;
...
...
@@ -683,20 +682,30 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
}
public
Map
<
String
,
Object
>
getInformationDetail
(
Long
sequenceNbr
)
{
public
FileDto
getInformationDetail
(
Long
sequenceNbr
)
{
FileDto
fileDto
=
new
FileDto
();
LambdaQueryWrapper
<
Attachment
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Attachment:
:
getSourceId
,
sequenceNbr
);
Attachment
attachment
=
attachmentService
.
getOne
(
wrapper
);
JSONObject
jsonObject
=
null
;
if
(!
ObjectUtils
.
isEmpty
(
attachment
)
&&
!
ObjectUtils
.
isEmpty
(
attachment
.
getInfo
()))
{
jsonObject
=
JSON
.
parseObject
(
attachment
.
getInfo
());
return
jsonObject
;
}
else
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"installSubForm"
,
XJConstant
.
INSTALL_SUB_FORM_NEW
);
map
.
put
(
"designSubForm"
,
XJConstant
.
DESIGN_SUB_FORM_NEW
);
return
map
;
ProjectDto
detail
=
projectMapper
.
getDetail
(
sequenceNbr
);
if
(!
ObjectUtils
.
isEmpty
(
detail
)
&&
!
ObjectUtils
.
isEmpty
(
detail
.
getInstanceId
())){
fileDto
.
setInstanceId
(
detail
.
getInstanceId
());
}
JSONArray
installSubForm
=
JSON
.
parseArray
(
XJConstant
.
INSTALL_SUB_FORM_NEW
);
JSONArray
designSubForm
=
JSON
.
parseArray
(
XJConstant
.
DESIGN_SUB_FORM_NEW
);
if
(!
ValidationUtil
.
isEmpty
(
attachment
)){
jsonObject
=
JSON
.
parseObject
(
attachment
.
getInfo
());
}
if
(!
ObjectUtils
.
isEmpty
(
jsonObject
))
{
installSubForm
=
jsonObject
.
getJSONArray
(
"installSubForm"
);
designSubForm
=
jsonObject
.
getJSONArray
(
"designSubForm"
);
}
fileDto
.
setInstallSubForm
(
installSubForm
);
fileDto
.
setDesignSubForm
(
designSubForm
);
fileDto
.
setStatus
(
detail
.
getStatus
());
return
fileDto
;
}
...
...
@@ -716,23 +725,17 @@ 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
)
{
data
.
forEach
(
item
->
{
HashMap
<
String
,
Object
>
messageData
=
new
HashMap
<>();
messageData
.
put
(
"companyName"
,
item
.
get
(
"type"
));
messageData
.
put
(
"Symbol_key"
,
item
.
get
(
"Symbol_key"
));
messageData
.
put
(
symbolKey
,
item
.
get
(
symbolKey
));
messageData
.
put
(
"date"
,
date
);
messageData
.
put
(
"type"
,
item
.
get
(
type
));
List
<
Map
<
String
,
Object
>>
infoList
=
(
List
<
Map
<
String
,
Object
>>)
item
.
get
(
"info"
);
messageData
.
put
(
"files"
,
infoList
);
messageData
.
put
(
"status"
,
item
.
getOrDefault
(
"auditStatus"
,
"1"
));
messageData
.
put
(
status
,
item
.
getOrDefault
(
"auditStatus"
,
"1"
));
result
.
add
(
messageData
);
// infoList.forEach(itemInfo -> {
// messageData.put("fileName", itemInfo.get("name"));
// messageData.put("fileUrl", itemInfo.get("url"));
// messageData.put("uid", itemInfo.get("uid"));
// messageData.put("status", itemInfo.getOrDefault("auditStatus", "1"));
// result.add(messageData);
// });
});
return
result
;
}
...
...
@@ -775,7 +778,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequenceNbr"
))));
projectResource
.
setType
(
"equipment"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
"status"
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
"status"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
projectResources
.
add
(
projectResource
);
});
// 焊工信息
...
...
@@ -785,7 +788,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequenceNbr"
))));
projectResource
.
setType
(
"welder"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
"status"
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
"status"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
projectResources
.
add
(
projectResource
);
});
// 管材信息
...
...
@@ -795,7 +798,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequenceNbr"
))));
projectResource
.
setType
(
"material"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
"status"
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
"status"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
projectResources
.
add
(
projectResource
);
});
LambdaQueryWrapper
<
ProjectResource
>
lambda
=
new
QueryWrapper
<
ProjectResource
>().
lambda
();
...
...
@@ -842,13 +845,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
private
void
changeStatus
(
List
<
Map
<
String
,
Object
>>
data
,
List
<
Map
<
String
,
Object
>>
fileList
)
{
data
.
forEach
(
item
->
{
List
<
Map
<
String
,
Object
>>
collect
=
fileList
.
stream
().
filter
(
itemData
->
itemData
.
get
(
"Symbol_key"
).
equals
(
item
.
get
(
"Symbol_key"
))).
collect
(
Collectors
.
toList
());
item
.
put
(
"auditStatus"
,
ObjectUtils
.
isEmpty
(
collect
.
get
(
0
).
get
(
"status"
))
?
""
:
collect
.
get
(
0
).
get
(
"status"
));
// List<Map<String, Object>> installSubFormInfo = (List<Map<String, Object>>) item.get("info");
// 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"));
// });
List
<
Map
<
String
,
Object
>>
collect
=
fileList
.
stream
().
filter
(
itemData
->
itemData
.
get
(
symbolKey
).
equals
(
item
.
get
(
symbolKey
))).
collect
(
Collectors
.
toList
());
item
.
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 @
557b2681
...
...
@@ -19,7 +19,6 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WelderMapper
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
...
...
@@ -28,7 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.*
;
...
...
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