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
d4cc1045
Commit
d4cc1045
authored
Nov 18, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安装、设计单位 上传监检资料时 约束
parent
2c4162dd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
13 deletions
+59
-13
XJConstant.java
...eejoin/amos/boot/module/ugp/api/constants/XJConstant.java
+4
-0
ProjectDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
+3
-1
Attachment.java
...m/yeejoin/amos/boot/module/ugp/api/entity/Attachment.java
+5
-0
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+8
-0
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+39
-12
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/constants/XJConstant.java
View file @
d4cc1045
...
...
@@ -22,6 +22,10 @@ public class XJConstant {
public
static
final
String
DEPT_WF_MAP_DIC_CODE
=
"DEPT_WF_MAP"
;
public
static
final
String
INSTALL_SUB_FORM
=
"[{\"Symbol_key\":\"B83A18D2-FF89-47D2-BEA2-BAA097E09783\",\"subFormInstall\":\"设计文件1\",\"info\":\"\",\"type\":\"\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD408\",\"subFormInstall\":\"设计文件2\",\"info\":\"\",\"type\":\"\"},{\"Symbol_key\":\"1939A00E-09D9-4023-8F3A-3B5B5A87CF2D\",\"subFormInstall\":\"设计文件3\",\"info\":\"\",\"type\":\"\"},{\"Symbol_key\":\"34DB64C7-1451-42D8-9AEE-012248B172A4\",\"subFormInstall\":\"设计文件4\",\"info\":\"\",\"type\":\"\"}]"
;
public
static
final
String
DESIGN_SUB_FORM
=
"[{\"Symbol_key\":\"314C727B-A6A7-40F1-9CFC-C354748657F7\",\"subFormAttachment\":\"设计文件5\",\"attachmentUpload_8budyj0clb\":\"\",\"input_qz5m6foxlw\":\"\"},{\"Symbol_key\":\"5F3B660B-25A2-420C-919E-60F74CE1F36A\",\"subFormAttachment\":\"设计文件6\",\"attachmentUpload_8budyj0clb\":\"\",\"input_qz5m6foxlw\":\"\"},{\"Symbol_key\":\"8ACCE0AE-C889-47AA-98AB-ACF48FC823EB\",\"subFormAttachment\":\"设计文件7\",\"attachmentUpload_8budyj0clb\":\"\",\"input_qz5m6foxlw\":\"\"},{\"Symbol_key\":\"E6C05EBD-32C5-4655-BCFC-59A4A3E4453D\",\"subFormAttachment\":\"设计文件8\",\"attachmentUpload_8budyj0clb\":\"\",\"input_qz5m6foxlw\":\"\"}]"
;
/** 企业用户注册前缀 */
public
static
final
String
UGP_USER_TEL
=
"ugp_tel_"
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
View file @
d4cc1045
...
...
@@ -98,7 +98,9 @@ public class ProjectDto extends BaseDto {
*/
private
String
superviseDept
;
private
JSONArray
subForm
;
private
JSONArray
installSubForm
;
private
JSONArray
designSubForm
;
private
String
examineProjectState
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/Attachment.java
View file @
d4cc1045
...
...
@@ -46,4 +46,9 @@ public class Attachment extends BaseEntity {
@TableField
(
"type"
)
private
String
type
;
// //安装单位
// String subFormInstall;
// //设计单位
// String subFormAttachment;
}
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 @
d4cc1045
...
...
@@ -134,6 +134,14 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
}
public
void
saveProjectAttachment
(
JSONObject
subForm
,
Long
SequenceNbr
){
AttachmentDto
attachmentDto
=
new
AttachmentDto
();
attachmentDto
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
attachmentDto
.
setSourceId
(
SequenceNbr
);
attachmentDto
.
setType
(
"project"
);
attachmentServiceImpl
.
createWithModel
(
attachmentDto
);
}
@Override
...
...
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 @
d4cc1045
...
...
@@ -173,12 +173,22 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
ProjectDto
project
=
projectMapper
.
getDetail
(
sequenceNbr
);
LambdaQueryWrapper
<
Attachment
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Attachment:
:
getSourceId
,
sequenceNbr
);
try
{
JSONArray
jsonArray
=
JSON
.
parseArray
(
attachmentService
.
getOne
(
wrapper
).
getInfo
());
project
.
setSubForm
(
jsonArray
);
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"该项目暂无附件"
);
// try{
JSONObject
jsonObject
=
JSON
.
parseObject
(
attachmentService
.
getOne
(
wrapper
).
getInfo
());
JSONArray
installSubForm
=
JSON
.
parseArray
(
XJConstant
.
INSTALL_SUB_FORM
);
JSONArray
designSubForm
=
JSON
.
parseArray
(
XJConstant
.
DESIGN_SUB_FORM
);
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
)){
installSubForm
=
jsonObject
.
getJSONArray
(
"installSubForm"
);
designSubForm
=
jsonObject
.
getJSONArray
(
"designSubForm"
);
}
project
.
setInstallSubForm
(
installSubForm
);
project
.
setDesignSubForm
(
designSubForm
);
// project.setSubForm(jsonArray);
// }catch (Exception e) {
// System.out.println("该项目暂无附件");
// }
project
.
getInstanceId
();
getProjectState
(
project
);
return
project
;
...
...
@@ -186,13 +196,17 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
public
String
saveOrUpdateFile
(
JSONObject
jsonObject
){
JSONArray
subForm
=
jsonObject
.
getJSONArray
(
"subForm"
);
JSONArray
installSubForm
=
jsonObject
.
getJSONArray
(
"installSubForm"
);
JSONArray
designSubForm
=
jsonObject
.
getJSONArray
(
"designSubForm"
);
JSONObject
subForm
=
new
JSONObject
();
subForm
.
put
(
"installSubForm"
,
installSubForm
);
subForm
.
put
(
"designSubForm"
,
designSubForm
);
Long
sequenceNbr
=
jsonObject
.
getLong
(
"sequenceNbr"
);
LambdaQueryWrapper
<
Attachment
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Attachment:
:
getSourceId
,
sequenceNbr
);
Attachment
attachment
=
attachmentService
.
getOne
(
wrapper
);
if
(
ValidationUtil
.
isEmpty
(
attachment
)){
equipmentService
.
saveAttachment
(
subForm
,
sequenceNbr
);
equipmentService
.
save
Project
Attachment
(
subForm
,
sequenceNbr
);
}
else
{
attachment
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
attachmentService
.
updateById
(
attachment
);
...
...
@@ -207,16 +221,29 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
projectDto
.
setInsDep
(
jsonObject
.
getString
(
"insPerson"
));
projectDto
.
setProcessProjectState
(
jsonObject
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
));
boolean
design
=
false
,
install
=
false
;
for
(
Object
object:
s
ubForm
){
for
(
Object
object:
installS
ubForm
){
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
));
String
type
=
jo
.
getString
(
"type"
);
if
(
OrgEnum
.
设计单位
.
getName
().
equals
(
type
)){
design
=
true
;
}
if
(
OrgEnum
.
安装单位
.
getName
().
equals
(
type
)){
String
info
=
jo
.
getString
(
"info"
);
if
(
OrgEnum
.
安装单位
.
getName
().
equals
(
type
)
&&
ValidationUtil
.
isEmpty
(
info
)){
install
=
true
;
}
else
{
install
=
false
;
break
;
}
}
for
(
Object
object:
designSubForm
){
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
));
String
type
=
jo
.
getString
(
"type"
);
String
info
=
jo
.
getString
(
"info"
);
if
(
OrgEnum
.
设计单位
.
getName
().
equals
(
type
)
&&
ValidationUtil
.
isEmpty
(
info
)){
design
=
true
;
}
else
{
design
=
false
;
break
;
}
}
String
type
=
jsonObject
.
getString
(
"type"
);
if
(
type
!=
null
)
{
if
(
design
&&
install
)
{
...
...
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