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
3a97f8c6
Commit
3a97f8c6
authored
Mar 15, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改流程细节,修改资料提交-焊口列表接口,新增根据companyId查询人员接口
parent
f9faa721
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
81 additions
and
44 deletions
+81
-44
OrgEnum.java
...va/com/yeejoin/amos/boot/module/ugp/api/Enum/OrgEnum.java
+5
-5
XJConstant.java
...eejoin/amos/boot/module/ugp/api/constants/XJConstant.java
+4
-0
WeldDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/WeldDto.java
+4
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+12
-0
ProjectInitiationController.java
...odule/ugp/biz/controller/ProjectInitiationController.java
+1
-1
OrgServiceImpl.java
...amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
+15
-0
ProjectInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
+32
-36
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+4
-1
WeldServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
+4
-1
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/OrgEnum.java
View file @
3a97f8c6
...
...
@@ -16,11 +16,11 @@ public enum OrgEnum {
管理员
(
"USER"
,
"945"
,
"管理员"
,
3
,
"ddd"
,
""
),
建设单位负责人
(
"CHARGE"
,
"254"
,
"建设单位负责人"
,
3
,
"studio_normalapp_4403119"
,
""
),
企业管理员
(
"ADMIN"
,
"248"
,
"企业管理员"
,
3
,
"studio_normalapp_4403119"
,
""
),
建设单位
(
"CONSTRUCTION"
,
"249"
,
"建设单位"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
760213
"
,
"1232"
),
安装单位
(
"INSTALL"
,
"250"
,
"安装单位"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
760213
"
,
"1234"
),
设计单位
(
"DESIGN"
,
"251"
,
"设计单位"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
760213
"
,
"1235"
),
监察部门
(
"SUPERVISION"
,
"252"
,
"监察部门"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
761616
"
,
""
),
监检机构
(
"MONITORING"
,
"253"
,
"监检机构"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
761616
"
,
"1233"
),
建设单位
(
"CONSTRUCTION"
,
"249"
,
"建设单位"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
461729
"
,
"1232"
),
安装单位
(
"INSTALL"
,
"250"
,
"安装单位"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
461729
"
,
"1234"
),
设计单位
(
"DESIGN"
,
"251"
,
"设计单位"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
461729
"
,
"1235"
),
监察部门
(
"SUPERVISION"
,
"252"
,
"监察部门"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
461729
"
,
""
),
监检机构
(
"MONITORING"
,
"253"
,
"监检机构"
,
1
,
"studio_normalapp_4403119,studio_normalapp_4
461729
"
,
"1233"
),
监理单位
(
"SUPERVISOR"
,
"254"
,
"监理单位"
,
1
,
""
,
"1237"
);
private
String
key
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/constants/XJConstant.java
View file @
3a97f8c6
...
...
@@ -35,6 +35,10 @@ public class XJConstant {
public
static
final
int
CODE_USER_SUM
=
6
;
public
static
final
String
监检
=
"WzNVBO"
;
//流程判断条件
public
static
final
String
condition
=
"condition"
;
public
static
final
String
option
=
"option"
;
/** 企业用户注册前缀 */
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/WeldDto.java
View file @
3a97f8c6
...
...
@@ -116,5 +116,9 @@ public class WeldDto extends BaseDto {
private
Long
backfillVerifyID
;
private
String
backfillVerifyColor
;
/**
* 焊机编号
*/
private
String
equipmentCode
;
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
3a97f8c6
...
...
@@ -471,5 +471,17 @@ public class ProjectController extends BaseController {
mapPage
.
setRecords
(
auditInformationDetail
);
return
ResponseHelper
.
buildResponse
(
mapPage
);
}
/**
* 根据companyId查询企业下的人员列表
* @param companyId
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据companyId查询企业下的人员列表"
,
notes
=
"根据companyId查询企业下的人员列表"
)
@GetMapping
(
value
=
"/getPersonByCompanyId"
)
public
ResponseModel
<
List
<
OrgUsr
>>
getPersonByCompanyId
(
String
companyId
){
return
ResponseHelper
.
buildResponse
(
orgServiceImpl
.
getPersonByCompanyId
(
companyId
));
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectInitiationController.java
View file @
3a97f8c6
...
...
@@ -25,7 +25,7 @@ public class ProjectInitiationController {
@GetMapping
(
value
=
"/start"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程启动"
,
notes
=
"流程启动"
)
public
ResponseModel
<
String
>
start
()
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
projectInitiationServiceImpl
.
startTest
(
new
Project
()
));
return
ResponseHelper
.
buildResponse
(
projectInitiationServiceImpl
.
startTest
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
View file @
3a97f8c6
...
...
@@ -587,4 +587,19 @@ public class OrgServiceImpl {
page
.
setRecords
(
mapList
);
return
page
;
}
/**
* 根据企业id获取企业下的所有人员
* @return
*/
public
List
<
OrgUsr
>
getPersonByCompanyId
(
String
companyId
){
if
(
ValidationUtil
.
isEmpty
(
companyId
)){
return
new
ArrayList
<>();
}
OrgUsr
orgUsr
=
this
.
getOrgUsrById
(
companyId
);
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
like
(
OrgUsr:
:
getBizOrgCode
,
orgUsr
.
getBizOrgCode
())
.
eq
(
OrgUsr:
:
getBizOrgType
,
OrgEnum
.
普通人员
.
getKey
());
return
orgUsrServiceImpl
.
list
(
wrapper
);
}
}
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 @
3a97f8c6
...
...
@@ -95,10 +95,10 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
/**
* 测试流程使用
* @param
project
* @param
* @return
*/
public
String
startTest
(
Project
project
)
{
public
String
startTest
()
{
String
instanceId
=
null
;
try
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
...
...
@@ -108,7 +108,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
"流程启动失败:"
+
e
.
getMessage
());
log
.
error
(
"流程启动失败:"
+
e
.
getMessage
());
}
return
instanceId
;
}
...
...
@@ -120,14 +120,16 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
*/
public
void
getTaskList
(
String
instanceId
){
JSONObject
dataObject
=
new
JSONObject
();
JSONObject
jsonObject
=
JSON
Object
.
parseObject
(
JSON
.
toJSONString
(
Workflow
.
taskClient
.
getTaskList
(
instanceId
)));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
Workflow
.
taskClient
.
getTaskList
(
instanceId
)));
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"data"
);
for
(
Object
o:
jsonArray
){
String
name
=
JSON
Object
.
parseObject
(
JSON
.
toJSONString
(
o
)).
getString
(
"name"
);
String
name
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
)).
getString
(
"name"
);
if
(
ProjectInitiationEnum
.
安装开工资料修改
.
getName
().
equals
(
name
)){
dataObject
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
o
));
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
}
}
logger
.
info
(
dataObject
.
toString
());
Workflow
.
taskClient
.
getTaskList
(
instanceId
);
Workflow
.
taskClient
.
getTasksNoAuth
(
processDefinitionKey
,
null
);
Workflow
.
taskClient
.
getTask
(
instanceId
);
...
...
@@ -150,12 +152,12 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResult
(
condition
);
dto
.
setResultCode
(
"condition"
);
dto
.
setResultCode
(
XJConstant
.
condition
);
dto
.
setTaskId
(
taskId
);
HashMap
<
String
,
Object
>
var
=
new
HashMap
<>();
var
.
put
(
"condition"
,
condition
);
var
.
put
(
"option"
,
option
);
dto
.
setVariable
(
var
);
HashMap
<
String
,
Object
>
var
iables
=
new
HashMap
<>();
var
iables
.
put
(
XJConstant
.
condition
,
condition
);
var
iables
.
put
(
XJConstant
.
option
,
option
);
dto
.
setVariable
(
var
iables
);
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
str
=
str
+
" 执行成功!"
;
}
catch
(
Exception
e
)
{
...
...
@@ -166,7 +168,6 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
@Override
public
void
start
(
Project
project
)
{
System
.
out
.
println
(
"流程启动:"
+
DateUtils
.
date2LongStr
(
new
Date
()));
String
instanceId
=
null
;
//启动流程
try
{
...
...
@@ -181,7 +182,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
this
.
save
(
projectInitiation
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
"流程启动失败:"
+
e
.
getMessage
());
log
.
error
(
"流程启动失败:"
+
e
.
getMessage
());
}
String
taskName
=
null
;
try
{
...
...
@@ -205,8 +206,8 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
Long
extendId
=
-
1L
;
String
taskName
=
""
;
JSONObject
object
=
JSON
Object
.
parseObject
(
JSONObject
.
toJSONString
(
objectd
));
Project
project
=
JSON
.
parseObject
(
JSON
Object
.
toJSONString
(
objectd
),
Project
.
class
);
JSONObject
object
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
objectd
));
Project
project
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
objectd
),
Project
.
class
);
if
(
ValidationUtil
.
isEmpty
(
project
.
getName
())){
project
=
projectService
.
getById
(
object
.
getLong
(
"projectId"
));
}
...
...
@@ -218,12 +219,12 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
}
catch
(
Exception
e
)
{
//当存在多个用户任务时 主要是安装/设计提交资料修改
logger
.
error
(
"当前用户存在多个任务"
);
JSONObject
jsonObject
=
JSON
Object
.
parseObject
(
JSON
.
toJSONString
(
Workflow
.
taskClient
.
getTaskList
(
instanceId
)));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
Workflow
.
taskClient
.
getTaskList
(
instanceId
)));
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"data"
);
for
(
Object
o:
jsonArray
){
String
name
=
JSON
Object
.
parseObject
(
JSON
.
toJSONString
(
o
)).
getString
(
"name"
);
String
name
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
)).
getString
(
"name"
);
if
(
ProjectInitiationEnum
.
安装开工资料修改
.
getName
().
equals
(
name
)){
dataObject
=
JSON
Object
.
parseObject
(
JSON
.
toJSONString
(
o
));
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
}
}
}
...
...
@@ -242,29 +243,26 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule
::
getAdminRegionCode
,
regionCode
);
SuperviseRule
superviseRule
=
superviseRuleService
.
getOne
(
wrapper
);
if
(
ProjectInitiationEnum
.
告知申请
.
getName
().
equals
(
taskName
))
{
if
(!
ValidationUtil
.
isEmpty
(
objectd
))
{
problemInitiationService
.
sendSms
(
object
,
SMSEnum
.
项目安装告知申请
.
getCode
());
}
if
(
ProjectInitiationEnum
.
告知申请
.
getName
().
equals
(
taskName
)
&&
!
ValidationUtil
.
isEmpty
(
objectd
))
{
problemInitiationService
.
sendSms
(
object
,
SMSEnum
.
项目安装告知申请
.
getCode
());
}
if
(
ProjectInitiationEnum
.
告知申请
.
getName
().
equals
(
taskName
)
||
ProjectInitiationEnum
.
接受告知
.
getName
().
equals
(
taskName
)
)
{
extendId
=
object
.
getLong
(
"sequenceNbr"
);
}
if
(
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
taskName
)){
if
(
"1"
.
equals
(
option
)){
if
(
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
taskName
)
&&
"1"
.
equals
(
option
))
{
projectInitiation
.
setTaskName
(
taskName
+
"(流程结束!)"
);
}
}
try
{
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResult
(
op
tion
);
dto
.
setResultCode
(
"condition"
);
dto
.
setResult
(
condi
tion
);
dto
.
setResultCode
(
XJConstant
.
condition
);
dto
.
setTaskId
(
projectInitiation
.
getTaskId
());
HashMap
<
String
,
Object
>
var
=
new
HashMap
<>();
var
.
put
(
"condition"
,
option
);
dto
.
setVariable
(
var
);
HashMap
<
String
,
Object
>
variables
=
new
HashMap
<>();
variables
.
put
(
XJConstant
.
condition
,
condition
);
variables
.
put
(
XJConstant
.
option
,
option
);
dto
.
setVariable
(
variables
);
//执行流程
Workflow
.
taskClient
.
completeByTask
(
projectInitiation
.
getTaskId
(),
dto
);
//保存日志
...
...
@@ -286,7 +284,6 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
unitIds
=
new
ArrayList
<>();
taskType
=
getUnitId
(
unitIds
,
project
,
superviseRule
);
taskService
.
saveOrUpdateTask
(
project
.
getStatus
(),
false
,
taskType
,
new
Date
(),
project
.
getSequenceNbr
(),
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
);
System
.
out
.
println
(
"流程更新任务表结束:"
+
DateUtils
.
date2LongStr
(
new
Date
()));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -453,7 +450,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
String
taskName
=
"流程结束!"
;
try
{
taskName
=
jsonObject
.
getString
(
"name"
);
}
catch
(
Exception
e
)
{}
}
catch
(
Exception
e
)
{
log
.
error
(
"当前流程名称为空"
);
}
return
taskName
;
}
...
...
@@ -463,10 +462,8 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
Project
project
=
projectService
.
getOne
(
wrapper
);
String
taskName
=
getFlowTaskName
(
instanceId
);
boolean
bool
=
true
;
if
(
project
.
getStatus
().
equals
(
ProjectInitiationEnum
.
提交资料
.
getName
())){
if
(
"流程结束!"
.
equals
(
taskName
)){
if
(
project
.
getStatus
().
equals
(
ProjectInitiationEnum
.
提交资料
.
getName
())
&&
"流程结束!"
.
equals
(
taskName
)){
bool
=
false
;
}
}
if
(
bool
)
{
project
.
setStatus
(
taskName
);
...
...
@@ -480,7 +477,6 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getInstanceId
,
instanceId
);
Project
project
=
projectService
.
getOne
(
wrapper
);
// project.setStatus(ProjectInitiationEnum.getCodeByNameMap.get(getFlowTaskName(instanceId)));
project
.
setStatus
(
getFlowTaskName
(
instanceId
));
projectService
.
updateById
(
project
);
}
...
...
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 @
3a97f8c6
...
...
@@ -133,7 +133,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
}
/**
* 根据
单位
id获取单位名称
* 根据id获取单位名称
* @param model
*/
public
void
getUnitName
(
ProjectDto
model
){
...
...
@@ -155,6 +155,9 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
if
(!
ValidationUtil
.
isEmpty
(
model
.
getChargePersonId
()))
{
model
.
setChargePerson
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getChargePersonId
())).
getBizOrgName
());
}
if
(!
ValidationUtil
.
isEmpty
(
model
.
getInstallUnitChargerId
()))
{
model
.
setInstallUnitCharger
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getInstallUnitChargerId
())).
getBizOrgName
());
}
}
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
View file @
3a97f8c6
...
...
@@ -268,7 +268,7 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
List
<
Verify
>
verifyList
=
verifyService
.
list
(
wapper
);
for
(
Verify
verify
:
verifyList
)
{
if
(
StageEnum
.
焊前人员
.
getStage
().
equals
(
verify
.
getStage
())){
weldDto
.
setWelderVerify
(
"详情"
);
weldDto
.
setWelderVerify
(
verify
.
getRecUserName
()
);
weldDto
.
setWelderVerifyID
(
verify
.
getSequenceNbr
());
weldDto
.
setWelderVerifyColor
(
ColorEnum
.
green
.
getColor
());
if
(
VerifyEnum
.
未通过
.
getStatus
().
equals
(
verify
.
getStatus
())){
...
...
@@ -283,6 +283,9 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
weldDto
.
setMaterialVerifyColor
(
ColorEnum
.
red
.
getColor
());
}
}
if
(
StageEnum
.
焊前设备
.
getStage
().
equals
(
verify
.
getStage
())
&&
ValidationUtil
.
isEmpty
(
verify
.
getTargetInfo
())
&&
VerifyEnum
.
已通过
.
getStatus
().
equals
(
verify
.
getStatus
())){
weldDto
.
setEquipmentCode
(
JSON
.
parseObject
(
verify
.
getTargetInfo
()).
getString
(
"facilityNumber"
));
}
if
(
StageEnum
.
焊接工艺
.
getStage
().
equals
(
verify
.
getStage
())){
weldDto
.
setCraftVerify
(
"详情"
);
weldDto
.
setCraftVerifyID
(
verify
.
getSequenceNbr
());
...
...
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