Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
db272c6e
Commit
db272c6e
authored
Aug 26, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
并网优化
parent
93ebdd09
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
293 additions
and
36 deletions
+293
-36
GridStatusEnum.java
...eejoin/amos/boot/module/hygf/api/Enum/GridStatusEnum.java
+6
-6
AcceptanceCheckAuditingDto.java
.../boot/module/hygf/api/dto/AcceptanceCheckAuditingDto.java
+1
-1
AcceptanceCheckDto.java
...oin/amos/boot/module/hygf/api/dto/AcceptanceCheckDto.java
+2
-2
BasicGridAcceptanceDto.java
...amos/boot/module/hygf/api/dto/BasicGridAcceptanceDto.java
+1
-0
BasicGridRecordDto.java
...oin/amos/boot/module/hygf/api/dto/BasicGridRecordDto.java
+23
-1
AcceptanceCheck.java
...oin/amos/boot/module/hygf/api/entity/AcceptanceCheck.java
+2
-2
AcceptanceCheckAuditing.java
.../boot/module/hygf/api/entity/AcceptanceCheckAuditing.java
+2
-2
BasicGridAcceptanceMapper.java
...oot/module/hygf/api/mapper/BasicGridAcceptanceMapper.java
+2
-1
BasicGridAcceptanceMapper.xml
...main/resources/mapper/mysql/BasicGridAcceptanceMapper.xml
+15
-7
BasicGridAcceptanceController.java
...le/hygf/biz/controller/BasicGridAcceptanceController.java
+56
-4
HygfRectificationOrderController.java
...hygf/biz/controller/HygfRectificationOrderController.java
+131
-1
WorkOrderController.java
.../boot/module/hygf/biz/controller/WorkOrderController.java
+13
-2
AcceptanceCheckServiceImpl.java
...ule/hygf/biz/service/impl/AcceptanceCheckServiceImpl.java
+0
-0
BasicGridAcceptanceServiceImpl.java
...hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
+0
-0
WorkFlowService.java
...os/boot/module/hygf/biz/service/impl/WorkFlowService.java
+30
-0
WorkOrderServiceImpl.java
...ot/module/hygf/biz/service/impl/WorkOrderServiceImpl.java
+7
-7
application.properties
...module-hygf-biz/src/main/resources/application.properties
+2
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/GridStatusEnum.java
View file @
db272c6e
...
...
@@ -17,12 +17,12 @@ public enum GridStatusEnum {
JXSGLYDSH
(
"经销商管理员待审核"
,
"2"
),
YWC
(
"已完成"
,
"3"
),
WTG
(
"未通过"
,
"4"
),
ZGDSH
(
"整改
待审核"
,
"5"
),
PQYYDSH
(
"片区运营
待审核"
,
"6"
),
GCDSH
(
"工程
待审核"
,
"7"
),
SJDSH
(
"设计
待审核"
,
"8"
),
DZG
(
"待整改
"
,
"9"
),
ROLESDSH
(
"设计待审核/工程待审核
"
,
"10"
);
SJDSH
(
"设计
待审核"
,
"5"
),
ROLESDSH
(
"设计待审核/工程
待审核"
,
"6"
),
PQYYDSH
(
"片区运营
待审核"
,
"7"
),
GCDSH
(
"工程
待审核"
,
"8"
),
ZGDSH
(
"整改待审核
"
,
"9"
),
DZG
(
"待整改
"
,
"10"
);
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/AcceptanceCheckAuditingDto.java
View file @
db272c6e
...
...
@@ -49,7 +49,7 @@ public class AcceptanceCheckAuditingDto extends BaseDto {
private
String
status
;
@ApiModelProperty
(
value
=
"验收id"
)
private
Long
acceptance
check
Id
;
private
Long
peasantHousehold
Id
;
@ApiModelProperty
(
value
=
" 待执行节点小程序路由"
)
private
String
nodeRouting
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/AcceptanceCheckDto.java
View file @
db272c6e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
...
@@ -31,7 +32,7 @@ public class AcceptanceCheckDto extends BaseDto {
private
Long
peasantHouseholdId
;
@ApiModelProperty
(
value
=
"验收状态"
)
private
String
acceptance
c
heckStatus
;
private
String
acceptance
C
heckStatus
;
@ApiModelProperty
(
value
=
"节点标识"
)
private
String
basicGridNode
;
...
...
@@ -46,7 +47,6 @@ public class AcceptanceCheckDto extends BaseDto {
private
String
powerStationEngineeringStatus
;
@ApiModelProperty
(
value
=
"实例id"
)
@TableField
(
"instance_Id"
)
private
String
instanceId
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/BasicGridAcceptanceDto.java
View file @
db272c6e
...
...
@@ -73,4 +73,5 @@ public class BasicGridAcceptanceDto extends BaseDto {
//并网登记id
private
Long
fonGridId
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/BasicGridRecordDto.java
View file @
db272c6e
...
...
@@ -46,7 +46,29 @@ public class BasicGridRecordDto extends BaseDto {
private
String
powerStationEngineeringStatus
;
@ApiModelProperty
(
value
=
"实例id"
)
@TableField
(
"instance_Id"
)
private
String
instanceId
;
@ApiModelProperty
(
value
=
"当前存在的整改单类型"
)
private
String
rectificationStatus
;
//电站编号
private
String
peasantHouseholdNo
;
//户主姓名
private
String
ownersName
;
///项目地址
private
String
projectAddressName
;
//并网日期
private
Date
gridConnectionTime
;
private
String
regionalCompaniesName
;
private
String
serviceAgent
;
//并网登记id
private
Long
fonGridId
;
private
String
isAudit
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/AcceptanceCheck.java
View file @
db272c6e
...
...
@@ -43,8 +43,8 @@ public class AcceptanceCheck extends BaseEntity {
/**
* 验收状态
*/
@TableField
(
"acceptance
check_status"
)
private
String
acceptance
c
heckStatus
;
@TableField
(
"acceptance
_
check_status"
)
private
String
acceptance
C
heckStatus
;
/**
* 节点标识
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/AcceptanceCheckAuditing.java
View file @
db272c6e
...
...
@@ -79,8 +79,8 @@ public class AcceptanceCheckAuditing extends BaseEntity {
/**
* 验收id
*/
@TableField
(
"
acceptance check
_id"
)
private
Long
acceptance
check
Id
;
@TableField
(
"
peasant_household
_id"
)
private
Long
peasantHousehold
Id
;
/**
* 待执行节点小程序路由
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/BasicGridAcceptanceMapper.java
View file @
db272c6e
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.BasicGridAcceptanceDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.BasicGridRecordDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.BasicGridAcceptance
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -21,5 +22,5 @@ public interface BasicGridAcceptanceMapper extends BaseMapper<BasicGridAcceptanc
PeasantHousehold
getStationInfoById
(
@Param
(
"id"
)
Long
id
);
@UserEmpower
(
field
={
"hph.regional_companies_code"
}
,
dealerField
={
"hph.developer_code"
,
"hph.regional_companies_code"
,
"hph.developer_user_id"
},
fieldConditions
={
"in"
,
"in"
,
"in"
}
,
relationship
=
"and"
)
List
<
BasicGrid
Acceptance
Dto
>
selectPageList
(
@Param
(
"map"
)
Map
<
String
,
Object
>
map
);
List
<
BasicGrid
Record
Dto
>
selectPageList
(
@Param
(
"map"
)
Map
<
String
,
Object
>
map
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/BasicGridAcceptanceMapper.xml
View file @
db272c6e
...
...
@@ -12,7 +12,7 @@
hogaa.peasant_household_id = #{id}
</select>
<select
id=
"selectPageList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.BasicGrid
Acceptance
Dto"
>
<select
id=
"selectPageList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.BasicGrid
Record
Dto"
>
SELECT
hogaa.sequence_nbr fonGridId,
...
...
@@ -20,10 +20,12 @@
hbga.work_order_id workOrderId,
hbga.work_order_power_station_id workOrderPowerStationId,
hbga.peasant_household_id peasantHouseholdId,
hbga.acceptance_rec_date acceptanceRecDate,
hbga.basic_grid_node basicGridNode,
hbga.power_station_area_status powerStationAreaStatus,
hbga.power_station_design_status powerStationDesignStatus,
hbga.rectification_status rectificationStatus,
hbga.power_station_engineering_status powerStationEngineeringStatus,
hbga.instance_id instanceId,
hbga.next_executor_ids nextExecutorIds,
hbga.next_node_key nextNodeKey,
hph.developer_name as serviceAgent,
hph.regional_companies_name AS regionalCompaniesName,
hph.owners_name AS ownersName,
...
...
@@ -31,11 +33,17 @@
hph.project_address_name projectAddressName,
DATE_FORMAT(hogaa.grid_connection_time, '%Y-%m-%d %H:%i:%S') AS gridConnectionTime,
CASE WHEN hbga.grid_status = '1' THEN '待登记'
WHEN hbga.grid_status = '2' THEN '待审核'
WHEN hbga.grid_status = '2' THEN '
经销商管理员
待审核'
WHEN hbga.grid_status = '3' THEN '已完成'
ELSE '未通过' END AS gridStatus
WHEN hbga.grid_status = '4' THEN '未通过'
WHEN hbga.grid_status = '5' THEN '设计待审核'
WHEN hbga.grid_status = '6' THEN '设计待审核/工程待审核'
WHEN hbga.grid_status = '7' THEN '片区运营待审核'
WHEN hbga.grid_status = '8' THEN '工程待审核'
WHEN hbga.grid_status = '9' THEN '整改待审核'
ELSE '待整改' END AS gridStatus
FROM
hygf_basic_grid_
acceptance
hbga
hygf_basic_grid_
record
hbga
LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id
LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_id
LEFT JOIN hygf_work_order ON hygf_work_order.sequence_nbr = hbga.work_order_id
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/BasicGridAcceptanceController.java
View file @
db272c6e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.BasicGridAcceptanceDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.BasicGridRecordDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.AcceptanceCheckItem
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HygfOnGrid
;
...
...
@@ -16,12 +18,15 @@ import com.yeejoin.amos.boot.module.hygf.biz.service.impl.WorkflowImpl;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -48,6 +53,15 @@ public class BasicGridAcceptanceController extends BaseController {
@Autowired
WorkflowImpl
workflow
;
@Value
(
"${admin.engineering.roleId}"
)
Long
engineeringId
;
@Value
(
"${admin.area.roleId}"
)
Long
areaId
;
@Value
(
"${admin.design.roleId}"
)
Long
designId
;
@Value
(
"${admin.delerAdmin.roleId}"
)
Long
delerAdminId
;
/**
* 新增保存
*
...
...
@@ -125,7 +139,7 @@ public class BasicGridAcceptanceController extends BaseController {
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
@UserLimits
public
ResponseModel
<
Page
<
BasicGrid
Acceptance
Dto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
public
ResponseModel
<
Page
<
BasicGrid
Record
Dto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
,
value
=
"projectAddress"
)
String
projectAddress
,
@RequestParam
(
required
=
false
,
value
=
"powerStationCode"
)
String
powerStationCode
,
...
...
@@ -134,7 +148,36 @@ public class BasicGridAcceptanceController extends BaseController {
@RequestParam
(
required
=
false
,
value
=
"gridConnectionTime"
)
String
gridConnectionTime
)
throws
Exception
{
//当前登录人所属场站
// UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId());
Page
<
BasicGridAcceptanceDto
>
page
=
basicGridAcceptanceServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
gridStatus
,
gridConnectionTime
,
""
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
List
<
String
>
basicGridNodes
=
new
ArrayList
<>();
for
(
Long
aLong
:
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
keySet
())
{
List
<
Long
>
longs
=
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
get
(
aLong
);
if
(
longs
.
contains
(
areaId
))
{
basicGridNodes
.
add
(
"bw-area"
);
}
if
(
longs
.
contains
(
engineeringId
))
{
basicGridNodes
.
add
(
"bw-engineering"
);
}
if
(
longs
.
contains
(
designId
))
{
basicGridNodes
.
add
(
"bw-design"
);
}
}
Page
<
BasicGridRecordDto
>
page
=
basicGridAcceptanceServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
gridStatus
,
gridConnectionTime
,
""
);
//根据角色及当前节点判断是否有操作权限
if
(
basicGridNodes
!=
null
){
for
(
BasicGridRecordDto
e
:
page
.
getRecords
())
{
for
(
String
g
:
basicGridNodes
)
{
if
(
null
!=
e
.
getBasicGridNode
()
&&
e
.
getBasicGridNode
().
contains
(
g
)){
e
.
setIsAudit
(
"0"
);
break
;
}
else
{
e
.
setIsAudit
(
"1"
);
}
}
}
}
return
ResponseHelper
.
buildResponse
(
page
);
}
...
...
@@ -149,7 +192,7 @@ public class BasicGridAcceptanceController extends BaseController {
@GetMapping
(
value
=
"/check/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
@UserLimits
public
ResponseModel
<
Page
<
BasicGrid
Acceptance
Dto
>>
queryForCheckPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
public
ResponseModel
<
Page
<
BasicGrid
Record
Dto
>>
queryForCheckPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
,
value
=
"projectAddress"
)
String
projectAddress
,
@RequestParam
(
required
=
false
,
value
=
"powerStationCode"
)
String
powerStationCode
,
...
...
@@ -158,7 +201,7 @@ public class BasicGridAcceptanceController extends BaseController {
@RequestParam
(
required
=
false
,
value
=
"gridConnectionTime"
)
String
gridConnectionTime
)
throws
Exception
{
//当前登录人所属场站
Page
<
BasicGrid
Acceptance
Dto
>
page
=
basicGridAcceptanceServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
gridStatus
,
gridConnectionTime
,
"check"
);
Page
<
BasicGrid
Record
Dto
>
page
=
basicGridAcceptanceServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
gridStatus
,
gridConnectionTime
,
"check"
);
return
ResponseHelper
.
buildResponse
(
page
);
}
...
...
@@ -193,6 +236,14 @@ public class BasicGridAcceptanceController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"完工自审-经销商管理"
,
notes
=
"完工自审经销商管理"
)
@PostMapping
(
value
=
"/completeAdminAudit"
)
public
ResponseModel
completeAdminAudit
(
@RequestBody
Map
<
String
,
String
>
kv
)
{
basicGridAcceptanceServiceImpl
.
completeAdminAudit
(
kv
);
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"完工自审管理审核"
,
notes
=
"完工自审管理审核"
)
@PostMapping
(
value
=
"/completeAudit"
)
public
ResponseModel
completeAudit
(
@RequestBody
Map
<
String
,
String
>
kv
)
{
...
...
@@ -221,6 +272,7 @@ public class BasicGridAcceptanceController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"整改单审核"
,
notes
=
"整改单审核"
)
@PostMapping
(
value
=
"/nextTaskAduit"
)
@Transactional
public
ResponseModel
nextTaskAduit
(
@RequestBody
HygfRectificationOrder
hygfReplenishment
)
{
basicGridAcceptanceServiceImpl
.
nextTaskAduit
(
hygfReplenishment
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HygfRectificationOrderController.java
View file @
db272c6e
...
...
@@ -46,6 +46,10 @@ public class HygfRectificationOrderController extends BaseController {
Long
designId
;
@Value
(
"${admin.deveEngineering.roleId}"
)
Long
deveEngineeringId
;
@Value
(
"${admin.delerAdmin.roleId}"
)
Long
delerAdminId
;
@Value
(
"${admin.delerKaId.roleId}"
)
Long
delerKfId
;
/**
* 新增审核单
*
...
...
@@ -127,6 +131,11 @@ public class HygfRectificationOrderController extends BaseController {
if
(
longs
.
contains
(
designId
)
)
{
workOrderPowerStationNodes
.
add
(
"design"
);
}
if
(
longs
.
contains
(
delerAdminId
)
)
{
workOrderPowerStationNodes
.
add
(
"design"
);
workOrderPowerStationNodes
.
add
(
"engineering"
);
workOrderPowerStationNodes
.
add
(
"area"
);
}
}
Page
<
HygfRectificationOrder
>
page
=
hygfRectificationOrderServiceImpl
.
queryForHygfRectificationOrderPage
(
current
,
size
,
workOrderPowerStationNodes
,
peasantHouseholeId
);
...
...
@@ -139,7 +148,128 @@ public class HygfRectificationOrderController extends BaseController {
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
designId
)
&&
e
.
getRectificationSource
().
equals
(
"design"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
engineeringId
)){
}
else
if
(
longs
.
contains
(
deveEngineeringId
)){
e
.
setIsAudit
(
"0"
);
}
else
{
e
.
setIsAudit
(
"1"
);
}
});
}
return
ResponseHelper
.
buildResponse
(
page
);
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/bwpage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"审核单分页查询 并网"
,
notes
=
"审核单分页查询 并网"
)
public
ResponseModel
<
Page
<
HygfRectificationOrder
>>
queryForPageBybw
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"rectificationSource"
,
required
=
false
)
String
rectificationSource
,
@RequestParam
(
value
=
"peasantHouseholeId"
)
String
peasantHouseholeId
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
List
<
String
>
workOrderPowerStationNodes
=
new
ArrayList
<>();
// workOrderPowerStationNodes.add(rectificationSource);
for
(
Long
aLong
:
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
keySet
())
{
List
<
Long
>
longs
=
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
get
(
aLong
);
if
(
longs
.
contains
(
areaId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-area"
);
}
if
(
longs
.
contains
(
engineeringId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-engineering"
);
}
if
(
longs
.
contains
(
designId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-design"
);
}
if
(
longs
.
contains
(
delerAdminId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-design"
);
workOrderPowerStationNodes
.
add
(
"bw-engineering"
);
workOrderPowerStationNodes
.
add
(
"bw-area"
);
}
if
(
longs
.
contains
(
delerKfId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-design"
);
workOrderPowerStationNodes
.
add
(
"bw-engineering"
);
workOrderPowerStationNodes
.
add
(
"bw-area"
);
}
}
Page
<
HygfRectificationOrder
>
page
=
hygfRectificationOrderServiceImpl
.
queryForHygfRectificationOrderPage
(
current
,
size
,
workOrderPowerStationNodes
,
peasantHouseholeId
);
for
(
Long
aLong
:
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
keySet
())
{
List
<
Long
>
longs
=
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
get
(
aLong
);
page
.
getRecords
().
forEach
(
e
->{
if
(
longs
.
contains
(
areaId
)
&&
e
.
getRectificationSource
().
equals
(
"bw-area"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
engineeringId
)
&&
e
.
getRectificationSource
().
equals
(
"bw-engineering"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
designId
)
&&
e
.
getRectificationSource
().
equals
(
"bw-design"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
delerKfId
)){
e
.
setIsAudit
(
"0"
);
}
else
{
e
.
setIsAudit
(
"1"
);
}
});
}
return
ResponseHelper
.
buildResponse
(
page
);
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/yspage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"审核单分页查询 验收"
,
notes
=
"审核单分页查询 验收"
)
public
ResponseModel
<
Page
<
HygfRectificationOrder
>>
queryForPageByYs
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"rectificationSource"
,
required
=
false
)
String
rectificationSource
,
@RequestParam
(
value
=
"peasantHouseholeId"
)
String
peasantHouseholeId
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
List
<
String
>
workOrderPowerStationNodes
=
new
ArrayList
<>();
// workOrderPowerStationNodes.add(rectificationSource);
for
(
Long
aLong
:
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
keySet
())
{
List
<
Long
>
longs
=
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
get
(
aLong
);
if
(
longs
.
contains
(
areaId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-area"
);
}
if
(
longs
.
contains
(
engineeringId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-engineering"
);
}
if
(
longs
.
contains
(
designId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-design"
);
}
if
(
longs
.
contains
(
delerAdminId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-design"
);
workOrderPowerStationNodes
.
add
(
"bw-engineering"
);
workOrderPowerStationNodes
.
add
(
"bw-area"
);
}
if
(
longs
.
contains
(
delerKfId
)
)
{
workOrderPowerStationNodes
.
add
(
"bw-design"
);
workOrderPowerStationNodes
.
add
(
"bw-engineering"
);
workOrderPowerStationNodes
.
add
(
"bw-area"
);
}
}
Page
<
HygfRectificationOrder
>
page
=
hygfRectificationOrderServiceImpl
.
queryForHygfRectificationOrderPage
(
current
,
size
,
workOrderPowerStationNodes
,
peasantHouseholeId
);
for
(
Long
aLong
:
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
keySet
())
{
List
<
Long
>
longs
=
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
get
(
aLong
);
page
.
getRecords
().
forEach
(
e
->{
if
(
longs
.
contains
(
areaId
)
&&
e
.
getRectificationSource
().
equals
(
"bw-area"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
engineeringId
)
&&
e
.
getRectificationSource
().
equals
(
"bw-engineering"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
designId
)
&&
e
.
getRectificationSource
().
equals
(
"bw-design"
)){
e
.
setIsAudit
(
"0"
);
}
else
if
(
longs
.
contains
(
delerKfId
)){
e
.
setIsAudit
(
"0"
);
}
else
{
e
.
setIsAudit
(
"1"
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/WorkOrderController.java
View file @
db272c6e
...
...
@@ -58,6 +58,8 @@ public class WorkOrderController extends BaseController {
Long
areaId
;
@Value
(
"${admin.design.roleId}"
)
Long
designId
;
@Value
(
"${admin.delerAdmin.roleId}"
)
Long
delerAdminId
;
/**
* 新增施工派工工单
*
...
...
@@ -195,8 +197,11 @@ public class WorkOrderController extends BaseController {
// workOrder.setAmosDealerId(userUnitInformationDto.getAmosDealerId());
ReginParams
reginParams
=
getSelectedOrgInfo
();
List
<
String
>
workOrderPowerStationNodes
=
new
ArrayList
<>();
List
<
Long
>
roleIds
=
new
ArrayList
<>();
for
(
Long
aLong
:
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
keySet
())
{
List
<
Long
>
longs
=
reginParams
.
getUserModel
().
getOrgRoleSeqs
().
get
(
aLong
);
roleIds
.
addAll
(
roleIds
);
if
(
longs
.
contains
(
areaId
))
{
workOrderPowerStationNodes
.
add
(
"area"
);
}
...
...
@@ -206,6 +211,11 @@ public class WorkOrderController extends BaseController {
if
(
longs
.
contains
(
designId
))
{
workOrderPowerStationNodes
.
add
(
"design"
);
}
if
(
longs
.
contains
(
delerAdminId
))
{
workOrderPowerStationNodes
.
add
(
"design"
);
workOrderPowerStationNodes
.
add
(
"engineering"
);
workOrderPowerStationNodes
.
add
(
"area"
);
}
}
if
(
workOrder
.
getType
().
equals
(
"3"
)
&&
workOrderPowerStationNodes
!=
null
){
workOrder
.
setWorkOrderPowerStationNodes
(
workOrderPowerStationNodes
);
...
...
@@ -213,9 +223,10 @@ public class WorkOrderController extends BaseController {
Page
<
WorkOrderPage
>
workOrderPagePage
=
workOrderServiceImpl
.
queryForwgpage
(
workOrder
.
getCurrent
(),
workOrder
.
getSize
(),
workOrder
);
if
(
workOrder
.
getType
().
equals
(
"3"
)
&&
workOrderPowerStationNodes
!=
null
){
workOrderPagePage
.
getRecords
().
forEach
(
e
->{
if
(
workOrderPowerStationNodes
.
contains
(
e
.
getWorkOrderPowerStationNode
())){
if
(
workOrderPowerStationNodes
.
contains
(
e
.
getWorkOrderPowerStationNode
())
&&
(
roleIds
.
contains
(
areaId
)
||
roleIds
.
contains
(
designId
)
||
roleIds
.
contains
(
engineeringId
))
){
e
.
setIsAudit
(
"0"
);
}
else
{
}
else
{
e
.
setIsAudit
(
"1"
);
}
});
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/AcceptanceCheckServiceImpl.java
View file @
db272c6e
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
View file @
db272c6e
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/WorkFlowService.java
View file @
db272c6e
...
...
@@ -112,4 +112,34 @@ public class WorkFlowService {
});
return
workflowResultDtoList
;
}
public
List
<
WorkflowResultDto
>
buildWorkFlowInfos
(
List
<
ProcessTaskDTO
>
processTaskDTOS
)
{
List
<
WorkflowResultDto
>
workflowResultDtoList
=
new
ArrayList
<>();
processTaskDTOS
.
forEach
(
item
->
{
if
(
null
!=
item
.
getProcessInstance
()){
}
// workflowResultDto.setNextExecutorIds(String.join(",", item.getCandidateGroups()));
if
(!
CollectionUtils
.
isEmpty
(
item
.
getNextTask
()))
{
item
.
getNextTask
().
forEach
(
actTaskDTO
->{
WorkflowResultDto
workflowResultDto
=
new
WorkflowResultDto
();
workflowResultDto
.
setInstanceId
(
actTaskDTO
.
getProcessInstanceId
());
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/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/WorkOrderServiceImpl.java
View file @
db272c6e
...
...
@@ -107,9 +107,9 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
@Autowired
ConstructionRecordsMapper
constructionRecordsMapper
;
@Autowired
BasicGrid
AcceptanceMapper
basicGridAcceptance
Mapper
;
BasicGrid
RecordMapper
basicGridRecord
Mapper
;
@Autowired
BasicGrid
AcceptanceServiceImpl
basicGridAcceptance
Service
;
BasicGrid
RecordServiceImpl
basicGridRecord
Service
;
@Autowired
WorkflowFeignClient
workflowFeignClient
;
...
...
@@ -864,9 +864,9 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
data
.
setConstructionRecordsList
(
li
);
surveyInfoAllDto
.
setConstructionRecords
(
data
);
LambdaQueryWrapper
<
BasicGrid
Acceptance
>
quv
=
new
LambdaQueryWrapper
();
quv
.
eq
(
BasicGrid
Acceptance
:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
BasicGrid
Acceptance
basicGridAcceptance
=
basicGridAcceptance
Mapper
.
selectOne
(
quv
);
LambdaQueryWrapper
<
BasicGrid
Record
>
quv
=
new
LambdaQueryWrapper
();
quv
.
eq
(
BasicGrid
Record
:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
BasicGrid
Record
basicGridAcceptance
=
basicGridRecord
Mapper
.
selectOne
(
quv
);
// 审核意见
if
(
Objects
.
nonNull
(
basicGridAcceptance
)
&&
!
StringUtils
.
isEmpty
(
basicGridAcceptance
.
getInstanceId
()))
{
...
...
@@ -1218,7 +1218,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
upq1
.
set
(
PowerStationEngineeringInfo:
:
getCompletionDate
,
new
Date
());
powerStationEngineeringInfoMapper
.
update
(
null
,
upq1
);
BasicGrid
Acceptance
dat
=
new
BasicGridAcceptance
();
BasicGrid
Record
dat
=
new
BasicGridRecord
();
dat
.
setWorkOrderId
(
workOrderPowerStation
.
getWorkOrderId
());
dat
.
setWorkOrderPowerStationId
(
workOrderPowerStation
.
getSequenceNbr
());
dat
.
setPeasantHouseholdId
(
workOrderPowerStation
.
getPeasantHouseholdId
());
...
...
@@ -1232,7 +1232,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
// if (b == null) {
// basicGridAcceptanceMapper.insert(dat);
// }
basicGrid
AcceptanceService
.
saveOrUpdate
(
dat
,
new
LambdaQueryWrapper
<
BasicGridAcceptance
>().
eq
(
BasicGridAcceptance
:
:
getPeasantHouseholdId
,
workOrderPowerStation
.
getPeasantHouseholdId
()));
basicGrid
RecordService
.
saveOrUpdate
(
dat
,
new
LambdaQueryWrapper
<
BasicGridRecord
>().
eq
(
BasicGridRecord
:
:
getPeasantHouseholdId
,
workOrderPowerStation
.
getPeasantHouseholdId
()));
// 修改派工单状态
LambdaQueryWrapper
<
WorkOrderPowerStation
>
qu1
=
new
LambdaQueryWrapper
();
qu1
.
eq
(
WorkOrderPowerStation:
:
getWorkOrderId
,
workOrderPowerStation
.
getWorkOrderId
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application.properties
View file @
db272c6e
...
...
@@ -76,6 +76,8 @@ admin.engineering.roleId=1702512052154687489
admin.area.roleId
=
1822904567478620161
admin.design.roleId
=
1702511991735738370
admin.deveEngineering.roleId
=
1702550832882413570
admin.delerAdmin.roleId
=
1702512164058718210
admin.delerKaId.roleId
=
1702551022574006274
...
...
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