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
68b668fa
Commit
68b668fa
authored
Jul 17, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口
parent
8b777360
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
119 additions
and
13 deletions
+119
-13
DesignInformationDto.java
...n/amos/boot/module/hygf/api/dto/DesignInformationDto.java
+2
-2
PowerStationDto.java
...eejoin/amos/boot/module/hygf/api/dto/PowerStationDto.java
+7
-0
WorkDto.java
...va/com/yeejoin/amos/boot/module/hygf/api/dto/WorkDto.java
+27
-0
DesignInformation.java
...n/amos/boot/module/hygf/api/entity/DesignInformation.java
+3
-3
WorkflowFeignClient.java
.../amos/boot/module/hygf/biz/feign/WorkflowFeignClient.java
+2
-1
PowerStationServiceImpl.java
...module/hygf/biz/service/impl/PowerStationServiceImpl.java
+78
-7
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/DesignInformationDto.java
View file @
68b668fa
...
...
@@ -108,7 +108,7 @@ public class DesignInformationDto extends BaseDto {
@ApiModelProperty
(
value
=
"特殊方案数量"
)
private
Integer
specialPlanNum
;
@ApiModelProperty
(
value
=
"
勘察表
id"
)
private
Long
surveyInformation
Id
;
@ApiModelProperty
(
value
=
"
农户
id"
)
private
String
peasantHousehold
Id
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/PowerStationDto.java
View file @
68b668fa
...
...
@@ -66,4 +66,11 @@ public class PowerStationDto extends BaseDto {
@ApiModelProperty
(
value
=
"流程定义id"
)
private
String
processDefinitionId
;
/**
* 当前流程节点
*/
private
String
nextProcessNode
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/WorkDto.java
0 → 100644
View file @
68b668fa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/7/17
*/
@Data
public
class
WorkDto
{
@ApiModelProperty
(
value
=
"待执行节点小程序 路由信息"
)
private
String
nodeRouting
;
@ApiModelProperty
(
value
=
"待执行节点角色"
)
private
String
nodeRole
;
private
String
nextProcessNode
;
public
WorkDto
(
String
nodeRouting
,
String
nodeRole
,
String
nextProcessNode
)
{
this
.
nodeRouting
=
nodeRouting
;
this
.
nodeRole
=
nodeRole
;
this
.
nextProcessNode
=
nextProcessNode
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/DesignInformation.java
View file @
68b668fa
...
...
@@ -175,9 +175,9 @@ public class DesignInformation extends BaseEntity {
private
Integer
specialPlanNum
;
/**
*
勘察表
id
*
农户
id
*/
@TableField
(
"survey_information
_id"
)
private
Long
surveyInformation
Id
;
@TableField
(
"peasant_household
_id"
)
private
String
peasantHousehold
Id
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/feign/WorkflowFeignClient.java
View file @
68b668fa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
feign
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -16,7 +17,7 @@ public interface WorkflowFeignClient {
*
* */
@RequestMapping
(
value
=
"/history/task/nodeInfo"
,
method
=
RequestMethod
.
GET
)
JSONObject
getNodeInfo
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
);
FeignClientResult
<
JSONObject
>
getNodeInfo
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
);
/***
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PowerStationServiceImpl.java
View file @
68b668fa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationNodeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.WorkDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DesignInformation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PowerStation
;
import
com.yeejoin.amos.boot.module.hygf.api.fegin.IdxFeginService
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.DesignInformationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.PeasantHouseholdMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.PowerStationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IPowerStationService
;
import
com.yeejoin.amos.boot.module.hygf.biz.feign.WorkflowFeignClient
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
springfox.documentation.service.ApiListing
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -34,6 +44,9 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
@Autowired
IPowerStationService
powerStationService
;
@Autowired
DesignInformationMapper
designInformationMapper
;
private
static
final
String
IDX_REQUEST_STATE
=
"200"
;
private
static
final
String
VERIFY_RESULT_YES
=
"yes"
;
...
...
@@ -71,14 +84,20 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
}
@Override
@Transactional
public
String
powerStationExamine
(
long
pageId
,
String
nodeCode
,
String
stationId
,
String
taskId
,
String
planInstanceId
,
Map
<
String
,
Object
>
kv
)
{
// 1. 业务相关数据落表
PowerStation
powerStation
=
this
.
baseMapper
.
selectById
(
stationId
);
PowerStationNodeEnum
nodeByCode
=
PowerStationNodeEnum
.
getNodeByCode
(
nodeCode
);
if
(
PowerStationNodeEnum
.
设计上传图纸
.
getCode
().
equals
(
nodeCode
))
{
}
else
if
(
PowerStationNodeEnum
.
经销商上传图纸
.
getCode
().
equals
(
nodeCode
))
{
}
else
{
String
result
=
String
.
valueOf
(
kv
.
get
(
"VERIFY_RESULT"
));
if
(
VERIFY_RESULT_NO
.
equals
(
result
))
{
...
...
@@ -105,13 +124,6 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
}
}
// 2. 更新流程状态
String
code
=
null
;
try
{
...
...
@@ -126,6 +138,13 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
JSONObject
resultObj
=
record
.
getResult
();
String
flowTaskId
=
String
.
valueOf
(
resultObj
.
get
(
"flowTaskId"
));
powerStation
.
setFlowTaskId
(
flowTaskId
);
//流程节点code
String
flowTaskIdnext
=
this
.
getTaskNoAuth
(
planInstanceId
);
WorkDto
workDto
=
this
.
getNodeInfoCode
(
flowTaskIdnext
);
powerStation
.
setNextProcessNode
(
workDto
.
getNextProcessNode
());
powerStation
.
setNodeRole
(
workDto
.
getNodeRole
());
powerStation
.
setNodeRouting
(
workDto
.
getNodeRouting
());
}
powerStationService
.
savePowerStation
(
powerStation
);
}
...
...
@@ -134,4 +153,55 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
}
return
code
;
}
public
WorkDto
getNodeInfoCode
(
String
flowTaskId
){
WorkDto
workDto
=
null
;
FeignClientResult
<
JSONObject
>
jSONObject
=
workflowFeignClient
.
getNodeInfo
(
flowTaskId
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
jSONObject
.
getStatus
()))){
JSONObject
js
=
jSONObject
.
getResult
();
if
(
js
==
null
){
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
JSONObject
taskInfo
=
js
.
get
(
"taskInfo"
)!=
null
?
JSON
.
parseObject
(
js
.
get
(
"taskInfo"
).
toString
()):
null
;
String
nextProcessNode
=
taskInfo
!=
null
?
taskInfo
.
get
(
"taskDefinitionKey"
).
toString
():
null
;
JSONObject
executor
=
js
.
get
(
"executor"
)!=
null
?
JSON
.
parseObject
(
js
.
get
(
"executor"
).
toString
()):
null
;
String
nodeRole
=
executor
!=
null
?
executor
.
get
(
"groupId"
).
toString
():
null
;
JSONObject
extensionInfo
=
js
.
get
(
"extensionInfo"
)!=
null
?
JSON
.
parseObject
(
js
.
get
(
"extensionInfo"
).
toString
()):
null
;
String
nodeRouting
=
extensionInfo
!=
null
?
extensionInfo
.
get
(
"nodeRole"
).
toString
():
null
;
workDto
=
new
WorkDto
(
nodeRouting
,
nodeRole
,
nextProcessNode
);
}
return
workDto
;
}
public
String
getTaskNoAuth
(
String
processInstanceId
){
String
flowTaskId
=
null
;
JSONObject
jSONObject
=
workflowFeignClient
.
getTaskNoAuth
(
processInstanceId
);
if
(
IDX_REQUEST_STATE
.
equals
(
String
.
valueOf
(
jSONObject
.
get
(
"code"
)))){
JSONObject
jsd
=
jSONObject
.
get
(
"data"
)!=
null
?
JSON
.
parseObject
(
jSONObject
.
get
(
"data"
).
toString
()):
null
;
flowTaskId
=
jsd
!=
null
?
jsd
.
get
(
"id"
).
toString
():
null
;
}
if
(
flowTaskId
==
null
){
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
return
flowTaskId
;
}
// 设计信息填充
public
void
updateSeve
(
String
peasantHouseholdId
){
LambdaQueryWrapper
<
DesignInformation
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
ne
(
DesignInformation:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
designInformationMapper
.
selectOne
(
peasantHouseholdId
);
}
}
\ No newline at end of file
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