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
9564c3f9
Commit
9564c3f9
authored
Jan 08, 2024
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安装告知工作流信息
parent
6770ab6c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
2 deletions
+77
-2
IJgInstallationNoticeService.java
...t/module/jg/api/service/IJgInstallationNoticeService.java
+2
-1
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+2
-1
PublicWorkFlowMessage.java
...os/boot/module/jg/biz/listener/PublicWorkFlowMessage.java
+73
-0
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+0
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgInstallationNoticeService.java
View file @
9564c3f9
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
netscape.javascript.JSObject
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -58,7 +59,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
...
@@ -58,7 +59,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param model 数据
* @param model 数据
* @param submitType 保存类型
* @param submitType 保存类型
*/
*/
void
saveNotice
(
String
submitType
,
Map
<
String
,
J
gInstallationNoticeDto
>
model
,
ReginParams
reginParams
);
void
saveNotice
(
String
submitType
,
Map
<
String
,
J
SObject
>
model
,
ReginParams
reginParams
);
/**
/**
* 打印告知单
* 打印告知单
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgInstallationNoticeController.java
View file @
9564c3f9
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
netscape.javascript.JSObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
@@ -46,7 +47,7 @@ public class JgInstallationNoticeController extends BaseController {
...
@@ -46,7 +47,7 @@ public class JgInstallationNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增安装告知"
,
notes
=
"新增安装告知"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增安装告知"
,
notes
=
"新增安装告知"
)
public
ResponseModel
<
String
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
J
gInstallationNoticeDto
>
model
)
{
public
ResponseModel
<
String
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
J
SObject
>
model
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
iJgInstallationNoticeService
.
saveNotice
(
submitType
,
model
,
reginParams
);
iJgInstallationNoticeService
.
saveNotice
(
submitType
,
model
,
reginParams
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/listener/PublicWorkFlowMessage.java
0 → 100644
View file @
9564c3f9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
listener
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
lombok.extern.slf4j.Slf4j
;
import
org.eclipse.paho.client.mqttv3.MqttMessage
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqxListener
;
import
javax.annotation.PostConstruct
;
import
java.util.List
;
@Slf4j
@Component
public
class
PublicWorkFlowMessage
extends
EmqxListener
{
@Autowired
protected
EmqKeeper
emqKeeper
;
/**
* 创建任务主题
*/
public
static
final
String
WORKFLOW_TASK_CREATED
=
"workflow/task/created"
;
/**
* 执行完成任务主题
*/
public
static
final
String
WORKFLOW_TASK_COMPLETED
=
"workflow/task/completed"
;
// /**
// * 流程执行结束主题
// */
// public static final String WORKFLOW_PROCESS_COMPLETE = "workflow/process/complete";
@Autowired
private
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
@PostConstruct
void
init
()
throws
Exception
{
emqKeeper
.
subscript
(
WORKFLOW_TASK_CREATED
,
2
,
this
);
emqKeeper
.
subscript
(
WORKFLOW_TASK_COMPLETED
,
2
,
this
);
// emqKeeper.subscript(WORKFLOW_PROCESS_COMPLETE, 2, this);
}
@Override
public
void
processMessage
(
String
topic
,
MqttMessage
message
)
throws
Exception
{
JSONObject
messageObject
=
JSON
.
parseObject
(
new
String
(
message
.
getPayload
()));
String
businessKey
=
messageObject
.
get
(
"businessKey"
).
toString
();
String
[]
s
=
businessKey
.
split
(
"_"
);
String
businessId
=
s
[
0
];
String
type
=
s
[
1
];
messageObject
.
put
(
"businessId"
,
businessId
);
if
(
topic
.
equals
(
WORKFLOW_TASK_CREATED
))
{
if
(
"installationNotice"
.
equals
(
type
))
{
jgInstallationNoticeService
.
updateByWorkFlow
(
messageObject
);
}
}
else
if
(
topic
.
equals
(
WORKFLOW_TASK_COMPLETED
))
{
if
(
"installationNotice"
.
equals
(
type
))
{
jgInstallationNoticeService
.
completeWorkFlow
(
messageObject
);
}
}
}
}
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 @
9564c3f9
This diff is collapsed.
Click to expand it.
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