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
61e7abe8
Commit
61e7abe8
authored
Mar 20, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目立项流程修改
parent
2fa8c116
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
221 additions
and
61 deletions
+221
-61
ProjectInitiationEnum.java
.../amos/boot/module/ugp/api/Enum/ProjectInitiationEnum.java
+10
-7
XJConstant.java
...eejoin/amos/boot/module/ugp/api/constants/XJConstant.java
+1
-1
FileDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/FileDto.java
+6
-0
MaterialDto.java
...com/yeejoin/amos/boot/module/ugp/api/dto/MaterialDto.java
+2
-0
ProjectMapper.xml
...odule-ugp-api/src/main/resources/mapper/ProjectMapper.xml
+1
-3
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+19
-6
CompanyServiceImpl.java
.../boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
+18
-16
InstallNoticeServiceImpl.java
...module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
+8
-2
MaterialServiceImpl.java
...boot/module/ugp/biz/service/impl/MaterialServiceImpl.java
+8
-2
ProjectInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
+74
-16
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+64
-6
QualityProblemServiceImpl.java
...odule/ugp/biz/service/impl/QualityProblemServiceImpl.java
+6
-2
TaskServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/TaskServiceImpl.java
+4
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/ProjectInitiationEnum.java
View file @
61e7abe8
...
...
@@ -11,20 +11,20 @@ import java.util.Map;
public
enum
ProjectInitiationEnum
{
项目立项
(
"1"
,
"项目立项"
,
"XMLX"
,
"被驳回,请重新申请"
,
""
,
""
),
设计开工资料提交
(
"2"
,
"
开工资料提交(设计)"
,
"SJZLTJ"
,
"设计资料待提交"
,
"
提交资料"
,
"待提交"
),
安装开工资料提交
(
"3"
,
"
开工资料提交(安装)"
,
"AZZLTJ"
,
"安装资料待提交"
,
"
提交资料"
,
"待提交"
),
设计开工资料提交
(
"2"
,
"
设计提交资料"
,
"SJZLTJ"
,
"设计资料待提交"
,
"设计
提交资料"
,
"待提交"
),
安装开工资料提交
(
"3"
,
"
安装提交资料"
,
"AZZLTJ"
,
"安装资料待提交"
,
"安装
提交资料"
,
"待提交"
),
告知申请
(
"4"
,
"告知申请"
,
"GZSQ"
,
"告知待申请"
,
"告知申请"
,
"待申请"
),
接受告知
(
"5"
,
"接
受
告知"
,
"JSGZ"
,
"告知待接收"
,
"告知接收"
,
"待接收"
),
接受告知
(
"5"
,
"接
收
告知"
,
"JSGZ"
,
"告知待接收"
,
"告知接收"
,
"待接收"
),
//设计和安装合并使用。
提交资料
(
"6"
,
"提交资料"
,
"TJZL"
,
"项目资料待提交"
,
"提交资料"
,
"待提交"
),
监检科室分配
(
"6"
,
"监检科室分配"
,
"JJKSFP"
,
"监检科室待分配"
,
"监检科室分配"
,
"待分配"
),
监检员分配
(
"7"
,
"监检员分配"
,
"JJYFP"
,
"监检员待分配"
,
"监检员分配"
,
"待分配"
),
监检员审核
(
"8"
,
"监检员审核"
,
"JJYSH"
,
"监检员待审核"
,
"监检员审核"
,
"待审核"
),
设计开工资料修改
(
"9"
,
"
开工资料修改(设计)
"
,
"SJZLXG"
,
"设计资料待修改"
,
"设计修改资料"
,
"待修改"
),
安装开工资料修改
(
"10"
,
"
开工资料修改(安装)
"
,
"AZZLXG"
,
"安装资料待修改"
,
"安装修改资料"
,
"待修改"
),
设计开工资料修改
(
"9"
,
"
设计修改资料
"
,
"SJZLXG"
,
"设计资料待修改"
,
"设计修改资料"
,
"待修改"
),
安装开工资料修改
(
"10"
,
"
安装修改资料
"
,
"AZZLXG"
,
"安装资料待修改"
,
"安装修改资料"
,
"待修改"
),
// 设计和安装都需要修改时合并使用
修改资料
(
""
,
"
资料修改
"
,
""
,
"资料待修改"
,
"修改资料"
,
"待修改"
),
流程结束
(
"11"
,
"流程结束!"
,
"LCJS"
,
""
,
""
,
""
);
修改资料
(
""
,
"
修改资料
"
,
""
,
"资料待修改"
,
"修改资料"
,
"待修改"
),
流程结束
(
"11"
,
"流程结束!"
,
"LCJS"
,
"
立项成功!
"
,
""
,
""
);
private
String
status
;
private
String
name
;
...
...
@@ -49,6 +49,9 @@ public enum ProjectInitiationEnum {
getTaskNameMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
taskName
);
getTaskDetailStatusMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
taskDetailStatus
);
}
for
(
OverProjectFlowEnum
overProject:
OverProjectFlowEnum
.
values
()){
getTaskDetailStatusMap
.
put
(
overProject
.
getName
(),
overProject
.
getTaskDetailStatus
());
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/constants/XJConstant.java
View file @
61e7abe8
...
...
@@ -26,7 +26,7 @@ public class XJConstant {
public
static
final
String
DESIGN_SUB_FORM
=
"[{\"Symbol_key\":\"314C727B-A6A7-40F1-9CFC-C354748657F7\",\"subFormAttachment\":\"设计文件\",\"info\":\"\",\"type\":\"设计单位\"},{\"Symbol_key\":\"5F3B660B-25A2-420C-919E-60F74CE1F36A\",\"subFormAttachment\":\"施工组织设计文件\",\"info\":\"\",\"type\":\"设计单位\"}]"
;
// 安装单位
public
static
final
String
INSTALL_SUB_FORM_NEW
=
"[{\"Symbol_key\":\"B83A18D2-FF89-47D2-BEA2-BAA097E09783\",\"subFormInstall\":\"材质证明文件\",\"info\":\"\",\"type\":\"安装单位\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD408\",\"subFormInstall\":\"焊接工艺评定报告\",\"info\":\"\",\"type\":\"安装单位\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD40
8\",\"subFormInstall\":\"施工组织设计文件\",\"info\":\"\",\"type\":\"安装单位\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD408
\",\"subFormInstall\":\"合同文件\",\"info\":\"\",\"type\":\"安装单位\"}]"
;
public
static
final
String
INSTALL_SUB_FORM_NEW
=
"[{\"Symbol_key\":\"B83A18D2-FF89-47D2-BEA2-BAA097E09783\",\"subFormInstall\":\"材质证明文件\",\"info\":\"\",\"type\":\"安装单位\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD408\",\"subFormInstall\":\"焊接工艺评定报告\",\"info\":\"\",\"type\":\"安装单位\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD40
9\",\"subFormInstall\":\"施工组织设计文件\",\"info\":\"\",\"type\":\"安装单位\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD410
\",\"subFormInstall\":\"合同文件\",\"info\":\"\",\"type\":\"安装单位\"}]"
;
// 设计单位
public
static
final
String
DESIGN_SUB_FORM_NEW
=
"[{\"Symbol_key\":\"314C727B-A6A7-40F1-9CFC-C354748657F7\",\"subFormAttachment\":\"设计文件\",\"info\":\"\",\"type\":\"设计单位\"},{\"Symbol_key\":\"5F3B660B-25A2-420C-919E-60F74CE1F36A\",\"subFormAttachment\":\"其他\",\"info\":\"\",\"type\":\"设计单位\"}]"
;
//人员org数值
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/FileDto.java
View file @
61e7abe8
...
...
@@ -18,6 +18,12 @@ public class FileDto {
private
JSONArray
designSubForm
;
private
String
unitType
;
private
String
insDepId
;
private
String
insDep
;
private
String
insPerson
;
// 前端定制组件格式 文件
Page
<
Map
<
String
,
Object
>>
mapPage
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/MaterialDto.java
View file @
61e7abe8
...
...
@@ -73,4 +73,6 @@ public class MaterialDto extends BaseDto {
private
List
<
JSONObject
>
files
;
private
String
status
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectMapper.xml
View file @
61e7abe8
...
...
@@ -21,11 +21,9 @@
<select
id=
"queryProjectPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto"
>
SELECT
pt.*,
pg.context
AS context
( SELECT log.context FROM tz_ugp_initiation_log log WHERE log.instance_id = pt.instance_id ORDER BY log.rec_date DESC LIMIT 1 )
AS context
FROM
tz_ugp_project pt
LEFT JOIN ( SELECT * FROM tz_ugp_initiation_log GROUP BY
instance_id ) pg ON pt.instance_id = pg.instance_id
<where>
<if
test=
"roleName == '建设单位'"
>
and pt.construction_unit_id = #{companyId}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
61e7abe8
...
...
@@ -343,11 +343,6 @@ public class ProjectController extends BaseController {
@GetMapping
(
value
=
"/getDetail"
)
public
ResponseModel
<
JSONObject
>
getDetail
(
Long
sequenceNbr
){
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
projectServiceImpl
.
getInformationDetail
(
sequenceNbr
)));
try
{
jsonObject
.
putAll
(
BeanUtils
.
describe
(
projectServiceImpl
.
getDetail
(
sequenceNbr
)));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
JSONObject
jo
=
new
JSONObject
();
jo
.
put
(
"projectInfo"
,
projectServiceImpl
.
selectById
(
sequenceNbr
));
jo
.
put
(
"fileInfo"
,
jsonObject
);
...
...
@@ -492,7 +487,11 @@ public class ProjectController extends BaseController {
public
ResponseModel
<
Object
>
informationAudit
(
@RequestBody
JSONObject
jsonObject
)
{
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
jsonObject
.
get
(
TabLogoEnum
.
项目资料信息
.
getLogo
());
InformationDto
dto
=
new
InformationDto
();
dto
.
setProjectId
(
Long
.
valueOf
(
String
.
valueOf
(
jsonObject
.
get
(
"projectId"
))));
dto
.
setProjectId
(
jsonObject
.
getLong
(
"projectId"
));
dto
.
setWelderList
(
new
ArrayList
<>());
dto
.
setMaterialList
(
new
ArrayList
<>());
dto
.
setEquipmentList
(
new
ArrayList
<>());
dto
.
setFileList
(
new
ArrayList
<>());
List
<
Map
<
String
,
Object
>>
welderList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"welderList"
);
if
(!
ObjectUtils
.
isEmpty
(
welderList
))
{
dto
.
setWelderList
(
welderList
);
...
...
@@ -542,6 +541,20 @@ public class ProjectController extends BaseController {
}
/**
* 获取当前登录人的单位类型
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前登录人的单位类型"
,
notes
=
"获取当前登录人的单位类型"
)
@GetMapping
(
value
=
"/companyType"
)
@BusinessIdentify
public
ResponseModel
<
Map
>
getCompanyType
(){
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"unitType"
,
orgServiceImpl
.
getReginParams
().
getBusinessInfo
().
getCompanyType
());
return
ResponseHelper
.
buildResponse
(
map
);
}
/**
* 根据projectId查询 项目基本信息、资料信息、告知信息、竣工结项信息
* @param projectId
* @return
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
View file @
61e7abe8
...
...
@@ -382,24 +382,26 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
}
public
JSONObject
getUnitLicenseCode
(
Long
unitId
)
{
UnitLicence
unitLicence
=
new
UnitLicence
();
Company
company
=
companyServiceImpl
.
getById
(
unitId
);
String
creditCode
=
company
.
getCreditCode
();
LambdaQueryWrapper
<
UnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
UnitLicence:
:
getUnitCode
,
creditCode
);
List
<
UnitLicence
>
list
=
unitLicenceService
.
list
(
wrapper
);
Iterator
<
UnitLicence
>
iterator
=
list
.
iterator
();
String
licenseCode
=
""
;
while
(
iterator
.
hasNext
())
{
unitLicence
=
iterator
.
next
();
if
(
ValidationUtil
.
isEmpty
(
licenseCode
)){
licenseCode
=
unitLicence
.
getCertNo
();
}
else
{
licenseCode
=
licenseCode
+
","
+
unitLicence
.
getCertNo
();
JSONObject
jsonObject
=
new
JSONObject
();
if
(!
ValidationUtil
.
isEmpty
(
unitId
))
{
UnitLicence
unitLicence
=
new
UnitLicence
();
Company
company
=
companyServiceImpl
.
getById
(
unitId
);
String
creditCode
=
company
.
getCreditCode
();
LambdaQueryWrapper
<
UnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
UnitLicence:
:
getUnitCode
,
creditCode
);
List
<
UnitLicence
>
list
=
unitLicenceService
.
list
(
wrapper
);
Iterator
<
UnitLicence
>
iterator
=
list
.
iterator
();
String
licenseCode
=
""
;
while
(
iterator
.
hasNext
())
{
unitLicence
=
iterator
.
next
();
if
(
ValidationUtil
.
isEmpty
(
licenseCode
))
{
licenseCode
=
unitLicence
.
getCertNo
();
}
else
{
licenseCode
=
licenseCode
+
","
+
unitLicence
.
getCertNo
();
}
}
jsonObject
.
put
(
"licenseCode"
,
licenseCode
);
}
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"licenseCode"
,
licenseCode
);
return
jsonObject
;
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
View file @
61e7abe8
...
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.NoticeStatusEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProcessTypeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
...
...
@@ -81,6 +82,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
ProcessRelationServiceImpl
processRelationService
;
/**
* 分页查询
*/
...
...
@@ -223,7 +226,6 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
if
(
ObjectUtils
.
isNotEmpty
(
one
))
{
BeanUtils
.
copyProperties
(
one
,
installNoticeDto
);
}
installNoticeDto
.
setEquipPosition
(
projectDto
.
getAddress
());
installNoticeDto
.
setImplementDate
(
projectDto
.
getStartDate
());
installNoticeDto
.
setConstructionUnit
(
projectDto
.
getInstallationUnit
());
installNoticeDto
.
setUseUnitName
(
orgServiceImpl
.
getOrgUsr
().
getBizOrgName
());
...
...
@@ -259,7 +261,10 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
installNoticeDto
.
setBuildLicenceCode
(
buildLicenceCode
);
installNoticeDto
.
setBuildLicenceDateLine
(
collect
);
installNoticeDto
.
setProjectId
(
projectId
);
installNoticeDto
.
setInstanceId
(
projectDto
.
getInstanceId
());
LambdaQueryWrapper
<
ProcessRelation
>
relationsWrapper
=
new
LambdaQueryWrapper
<>();
relationsWrapper
.
eq
(
ProcessRelation:
:
getSourceId
,
projectDto
.
getSequenceNbr
())
.
eq
(
ProcessRelation:
:
getDefCode
,
ProcessTypeEnum
.
项目立项
.
getType
());
installNoticeDto
.
setInstanceId
(
processRelationService
.
getOne
(
relationsWrapper
).
getInstanceId
());
return
installNoticeDto
;
}
}
\ 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/MaterialServiceImpl.java
View file @
61e7abe8
...
...
@@ -88,6 +88,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
public
IPage
<
MaterialDto
>
queryOutPage
(
IPage
<
Material
>
page
,
MaterialDto
material
)
{
LambdaQueryWrapper
<
Material
>
wrapper
=
new
LambdaQueryWrapper
<>();
List
materialIds
=
new
ArrayList
<>();
Map
<
Long
,
String
>
map
=
new
HashMap
<>();
LambdaQueryWrapper
<
ProjectResource
>
resourceWrapper
=
new
LambdaQueryWrapper
<>();
if
(!
ValidationUtil
.
isEmpty
(
material
.
getProjectId
())){
resourceWrapper
.
eq
(
ProjectResource:
:
getProjectId
,
material
.
getProjectId
())
...
...
@@ -95,6 +96,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
List
<
ProjectResource
>
list
=
projectResourceServiceImpl
.
list
(
resourceWrapper
);
for
(
ProjectResource
projectResource:
list
)
{
materialIds
.
add
(
projectResource
.
getResourceId
());
map
.
put
(
projectResource
.
getResourceId
(),
projectResource
.
getStatus
());
}
if
(
ObjectUtils
.
isEmpty
(
list
)){
return
new
Page
<>();
...
...
@@ -113,6 +115,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
MaterialDto
materialDto
=
new
MaterialDto
();
BeanUtils
.
copyProperties
(
mt
,
materialDto
);
materialDto
.
setFiles
(
attachmentService
.
getFilesBySourceId
(
mt
.
getSequenceNbr
()));
materialDto
.
setStatus
(
map
.
get
(
mt
.
getSequenceNbr
()));
materialDtoList
.
add
(
materialDto
);
}
}
...
...
@@ -134,11 +137,14 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
for
(
ProjectResource
projectResource:
list
)
{
materialIds
.
add
(
projectResource
.
getResourceId
());
}
wrapper
.
notIn
(
Material:
:
getSequenceNbr
,
materialIds
);
if
(!
ValidationUtil
.
isEmpty
(
materialIds
))
{
wrapper
.
notIn
(
Material:
:
getSequenceNbr
,
materialIds
);
}
}
getWrapper
(
wrapper
,
material
);
wrapper
.
in
(
Material:
:
getCompanyId
,
getCompanyIds
());
Project
project
=
projectService
.
getById
(
material
.
getProjectId
());
wrapper
.
in
(
Material:
:
getCompanyId
,
project
.
getInstallationUnitId
());
page
=
this
.
page
(
page
,
wrapper
);
IPage
<
MaterialDto
>
dtoPage
=
new
Page
<>();
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
View file @
61e7abe8
This diff is collapsed.
Click to expand it.
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 @
61e7abe8
...
...
@@ -11,6 +11,7 @@ import com.google.common.collect.Lists;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProcessTypeEnum
;
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
;
...
...
@@ -41,6 +42,7 @@ import java.math.BigDecimal;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -91,6 +93,9 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
IPipeServiceImpl
pipeService
;
@Autowired
ProcessRelationServiceImpl
processRelationService
;
@Autowired
AttachmentMapper
attachmentMapper
;
static
final
String
symbolKey
=
"Symbol_key"
;
...
...
@@ -108,6 +113,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
// model.setCode(getCode());
if
(
ValidationUtil
.
isEmpty
(
model
.
getSequenceNbr
()))
{
model
=
this
.
createWithModel
(
model
);
project
.
setSequenceNbr
(
model
.
getSequenceNbr
());
}
else
{
this
.
updateById
(
project
);
}
...
...
@@ -117,6 +123,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
String
token
=
RequestContext
.
getToken
();
String
appKey
=
RequestContext
.
getAppKey
();
String
product
=
RequestContext
.
getProduct
();
String
ExeUserId
=
RequestContext
.
getExeUserId
();
//分支线程执行流程
Thread
t1
=
new
Thread
(
new
Runnable
()
{
@Override
...
...
@@ -124,6 +131,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
RequestContext
.
setToken
(
token
);
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setExeUserId
(
ExeUserId
);
projectInitiationService
.
start
(
project
);
}
});
...
...
@@ -191,6 +199,10 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
pipeDtoList
.
add
(
pipeDto
);
}
projectDto
.
setPipeSubForm
(
pipeDtoList
);
LambdaQueryWrapper
<
ProcessRelation
>
relationsWrapper
=
new
LambdaQueryWrapper
<>();
relationsWrapper
.
eq
(
ProcessRelation:
:
getSourceId
,
projectDto
.
getSequenceNbr
())
.
eq
(
ProcessRelation:
:
getDefCode
,
ProcessTypeEnum
.
项目立项
.
getType
());
projectDto
.
setInstanceId
(
processRelationService
.
getOne
(
relationsWrapper
).
getInstanceId
());
return
projectDto
;
}
...
...
@@ -273,13 +285,12 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
if
(
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
流程结束
.
getName
().
equals
(
project
.
getStatus
())){
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
)){
insDepId
=
jsonObject
.
getString
(
XJConstant
.
INS_DEPID
);
state
=
jsonObject
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
);
//
state = jsonObject.getString(XJConstant.PROCESS_PROJECT_STATE);
insDep
=
jsonObject
.
getString
(
XJConstant
.
INS_DEP
);
insPerson
=
jsonObject
.
getString
(
XJConstant
.
INS_PRESON
);
}
}
else
{
state
=
ProjectInitiationEnum
.
getTaskDetailStatusMap
.
get
(
project
.
getStatus
());
}
state
=
ProjectInitiationEnum
.
getTaskDetailStatusMap
.
get
(
project
.
getStatus
());
}
project
.
setExamineProjectState
(
state
);
...
...
@@ -523,8 +534,11 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
FeignClientResult
<
List
<
AgencyUserModel
>>
listFeignClientResult
=
Privilege
.
agencyUserClient
.
queryByRealName
(
orgUsr
.
getBizOrgName
());
List
<
AgencyUserModel
>
resultList
=
listFeignClientResult
.
getResult
();
for
(
AgencyUserModel
agencyUserModel
:
resultList
)
{
String
userId
=
agencyUserModel
.
getUserId
();
projectDto
.
setUserId
(
userId
);
if
(
orgUsr
.
getBizOrgName
().
equals
(
agencyUserModel
.
getRealName
()))
{
String
userId
=
agencyUserModel
.
getUserId
();
projectDto
.
setUserId
(
userId
);
break
;
}
}
}
}
...
...
@@ -685,6 +699,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
public
FileDto
getInformationDetail
(
Long
sequenceNbr
)
{
FileDto
fileDto
=
new
FileDto
();
String
unitType
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
();
fileDto
.
setUnitType
(
unitType
);
LambdaQueryWrapper
<
Attachment
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Attachment:
:
getSourceId
,
sequenceNbr
);
Attachment
attachment
=
attachmentService
.
getOne
(
wrapper
);
...
...
@@ -706,6 +722,15 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
fileDto
.
setInstallSubForm
(
installSubForm
);
fileDto
.
setDesignSubForm
(
designSubForm
);
fileDto
.
setStatus
(
detail
.
getStatus
());
ProjectDto
projectdto
=
this
.
queryBySeq
(
sequenceNbr
);
getProjectState
(
projectdto
);
fileDto
.
setInsDep
(
projectdto
.
getInsDep
());
fileDto
.
setInsDepId
(
projectdto
.
getInsDepId
());
fileDto
.
setInsPerson
(
projectdto
.
getInsPerson
());
LambdaQueryWrapper
<
ProcessRelation
>
relationsWrapper
=
new
LambdaQueryWrapper
<>();
relationsWrapper
.
eq
(
ProcessRelation:
:
getSourceId
,
sequenceNbr
)
.
eq
(
ProcessRelation:
:
getDefCode
,
ProcessTypeEnum
.
项目立项
.
getType
());
fileDto
.
setInstanceId
(
processRelationService
.
getOne
(
relationsWrapper
).
getInstanceId
());
return
fileDto
;
}
...
...
@@ -720,7 +745,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
List
<
Map
<
String
,
Object
>>
installSubForm
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"installSubForm"
);
data
(
"subFormInstall"
,
installSubForm
,
result
,
attachment
.
getRecDate
());
List
<
Map
<
String
,
Object
>>
designSubForm
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"designSubForm"
);
data
(
"
designSubForm
"
,
designSubForm
,
result
,
attachment
.
getRecDate
());
data
(
"
subFormAttachment
"
,
designSubForm
,
result
,
attachment
.
getRecDate
());
}
return
result
;
}
...
...
@@ -761,6 +786,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
attachmentService
.
save
(
attachment
);
if
(
"submit"
.
equals
(
type
))
{
// 触发流程 todo
Project
project
=
this
.
getById
(
projectId
);
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
project
,
null
,
null
);
}
return
"ok"
;
...
...
@@ -846,7 +873,38 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
}
if
(
"submit"
.
equals
(
type
))
{
if
(!
ValidationUtil
.
isEmpty
(
equipmentList
))
{
equipmentList
=
equipmentList
.
stream
().
filter
(
i
->
"0"
.
equals
(
i
.
get
(
"status"
).
toString
())).
collect
(
Collectors
.
toList
());
}
if
(!
ValidationUtil
.
isEmpty
(
welderList
))
{
welderList
=
welderList
.
stream
().
filter
(
i
->
"0"
.
equals
(
i
.
get
(
"status"
).
toString
())).
collect
(
Collectors
.
toList
());
}
if
(!
ValidationUtil
.
isEmpty
(
materialList
))
{
materialList
=
materialList
.
stream
().
filter
(
i
->
"0"
.
equals
(
i
.
get
(
"status"
).
toString
())).
collect
(
Collectors
.
toList
());
}
if
(!
ValidationUtil
.
isEmpty
(
fileList
))
{
fileList
=
fileList
.
stream
().
filter
(
i
->
"0"
.
equals
(
i
.
get
(
"status"
).
toString
())).
collect
(
Collectors
.
toList
());
}
AtomicReference
<
String
>
condition
=
new
AtomicReference
<>(
"1"
);
AtomicReference
<
String
>
option
=
new
AtomicReference
<>(
"1"
);
if
(
equipmentList
.
size
()
>=
1
||
welderList
.
size
()
>=
1
||
materialList
.
size
()
>=
1
){
condition
.
set
(
"0"
);
}
if
(
fileList
.
size
()
>=
1
){
fileList
.
stream
().
forEach
(
i
->
{
if
(
OrgEnum
.
安装单位
.
getName
().
equals
(
i
.
get
(
"companyName"
).
toString
())){
condition
.
set
(
"0"
);
}
if
(
OrgEnum
.
设计单位
.
getName
().
equals
(
i
.
get
(
"companyName"
).
toString
())){
option
.
set
(
"0"
);
}
});
}
// 触发流程 todo
Project
project
=
this
.
getById
(
projectId
);
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
project
,
condition
.
get
(),
option
.
get
());
}
return
"ok"
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/QualityProblemServiceImpl.java
View file @
61e7abe8
...
...
@@ -62,8 +62,12 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
LocalDateTime
now
=
LocalDateTime
.
now
();
ZoneId
zoneId
=
ZoneId
.
systemDefault
();
Set
<
String
>
projectIds
=
new
HashSet
<>();
for
(
Project
project:
projectResourceService
.
getProjectList
()){
projectIds
.
add
(
String
.
valueOf
(
project
.
getSequenceNbr
()));
if
(
ValidationUtil
.
isEmpty
(
qualityProblemDto
.
getProjectId
()))
{
for
(
Project
project
:
projectResourceService
.
getProjectList
())
{
projectIds
.
add
(
String
.
valueOf
(
project
.
getSequenceNbr
()));
}
}
else
{
projectIds
.
add
(
String
.
valueOf
(
qualityProblemDto
.
getProjectId
()));
}
List
<
QualityProblemDto
>
list
=
new
ArrayList
<>();
IPage
<
QualityProblemDto
>
page
=
new
Page
<>();
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/TaskServiceImpl.java
View file @
61e7abe8
...
...
@@ -59,6 +59,10 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
String
title
=
""
,
taskStatus
=
""
;
task
.
setTaskType
(
taskType
);
if
(!
ValidationUtil
.
isEmpty
(
InitiationStatus
))
{
//特殊处理
if
(
ProjectInitiationEnum
.
安装开工资料修改
.
getTaskName
().
equals
(
InitiationStatus
))
{
InitiationStatus
=
ProjectInitiationEnum
.
安装开工资料修改
.
getName
();
}
if
(
ProjectInitiationEnum
.
设计开工资料修改
.
getTaskName
().
equals
(
InitiationStatus
))
{
InitiationStatus
=
ProjectInitiationEnum
.
设计开工资料修改
.
getName
();
}
title
=
ProjectInitiationEnum
.
getTaskNameMap
.
get
(
InitiationStatus
);
taskStatus
=
ProjectInitiationEnum
.
getTaskStatusMap
.
get
(
InitiationStatus
);
if
(
ValidationUtil
.
isEmpty
(
title
))
{
...
...
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