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
d91d5fdd
Commit
d91d5fdd
authored
Apr 07, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev0124' into dev0124-01
parents
840f787c
c3fbb199
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
766 additions
and
46 deletions
+766
-46
FinancingAuditEnum.java
...in/amos/boot/module/hygf/api/Enum/FinancingAuditEnum.java
+37
-0
FinancingInfoDto.java
...ejoin/amos/boot/module/hygf/api/dto/FinancingInfoDto.java
+13
-0
FinancingRectificationOrderDto.java
...t/module/hygf/api/dto/FinancingRectificationOrderDto.java
+54
-0
WorkflowResultDto.java
...join/amos/boot/module/hygf/api/dto/WorkflowResultDto.java
+52
-0
FinancingRectificationOrder.java
...t/module/hygf/api/entity/FinancingRectificationOrder.java
+85
-0
FinancingInfoMapper.java
...amos/boot/module/hygf/api/mapper/FinancingInfoMapper.java
+5
-0
FinancingRectificationOrderMapper.java
...le/hygf/api/mapper/FinancingRectificationOrderMapper.java
+14
-0
IFinancingInfoService.java
...s/boot/module/hygf/api/service/IFinancingInfoService.java
+11
-0
IFinancingRectificationOrderService.java
...hygf/api/service/IFinancingRectificationOrderService.java
+12
-0
IPeasantHouseholdService.java
...oot/module/hygf/api/service/IPeasantHouseholdService.java
+6
-2
FinancingInfoMapper.xml
...i/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
+10
-1
FinancingRectificationOrderMapper.xml
...ources/mapper/mysql/FinancingRectificationOrderMapper.xml
+5
-0
HYGFMaintenanceTicketsMapper.xml
...n/resources/mapper/mysql/HYGFMaintenanceTicketsMapper.xml
+0
-1
FinancingInfoController.java
...t/module/hygf/biz/controller/FinancingInfoController.java
+33
-2
PeasantHouseholdController.java
...odule/hygf/biz/controller/PeasantHouseholdController.java
+6
-0
MaintenanceResultHandlerMessage.java
...module/hygf/biz/emqx/MaintenanceResultHandlerMessage.java
+8
-0
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+155
-5
FinancingRectificationOrderServiceImpl.java
.../service/impl/FinancingRectificationOrderServiceImpl.java
+34
-0
HYGFMaintenanceTicketsServiceImpl.java
...f/biz/service/impl/HYGFMaintenanceTicketsServiceImpl.java
+61
-1
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+12
-4
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+12
-0
PersonnelBusinessServiceImpl.java
...e/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
+40
-29
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+1
-1
WorkFlowService.java
...os/boot/module/hygf/biz/service/impl/WorkFlowService.java
+97
-0
application-dev.properties
...le-hygf-biz/src/main/resources/application-dev.properties
+3
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/FinancingAuditEnum.java
0 → 100644
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
FinancingAuditEnum
{
待融资审核
(
"FinancingAudit"
,
"待融资审核"
),
审核不通过
(
"AuditReject"
,
"审核不通过"
),
待整改
(
"WaitAbarbeitung"
,
"待整改"
),
整改待推送
(
"AbarbeitungWaitPush"
,
"整改待推送"
),
审核通过
(
"AuditPass"
,
"审核通过"
),
放款完成
(
"complete"
,
"放款完成"
);
private
String
code
;
private
String
name
;
/**
* 编码
*/
public
static
String
getNameByCode
(
String
code
){
String
name
=
null
;
for
(
FinancingAuditEnum
value
:
FinancingAuditEnum
.
values
())
{
if
(
value
.
getCode
().
equals
(
code
)){
name
=
value
.
getName
();
}
}
return
name
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/FinancingInfoDto.java
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.support.spring.annotation.FastJsonFilter
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
*
*
...
@@ -34,6 +38,7 @@ public class FinancingInfoDto extends BaseDto {
...
@@ -34,6 +38,7 @@ public class FinancingInfoDto extends BaseDto {
private
Long
peasantHouseholdId
;
private
Long
peasantHouseholdId
;
@ApiModelProperty
(
value
=
"放款时间"
)
@ApiModelProperty
(
value
=
"放款时间"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
private
Date
disbursementTime
;
private
Date
disbursementTime
;
@ApiModelProperty
(
value
=
"元"
)
@ApiModelProperty
(
value
=
"元"
)
...
@@ -45,4 +50,12 @@ public class FinancingInfoDto extends BaseDto {
...
@@ -45,4 +50,12 @@ public class FinancingInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"状态"
)
@ApiModelProperty
(
value
=
"状态"
)
private
String
status
;
private
String
status
;
@ApiModelProperty
(
value
=
"农户id"
)
private
String
peasantHouseholdIds
;
private
String
instanceId
;
@ApiModelProperty
(
value
=
"附件"
)
private
List
<
Object
>
files
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/FinancingRectificationOrderDto.java
0 → 100644
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 投融整改单
*
* @author system_generator
* @date 2024-04-02
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"FinancingRectificationOrderDto"
,
description
=
"投融整改单"
)
public
class
FinancingRectificationOrderDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"整改单号"
)
private
String
rectificationOrderCode
;
@ApiModelProperty
(
value
=
"农户id"
)
private
Long
peasantHouseholdId
;
@ApiModelProperty
(
value
=
"问题描述"
)
private
String
problemDescription
;
@ApiModelProperty
(
value
=
"整改状态"
)
private
String
rectificationStatus
;
@ApiModelProperty
(
value
=
"整改描述"
)
private
String
rectificationDescription
;
@ApiModelProperty
(
value
=
"完成日期"
)
private
Date
completeDate
;
@ApiModelProperty
(
value
=
"负责人ID"
)
private
Long
responsibleUserId
;
@ApiModelProperty
(
value
=
"负责人姓名"
)
private
String
responsibleUserName
;
@ApiModelProperty
(
value
=
"负责人电话"
)
private
String
responsibleUserPhone
;
@ApiModelProperty
(
value
=
"整改照片"
)
private
String
rectificationPhoto
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/WorkflowResultDto.java
0 → 100644
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
lombok.Data
;
@Data
public
class
WorkflowResultDto
{
/**
* WORKFLOW实例ids
*/
String
instanceId
;
// /**
// * 执行人角色
// */
// String nextExecutorIds;
String
executorId
;
String
executorName
;
String
createUserId
;
/**
* 下一步执行人角色
*/
String
nextExecutorIds
;
String
nextTaskId
;
/**
* 下一步执行人用户id
*/
String
nextExecuteUserIds
;
/**
* 当前节点任务名称
*/
String
taskName
;
/**
* 下一节点任务名称
*/
String
nextNodeName
;
/**
* 下一节点code
*/
String
nextNodeCode
;
String
nextNodeKey
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/FinancingRectificationOrder.java
0 → 100644
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* 投融整改单
*
* @author system_generator
* @date 2024-04-02
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"hygf_financing_rectification_order"
)
public
class
FinancingRectificationOrder
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 整改单号
*/
@TableField
(
"rectification_order_code"
)
private
String
rectificationOrderCode
;
/**
* 农户id
*/
@TableField
(
"peasant_household_id"
)
private
Long
peasantHouseholdId
;
/**
* 问题描述
*/
@TableField
(
"problem_description"
)
private
String
problemDescription
;
/**
* 整改状态
*/
@TableField
(
"rectification_status"
)
private
String
rectificationStatus
;
/**
* 整改描述
*/
@TableField
(
"rectification_description"
)
private
String
rectificationDescription
;
/**
* 完成日期
*/
@TableField
(
"complete_date"
)
private
Date
completeDate
;
/**
* 负责人ID
*/
@TableField
(
"responsible_user_id"
)
private
Long
responsibleUserId
;
/**
* 负责人姓名
*/
@TableField
(
"responsible_user_name"
)
private
String
responsibleUserName
;
/**
* 负责人电话
*/
@TableField
(
"responsible_user_phone"
)
private
String
responsibleUserPhone
;
/**
* 整改照片
*/
@TableField
(
"rectification_photo"
)
private
String
rectificationPhoto
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/FinancingInfoMapper.java
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -16,4 +18,7 @@ public interface FinancingInfoMapper extends BaseMapper<FinancingInfo> {
...
@@ -16,4 +18,7 @@ public interface FinancingInfoMapper extends BaseMapper<FinancingInfo> {
List
<
Map
<
String
,
String
>>
getStationFinancingInfoList
();
List
<
Map
<
String
,
String
>>
getStationFinancingInfoList
();
FinancingInfoDto
selectDataInfo
(
@Param
(
"peasantHouseholdId"
)
Long
peasantHouseholdId
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/FinancingRectificationOrderMapper.java
0 → 100644
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.FinancingRectificationOrder
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 投融整改单 Mapper 接口
*
* @author system_generator
* @date 2024-04-02
*/
public
interface
FinancingRectificationOrderMapper
extends
BaseMapper
<
FinancingRectificationOrder
>
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IFinancingInfoService.java
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto
;
import
java.util.Map
;
/**
/**
* 接口类
* 接口类
*
*
...
@@ -9,4 +13,11 @@ package com.yeejoin.amos.boot.module.hygf.api.service;
...
@@ -9,4 +13,11 @@ package com.yeejoin.amos.boot.module.hygf.api.service;
*/
*/
public
interface
IFinancingInfoService
{
public
interface
IFinancingInfoService
{
void
rollback
(
String
processId
,
String
peasantHouseholdId
);
FinancingInfoDto
selectDataInfo
(
Long
sequenceNbr
);
void
execueFlow
(
Map
<
String
,
Object
>
params
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IFinancingRectificationOrderService.java
0 → 100644
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
service
;
/**
* 投融整改单接口类
*
* @author system_generator
* @date 2024-04-02
*/
public
interface
IFinancingRectificationOrderService
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IPeasantHouseholdService.java
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PeasantHouseholdDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
java.util.List
;
/**
/**
* 农户信息接口类
* 农户信息接口类
*
*
...
@@ -10,6 +15,5 @@ package com.yeejoin.amos.boot.module.hygf.api.service;
...
@@ -10,6 +15,5 @@ package com.yeejoin.amos.boot.module.hygf.api.service;
public
interface
IPeasantHouseholdService
{
public
interface
IPeasantHouseholdService
{
List
<
PeasantHousehold
>
getInfoByIds
(
String
ids
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
View file @
d91d5fdd
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
hph.sequence_nbr AS sequenceNbr,
hph.sequence_nbr AS sequenceNbr,
hph.peasant_household_no peasantHouseholdNo,
hph.peasant_household_no peasantHouseholdNo,
hph.owners_name as ownersName,
hph.owners_name as ownersName,
hph.project_address as projectAddress,
hph.project_address
_name
as projectAddress,
hph.regional_companies_name as regionalCompaniesName,
hph.regional_companies_name as regionalCompaniesName,
IFNULL(info.`status`,'待推送') as status
IFNULL(info.`status`,'待推送') as status
FROM
FROM
...
@@ -16,4 +16,13 @@
...
@@ -16,4 +16,13 @@
WHERE
WHERE
hph.construction_state= '验收完成'
hph.construction_state= '验收完成'
</select>
</select>
<select
id=
"selectDataInfo"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto"
>
SELECT
hfi.*,
(select instance_id FROM hygf_financing_auditing WHERE peasant_household_id = hfi.peasant_household_id ORDER BY rec_date desc LIMIT 1) as instanceId
FROM
`hygf_financing_info` hfi
WHERE
hfi.peasant_household_id = #{peasantHouseholdId}
</select>
</mapper>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingRectificationOrderMapper.xml
0 → 100644
View file @
d91d5fdd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.api.mapper.FinancingRectificationOrderMapper"
>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/HYGFMaintenanceTicketsMapper.xml
View file @
d91d5fdd
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
<where>
<where>
hygf_maintenance_tickets.creator_user_id =#{amosUserId}
hygf_maintenance_tickets.creator_user_id =#{amosUserId}
and hygf_maintenance_tickets.warning_id =0
<if
test=
"dto.handlerStatus != null and dto.handlerStatus !=''"
>
<if
test=
"dto.handlerStatus != null and dto.handlerStatus !=''"
>
And hygf_maintenance_tickets.handler_status = #{dto.handlerStatus}
And hygf_maintenance_tickets.handler_status = #{dto.handlerStatus}
</if>
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/FinancingInfoController.java
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -57,7 +63,14 @@ public class FinancingInfoController extends BaseController {
...
@@ -57,7 +63,14 @@ public class FinancingInfoController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
FinancingInfoDto
>
updateBySequenceNbrFinancingInfo
(
@RequestBody
FinancingInfoDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
FinancingInfoDto
>
updateBySequenceNbrFinancingInfo
(
@RequestBody
FinancingInfoDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
financingInfoServiceImpl
.
updateWithModel
(
model
));
model
.
setFile
(
JSON
.
toJSONString
(
model
.
getFiles
()));
financingInfoServiceImpl
.
updateWithModel
(
model
);
if
(
null
!=
model
.
getDisbursementMoney
()){
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
model
);
map
.
put
(
"approvalStatus"
,
"0"
);
financingInfoServiceImpl
.
execueFlow
(
map
);
}
return
ResponseHelper
.
buildResponse
(
model
);
}
}
/**
/**
...
@@ -83,7 +96,7 @@ public class FinancingInfoController extends BaseController {
...
@@ -83,7 +96,7 @@ public class FinancingInfoController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
FinancingInfoDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
FinancingInfoDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
financingInfoServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
financingInfoServiceImpl
.
selectDataInfo
(
sequenceNbr
));
}
}
/**
/**
...
@@ -115,4 +128,22 @@ public class FinancingInfoController extends BaseController {
...
@@ -115,4 +128,22 @@ public class FinancingInfoController extends BaseController {
public
ResponseModel
<
List
<
FinancingInfoDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
FinancingInfoDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
financingInfoServiceImpl
.
queryForFinancingInfoList
());
return
ResponseHelper
.
buildResponse
(
financingInfoServiceImpl
.
queryForFinancingInfoList
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"撤回"
,
notes
=
"撤回"
)
@GetMapping
(
value
=
"/rollback"
)
public
ResponseModel
rollback
(
String
instanceId
,
String
peasantHouseholdId
)
{
financingInfoServiceImpl
.
rollback
(
instanceId
,
peasantHouseholdId
);
return
CommonResponseNewUtil
.
success
();
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"审核"
,
notes
=
"审核"
)
@PostMapping
(
value
=
"/execueFlow"
)
public
ResponseModel
execueFlow
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
financingInfoServiceImpl
.
execueFlow
(
params
);
return
CommonResponseNewUtil
.
success
();
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PeasantHouseholdController.java
View file @
d91d5fdd
...
@@ -270,7 +270,13 @@ public class PeasantHouseholdController extends BaseController {
...
@@ -270,7 +270,13 @@ public class PeasantHouseholdController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"农户信息列表根据ids查询"
,
notes
=
"农户信息列表根据ids查询"
)
@GetMapping
(
value
=
"/getInfoByIds"
)
public
ResponseModel
<
List
<
PeasantHousehold
>>
getInfoByIds
(
String
ids
)
{
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
getInfoByIds
(
ids
));
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/emqx/MaintenanceResultHandlerMessage.java
View file @
d91d5fdd
...
@@ -116,11 +116,16 @@ public class MaintenanceResultHandlerMessage extends EmqxListener {
...
@@ -116,11 +116,16 @@ public class MaintenanceResultHandlerMessage extends EmqxListener {
hygfMaintenanceTickets
.
setStationContact
(
jpStation
.
getStationContact
());
hygfMaintenanceTickets
.
setStationContact
(
jpStation
.
getStationContact
());
//业主姓名
//业主姓名
hygfMaintenanceTickets
.
setOwnerName
(
jpStation
.
getUserName
());
hygfMaintenanceTickets
.
setOwnerName
(
jpStation
.
getUserName
());
if
(
ObjectUtil
.
isEmpty
(
hygfMaintenanceTickets
.
getStationContact
()))
{
if
(
ObjectUtil
.
isEmpty
(
hygfMaintenanceTickets
.
getStationContact
()))
{
hygfMaintenanceTickets
.
setStationContact
(
jpStation
.
getUserName
());
hygfMaintenanceTickets
.
setStationContact
(
jpStation
.
getUserName
());
}
}
}
}
hygfMaintenanceTickets
.
setInverterSn
(
sncode
);
hygfMaintenanceTickets
.
setInverterSn
(
sncode
);
if
(
specialMap
.
containsKey
(
"creatorUserId"
)){
hygfMaintenanceTickets
.
setCreatorUserId
(
specialMap
.
get
(
"creatorUserId"
).
toString
());
}
if
(
specialMap
.
containsKey
(
"warningLevel"
)){
if
(
specialMap
.
containsKey
(
"warningLevel"
)){
hygfMaintenanceTickets
.
setWarningLevel
(
specialMap
.
get
(
"warningLevel"
).
toString
());
hygfMaintenanceTickets
.
setWarningLevel
(
specialMap
.
get
(
"warningLevel"
).
toString
());
}
}
...
@@ -137,6 +142,9 @@ public class MaintenanceResultHandlerMessage extends EmqxListener {
...
@@ -137,6 +142,9 @@ public class MaintenanceResultHandlerMessage extends EmqxListener {
if
(
ObjectUtil
.
isNotEmpty
(
tdHygfJpInverterWarn
))
{
if
(
ObjectUtil
.
isNotEmpty
(
tdHygfJpInverterWarn
))
{
hygfMaintenanceTickets
.
setWarningLevel
(
tdHygfJpInverterWarn
.
getLevel
());
hygfMaintenanceTickets
.
setWarningLevel
(
tdHygfJpInverterWarn
.
getLevel
());
if
(
ObjectUtil
.
isEmpty
(
hygfMaintenanceTickets
.
getWarningLevel
())){
hygfMaintenanceTickets
.
setWarningLevel
(
"一般"
);
}
hygfMaintenanceTickets
.
setWarningContent
(
tdHygfJpInverterWarn
.
getContent
());
hygfMaintenanceTickets
.
setWarningContent
(
tdHygfJpInverterWarn
.
getContent
());
hygfMaintenanceTickets
.
setWarningStatus
(
tdHygfJpInverterWarn
.
getState
());
hygfMaintenanceTickets
.
setWarningStatus
(
tdHygfJpInverterWarn
.
getState
());
//告警等级
//告警等级
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingInfoServiceImpl.java
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.FinancingAuditEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingAuditingDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.BasicGridAcceptance
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.BasicGridAcceptance
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingAuditing
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IFinancingInfoService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IFinancingInfoService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.FinancingRectificationOrder
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.FinancingRectificationOrderServiceImpl
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
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.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
import
java.util.
Map
;
import
java.util.
*
;
/**
/**
* 服务实现类
* 服务实现类
...
@@ -29,7 +48,15 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
...
@@ -29,7 +48,15 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
@Autowired
@Autowired
private
FinancingInfoMapper
financingInfoMapper
;
private
FinancingInfoMapper
financingInfoMapper
;
@Autowired
@Autowired
private
WorkflowImpl
workflow
;
private
WorkFlowService
workFlowService
;
@Autowired
private
WorkflowImpl
workflow
;
@Autowired
private
FinancingAuditingServiceImpl
financingAuditingService
;
@Autowired
private
FinancingRectificationOrderServiceImpl
financingRectificationOrderService
;
private
static
String
PROCESSKEY
=
"StationFinancing"
;
public
Page
<
Map
<
String
,
String
>>
queryForFinancingInfoPage
(
Page
<
Map
<
String
,
String
>>
page
)
{
public
Page
<
Map
<
String
,
String
>>
queryForFinancingInfoPage
(
Page
<
Map
<
String
,
String
>>
page
)
{
...
@@ -49,8 +76,130 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
...
@@ -49,8 +76,130 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto,Finan
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
@Transactional
public
FinancingInfoDto
saveModel
(
FinancingInfoDto
model
)
{
public
FinancingInfoDto
saveModel
(
FinancingInfoDto
model
)
{
this
.
createWithModel
(
model
);
List
<
String
>
ids
;
return
null
;
if
(
model
.
getPeasantHouseholdIds
().
contains
(
","
))
{
ids
=
Arrays
.
asList
(
model
.
getPeasantHouseholdIds
().
split
(
","
));
}
else
{
ids
=
Arrays
.
asList
(
new
String
[]{
model
.
getPeasantHouseholdIds
()});
}
ids
.
stream
().
forEach
(
e
->{
LambdaQueryWrapper
<
FinancingInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
Long
.
valueOf
(
e
));
FinancingInfo
financingInfos
=
this
.
getBaseMapper
().
selectOne
(
queryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
financingInfos
)){
model
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
model
.
setPeasantHouseholdId
(
Long
.
valueOf
(
e
));
FinancingInfoDto
financingInfoDto
=
new
FinancingInfoDto
();
BeanUtils
.
copyProperties
(
model
,
financingInfoDto
);
financingInfoDto
.
setSequenceNbr
(
null
);
this
.
createWithModel
(
financingInfoDto
);
}
else
{
financingInfos
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
this
.
updateById
(
financingInfos
);
}
//开启工作流 并执行一步
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESSKEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
new
Date
().
getTime
()));
dto
.
setCompleteFirstTask
(
true
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
List
<
ProcessTaskDTO
>
processTaskDTOS
=
workFlowService
.
startBatch
(
actWorkflowBatchDTO
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
processTaskDTOS
);
WorkflowResultDto
workflowResultDto
=
workflowResultDtos
.
get
(
0
);
FinancingAuditingDto
financingAuditingDto
=
new
FinancingAuditingDto
();
BeanUtils
.
copyProperties
(
workflowResultDto
,
financingAuditingDto
);
financingAuditingDto
.
setPeasantHouseholdId
(
Long
.
valueOf
(
e
));
financingAuditingDto
.
setPromoter
(
RequestContext
.
getExeUserId
());
financingAuditingService
.
createWithModel
(
financingAuditingDto
);
});
return
model
;
}
@Override
public
void
rollback
(
String
processId
,
String
peasantHouseholdId
)
{
workFlowService
.
stopProcess
(
processId
);
LambdaQueryWrapper
<
FinancingInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
List
<
FinancingInfo
>
financingInfos
=
this
.
getBaseMapper
().
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
financingInfos
)){
FinancingInfo
financingInfo
=
financingInfos
.
get
(
0
);
financingInfo
.
setStatus
(
"待推送"
);
financingInfo
.
setFinancingCompaniesCode
(
null
);
financingInfo
.
setFinancingCompaniesSeq
(
null
);
financingInfo
.
setFinancingCompaniesName
(
null
);
this
.
updateById
(
financingInfo
);
}
}
@Override
public
FinancingInfoDto
selectDataInfo
(
Long
peasantHouseholdId
)
{
FinancingInfoDto
financingInfoDto
=
this
.
getBaseMapper
().
selectDataInfo
(
peasantHouseholdId
);
financingInfoDto
.
setFiles
(
JSONArray
.
parseArray
(
financingInfoDto
.
getFile
()));
return
financingInfoDto
;
}
@Override
public
void
execueFlow
(
Map
<
String
,
Object
>
params
)
{
LambdaQueryWrapper
<
FinancingAuditing
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
FinancingAuditing:
:
getInstanceId
,
params
.
get
(
"instanceId"
).
toString
());
query
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
query
.
last
(
"limit 1"
);
FinancingAuditing
financingAuditing
=
financingAuditingService
.
getBaseMapper
().
selectOne
(
query
);
//组装信息
TaskResultDTO
task
=
new
TaskResultDTO
();
task
.
setResultCode
(
"approvalStatus"
);
task
.
setTaskId
(
financingAuditing
.
getNextTaskId
());
task
.
setComment
(
params
.
getOrDefault
(
"comments"
,
""
).
toString
());
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
task
.
setVariable
(
map
);
map
.
put
(
"approvalStatus"
,
params
.
get
(
"approvalStatus"
));
//执行流程
ProcessTaskDTO
processTaskDTO
=
workFlowService
.
complete
(
financingAuditing
.
getNextTaskId
(),
task
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
CollectionUtil
.
newArrayList
(
processTaskDTO
));
WorkflowResultDto
workflowResultDto
=
workflowResultDtos
.
get
(
0
);
FinancingAuditingDto
financingAuditingDto
=
new
FinancingAuditingDto
();
BeanUtils
.
copyProperties
(
workflowResultDto
,
financingAuditingDto
);
financingAuditingDto
.
setPeasantHouseholdId
(
financingAuditing
.
getPeasantHouseholdId
());
financingAuditingDto
.
setPromoter
(
financingAuditing
.
getPromoter
());
if
(
null
==
financingAuditingDto
.
getInstanceId
()){
financingAuditingDto
.
setInstanceId
(
financingAuditing
.
getInstanceId
());
}
financingAuditingService
.
createWithModel
(
financingAuditingDto
);
String
nameByCode
=
FinancingAuditEnum
.
getNameByCode
(
workflowResultDto
.
getNextNodeKey
());
String
statusName
=
nameByCode
==
null
||
nameByCode
.
equals
(
""
)
?
"放款完成"
:
nameByCode
;
LambdaQueryWrapper
<
FinancingInfo
>
info
=
new
LambdaQueryWrapper
<>();
info
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
financingAuditing
.
getPeasantHouseholdId
());
FinancingInfo
financingInfo
=
this
.
getBaseMapper
().
selectOne
(
info
);
financingInfo
.
setStatus
(
statusName
);
this
.
updateById
(
financingInfo
);
if
(
params
.
get
(
"approvalStatus"
).
equals
(
"7"
)){
FinancingRectificationOrder
financingRectificationOrder
=
new
FinancingRectificationOrder
();
financingRectificationOrder
.
setRectificationOrderCode
(
String
.
valueOf
(
new
Date
().
getTime
()));
financingRectificationOrder
.
setRectificationStatus
(
"待整改"
);
financingRectificationOrder
.
setRectificationDescription
(
params
.
getOrDefault
(
"rectificationDescription"
,
""
).
toString
());
financingRectificationOrder
.
setPeasantHouseholdId
((
Long
)
params
.
get
(
"peasantHouseholdId"
));
financingRectificationOrderService
.
save
(
financingRectificationOrder
);
}
}
}
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingRectificationOrderServiceImpl.java
0 → 100644
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.FinancingRectificationOrder
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.FinancingRectificationOrderMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.service.IFinancingRectificationOrderService
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.FinancingRectificationOrderDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
/**
* 投融整改单服务实现类
*
* @author system_generator
* @date 2024-04-02
*/
@Service
public
class
FinancingRectificationOrderServiceImpl
extends
BaseService
<
FinancingRectificationOrderDto
,
FinancingRectificationOrder
,
FinancingRectificationOrderMapper
>
implements
IFinancingRectificationOrderService
{
/**
* 分页查询
*/
public
Page
<
FinancingRectificationOrderDto
>
queryForFinancingRectificationOrderPage
(
Page
<
FinancingRectificationOrderDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
FinancingRectificationOrderDto
>
queryForFinancingRectificationOrderList
()
{
return
this
.
queryForList
(
""
,
false
);
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HYGFMaintenanceTicketsServiceImpl.java
View file @
d91d5fdd
...
@@ -6,16 +6,21 @@ import cn.hutool.core.date.DateUtil;
...
@@ -6,16 +6,21 @@ import cn.hutool.core.date.DateUtil;
import
cn.hutool.core.io.unit.DataUnit
;
import
cn.hutool.core.io.unit.DataUnit
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HYGFMaintenanceTickets
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HYGFMaintenanceTickets
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInverterWarn
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInverterWarn
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.HYGFMaintenanceTicketsMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.HYGFMaintenanceTicketsMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpStationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.MaintenanceMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IHYGFMaintenanceTicketsService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IHYGFMaintenanceTicketsService
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInverterWarnMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInverterWarnMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
...
@@ -38,6 +43,10 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
...
@@ -38,6 +43,10 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
@Autowired
@Autowired
HYGFMaintenanceTicketsMapper
hygfMaintenanceTicketsMapper
;
HYGFMaintenanceTicketsMapper
hygfMaintenanceTicketsMapper
;
@Autowired
JpStationMapper
jpStationMapper
;
@Autowired
MaintenanceMapper
maintenanceMapper
;
/**
/**
* 分页查询
* 分页查询
...
@@ -71,6 +80,50 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
...
@@ -71,6 +80,50 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
}
}
public
void
sendMeassageToMcb
(
HYGFMaintenanceTicketsDto
hygfMaintenanceTicketsDto
)
{
public
void
sendMeassageToMcb
(
HYGFMaintenanceTicketsDto
hygfMaintenanceTicketsDto
)
{
if
(
hygfMaintenanceTicketsDto
.
getWarningId
()==
null
){
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_station_id"
,
hygfMaintenanceTicketsDto
.
getStationId
()));
if
(
ObjectUtil
.
isEmpty
(
jpStation
))
{
jpStation
=
jpStationMapper
.
selectById
(
hygfMaintenanceTicketsDto
.
getStationId
());
}
if
(
ObjectUtil
.
isNotEmpty
(
jpStation
))
{
//场站名称
hygfMaintenanceTicketsDto
.
setStationName
(
jpStation
.
getName
());
//区域公司编码
hygfMaintenanceTicketsDto
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
//经销商orgCode
hygfMaintenanceTicketsDto
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
//地址
hygfMaintenanceTicketsDto
.
setStationAddress
(
jpStation
.
getAddress
());
//经度
hygfMaintenanceTicketsDto
.
setStationLongitude
(
jpStation
.
getLongitude
());
//纬度
hygfMaintenanceTicketsDto
.
setStationLatitude
(
jpStation
.
getLatitude
());
//电站联系人电话
hygfMaintenanceTicketsDto
.
setStationContactPhone
(
jpStation
.
getUserPhone
());
// 电站联系人
hygfMaintenanceTicketsDto
.
setStationContact
(
jpStation
.
getStationContact
());
//业主姓名
hygfMaintenanceTicketsDto
.
setOwnerName
(
jpStation
.
getUserName
());
if
(
ObjectUtil
.
isEmpty
(
hygfMaintenanceTicketsDto
.
getStationContact
()))
{
hygfMaintenanceTicketsDto
.
setStationContact
(
jpStation
.
getUserName
());
}
}
MaintenanceDto
maintenance
=
maintenanceMapper
.
selectOneById
(
Long
.
valueOf
(
hygfMaintenanceTicketsDto
.
getMaintenancePersonId
()));
if
(
ObjectUtil
.
isNotEmpty
(
maintenance
))
{
hygfMaintenanceTicketsDto
.
setMaintenancePersonName
(
maintenance
.
getName
());
hygfMaintenanceTicketsDto
.
setMaintenancePersonPhone
(
maintenance
.
getTelephone
());
}
HYGFMaintenanceTickets
fMaintenanceTickets
=
new
HYGFMaintenanceTickets
();
BeanUtils
.
copyProperties
(
hygfMaintenanceTicketsDto
,
fMaintenanceTickets
);
fMaintenanceTickets
.
setWarningId
(
0
l
);
this
.
save
(
fMaintenanceTickets
);
}
else
{
HashMap
<
String
,
Object
>
messageMain
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
messageMain
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
rawData
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
rawData
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
bizInfo
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
bizInfo
=
new
HashMap
<>();
...
@@ -87,6 +140,10 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
...
@@ -87,6 +140,10 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
specialMap
.
put
(
"warningId"
,
hygfMaintenanceTicketsDto
.
getWarningId
());
specialMap
.
put
(
"warningId"
,
hygfMaintenanceTicketsDto
.
getWarningId
());
specialMap
.
put
(
"taskStartTime"
,
hygfMaintenanceTicketsDto
.
getTaskStartTime
());
specialMap
.
put
(
"taskStartTime"
,
hygfMaintenanceTicketsDto
.
getTaskStartTime
());
specialMap
.
put
(
"taskEndTime"
,
hygfMaintenanceTicketsDto
.
getTaskEndTime
());
specialMap
.
put
(
"taskEndTime"
,
hygfMaintenanceTicketsDto
.
getTaskEndTime
());
specialMap
.
put
(
"creatorUserId"
,
hygfMaintenanceTicketsDto
.
getCreatorUserId
());
if
(
ObjectUtil
.
isNotEmpty
(
hygfMaintenanceTicketsDto
.
getWarningId
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
hygfMaintenanceTicketsDto
.
getWarningId
()))
{
//告警内容
//告警内容
specialMap
.
put
(
"warningContent"
,
hygfMaintenanceTicketsDto
.
getWarningContent
());
specialMap
.
put
(
"warningContent"
,
hygfMaintenanceTicketsDto
.
getWarningContent
());
...
@@ -119,6 +176,8 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
...
@@ -119,6 +176,8 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
bizInfo
.
put
(
"warningTime"
,
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
));
bizInfo
.
put
(
"warningTime"
,
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
));
bizInfo
.
put
(
"warningObjectName"
,
hygfMaintenanceTicketsDto
.
getStationName
());
bizInfo
.
put
(
"warningObjectName"
,
hygfMaintenanceTicketsDto
.
getStationName
());
rawData
.
put
(
"traceId"
,
hygfMaintenanceTicketsDto
.
getInverterSn
());
rawData
.
put
(
"traceId"
,
hygfMaintenanceTicketsDto
.
getInverterSn
());
rawData
.
put
(
"bizInfo"
,
bizInfo
);
rawData
.
put
(
"bizInfo"
,
bizInfo
);
rawData
.
put
(
"indexKey"
,
hygfMaintenanceTicketsDto
.
getInverterSn
());
rawData
.
put
(
"indexKey"
,
hygfMaintenanceTicketsDto
.
getInverterSn
());
...
@@ -172,11 +231,12 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
...
@@ -172,11 +231,12 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
}
catch
(
Exception
exception
)
{
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
();
exception
.
printStackTrace
();
}
}
}
}
}
public
HYGFMaintenanceTicketsDto
updateHYGFMaintenanceTicketsDto
(
HYGFMaintenanceTicketsDto
hygfMaintenanceTicketsDto
)
{
public
HYGFMaintenanceTicketsDto
updateHYGFMaintenanceTicketsDto
(
HYGFMaintenanceTicketsDto
hygfMaintenanceTicketsDto
)
{
hygfMaintenanceTicketsDto
.
setHandlerStatus
(
"已处理"
);
hygfMaintenanceTicketsDto
.
setHandlerStatus
(
"已处理"
);
if
(
hygfMaintenanceTicketsDto
.
getWarningId
()>
0
){
if
(
ObjectUtil
.
isNotEmpty
(
hygfMaintenanceTicketsDto
.
getWarningId
())&&
hygfMaintenanceTicketsDto
.
getWarningId
()>
0
){
hygfMaintenanceTicketsDto
.
setTaskEndTime
(
new
Date
());
hygfMaintenanceTicketsDto
.
setTaskEndTime
(
new
Date
());
Long
day
=
DateUtil
.
between
(
hygfMaintenanceTicketsDto
.
getWarningStartTime
(),
hygfMaintenanceTicketsDto
.
getTaskEndTime
(),
DateUnit
.
DAY
);
Long
day
=
DateUtil
.
between
(
hygfMaintenanceTicketsDto
.
getWarningStartTime
(),
hygfMaintenanceTicketsDto
.
getTaskEndTime
(),
DateUnit
.
DAY
);
Long
hour
=
DateUtil
.
between
(
hygfMaintenanceTicketsDto
.
getWarningStartTime
(),
hygfMaintenanceTicketsDto
.
getTaskEndTime
(),
DateUnit
.
HOUR
)-
day
*
24
;
Long
hour
=
DateUtil
.
between
(
hygfMaintenanceTicketsDto
.
getWarningStartTime
(),
hygfMaintenanceTicketsDto
.
getTaskEndTime
(),
DateUnit
.
HOUR
)-
day
*
24
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpStationServiceImpl.java
View file @
d91d5fdd
...
@@ -179,11 +179,19 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
...
@@ -179,11 +179,19 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
Map
<
String
,
List
<
String
>>
inverterMap
=
dataJpInverter
.
stream
().
collect
(
Collectors
.
groupingBy
(
JpInverter:
:
getThirdStationId
,
Collectors
.
mapping
(
JpInverter:
:
getSnCode
,
Collectors
.
toList
())));
Map
<
String
,
List
<
String
>>
inverterMap
=
dataJpInverter
.
stream
().
collect
(
Collectors
.
groupingBy
(
JpInverter:
:
getThirdStationId
,
Collectors
.
mapping
(
JpInverter:
:
getSnCode
,
Collectors
.
toList
())));
List
<
JpStation
>
list
=
jpStationMapper
.
getJpStationList
(
reviewDto
);
List
<
JpStation
>
list
=
jpStationMapper
.
getJpStationList
(
reviewDto
);
list
.
forEach
(
jpStation
->
{
list
.
forEach
(
jpStation
->
{
List
<
String
>
sncodes
=
inverterMap
.
get
(
jpStation
.
getThirdStationId
()).
stream
().
distinct
().
collect
(
Collectors
.
toList
());
sncodes
=
sncodes
.
stream
().
filter
(
s
->
s
.
trim
().
length
()>
1
).
collect
(
Collectors
.
toList
());
if
(
inverterMap
.
containsKey
(
jpStation
.
getThirdStationId
())){
jpStation
.
setSnCodes
(
sncodes
);
List
<
String
>
sncodes
=
inverterMap
.
get
(
jpStation
.
getThirdStationId
())!=
null
?
inverterMap
.
get
(
jpStation
.
getThirdStationId
()).
stream
().
distinct
().
collect
(
Collectors
.
toList
()):
null
;
sncodes
=
sncodes
!=
null
?
sncodes
.
stream
().
filter
(
s
->
s
.
trim
().
length
()>
1
).
collect
(
Collectors
.
toList
()):
null
;
jpStation
.
setSnCodes
(
sncodes
);
}
});
});
list
=
list
.
stream
().
filter
(
jpStation
->
jpStation
.
getSnCodes
().
size
()>
0
).
collect
(
Collectors
.
toList
());
list
=
list
.
stream
().
filter
(
jpStation
->
jpStation
.
getSnCodes
()
!=
null
&&
jpStation
.
getSnCodes
()
.
size
()>
0
).
collect
(
Collectors
.
toList
());
return
list
;
return
list
;
}
}
@Override
@Override
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.ArrivalStateeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.ArrivalStateeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.CodeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.CodeEnum
;
...
@@ -667,4 +670,12 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
...
@@ -667,4 +670,12 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
return
(
calendar
.
getTimeInMillis
()
-
System
.
currentTimeMillis
())
/
1000
;
return
(
calendar
.
getTimeInMillis
()
-
System
.
currentTimeMillis
())
/
1000
;
}
}
@Override
public
List
<
PeasantHousehold
>
getInfoByIds
(
String
ids
)
{
LambdaQueryWrapper
<
PeasantHousehold
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
in
(
BaseEntity:
:
getSequenceNbr
,
Arrays
.
asList
(
ids
.
split
(
","
)));
queryWrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
0
);
return
this
.
getBaseMapper
().
selectList
(
queryWrapper
);
}
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
View file @
d91d5fdd
...
@@ -63,6 +63,9 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -63,6 +63,9 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
protected
EmqKeeper
emqKeeper
;
protected
EmqKeeper
emqKeeper
;
@Value
(
"${hygf.user.group.id}"
)
@Value
(
"${hygf.user.group.id}"
)
private
long
userGroupId
;
private
long
userGroupId
;
@Value
(
"${hygf.user.group.empty}"
)
private
long
userGroupempty
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -355,51 +358,59 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
...
@@ -355,51 +358,59 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
unitInfo
.
setAdminUserName
(
publicAgencyUse
.
getRealName
());
unitInfo
.
setAdminUserName
(
publicAgencyUse
.
getRealName
());
unitInfoMapper
.
updateById
(
unitInfo
);
unitInfoMapper
.
updateById
(
unitInfo
);
//修改管理员
//修改管理员
List
<
Long
>
roidx
=
JSONArray
.
parseArray
(
publicAgencyUsex
.
getRole
(),
Long
.
class
);
List
<
Long
>
roidx
=
JSONArray
.
parseArray
(
publicAgencyUsex
.
getRole
(),
Long
.
class
);
if
(
roidx
==
null
){
publicAgencyUsex
.
setRole
(
null
);
}
else
{
roidx
.
remove
(
userGroupId
);
publicAgencyUsex
.
setRole
(
JSON
.
toJSONString
(
roidx
));
}
//修改当前用户角色权限
List
<
Long
>
roid
=
JSONArray
.
parseArray
(
publicAgencyUse
.
getRole
(),
Long
.
class
);
if
(
roid
==
null
){
roid
=
new
ArrayList
<>();
}
roid
.
add
(
userGroupId
);
publicAgencyUse
.
setRole
(
JSON
.
toJSONString
(
roid
));
publicAgencyUserMapper
.
updateById
(
publicAgencyUsex
);
publicAgencyUserMapper
.
updateById
(
publicAgencyUse
);
//修改平台用户
//修改平台用户
List
<
String
>
userId
=
new
ArrayList
<>();
List
<
String
>
userId
=
new
ArrayList
<>();
userId
.
add
(
publicAgencyUse
.
getAmosUserId
());
userId
.
add
(
publicAgencyUse
.
getAmosUserId
());
System
.
out
.
println
(
"删除旧管理员===================================:"
+
publicAgencyUsex
.
getAmosUserId
());
if
(
roidx
!=
null
&&!
roidx
.
isEmpty
()&&
roidx
.
size
()==
1
&&
roidx
.
get
(
0
).
longValue
()==
userGroupId
){
//新增空角色防止单位丢失
List
<
String
>
userId1
=
new
ArrayList
<>();
userId1
.
add
(
publicAgencyUsex
.
getAmosUserId
());
Privilege
.
groupUserClient
.
create
(
userGroupempty
,
userId1
);
}
//删除旧管理员
Privilege
.
groupUserClient
.
deleteGroupUser
(
userGroupId
,
publicAgencyUsex
.
getAmosUserId
());
//删除旧管理员
Privilege
.
groupUserClient
.
deleteGroupUser
(
userGroupId
,
publicAgencyUsex
.
getAmosUserId
());
System
.
out
.
println
(
"删除旧管理员===================================:"
+
publicAgencyUsex
.
getAmosUserId
());
// 1 修改平台用户
// 1 修改平台用户
Privilege
.
groupUserClient
.
create
(
userGroupId
,
userId
);
Privilege
.
groupUserClient
.
create
(
userGroupId
,
userId
);
System
.
out
.
println
(
"新增角色用户===================================:"
+
userId
);
// userEmpowerMapper.upuserrole(
System
.
out
.
println
(
"新增角色用户===================================:"
+
userId
);
// publicAgencyUse.getSequenceNbr(),
// publicAgencyUse.getAmosUserId(),
// userGroupId,
// personnelBusines.getAmosUnitId()
// );
//修改权限
//修改权限
if
(
roidx
==
null
){
publicAgencyUsex
.
setRole
(
null
);
}
else
{
roidx
.
remove
(
userGroupId
);
publicAgencyUsex
.
setRole
(
JSON
.
toJSONString
(
roidx
));
}
//修改当前用户角色权限
List
<
Long
>
roid
=
JSONArray
.
parseArray
(
publicAgencyUse
.
getRole
(),
Long
.
class
);
if
(
roid
==
null
){
roid
=
new
ArrayList
<>();
}
roid
.
add
(
userGroupId
);
publicAgencyUse
.
setRole
(
JSON
.
toJSONString
(
roid
));
publicAgencyUserMapper
.
updateById
(
publicAgencyUsex
);
publicAgencyUserMapper
.
updateById
(
publicAgencyUse
);
//旧管理员去除
//旧管理员去除
List
<
String
>
li
=
null
;
List
<
String
>
li
=
null
;
LambdaQueryWrapper
<
StdUserEmpower
>
uo
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
StdUserEmpower
>
uo
=
new
LambdaQueryWrapper
();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
d91d5fdd
...
@@ -332,7 +332,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
...
@@ -332,7 +332,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
//
//
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
勘察中
.
getCode
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
勘察中
.
getCode
());
long
idsk
=
basicGridAcceptance
.
getPeasantHouseholdId
();
long
idsk
=
peasantHousehold
.
getSequenceNbr
();
up
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
idsk
);
up
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
idsk
);
peasantHouseholdMapper
.
update
(
null
,
up
);
peasantHouseholdMapper
.
update
(
null
,
up
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/WorkFlowService.java
0 → 100644
View file @
d91d5fdd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.WorkflowResultDto
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
@Slf4j
public
class
WorkFlowService
{
/***
* 开启并执行一步 支持批量
*
* */
public
List
<
ProcessTaskDTO
>
startBatch
(
ActWorkflowBatchDTO
params
)
{
List
<
ProcessTaskDTO
>
processTasks
;
try
{
log
.
info
(
"开始前请求工作流启动接口:/start/batch,请求参数:{}"
,
JSONObject
.
toJSONString
(
params
));
processTasks
=
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
startForBatch
(
params
));
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流批量启动失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流批量启动失败"
);
}
return
processTasks
;
}
public
ProcessInstanceDTO
stopProcess
(
String
processInstanceId
)
{
ProcessInstanceDTO
processInstanceDTO
;
try
{
log
.
info
(
"开始前请求工作流停止接口:stopProcess,请求参数:{}"
,
processInstanceId
);
processInstanceDTO
=
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
stopProcess
(
processInstanceId
));
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流批量停止失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流批量启动失败"
);
}
return
processInstanceDTO
;
}
/***
* 执行
*
* */
public
ProcessTaskDTO
complete
(
String
taskId
,
TaskResultDTO
data
)
{
ProcessTaskDTO
processTaskDTO
;
try
{
log
.
info
(
"开始前请求工作流完成任务接口:/complete/standard/{taskId},请求参数:{},{}"
,
taskId
,
JSONObject
.
toJSONString
(
data
));
processTaskDTO
=
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
completeByTaskFroStandard
(
taskId
,
data
));
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流完成任务接口失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流完成任务接口失败"
);
}
return
processTaskDTO
;
}
public
List
<
WorkflowResultDto
>
buildWorkFlowInfo
(
List
<
ProcessTaskDTO
>
processTaskDTOS
)
{
List
<
WorkflowResultDto
>
workflowResultDtoList
=
new
ArrayList
<>();
processTaskDTOS
.
forEach
(
item
->
{
WorkflowResultDto
workflowResultDto
=
new
WorkflowResultDto
();
if
(
null
!=
item
.
getProcessInstance
()){
workflowResultDto
.
setInstanceId
(
item
.
getProcessInstance
().
getId
());
}
// workflowResultDto.setNextExecutorIds(String.join(",", item.getCandidateGroups()));
if
(!
CollectionUtils
.
isEmpty
(
item
.
getNextTask
()))
{
ActTaskDTO
actTaskDTO
=
item
.
getNextTask
().
get
(
0
);
workflowResultDto
.
setTaskName
(
actTaskDTO
.
getName
());
workflowResultDto
.
setNextTaskId
(
actTaskDTO
.
getId
());
workflowResultDto
.
setNextNodeKey
(
actTaskDTO
.
getKey
());
// 工作流字段还未添加
workflowResultDto
.
setNextNodeName
(
actTaskDTO
.
getName
());
List
<
String
>
nextGroups
=
item
.
getNextCandidateGroups
().
get
(
actTaskDTO
.
getId
());
String
join
=
String
.
join
(
","
,
nextGroups
);
workflowResultDto
.
setNextExecutorIds
(
join
);
List
<
String
>
nextUserIds
=
item
.
getNextTaskExecutor
().
get
(
actTaskDTO
.
getId
()).
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
String
nextUserIdsString
=
String
.
join
(
","
,
nextUserIds
);
workflowResultDto
.
setNextExecuteUserIds
(
nextUserIdsString
);
}
workflowResultDtoList
.
add
(
workflowResultDto
);
});
return
workflowResultDtoList
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev.properties
View file @
d91d5fdd
...
@@ -168,6 +168,9 @@ hygf.user.group.id=1702512164058718210
...
@@ -168,6 +168,9 @@ hygf.user.group.id=1702512164058718210
regionalCompanies.company.seq
=
1701778292098498561
regionalCompanies.company.seq
=
1701778292098498561
hygf.user.group.empty
=
1775056568031645697
#qiyuesuo.serverUrl = https://openapi.qiyuesuo.cn
#qiyuesuo.serverUrl = https://openapi.qiyuesuo.cn
#qiyuesuo.accessKey = a1lcd3WRRV
#qiyuesuo.accessKey = a1lcd3WRRV
...
...
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