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
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;
...
@@ -11,20 +11,20 @@ import java.util.Map;
public
enum
ProjectInitiationEnum
{
public
enum
ProjectInitiationEnum
{
项目立项
(
"1"
,
"项目立项"
,
"XMLX"
,
"被驳回,请重新申请"
,
""
,
""
),
项目立项
(
"1"
,
"项目立项"
,
"XMLX"
,
"被驳回,请重新申请"
,
""
,
""
),
设计开工资料提交
(
"2"
,
"
开工资料提交(设计)"
,
"SJZLTJ"
,
"设计资料待提交"
,
"
提交资料"
,
"待提交"
),
设计开工资料提交
(
"2"
,
"
设计提交资料"
,
"SJZLTJ"
,
"设计资料待提交"
,
"设计
提交资料"
,
"待提交"
),
安装开工资料提交
(
"3"
,
"
开工资料提交(安装)"
,
"AZZLTJ"
,
"安装资料待提交"
,
"
提交资料"
,
"待提交"
),
安装开工资料提交
(
"3"
,
"
安装提交资料"
,
"AZZLTJ"
,
"安装资料待提交"
,
"安装
提交资料"
,
"待提交"
),
告知申请
(
"4"
,
"告知申请"
,
"GZSQ"
,
"告知待申请"
,
"告知申请"
,
"待申请"
),
告知申请
(
"4"
,
"告知申请"
,
"GZSQ"
,
"告知待申请"
,
"告知申请"
,
"待申请"
),
接受告知
(
"5"
,
"接
受
告知"
,
"JSGZ"
,
"告知待接收"
,
"告知接收"
,
"待接收"
),
接受告知
(
"5"
,
"接
收
告知"
,
"JSGZ"
,
"告知待接收"
,
"告知接收"
,
"待接收"
),
//设计和安装合并使用。
//设计和安装合并使用。
提交资料
(
"6"
,
"提交资料"
,
"TJZL"
,
"项目资料待提交"
,
"提交资料"
,
"待提交"
),
提交资料
(
"6"
,
"提交资料"
,
"TJZL"
,
"项目资料待提交"
,
"提交资料"
,
"待提交"
),
监检科室分配
(
"6"
,
"监检科室分配"
,
"JJKSFP"
,
"监检科室待分配"
,
"监检科室分配"
,
"待分配"
),
监检科室分配
(
"6"
,
"监检科室分配"
,
"JJKSFP"
,
"监检科室待分配"
,
"监检科室分配"
,
"待分配"
),
监检员分配
(
"7"
,
"监检员分配"
,
"JJYFP"
,
"监检员待分配"
,
"监检员分配"
,
"待分配"
),
监检员分配
(
"7"
,
"监检员分配"
,
"JJYFP"
,
"监检员待分配"
,
"监检员分配"
,
"待分配"
),
监检员审核
(
"8"
,
"监检员审核"
,
"JJYSH"
,
"监检员待审核"
,
"监检员审核"
,
"待审核"
),
监检员审核
(
"8"
,
"监检员审核"
,
"JJYSH"
,
"监检员待审核"
,
"监检员审核"
,
"待审核"
),
设计开工资料修改
(
"9"
,
"
开工资料修改(设计)
"
,
"SJZLXG"
,
"设计资料待修改"
,
"设计修改资料"
,
"待修改"
),
设计开工资料修改
(
"9"
,
"
设计修改资料
"
,
"SJZLXG"
,
"设计资料待修改"
,
"设计修改资料"
,
"待修改"
),
安装开工资料修改
(
"10"
,
"
开工资料修改(安装)
"
,
"AZZLXG"
,
"安装资料待修改"
,
"安装修改资料"
,
"待修改"
),
安装开工资料修改
(
"10"
,
"
安装修改资料
"
,
"AZZLXG"
,
"安装资料待修改"
,
"安装修改资料"
,
"待修改"
),
// 设计和安装都需要修改时合并使用
// 设计和安装都需要修改时合并使用
修改资料
(
""
,
"
资料修改
"
,
""
,
"资料待修改"
,
"修改资料"
,
"待修改"
),
修改资料
(
""
,
"
修改资料
"
,
""
,
"资料待修改"
,
"修改资料"
,
"待修改"
),
流程结束
(
"11"
,
"流程结束!"
,
"LCJS"
,
""
,
""
,
""
);
流程结束
(
"11"
,
"流程结束!"
,
"LCJS"
,
"
立项成功!
"
,
""
,
""
);
private
String
status
;
private
String
status
;
private
String
name
;
private
String
name
;
...
@@ -49,6 +49,9 @@ public enum ProjectInitiationEnum {
...
@@ -49,6 +49,9 @@ public enum ProjectInitiationEnum {
getTaskNameMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
taskName
);
getTaskNameMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
taskName
);
getTaskDetailStatusMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
taskDetailStatus
);
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 {
...
@@ -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
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\":\"设计单位\"}]"
;
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数值
//人员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 {
...
@@ -18,6 +18,12 @@ public class FileDto {
private
JSONArray
designSubForm
;
private
JSONArray
designSubForm
;
private
String
unitType
;
private
String
insDepId
;
private
String
insDep
;
private
String
insPerson
;
// 前端定制组件格式 文件
// 前端定制组件格式 文件
Page
<
Map
<
String
,
Object
>>
mapPage
;
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 {
...
@@ -73,4 +73,6 @@ public class MaterialDto extends BaseDto {
private
List
<
JSONObject
>
files
;
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 @@
...
@@ -21,11 +21,9 @@
<select
id=
"queryProjectPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto"
>
<select
id=
"queryProjectPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto"
>
SELECT
SELECT
pt.*,
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
FROM
tz_ugp_project pt
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>
<where>
<if
test=
"roleName == '建设单位'"
>
<if
test=
"roleName == '建设单位'"
>
and pt.construction_unit_id = #{companyId}
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 {
...
@@ -343,11 +343,6 @@ public class ProjectController extends BaseController {
@GetMapping
(
value
=
"/getDetail"
)
@GetMapping
(
value
=
"/getDetail"
)
public
ResponseModel
<
JSONObject
>
getDetail
(
Long
sequenceNbr
){
public
ResponseModel
<
JSONObject
>
getDetail
(
Long
sequenceNbr
){
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
projectServiceImpl
.
getInformationDetail
(
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
();
JSONObject
jo
=
new
JSONObject
();
jo
.
put
(
"projectInfo"
,
projectServiceImpl
.
selectById
(
sequenceNbr
));
jo
.
put
(
"projectInfo"
,
projectServiceImpl
.
selectById
(
sequenceNbr
));
jo
.
put
(
"fileInfo"
,
jsonObject
);
jo
.
put
(
"fileInfo"
,
jsonObject
);
...
@@ -492,7 +487,11 @@ public class ProjectController extends BaseController {
...
@@ -492,7 +487,11 @@ public class ProjectController extends BaseController {
public
ResponseModel
<
Object
>
informationAudit
(
@RequestBody
JSONObject
jsonObject
)
{
public
ResponseModel
<
Object
>
informationAudit
(
@RequestBody
JSONObject
jsonObject
)
{
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
jsonObject
.
get
(
TabLogoEnum
.
项目资料信息
.
getLogo
());
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
jsonObject
.
get
(
TabLogoEnum
.
项目资料信息
.
getLogo
());
InformationDto
dto
=
new
InformationDto
();
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"
);
List
<
Map
<
String
,
Object
>>
welderList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"welderList"
);
if
(!
ObjectUtils
.
isEmpty
(
welderList
))
{
if
(!
ObjectUtils
.
isEmpty
(
welderList
))
{
dto
.
setWelderList
(
welderList
);
dto
.
setWelderList
(
welderList
);
...
@@ -542,6 +541,20 @@ public class ProjectController extends BaseController {
...
@@ -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查询 项目基本信息、资料信息、告知信息、竣工结项信息
* 根据projectId查询 项目基本信息、资料信息、告知信息、竣工结项信息
* @param projectId
* @param projectId
* @return
* @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
...
@@ -382,24 +382,26 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
}
}
public
JSONObject
getUnitLicenseCode
(
Long
unitId
)
{
public
JSONObject
getUnitLicenseCode
(
Long
unitId
)
{
UnitLicence
unitLicence
=
new
UnitLicence
();
JSONObject
jsonObject
=
new
JSONObject
();
Company
company
=
companyServiceImpl
.
getById
(
unitId
);
if
(!
ValidationUtil
.
isEmpty
(
unitId
))
{
String
creditCode
=
company
.
getCreditCode
();
UnitLicence
unitLicence
=
new
UnitLicence
();
LambdaQueryWrapper
<
UnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
Company
company
=
companyServiceImpl
.
getById
(
unitId
);
wrapper
.
eq
(
UnitLicence:
:
getUnitCode
,
creditCode
);
String
creditCode
=
company
.
getCreditCode
();
List
<
UnitLicence
>
list
=
unitLicenceService
.
list
(
wrapper
);
LambdaQueryWrapper
<
UnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
Iterator
<
UnitLicence
>
iterator
=
list
.
iterator
();
wrapper
.
eq
(
UnitLicence:
:
getUnitCode
,
creditCode
);
String
licenseCode
=
""
;
List
<
UnitLicence
>
list
=
unitLicenceService
.
list
(
wrapper
);
while
(
iterator
.
hasNext
())
{
Iterator
<
UnitLicence
>
iterator
=
list
.
iterator
();
unitLicence
=
iterator
.
next
();
String
licenseCode
=
""
;
if
(
ValidationUtil
.
isEmpty
(
licenseCode
)){
while
(
iterator
.
hasNext
())
{
licenseCode
=
unitLicence
.
getCertNo
();
unitLicence
=
iterator
.
next
();
}
else
{
if
(
ValidationUtil
.
isEmpty
(
licenseCode
))
{
licenseCode
=
licenseCode
+
","
+
unitLicence
.
getCertNo
();
licenseCode
=
unitLicence
.
getCertNo
();
}
else
{
licenseCode
=
licenseCode
+
","
+
unitLicence
.
getCertNo
();
}
}
}
jsonObject
.
put
(
"licenseCode"
,
licenseCode
);
}
}
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"licenseCode"
,
licenseCode
);
return
jsonObject
;
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;
...
@@ -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.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
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.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.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
...
@@ -81,6 +82,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
...
@@ -81,6 +82,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
@Autowired
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
ProcessRelationServiceImpl
processRelationService
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -223,7 +226,6 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
...
@@ -223,7 +226,6 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
if
(
ObjectUtils
.
isNotEmpty
(
one
))
{
if
(
ObjectUtils
.
isNotEmpty
(
one
))
{
BeanUtils
.
copyProperties
(
one
,
installNoticeDto
);
BeanUtils
.
copyProperties
(
one
,
installNoticeDto
);
}
}
installNoticeDto
.
setEquipPosition
(
projectDto
.
getAddress
());
installNoticeDto
.
setImplementDate
(
projectDto
.
getStartDate
());
installNoticeDto
.
setImplementDate
(
projectDto
.
getStartDate
());
installNoticeDto
.
setConstructionUnit
(
projectDto
.
getInstallationUnit
());
installNoticeDto
.
setConstructionUnit
(
projectDto
.
getInstallationUnit
());
installNoticeDto
.
setUseUnitName
(
orgServiceImpl
.
getOrgUsr
().
getBizOrgName
());
installNoticeDto
.
setUseUnitName
(
orgServiceImpl
.
getOrgUsr
().
getBizOrgName
());
...
@@ -259,7 +261,10 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
...
@@ -259,7 +261,10 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
installNoticeDto
.
setBuildLicenceCode
(
buildLicenceCode
);
installNoticeDto
.
setBuildLicenceCode
(
buildLicenceCode
);
installNoticeDto
.
setBuildLicenceDateLine
(
collect
);
installNoticeDto
.
setBuildLicenceDateLine
(
collect
);
installNoticeDto
.
setProjectId
(
projectId
);
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
;
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
...
@@ -88,6 +88,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
public
IPage
<
MaterialDto
>
queryOutPage
(
IPage
<
Material
>
page
,
MaterialDto
material
)
{
public
IPage
<
MaterialDto
>
queryOutPage
(
IPage
<
Material
>
page
,
MaterialDto
material
)
{
LambdaQueryWrapper
<
Material
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Material
>
wrapper
=
new
LambdaQueryWrapper
<>();
List
materialIds
=
new
ArrayList
<>();
List
materialIds
=
new
ArrayList
<>();
Map
<
Long
,
String
>
map
=
new
HashMap
<>();
LambdaQueryWrapper
<
ProjectResource
>
resourceWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
ProjectResource
>
resourceWrapper
=
new
LambdaQueryWrapper
<>();
if
(!
ValidationUtil
.
isEmpty
(
material
.
getProjectId
())){
if
(!
ValidationUtil
.
isEmpty
(
material
.
getProjectId
())){
resourceWrapper
.
eq
(
ProjectResource:
:
getProjectId
,
material
.
getProjectId
())
resourceWrapper
.
eq
(
ProjectResource:
:
getProjectId
,
material
.
getProjectId
())
...
@@ -95,6 +96,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
...
@@ -95,6 +96,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
List
<
ProjectResource
>
list
=
projectResourceServiceImpl
.
list
(
resourceWrapper
);
List
<
ProjectResource
>
list
=
projectResourceServiceImpl
.
list
(
resourceWrapper
);
for
(
ProjectResource
projectResource:
list
)
{
for
(
ProjectResource
projectResource:
list
)
{
materialIds
.
add
(
projectResource
.
getResourceId
());
materialIds
.
add
(
projectResource
.
getResourceId
());
map
.
put
(
projectResource
.
getResourceId
(),
projectResource
.
getStatus
());
}
}
if
(
ObjectUtils
.
isEmpty
(
list
)){
if
(
ObjectUtils
.
isEmpty
(
list
)){
return
new
Page
<>();
return
new
Page
<>();
...
@@ -113,6 +115,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
...
@@ -113,6 +115,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
MaterialDto
materialDto
=
new
MaterialDto
();
MaterialDto
materialDto
=
new
MaterialDto
();
BeanUtils
.
copyProperties
(
mt
,
materialDto
);
BeanUtils
.
copyProperties
(
mt
,
materialDto
);
materialDto
.
setFiles
(
attachmentService
.
getFilesBySourceId
(
mt
.
getSequenceNbr
()));
materialDto
.
setFiles
(
attachmentService
.
getFilesBySourceId
(
mt
.
getSequenceNbr
()));
materialDto
.
setStatus
(
map
.
get
(
mt
.
getSequenceNbr
()));
materialDtoList
.
add
(
materialDto
);
materialDtoList
.
add
(
materialDto
);
}
}
}
}
...
@@ -134,11 +137,14 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
...
@@ -134,11 +137,14 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
for
(
ProjectResource
projectResource:
list
)
{
for
(
ProjectResource
projectResource:
list
)
{
materialIds
.
add
(
projectResource
.
getResourceId
());
materialIds
.
add
(
projectResource
.
getResourceId
());
}
}
wrapper
.
notIn
(
Material:
:
getSequenceNbr
,
materialIds
);
if
(!
ValidationUtil
.
isEmpty
(
materialIds
))
{
wrapper
.
notIn
(
Material:
:
getSequenceNbr
,
materialIds
);
}
}
}
getWrapper
(
wrapper
,
material
);
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
);
page
=
this
.
page
(
page
,
wrapper
);
IPage
<
MaterialDto
>
dtoPage
=
new
Page
<>();
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
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.mao.expertSystem.WeldingQualification
;
import
com.mao.expertSystem.WeldingQualification
;
import
com.mao.expertSystem.material.MyPqr
;
import
com.mao.expertSystem.material.MyPqr
;
import
com.mao.expertSystem.material.MyWps
;
import
com.mao.expertSystem.material.MyWps
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
...
@@ -18,10 +19,12 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.*;
...
@@ -18,10 +19,12 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.*;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectInitiationMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectInitiationMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProcessRelationService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProcessRelationService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectInitiationService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectInitiationService
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.ibatis.type.LocalDateTypeHandler
;
import
org.apache.ibatis.type.LocalDateTypeHandler
;
import
org.joda.time.LocalDateTime
;
import
org.joda.time.LocalDateTime
;
...
@@ -183,6 +186,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -183,6 +186,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
"流程启动失败:"
+
e
.
getMessage
());
log
.
error
(
"流程启动失败:"
+
e
.
getMessage
());
return
;
}
}
String
taskName
=
null
;
String
taskName
=
null
;
try
{
try
{
...
@@ -200,6 +204,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -200,6 +204,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
}
}
@Override
@Override
@BusinessIdentify
public
void
execute
(
String
instanceId
,
Object
objectd
,
String
condition
,
String
option
){
public
void
execute
(
String
instanceId
,
Object
objectd
,
String
condition
,
String
option
){
String
taskType
=
""
;
String
taskType
=
""
;
List
<
Long
>
unitIds
=
new
ArrayList
<>();
List
<
Long
>
unitIds
=
new
ArrayList
<>();
...
@@ -209,7 +214,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -209,7 +214,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
JSONObject
object
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
objectd
));
JSONObject
object
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
objectd
));
Project
project
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
objectd
),
Project
.
class
);
Project
project
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
objectd
),
Project
.
class
);
if
(
ValidationUtil
.
isEmpty
(
project
.
getName
())){
if
(
ValidationUtil
.
isEmpty
(
project
.
getName
())){
project
=
projectService
.
getById
(
object
.
get
Lo
ng
(
"projectId"
));
project
=
projectService
.
getById
(
object
.
get
Stri
ng
(
"projectId"
));
}
}
AjaxResult
ajaxResult
=
new
AjaxResult
();
AjaxResult
ajaxResult
=
new
AjaxResult
();
JSONObject
dataObject
=
new
JSONObject
();
JSONObject
dataObject
=
new
JSONObject
();
...
@@ -226,6 +231,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -226,6 +231,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
if
(
ProjectInitiationEnum
.
安装开工资料修改
.
getName
().
equals
(
name
)){
if
(
ProjectInitiationEnum
.
安装开工资料修改
.
getName
().
equals
(
name
)){
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
}
}
if
(
ProjectInitiationEnum
.
设计开工资料修改
.
getName
().
equals
(
name
)){
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
}
}
}
}
}
...
@@ -270,6 +278,10 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -270,6 +278,10 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
//更新任务表的状态 已办
//更新任务表的状态 已办
taskType
=
getUnitId
(
unitIds
,
project
,
superviseRule
);
taskType
=
getUnitId
(
unitIds
,
project
,
superviseRule
);
unitIds
=
new
ArrayList
<>();
if
(
ProjectInitiationEnum
.
设计开工资料提交
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
安装开工资料提交
.
getName
().
equals
(
project
.
getStatus
())){
project
.
setStatus
(
ProjectInitiationEnum
.
提交资料
.
getName
());
}
taskService
.
saveOrUpdateTask
(
project
.
getStatus
(),
true
,
taskType
,
new
Date
(),
project
.
getSequenceNbr
(),
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
);
taskService
.
saveOrUpdateTask
(
project
.
getStatus
(),
true
,
taskType
,
new
Date
(),
project
.
getSequenceNbr
(),
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
);
//更新project种的status字段,更新关系表中的state字段,表示当前流程下一个执行的任务
//更新project种的status字段,更新关系表中的state字段,表示当前流程下一个执行的任务
...
@@ -277,9 +289,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -277,9 +289,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
//如果更新了status状态 新增任务表的状态 待办
//如果更新了status状态 新增任务表的状态 待办
if
(
bool
)
{
if
(
bool
)
{
project
=
projectService
.
getById
(
object
.
get
Lo
ng
(
"sequenceNbr"
));
project
=
projectService
.
getById
(
object
.
get
Stri
ng
(
"sequenceNbr"
));
if
(
ValidationUtil
.
isEmpty
(
project
))
{
if
(
ValidationUtil
.
isEmpty
(
project
))
{
project
=
projectService
.
getById
(
object
.
get
Lo
ng
(
"projectId"
));
project
=
projectService
.
getById
(
object
.
get
Stri
ng
(
"projectId"
));
}
}
unitIds
=
new
ArrayList
<>();
unitIds
=
new
ArrayList
<>();
taskType
=
getUnitId
(
unitIds
,
project
,
superviseRule
);
taskType
=
getUnitId
(
unitIds
,
project
,
superviseRule
);
...
@@ -294,6 +306,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -294,6 +306,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
* 获取任务的执行单位id 和 TaskType
* 获取任务的执行单位id 和 TaskType
* @param unitIds
* @param unitIds
*/
*/
@BusinessIdentify
public
String
getUnitId
(
List
<
Long
>
unitIds
,
Project
project
,
SuperviseRule
superviseRule
){
public
String
getUnitId
(
List
<
Long
>
unitIds
,
Project
project
,
SuperviseRule
superviseRule
){
String
taskType
=
""
;
String
taskType
=
""
;
if
(
ProjectInitiationEnum
.
项目立项
.
getName
().
equals
(
project
.
getStatus
()))
{
if
(
ProjectInitiationEnum
.
项目立项
.
getName
().
equals
(
project
.
getStatus
()))
{
...
@@ -301,7 +314,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -301,7 +314,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
taskType
=
TaskTypeEnum
.
填报
.
getKey
();
taskType
=
TaskTypeEnum
.
填报
.
getKey
();
}
}
if
(
ProjectInitiationEnum
.
告知申请
.
getName
().
equals
(
project
.
getStatus
()))
{
if
(
ProjectInitiationEnum
.
告知申请
.
getName
().
equals
(
project
.
getStatus
()))
{
unitIds
.
add
(
project
.
get
Installa
tionUnitId
());
unitIds
.
add
(
project
.
get
Construc
tionUnitId
());
taskType
=
TaskTypeEnum
.
填报
.
getKey
();
taskType
=
TaskTypeEnum
.
填报
.
getKey
();
}
}
if
(
ProjectInitiationEnum
.
接受告知
.
getName
().
equals
(
project
.
getStatus
()))
{
if
(
ProjectInitiationEnum
.
接受告知
.
getName
().
equals
(
project
.
getStatus
()))
{
...
@@ -312,9 +325,15 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -312,9 +325,15 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
unitIds
.
add
(
superviseRule
.
getInspectionUnitId
());
unitIds
.
add
(
superviseRule
.
getInspectionUnitId
());
taskType
=
TaskTypeEnum
.
流程
.
getKey
();
taskType
=
TaskTypeEnum
.
流程
.
getKey
();
}
}
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
project
.
getStatus
())
)
{
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
安装开工资料提交
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
设计开工资料提交
.
getName
().
equals
(
project
.
getStatus
()))
{
unitIds
.
add
(
project
.
getInstallationUnitId
());
if
(
OrgEnum
.
安装单位
.
getType
().
equals
(
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
())){
unitIds
.
add
(
project
.
getDesignUnitId
());
unitIds
.
add
(
project
.
getInstallationUnitId
());
}
else
if
(
OrgEnum
.
设计单位
.
getType
().
equals
(
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
())){
unitIds
.
add
(
project
.
getDesignUnitId
());
}
else
{
unitIds
.
add
(
project
.
getDesignUnitId
());
unitIds
.
add
(
project
.
getInstallationUnitId
());
}
taskType
=
TaskTypeEnum
.
填报
.
getKey
();
taskType
=
TaskTypeEnum
.
填报
.
getKey
();
}
}
if
(
ProjectInitiationEnum
.
安装开工资料修改
.
getName
().
equals
(
project
.
getStatus
())){
if
(
ProjectInitiationEnum
.
安装开工资料修改
.
getName
().
equals
(
project
.
getStatus
())){
...
@@ -445,31 +464,70 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -445,31 +464,70 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
* @return
* @return
*/
*/
public
String
getFlowTaskName
(
String
instanceId
){
public
String
getFlowTaskName
(
String
instanceId
){
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
new
JSONObject
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
try
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
}
catch
(
Exception
e
)
{
//当存在多个用户任务时 主要是安装/设计提交资料修改
logger
.
error
(
"当前用户存在多个任务"
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
Workflow
.
taskClient
.
getTaskList
(
instanceId
)));
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"data"
);
for
(
Object
o:
jsonArray
){
String
name
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
)).
getString
(
"name"
);
if
(
ProjectInitiationEnum
.
安装开工资料修改
.
getName
().
equals
(
name
)){
return
ProjectInitiationEnum
.
修改资料
.
getName
();
}
if
(
ProjectInitiationEnum
.
设计开工资料提交
.
getName
().
equals
(
name
)){
return
ProjectInitiationEnum
.
提交资料
.
getName
();
}
if
(
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
name
)){
return
ProjectInitiationEnum
.
监检员审核
.
getName
();
}
}
}
String
taskName
=
"流程结束!"
;
String
taskName
=
"流程结束!"
;
try
{
try
{
taskName
=
json
Object
.
getString
(
"name"
);
taskName
=
data
Object
.
getString
(
"name"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"当前流程名称为空"
);
log
.
error
(
"当前流程名称为空"
);
}
}
return
taskName
;
return
taskName
;
}
}
@Autowired
OrgServiceImpl
orgService
;
@BusinessIdentify
public
boolean
updateFlowStatus
(
String
instanceId
){
public
boolean
updateFlowStatus
(
String
instanceId
){
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getInstanceId
,
instanceId
);
wrapper
.
eq
(
Project:
:
getInstanceId
,
instanceId
);
Project
project
=
projectService
.
getOne
(
wrapper
);
Project
project
=
projectService
.
getOne
(
wrapper
);
String
taskName
=
getFlowTaskName
(
instanceId
);
String
taskName
=
getFlowTaskName
(
instanceId
);
boolean
bool
=
true
;
boolean
bool
=
true
;
if
(
project
.
getStatus
().
equals
(
ProjectInitiationEnum
.
提交资料
.
getName
())
&&
"流程结束!"
.
equals
(
taskName
)){
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
project
.
getStatus
())
&&
"流程结束!"
.
equals
(
taskName
)){
bool
=
false
;
bool
=
false
;
if
(
OrgEnum
.
安装单位
.
getKey
().
equals
(
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
())){
taskName
=
ProjectInitiationEnum
.
设计开工资料提交
.
getName
();
}
if
(
OrgEnum
.
设计单位
.
getKey
().
equals
(
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
())){
taskName
=
ProjectInitiationEnum
.
安装开工资料提交
.
getName
();
}
}
}
if
(
bool
)
{
if
(
ProjectInitiationEnum
.
修改资料
.
getName
().
equals
(
project
.
getStatus
())
&&
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
taskName
)){
project
.
setStatus
(
taskName
);
String
companyType
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
();
projectService
.
updateById
(
project
);
if
(
OrgEnum
.
设计单位
.
getKey
().
equals
(
companyType
)){
processRelationService
.
updateState
(
instanceId
,
taskName
);
taskName
=
ProjectInitiationEnum
.
安装开工资料修改
.
getTaskName
();
}
if
(
OrgEnum
.
安装单位
.
getKey
().
equals
(
companyType
)){
taskName
=
ProjectInitiationEnum
.
设计开工资料修改
.
getTaskName
();
}
}
}
project
.
setStatus
(
taskName
);
projectService
.
updateById
(
project
);
processRelationService
.
updateState
(
instanceId
,
taskName
);
return
bool
;
return
bool
;
}
}
...
...
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;
...
@@ -11,6 +11,7 @@ import com.google.common.collect.Lists;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
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.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
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.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WhetherItPassEnum
;
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.constants.XJConstant
;
...
@@ -41,6 +42,7 @@ import java.math.BigDecimal;
...
@@ -41,6 +42,7 @@ import java.math.BigDecimal;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -91,6 +93,9 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -91,6 +93,9 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
IPipeServiceImpl
pipeService
;
IPipeServiceImpl
pipeService
;
@Autowired
@Autowired
ProcessRelationServiceImpl
processRelationService
;
@Autowired
AttachmentMapper
attachmentMapper
;
AttachmentMapper
attachmentMapper
;
static
final
String
symbolKey
=
"Symbol_key"
;
static
final
String
symbolKey
=
"Symbol_key"
;
...
@@ -108,6 +113,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -108,6 +113,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
// model.setCode(getCode());
// model.setCode(getCode());
if
(
ValidationUtil
.
isEmpty
(
model
.
getSequenceNbr
()))
{
if
(
ValidationUtil
.
isEmpty
(
model
.
getSequenceNbr
()))
{
model
=
this
.
createWithModel
(
model
);
model
=
this
.
createWithModel
(
model
);
project
.
setSequenceNbr
(
model
.
getSequenceNbr
());
}
else
{
}
else
{
this
.
updateById
(
project
);
this
.
updateById
(
project
);
}
}
...
@@ -117,6 +123,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -117,6 +123,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
String
token
=
RequestContext
.
getToken
();
String
token
=
RequestContext
.
getToken
();
String
appKey
=
RequestContext
.
getAppKey
();
String
appKey
=
RequestContext
.
getAppKey
();
String
product
=
RequestContext
.
getProduct
();
String
product
=
RequestContext
.
getProduct
();
String
ExeUserId
=
RequestContext
.
getExeUserId
();
//分支线程执行流程
//分支线程执行流程
Thread
t1
=
new
Thread
(
new
Runnable
()
{
Thread
t1
=
new
Thread
(
new
Runnable
()
{
@Override
@Override
...
@@ -124,6 +131,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -124,6 +131,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
RequestContext
.
setToken
(
token
);
RequestContext
.
setToken
(
token
);
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setExeUserId
(
ExeUserId
);
projectInitiationService
.
start
(
project
);
projectInitiationService
.
start
(
project
);
}
}
});
});
...
@@ -191,6 +199,10 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -191,6 +199,10 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
pipeDtoList
.
add
(
pipeDto
);
pipeDtoList
.
add
(
pipeDto
);
}
}
projectDto
.
setPipeSubForm
(
pipeDtoList
);
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
;
return
projectDto
;
}
}
...
@@ -273,13 +285,12 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -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
(
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
流程结束
.
getName
().
equals
(
project
.
getStatus
())){
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
)){
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
)){
insDepId
=
jsonObject
.
getString
(
XJConstant
.
INS_DEPID
);
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
);
insDep
=
jsonObject
.
getString
(
XJConstant
.
INS_DEP
);
insPerson
=
jsonObject
.
getString
(
XJConstant
.
INS_PRESON
);
insPerson
=
jsonObject
.
getString
(
XJConstant
.
INS_PRESON
);
}
}
}
else
{
state
=
ProjectInitiationEnum
.
getTaskDetailStatusMap
.
get
(
project
.
getStatus
());
}
}
state
=
ProjectInitiationEnum
.
getTaskDetailStatusMap
.
get
(
project
.
getStatus
());
}
}
project
.
setExamineProjectState
(
state
);
project
.
setExamineProjectState
(
state
);
...
@@ -523,8 +534,11 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -523,8 +534,11 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
FeignClientResult
<
List
<
AgencyUserModel
>>
listFeignClientResult
=
Privilege
.
agencyUserClient
.
queryByRealName
(
orgUsr
.
getBizOrgName
());
FeignClientResult
<
List
<
AgencyUserModel
>>
listFeignClientResult
=
Privilege
.
agencyUserClient
.
queryByRealName
(
orgUsr
.
getBizOrgName
());
List
<
AgencyUserModel
>
resultList
=
listFeignClientResult
.
getResult
();
List
<
AgencyUserModel
>
resultList
=
listFeignClientResult
.
getResult
();
for
(
AgencyUserModel
agencyUserModel
:
resultList
)
{
for
(
AgencyUserModel
agencyUserModel
:
resultList
)
{
String
userId
=
agencyUserModel
.
getUserId
();
if
(
orgUsr
.
getBizOrgName
().
equals
(
agencyUserModel
.
getRealName
()))
{
projectDto
.
setUserId
(
userId
);
String
userId
=
agencyUserModel
.
getUserId
();
projectDto
.
setUserId
(
userId
);
break
;
}
}
}
}
}
}
}
...
@@ -685,6 +699,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -685,6 +699,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
public
FileDto
getInformationDetail
(
Long
sequenceNbr
)
{
public
FileDto
getInformationDetail
(
Long
sequenceNbr
)
{
FileDto
fileDto
=
new
FileDto
();
FileDto
fileDto
=
new
FileDto
();
String
unitType
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
();
fileDto
.
setUnitType
(
unitType
);
LambdaQueryWrapper
<
Attachment
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Attachment
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Attachment:
:
getSourceId
,
sequenceNbr
);
wrapper
.
eq
(
Attachment:
:
getSourceId
,
sequenceNbr
);
Attachment
attachment
=
attachmentService
.
getOne
(
wrapper
);
Attachment
attachment
=
attachmentService
.
getOne
(
wrapper
);
...
@@ -706,6 +722,15 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -706,6 +722,15 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
fileDto
.
setInstallSubForm
(
installSubForm
);
fileDto
.
setInstallSubForm
(
installSubForm
);
fileDto
.
setDesignSubForm
(
designSubForm
);
fileDto
.
setDesignSubForm
(
designSubForm
);
fileDto
.
setStatus
(
detail
.
getStatus
());
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
;
return
fileDto
;
}
}
...
@@ -720,7 +745,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -720,7 +745,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
List
<
Map
<
String
,
Object
>>
installSubForm
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"installSubForm"
);
List
<
Map
<
String
,
Object
>>
installSubForm
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"installSubForm"
);
data
(
"subFormInstall"
,
installSubForm
,
result
,
attachment
.
getRecDate
());
data
(
"subFormInstall"
,
installSubForm
,
result
,
attachment
.
getRecDate
());
List
<
Map
<
String
,
Object
>>
designSubForm
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"designSubForm"
);
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
;
return
result
;
}
}
...
@@ -761,6 +786,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -761,6 +786,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
attachmentService
.
save
(
attachment
);
attachmentService
.
save
(
attachment
);
if
(
"submit"
.
equals
(
type
))
{
if
(
"submit"
.
equals
(
type
))
{
// 触发流程 todo
// 触发流程 todo
Project
project
=
this
.
getById
(
projectId
);
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
project
,
null
,
null
);
}
}
return
"ok"
;
return
"ok"
;
...
@@ -846,7 +873,38 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -846,7 +873,38 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
}
}
if
(
"submit"
.
equals
(
type
))
{
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
// 触发流程 todo
Project
project
=
this
.
getById
(
projectId
);
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
project
,
condition
.
get
(),
option
.
get
());
}
}
return
"ok"
;
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
...
@@ -62,8 +62,12 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
ZoneId
zoneId
=
ZoneId
.
systemDefault
();
ZoneId
zoneId
=
ZoneId
.
systemDefault
();
Set
<
String
>
projectIds
=
new
HashSet
<>();
Set
<
String
>
projectIds
=
new
HashSet
<>();
for
(
Project
project:
projectResourceService
.
getProjectList
()){
if
(
ValidationUtil
.
isEmpty
(
qualityProblemDto
.
getProjectId
()))
{
projectIds
.
add
(
String
.
valueOf
(
project
.
getSequenceNbr
()));
for
(
Project
project
:
projectResourceService
.
getProjectList
())
{
projectIds
.
add
(
String
.
valueOf
(
project
.
getSequenceNbr
()));
}
}
else
{
projectIds
.
add
(
String
.
valueOf
(
qualityProblemDto
.
getProjectId
()));
}
}
List
<
QualityProblemDto
>
list
=
new
ArrayList
<>();
List
<
QualityProblemDto
>
list
=
new
ArrayList
<>();
IPage
<
QualityProblemDto
>
page
=
new
Page
<>();
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
...
@@ -59,6 +59,10 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
String
title
=
""
,
taskStatus
=
""
;
String
title
=
""
,
taskStatus
=
""
;
task
.
setTaskType
(
taskType
);
task
.
setTaskType
(
taskType
);
if
(!
ValidationUtil
.
isEmpty
(
InitiationStatus
))
{
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
);
title
=
ProjectInitiationEnum
.
getTaskNameMap
.
get
(
InitiationStatus
);
taskStatus
=
ProjectInitiationEnum
.
getTaskStatusMap
.
get
(
InitiationStatus
);
taskStatus
=
ProjectInitiationEnum
.
getTaskStatusMap
.
get
(
InitiationStatus
);
if
(
ValidationUtil
.
isEmpty
(
title
))
{
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