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
f07c6394
Commit
f07c6394
authored
Dec 15, 2023
by
xixinzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register
parents
d45967ad
eda0d728
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
30 deletions
+31
-30
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+31
-30
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
f07c6394
...
@@ -11,20 +11,14 @@ import com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum;
...
@@ -11,20 +11,14 @@ import com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRelationEquipMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRelationEquipMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ICreateCodeService
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ICreateCodeService
;
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.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
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
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -47,10 +41,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -47,10 +41,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
static
final
String
PROCESS_DEFINITION_KEY
=
"installationNotification"
;
public
static
final
String
PROCESS_DEFINITION_KEY
=
"installationNotification"
;
public
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
public
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
@Autowired
private
JgRelationEquipMapper
jgRelationEquipMapper
;
@Autowired
@Autowired
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
@Autowired
@SuppressWarnings
(
"all"
)
private
ICreateCodeService
iCreateCodeService
;
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
...
@@ -82,25 +79,33 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -82,25 +79,33 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
*
*
* @param noticeDto 安装告知
* @param noticeDto 安装告知
*/
*/
@SuppressWarnings
(
"rawtypes"
)
@SuppressWarnings
(
{
"rawtypes"
,
"Duplicates"
}
)
public
JgInstallationNoticeDto
updateInstallationNotice
(
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
public
JgInstallationNoticeDto
updateInstallationNotice
(
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
op
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
// 字段转换
this
.
convertField
(
noticeDto
);
this
.
convertField
(
noticeDto
);
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"installationNotification"
);
dto
.
setBusinessKey
(
"1"
);
AjaxResult
ajaxResult
;
AjaxResult
ajaxResult
;
try
{
// 发起流程
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
if
(!
StringUtils
.
hasText
(
noticeDto
.
getInstanceId
()))
{
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
noticeDto
.
setInstanceId
(
instanceId
);
dto
.
setProcessDefinitionKey
(
"installationNotification"
);
noticeDto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setBusinessKey
(
"1"
);
noticeDto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
try
{
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
jgInstallationNoticeMapper
.
updateById
(
bean
);
noticeDto
.
setInstanceId
(
instanceId
);
}
catch
(
Exception
e
)
{
noticeDto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
log
.
error
(
"提交失败:{}"
,
e
);
noticeDto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
...
@@ -121,7 +126,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -121,7 +126,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
noticeDto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
noticeDto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
dto
,
bean
);
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -130,11 +135,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -130,11 +135,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return
noticeDto
;
return
noticeDto
;
}
}
@Autowired
private
ICreateCodeService
iCreateCodeService
;
@Autowired
JgRelationEquipMapper
jgRelationEquipMapper
;
/**
/**
* 分页查询
* 分页查询
*
*
...
@@ -194,6 +194,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -194,6 +194,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
@Override
@Override
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgInstallationNoticeDto
>
jgInstallationNoticeDtoMap
)
{
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgInstallationNoticeDto
>
jgInstallationNoticeDtoMap
)
{
JgInstallationNoticeDto
model
=
jgInstallationNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
JgInstallationNoticeDto
model
=
jgInstallationNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
...
@@ -217,7 +218,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -217,7 +218,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
// 发起流程
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
"1"
);
dto
.
setBusinessKey
(
"1"
);
AjaxResult
ajaxResult
=
null
;
AjaxResult
ajaxResult
=
null
;
...
...
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