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
af5af936
Commit
af5af936
authored
Jul 17, 2023
by
leizhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加:电站管理列表和详情接口
parent
27461971
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
16 deletions
+113
-16
LoggerDto.java
.../com/yeejoin/amos/boot/module/hygf/api/dto/LoggerDto.java
+18
-0
OrderTrackingDto.java
...ejoin/amos/boot/module/hygf/api/dto/OrderTrackingDto.java
+39
-0
PowerStationDto.java
...eejoin/amos/boot/module/hygf/api/dto/PowerStationDto.java
+4
-4
SurveyInfoAllDto.java
...ejoin/amos/boot/module/hygf/api/dto/SurveyInfoAllDto.java
+3
-2
SurveyInformationController.java
...dule/hygf/biz/controller/SurveyInformationController.java
+4
-2
WorkflowFeignClient.java
.../amos/boot/module/hygf/biz/feign/WorkflowFeignClient.java
+10
-0
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+35
-8
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/LoggerDto.java
0 → 100644
View file @
af5af936
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
/**
* @author fengwang
* @date 2023/7/17.
*/
@Data
@ApiModel
(
value
=
"LoggerDto"
,
description
=
"审核日志"
)
public
class
LoggerDto
{
//订单跟踪
List
<
LinkedHashMap
>
logger
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/OrderTrackingDto.java
0 → 100644
View file @
af5af936
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
*
* 订单跟踪【任务审核记录】
* @author fengwang
* @date 2023/7/17.
*/
@Data
@ApiModel
(
value
=
"OrderTrackingDto"
,
description
=
"订单跟踪"
)
public
class
OrderTrackingDto
{
@ApiModelProperty
(
value
=
"组件唯一标识"
)
private
String
Symbol_key
;
@ApiModelProperty
(
value
=
"审核节点Id"
)
private
String
taskId
;
@ApiModelProperty
(
value
=
"审核节点"
)
private
String
taskName
;
@ApiModelProperty
(
value
=
"审核人"
)
private
String
operator
;
@ApiModelProperty
(
value
=
"审核时间"
)
private
String
operateDate
;
@ApiModelProperty
(
value
=
"审核状态"
)
private
String
approvalStatue
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/PowerStationDto.java
View file @
af5af936
...
...
@@ -10,7 +10,7 @@ import lombok.EqualsAndHashCode;
import
java.util.Date
;
/**
*
*
*
* @author system_generator
* @date 2023-07-15
...
...
@@ -41,13 +41,13 @@ public class PowerStationDto extends BaseDto {
@ApiModelProperty
(
value
=
"流程状态"
)
private
String
processStatus
;
@ApiModelProperty
(
value
=
"
设计审核状态
"
)
@ApiModelProperty
(
value
=
"
投融资审核
"
)
private
String
designStatus
;
@ApiModelProperty
(
value
=
"
商务审核状态
"
)
@ApiModelProperty
(
value
=
"
法务审核
"
)
private
String
businessStatus
;
@ApiModelProperty
(
value
=
"
技术审核状态
"
)
@ApiModelProperty
(
value
=
"
设计审核
"
)
private
String
technologyStatus
;
@ApiModelProperty
(
value
=
"流程实例id"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/SurveyInfoAllDto.java
View file @
af5af936
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DesignInformationDto
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
...
...
@@ -27,4 +25,7 @@ public class SurveyInfoAllDto {
//设计信息
DesignInformationDto
designInformation
;
//订单跟踪
LoggerDto
orderTracking
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/SurveyInformationController.java
View file @
af5af936
...
...
@@ -138,9 +138,11 @@ public class SurveyInformationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"勘察信息编辑"
,
notes
=
"勘察信息编辑"
)
@GetMapping
(
value
=
"/surveyQuery"
)
public
ResponseModel
<
SurveyInfoAllDto
>
surveyQuery
(
@RequestParam
String
surveyInformationId
)
{
public
ResponseModel
<
SurveyInfoAllDto
>
surveyQuery
(
@RequestParam
(
value
=
"surveyInformationId"
,
required
=
false
)
String
surveyInformationId
,
@RequestParam
(
value
=
"peasantHouseholdId"
,
required
=
false
)
String
peasantHouseholdId
,
@RequestParam
(
value
=
"processInstanceId"
,
required
=
false
)
String
processInstanceId
)
{
AgencyUserModel
userInfo
=
getUserInfo
();
SurveyInfoAllDto
returnDto
=
surveyInformationServiceImpl
.
querySurveyInfo
(
surveyInformationId
,
userInfo
);
SurveyInfoAllDto
returnDto
=
surveyInformationServiceImpl
.
querySurveyInfo
(
surveyInformationId
,
peasantHouseholdId
,
processInstanceId
,
userInfo
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/feign/WorkflowFeignClient.java
View file @
af5af936
...
...
@@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.Map
;
@FeignClient
(
name
=
"${workflow.feign.name:AMOS-API-WORKFLOW}"
,
path
=
"workflow"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
WorkflowFeignClient
{
...
...
@@ -28,6 +30,13 @@ public interface WorkflowFeignClient {
@RequestMapping
(
value
=
"/task/getTaskNoAuth/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
getTaskNoAuth
(
@PathVariable
(
value
=
"processInstanceId"
)
String
processInstanceId
);
/***
*
* 获取流程审批日志
* */
@RequestMapping
(
value
=
"/task/flowLogger/{procInsId}"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
<
Map
<
String
,
Object
>>
getFlowLogger
(
@PathVariable
(
value
=
"procInsId"
)
String
procInsId
);
}
\ 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/SurveyInformationServiceImpl.java
View file @
af5af936
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationNodeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum
;
...
...
@@ -17,11 +18,12 @@ import com.yeejoin.amos.boot.module.hygf.api.service.ISurveyInformationService;
import
com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DesignInformationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DesignInformation
;
import
com.yeejoin.amos.boot.module.hygf.biz.
service.impl.DesignInformationServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.
feign.WorkflowFeignClient
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
jdk.internal.org.objectweb.asm.TypeReference
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -33,6 +35,7 @@ import org.springframework.stereotype.Service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 勘察信息服务实现类
...
...
@@ -64,6 +67,9 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
DesignInformationServiceImpl
designInformationService
;
@Autowired
WorkflowFeignClient
workflowFeignClient
;
@Autowired
RedisUtils
redisUtils
;
@Autowired
...
...
@@ -231,18 +237,26 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
}
}
public
SurveyInfoAllDto
querySurveyInfo
(
String
surveyInformationId
,
AgencyUserModel
userInfo
)
{
public
SurveyInfoAllDto
querySurveyInfo
(
String
surveyInformationId
,
String
peasantHouseholdId
,
String
processInstanceId
,
AgencyUserModel
userInfo
)
{
SurveyInfoAllDto
surveyInfoAllDto
=
new
SurveyInfoAllDto
();
PeasantHousehold
peasantHousehold
=
new
PeasantHousehold
();
if
(!
StringUtils
.
isEmpty
(
peasantHouseholdId
)){
LambdaQueryWrapper
<
PeasantHousehold
>
peasantHouseholdWrapper
=
new
LambdaQueryWrapper
<>();
peasantHouseholdWrapper
.
eq
(
PeasantHousehold:
:
getSequenceNbr
,
peasantHouseholdId
);
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdWrapper
);
surveyInformationId
=
String
.
valueOf
(
peasantHousehold
.
getSurveyInformationId
());
}
else
{
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdQueryWrapper
);
}
//勘察基本信息
LambdaQueryWrapper
<
SurveyInformation
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SurveyInformation:
:
getSequenceNbr
,
surveyInformationId
);
SurveyInformation
surveyInformation
=
this
.
baseMapper
.
selectOne
(
queryWrapper
);
surveyInfoAllDto
.
setSurveyInformation
(
BeanDtoUtils
.
convert
(
surveyInformation
,
SurveyInformationDto
.
class
));
QueryWrapper
<
PeasantHousehold
>
peasantHouseholdQueryWrapper
=
new
QueryWrapper
<>();
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdQueryWrapper
);
//农户信息
BeanUtils
.
copyProperties
(
peasantHousehold
,
surveyInfoAllDto
.
getSurveyInformation
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperName
(
userInfo
.
getCompanys
().
get
(
0
).
getCompanyName
());
surveyInfoAllDto
.
getSurveyInformation
().
setDeveloperCode
(
userInfo
.
getCompanys
().
get
(
0
).
getOrgCode
());
...
...
@@ -261,6 +275,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
surveyInfoAllDto
.
getSurveyInformation
().
setIsPermanent
(
"1"
);
}
surveyInfoAllDto
.
getSurveyInformation
().
setSequenceNbr
(
surveyInformation
.
getSequenceNbr
());
surveyInfoAllDto
.
getSurveyInformation
().
setCreatorTime
(
new
Date
());
QueryWrapper
<
SurveyDetails
>
surveyDetailsQueryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -307,13 +322,25 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
}
QueryWrapper
<
DesignInformation
>
designInformationQueryWrapper
=
new
QueryWrapper
<>();
designInformationQueryWrapper
.
eq
(
"
survey_information_id"
,
surveyInformationId
);
designInformationQueryWrapper
.
eq
(
"
peasant_household_id"
,
peasantHousehold
.
getSequenceNbr
()
);
DesignInformation
designInformation
=
designInformationService
.
getBaseMapper
().
selectOne
(
designInformationQueryWrapper
);
if
(
designInformation
==
null
){
surveyInfoAllDto
.
setDesignInformation
(
new
DesignInformationDto
());
}
else
{
surveyInfoAllDto
.
setDesignInformation
(
BeanDtoUtils
.
convert
(
designInformation
,
DesignInformationDto
.
class
));
}
if
(!
StringUtils
.
isEmpty
(
processInstanceId
)){
Map
<
String
,
Object
>
flowLoggerMap
=
workflowFeignClient
.
getFlowLogger
(
processInstanceId
).
getResult
();
List
<
LinkedHashMap
>
flowLogger
=
(
List
<
LinkedHashMap
>)
flowLoggerMap
.
get
(
"flowLogger"
);
flowLogger
=
flowLogger
.
stream
().
map
(
i
->
{
i
.
put
(
"approvalStatue"
,
i
.
get
(
"approvalStatue"
).
toString
());
return
i
;
}).
collect
(
Collectors
.
toList
());
LoggerDto
loggerDto
=
new
LoggerDto
();
loggerDto
.
setLogger
(
flowLogger
);
surveyInfoAllDto
.
setOrderTracking
(
loggerDto
);
}
return
surveyInfoAllDto
;
}
...
...
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