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
4fdb1e06
Commit
4fdb1e06
authored
Sep 12, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer_bw' into developer_bw
parents
1a9ef097
4e395bfe
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
493 additions
and
469 deletions
+493
-469
PeasantHousehold.java
...in/amos/boot/module/hygf/api/entity/PeasantHousehold.java
+3
-0
PeasantHouseholdMapper.java
...s/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
+1
-1
PeasantHouseholdMapper.xml
...rc/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
+5
-1
WorkOrderMapper.xml
...f-api/src/main/resources/mapper/mysql/WorkOrderMapper.xml
+2
-2
AcceptanceCheckController.java
...module/hygf/biz/controller/AcceptanceCheckController.java
+5
-4
BasicGridAcceptanceController.java
...le/hygf/biz/controller/BasicGridAcceptanceController.java
+108
-118
PeasantHouseholdController.java
...odule/hygf/biz/controller/PeasantHouseholdController.java
+3
-2
AcceptanceCheckServiceImpl.java
...ule/hygf/biz/service/impl/AcceptanceCheckServiceImpl.java
+2
-1
BasicGridAcceptanceServiceImpl.java
...hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
+362
-338
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+2
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PeasantHousehold.java
View file @
4fdb1e06
...
...
@@ -232,4 +232,7 @@ public class PeasantHousehold extends BaseEntity {
*/
@TableField
(
exist
=
false
)
private
Double
disbursementMoney
;
@TableField
(
exist
=
false
)
private
String
province
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
View file @
4fdb1e06
...
...
@@ -30,7 +30,7 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
);
@UserEmpower
(
field
={},
dealerField
={
"developer_code"
,
"regional_companies_code"
,
"developer_user_id"
}
,
fieldConditions
={
"eq"
,
"in"
,
"eq"
}
,
relationship
=
"and"
)
List
<
PeasantHousehold
>
queryForPage
(
String
developerCode
,
String
ownersName
,
Long
developerId
,
Integer
isCertified
,
String
preparationMoneyState
,
String
peasantHouseholdNo
);
List
<
PeasantHousehold
>
queryForPage
(
String
developerCode
,
String
ownersName
,
Long
developerId
,
Integer
isCertified
,
String
preparationMoneyState
,
String
peasantHouseholdNo
,
String
province
);
List
<
Map
<
String
,
Object
>>
selectUserIsHouse
(
String
telephone
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
View file @
4fdb1e06
...
...
@@ -52,7 +52,8 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
</select>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold"
>
SELECT *
SELECT *,
substring_index ( hygf_peasant_household.project_address_name, '/', 1 ) AS province
FROM hygf_peasant_household
WHERE IS_CERTIFIED = #{isCertified}
<if
test=
"ownersName!=null and ownersName !=''"
>
...
...
@@ -73,6 +74,9 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
<if
test=
"peasantHouseholdNo!=null and peasantHouseholdNo !=''"
>
and peasant_household_no like concat ('%',#{peasantHouseholdNo},'%')
</if>
<if
test=
"province != null and province != ''"
>
and project_address like concat(concat('%',#{province}),'%')
</if>
ORDER BY creation_time DESC
</select>
<select
id=
"selectUserIsHouse"
resultType=
"java.util.Map"
>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/WorkOrderMapper.xml
View file @
4fdb1e06
...
...
@@ -121,8 +121,8 @@
<if
test=
"dto.regionCompanyId!=null and dto.regionCompanyId!=''"
>
and hygf_work_order.region_company_id =#{dto.regionCompanyId}
</if>
<if
test=
"
province != null and
province != ''"
>
and hygf_peasant_household.project_address like concat(concat('%',#{province}),'%')
<if
test=
"
dto.province != null and dto.
province != ''"
>
and hygf_peasant_household.project_address like concat(concat('%',#{
dto.
province}),'%')
</if>
</where>
ORDER BY
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/AcceptanceCheckController.java
View file @
4fdb1e06
...
...
@@ -7,10 +7,10 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.AcceptanceCheck;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HygfRectificationOrder
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.ArrayList
;
...
...
@@ -205,7 +205,8 @@ public class AcceptanceCheckController extends BaseController {
@RequestParam
(
required
=
false
,
value
=
"ownersName"
)
String
ownersName
,
@RequestParam
(
required
=
false
,
value
=
"acceptanceCheckStatus"
)
String
acceptanceCheckStatus
,
@RequestParam
(
required
=
false
,
value
=
"type"
)
String
type
,
@RequestParam
(
required
=
false
,
value
=
"acceptanceTime"
)
String
acceptanceTime
)
throws
Exception
{
@RequestParam
(
required
=
false
,
value
=
"acceptanceTime"
)
String
acceptanceTime
,
@RequestParam
(
required
=
false
,
value
=
"province"
)
String
province
)
throws
Exception
{
//当前登录人所属场站
// UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId());
...
...
@@ -234,7 +235,7 @@ public class AcceptanceCheckController extends BaseController {
basicGridNodes
.
add
(
"ys-zichan"
);
}
}
Page
<
AcceptanceCheckDto
>
page
=
acceptanceCheckServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
acceptanceCheckStatus
,
acceptanceTime
,
""
,
basicGridNodes
,
type
);
Page
<
AcceptanceCheckDto
>
page
=
acceptanceCheckServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
acceptanceCheckStatus
,
acceptanceTime
,
""
,
basicGridNodes
,
type
,
province
);
//根据角色及当前节点判断是否有操作权限
if
(
basicGridNodes
!=
null
){
for
(
AcceptanceCheckDto
e
:
page
.
getRecords
())
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/BasicGridAcceptanceController.java
View file @
4fdb1e06
...
...
@@ -43,14 +43,14 @@ import java.util.*;
@RequestMapping
(
value
=
"/basic-grid-acceptance"
)
public
class
BasicGridAcceptanceController
extends
BaseController
{
@Autowired
BasicGridAcceptanceServiceImpl
basicGridAcceptanceServiceImpl
;
@Autowired
BasicGridAcceptanceServiceImpl
basicGridAcceptanceServiceImpl
;
@Autowired
BasicGridAcceptanceMapper
basicGridAcceptanceMapper
;
@Autowired
HygfOnGridMapper
onGridMapper
;
@Autowired
PersonnelBusinessMapper
personnelBusinessMapper
;
@Autowired
PersonnelBusinessMapper
personnelBusinessMapper
;
@Autowired
WorkflowImpl
workflow
;
...
...
@@ -63,17 +63,17 @@ public class BasicGridAcceptanceController extends BaseController {
@Value
(
"${admin.delerAdmin.roleId}"
)
Long
delerAdminId
;
/**
* 新增保存
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
/**
* 新增保存
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
save
(
@RequestBody
HygfOnGrid
dto
)
{
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
saveEntity
(
dto
));
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
saveEntity
(
dto
));
}
/**
...
...
@@ -85,72 +85,74 @@ public class BasicGridAcceptanceController extends BaseController {
@PostMapping
(
value
=
"/save/commit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@Transactional
public
ResponseModel
saveAndCommit
(
@RequestBody
HygfOnGrid
dto
)
{
public
ResponseModel
saveAndCommit
(
@RequestBody
HygfOnGrid
dto
)
{
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
saveAndCommit
(
dto
,
getSelectedOrgInfo
().
getUserModel
().
getRealName
()));
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
saveAndCommit
(
dto
,
getSelectedOrgInfo
().
getUserModel
().
getRealName
()));
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
updateBySequenceNbrBasicGridAcceptance
(
@RequestBody
HygfOnGrid
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
modifyEntity
(
model
));
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
modifyEntity
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
"sequenceNbrs"
)
Long
[]
sequenceNbrs
)
{
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
deleteForBatch
(
sequenceNbrs
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr
主键
* @return
*/
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
"sequenceNbrs"
)
Long
[]
sequenceNbrs
)
{
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
deleteForBatch
(
sequenceNbrs
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
BasicGridAcceptanceDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
basicGridAcceptanceServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 经销商端列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
* 经销商端列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
@UserLimits
public
ResponseModel
<
Page
<
BasicGridRecordDto
>>
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
,
@RequestParam
(
required
=
false
,
value
=
"ownersName"
)
String
ownersName
,
@RequestParam
(
required
=
false
,
value
=
"gridStatus"
)
String
gridStatus
,
@RequestParam
(
required
=
false
,
value
=
"type"
)
String
type
,
@RequestParam
(
required
=
false
,
value
=
"gridConnectionTime"
)
String
gridConnectionTime
)
throws
Exception
{
//当前登录人所属场站
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
,
value
=
"projectAddress"
)
String
projectAddress
,
@RequestParam
(
required
=
false
,
value
=
"powerStationCode"
)
String
powerStationCode
,
@RequestParam
(
required
=
false
,
value
=
"ownersName"
)
String
ownersName
,
@RequestParam
(
required
=
false
,
value
=
"gridStatus"
)
String
gridStatus
,
@RequestParam
(
required
=
false
,
value
=
"type"
)
String
type
,
@RequestParam
(
required
=
false
,
value
=
"gridConnectionTime"
)
String
gridConnectionTime
,
@RequestParam
(
required
=
false
,
value
=
"province"
)
String
province
)
throws
Exception
{
// 当前登录人所属场站
// UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId());
ReginParams
reginParams
=
getSelectedOrgInfo
();
...
...
@@ -174,22 +176,24 @@ public class BasicGridAcceptanceController extends BaseController {
basicGridNodes
.
add
(
"bw-area"
);
}
}
Page
<
BasicGridRecordDto
>
page
=
basicGridAcceptanceServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
gridStatus
,
gridConnectionTime
,
""
,
basicGridNodes
,
type
);
//根据角色及当前节点判断是否有操作权限
if
(
basicGridNodes
!=
null
){
Page
<
BasicGridRecordDto
>
page
=
basicGridAcceptanceServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
gridStatus
,
gridConnectionTime
,
""
,
basicGridNodes
,
type
,
province
);
// 根据角色及当前节点判断是否有操作权限
if
(
basicGridNodes
!=
null
)
{
for
(
BasicGridRecordDto
e
:
page
.
getRecords
())
{
for
(
String
g
:
basicGridNodes
)
{
if
(
null
!=
e
.
getBasicGridNode
()
&&
e
.
getBasicGridNode
().
contains
(
g
)
&&
(
roleIds
.
contains
(
areaId
)
||
roleIds
.
contains
(
designId
)
||
roleIds
.
contains
(
engineeringId
))){
if
(
null
!=
e
.
getBasicGridNode
()
&&
e
.
getBasicGridNode
().
contains
(
g
)
&&
(
roleIds
.
contains
(
areaId
)
||
roleIds
.
contains
(
designId
)
||
roleIds
.
contains
(
engineeringId
)))
{
e
.
setIsAudit
(
"0"
);
break
;
}
else
{
}
else
{
e
.
setIsAudit
(
"1"
);
}
}
}
}
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
/**
...
...
@@ -201,112 +205,99 @@ public class BasicGridAcceptanceController extends BaseController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/check/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
@UserLimits
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
@UserLimits
public
ResponseModel
<
Page
<
BasicGridRecordDto
>>
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
,
@RequestParam
(
required
=
false
,
value
=
"ownersName"
)
String
ownersName
,
@RequestParam
(
required
=
false
,
value
=
"gridStatus"
)
String
gridStatus
,
@RequestParam
(
required
=
false
,
value
=
"gridConnectionTime"
)
String
gridConnectionTime
)
throws
Exception
{
//当前登录人所属场站
Page
<
BasicGridRecordDto
>
page
=
basicGridAcceptanceServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
gridStatus
,
gridConnectionTime
,
"check"
,
null
,
null
);
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
,
value
=
"projectAddress"
)
String
projectAddress
,
@RequestParam
(
required
=
false
,
value
=
"powerStationCode"
)
String
powerStationCode
,
@RequestParam
(
required
=
false
,
value
=
"ownersName"
)
String
ownersName
,
@RequestParam
(
required
=
false
,
value
=
"gridStatus"
)
String
gridStatus
,
@RequestParam
(
required
=
false
,
value
=
"gridConnectionTime"
)
String
gridConnectionTime
,
@RequestParam
(
required
=
false
,
value
=
"province"
)
String
province
)
throws
Exception
{
// 当前登录人所属场站
Page
<
BasicGridRecordDto
>
page
=
basicGridAcceptanceServiceImpl
.
selectPage
(
null
,
null
,
current
,
size
,
projectAddress
,
powerStationCode
,
ownersName
,
gridStatus
,
gridConnectionTime
,
"check"
,
null
,
null
,
province
);
return
ResponseHelper
.
buildResponse
(
page
);
}
/**
* 列表全部数据查询
*
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
BasicGridAcceptanceDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
Collections
.
emptyList
());
return
ResponseHelper
.
buildResponse
(
Collections
.
emptyList
());
}
// 并网审核
//并网审核
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/execute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行工作流"
,
notes
=
"执行工作流"
)
public
ResponseModel
execute
(
@RequestBody
AcceptanceCheckItem
dto
)
{
basicGridAcceptanceServiceImpl
.
execute
(
dto
,
getUserId
());
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/execute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行工作流"
,
notes
=
"执行工作流"
)
public
ResponseModel
execute
(
@RequestBody
AcceptanceCheckItem
dto
)
{
basicGridAcceptanceServiceImpl
.
execute
(
dto
,
getUserId
());
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"完工自审-经销商管理"
,
notes
=
"完工自审经销商管理"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"完工自审-经销商管理"
,
notes
=
"完工自审经销商管理"
)
@PostMapping
(
value
=
"/completeAdminAudit"
)
@Transactional
public
ResponseModel
completeAdminAudit
(
@RequestBody
Map
<
String
,
String
>
kv
)
{
public
ResponseModel
completeAdminAudit
(
@RequestBody
Map
<
String
,
String
>
kv
)
{
basicGridAcceptanceServiceImpl
.
completeAdminAudit
(
kv
);
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"完工自审管理审核"
,
notes
=
"完工自审管理审核"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"完工自审管理审核"
,
notes
=
"完工自审管理审核"
)
@PostMapping
(
value
=
"/completeAudit"
)
@Transactional
public
ResponseModel
completeAudit
(
@RequestBody
Map
<
String
,
String
>
kv
)
{
return
basicGridAcceptanceServiceImpl
.
completeAudit
(
kv
);
public
ResponseModel
completeAudit
(
@RequestBody
Map
<
String
,
String
>
kv
)
{
return
basicGridAcceptanceServiceImpl
.
completeAudit
(
kv
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"整改单下发"
,
notes
=
"整改单下发"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"整改单下发"
,
notes
=
"整改单下发"
)
@PostMapping
(
value
=
"/addRectification"
)
@Transactional
public
ResponseModel
addRectification
(
@RequestBody
HygfRectificationOrder
hygfReplenishment
)
{
public
ResponseModel
addRectification
(
@RequestBody
HygfRectificationOrder
hygfReplenishment
)
{
return
basicGridAcceptanceServiceImpl
.
addRectification
(
hygfReplenishment
);
return
basicGridAcceptanceServiceImpl
.
addRectification
(
hygfReplenishment
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"整改单添加信息"
,
notes
=
"整改单添加信息"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"整改单添加信息"
,
notes
=
"整改单添加信息"
)
@PostMapping
(
value
=
"/nextTaskExcute"
)
@Transactional
public
ResponseModel
nextTaskExcute
(
@RequestBody
HygfRectificationOrder
hygfReplenishment
)
{
public
ResponseModel
nextTaskExcute
(
@RequestBody
HygfRectificationOrder
hygfReplenishment
)
{
return
basicGridAcceptanceServiceImpl
.
nextTaskExcute
(
hygfReplenishment
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"整改单审核"
,
notes
=
"整改单审核"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"整改单审核"
,
notes
=
"整改单审核"
)
@PostMapping
(
value
=
"/nextTaskAduit"
)
@Transactional
public
ResponseModel
nextTaskAduit
(
@RequestBody
HygfRectificationOrder
hygfReplenishment
)
{
public
ResponseModel
nextTaskAduit
(
@RequestBody
HygfRectificationOrder
hygfReplenishment
)
{
return
basicGridAcceptanceServiceImpl
.
nextTaskAduit
(
hygfReplenishment
);
return
basicGridAcceptanceServiceImpl
.
nextTaskAduit
(
hygfReplenishment
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"整改单作废"
,
notes
=
"整改单作废"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"整改单作废"
,
notes
=
"整改单作废"
)
@PutMapping
(
value
=
"/rollback"
)
@Transactional
public
ResponseModel
rollback
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
rollback
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
basicGridAcceptanceServiceImpl
.
rollback
(
sequenceNbr
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/test1"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行工作流"
,
notes
=
"执行工作流"
)
...
...
@@ -318,10 +309,9 @@ public class BasicGridAcceptanceController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/test2"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行工作流"
,
notes
=
"执行工作流"
)
public
ResponseModel
test
(
String
approvalStatus
,
String
comment
)
{
basicGridAcceptanceServiceImpl
.
zhixing
(
approvalStatus
,
comment
);
public
ResponseModel
test
(
String
approvalStatus
,
String
comment
)
{
basicGridAcceptanceServiceImpl
.
zhixing
(
approvalStatus
,
comment
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PeasantHouseholdController.java
View file @
4fdb1e06
...
...
@@ -210,7 +210,8 @@ public class PeasantHouseholdController extends BaseController {
@RequestParam
(
value
=
"ownersName"
,
required
=
false
)
String
ownersName
,
@RequestParam
(
value
=
"preparationMoneyState"
,
required
=
false
)
String
preparationMoneyState
,
@RequestParam
(
value
=
"developerId"
,
required
=
false
)
Long
developerId
,
@RequestParam
(
value
=
"peasantHouseholdNo"
,
required
=
false
)
String
peasantHouseholdNo
)
{
@RequestParam
(
value
=
"peasantHouseholdNo"
,
required
=
false
)
String
peasantHouseholdNo
,
@RequestParam
(
value
=
"province"
,
required
=
false
)
String
province
)
{
Page
<
PeasantHousehold
>
page
=
new
Page
<
PeasantHousehold
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
...
...
@@ -223,7 +224,7 @@ public class PeasantHouseholdController extends BaseController {
// String orgCode = userUnitInformationDto.getAmosDealerOrgCode();
Integer
isCertified
=
PeasantHouseholdEnum
.
已认证
.
getCode
();
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
queryForPeasantHouseholdPage
(
page
,
null
,
ownersName
,
developerId
,
isCertified
,
preparationMoneyState
,
peasantHouseholdNo
));
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
queryForPeasantHouseholdPage
(
page
,
null
,
ownersName
,
developerId
,
isCertified
,
preparationMoneyState
,
peasantHouseholdNo
,
province
));
}
/**
...
...
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 @
4fdb1e06
...
...
@@ -73,7 +73,7 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
public
Page
<
AcceptanceCheckDto
>
selectPage
(
Long
regionCompanyId
,
Long
amosDealerId
,
int
current
,
int
size
,
String
projectAddress
,
String
powerStationCode
,
String
ownersName
,
String
acceptanceCheckStatus
,
String
gridConnectionTime
,
String
formType
,
List
<
String
>
basicGridNodes
,
String
type
)
throws
Exception
{
String
gridConnectionTime
,
String
formType
,
List
<
String
>
basicGridNodes
,
String
type
,
String
province
)
throws
Exception
{
PageHelper
.
startPage
(
current
,
size
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Date
date
=
null
;
...
...
@@ -90,6 +90,7 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
map
.
put
(
"amosDealerId"
,
amosDealerId
);
map
.
put
(
"basicGridNodes"
,
basicGridNodes
);
map
.
put
(
"type"
,
type
);
map
.
put
(
"province"
,
province
);
List
<
AcceptanceCheckDto
>
list
=
acceptanceCheckMapper
.
selectPageList
(
map
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
...
...
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 @
4fdb1e06
...
...
@@ -68,7 +68,7 @@ public class BasicGridAcceptanceServiceImpl
RegionalCompaniesMapper
regionalCompaniesMapper
;
@Autowired
WorkOrderMapper
workOrderMapper
;
@Resource
(
type
=
RedisLockUtil
.
class
)
@Resource
(
type
=
RedisLockUtil
.
class
)
private
RedisLockUtil
redisLockUtil
;
@Autowired
PeasantHouseholdMapper
peasantHouseholdMapper
;
...
...
@@ -93,8 +93,9 @@ public class BasicGridAcceptanceServiceImpl
private
final
String
PASS
=
"5"
;
public
Page
<
BasicGridRecordDto
>
selectPage
(
Long
regionCompanyId
,
Long
amosDealerId
,
int
current
,
int
size
,
String
projectAddress
,
String
powerStationCode
,
String
ownersName
,
String
gridStatus
,
String
gridConnectionTime
,
String
formType
,
List
<
String
>
basicGridNodes
,
String
type
)
throws
Exception
{
String
projectAddress
,
String
powerStationCode
,
String
ownersName
,
String
gridStatus
,
String
gridConnectionTime
,
String
formType
,
List
<
String
>
basicGridNodes
,
String
type
,
String
province
)
throws
Exception
{
PageHelper
.
startPage
(
current
,
size
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Date
date
=
null
;
...
...
@@ -109,8 +110,9 @@ public class BasicGridAcceptanceServiceImpl
map
.
put
(
"formType"
,
formType
);
map
.
put
(
"regionCompanyId"
,
regionCompanyId
);
map
.
put
(
"amosDealerId"
,
amosDealerId
);
map
.
put
(
"basicGridNodes"
,
basicGridNodes
);
map
.
put
(
"type"
,
type
);
map
.
put
(
"basicGridNodes"
,
basicGridNodes
);
map
.
put
(
"type"
,
type
);
map
.
put
(
"province"
,
province
);
List
<
BasicGridRecordDto
>
list
=
basicGridAcceptanceMapper
.
selectPageList
(
map
);
PageInfo
<
BasicGridRecordDto
>
page
=
new
PageInfo
(
list
);
Page
<
BasicGridRecordDto
>
pageNew
=
new
Page
<>();
...
...
@@ -118,11 +120,12 @@ public class BasicGridAcceptanceServiceImpl
pageNew
.
setTotal
(
page
.
getTotal
());
pageNew
.
setSize
(
size
);
if
(
page
.
getList
()
!=
null
&&
page
.
getList
().
size
()
>
0
)
{
if
(
page
.
getList
()
!=
null
&&
page
.
getList
().
size
()
>
0
)
{
page
.
getList
().
forEach
(
e
->
{
if
(
e
.
getPeasantHouseholdNo
()
!=
null
)
{
if
(
e
.
getPeasantHouseholdNo
()
!=
null
)
{
e
.
setScale
(
householdContractMapper
.
getHygfCommercialScale
(
e
.
getPeasantHouseholdNo
()));
e
.
setRealScale
(
powerStationEngineeringInfoMapper
.
getRealScaleByPeasantHouseholdNo
(
e
.
getPeasantHouseholdNo
()));
e
.
setRealScale
(
powerStationEngineeringInfoMapper
.
getRealScaleByPeasantHouseholdNo
(
e
.
getPeasantHouseholdNo
()));
}
});
}
...
...
@@ -134,12 +137,12 @@ public class BasicGridAcceptanceServiceImpl
public
synchronized
HygfOnGrid
saveEntity
(
HygfOnGrid
grid
)
{
LambdaQueryWrapper
<
HygfOnGrid
>
hog
=
new
LambdaQueryWrapper
<>();
hog
.
eq
(
HygfOnGrid:
:
getPeasantHouseholdId
,
grid
.
getPeasantHouseholdId
());
hygfOnGridServiceImpl
.
saveOrUpdate
(
grid
,
hog
);
hygfOnGridServiceImpl
.
saveOrUpdate
(
grid
,
hog
);
return
grid
;
}
public
void
testKAIQI
(){
//开启工作流 并执行一步
public
void
testKAIQI
()
{
//
开启工作流 并执行一步
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
params
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
...
...
@@ -154,7 +157,7 @@ public class BasicGridAcceptanceServiceImpl
List
<
ProcessTaskDTO
>
processTaskDTOS
=
workFlowService
.
startBatch
(
actWorkflowBatchDTO
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfos
(
processTaskDTOS
);
workflowResultDtos
.
forEach
(
e
->
{
workflowResultDtos
.
forEach
(
e
->
{
BasicGridAuditingDto
basicGridAuditingDto
=
new
BasicGridAuditingDto
();
BeanUtils
.
copyProperties
(
e
,
basicGridAuditingDto
);
basicGridAuditingDto
.
setPeasantHouseholdId
(
20248001107L
);
...
...
@@ -164,16 +167,15 @@ public class BasicGridAcceptanceServiceImpl
}
public
void
zhixing
(
String
approvalStatus
,
String
comment
){
public
void
zhixing
(
String
approvalStatus
,
String
comment
)
{
LambdaQueryWrapper
<
BasicGridAuditing
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
BasicGridAuditing:
:
getPeasantHouseholdId
,
20248001107L
);
query
.
eq
(
BasicGridAuditing:
:
getNextNodeKey
,
"gongchengshenhe"
);
query
.
eq
(
BasicGridAuditing:
:
getNextNodeKey
,
"gongchengshenhe"
);
query
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
query
.
last
(
"limit 1"
);
BasicGridAuditing
basicGridAuditing
=
basicGridAuditingService
.
getBaseMapper
().
selectOne
(
query
);
//组装信息
//
组装信息
TaskResultDTO
task
=
new
TaskResultDTO
();
task
.
setTaskId
(
basicGridAuditing
.
getNextTaskId
());
...
...
@@ -181,11 +183,12 @@ public class BasicGridAcceptanceServiceImpl
BasicGridAuditingDto
basicGridAuditingDto
=
new
BasicGridAuditingDto
();
task
.
setResultCode
(
"approvalStatus"
);
map
.
put
(
"approvalStatus"
,
approvalStatus
);
task
.
setComment
(
comment
==
null
?
""
:
comment
);
task
.
setComment
(
comment
==
null
?
""
:
comment
);
task
.
setVariable
(
map
);
//执行流程
//
执行流程
ProcessTaskDTO
processTaskDTO
=
workFlowService
.
complete
(
basicGridAuditing
.
getNextTaskId
(),
task
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
CollectionUtil
.
newArrayList
(
processTaskDTO
));
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
CollectionUtil
.
newArrayList
(
processTaskDTO
));
WorkflowResultDto
workflowResultDto
=
workflowResultDtos
.
get
(
0
);
BeanUtils
.
copyProperties
(
workflowResultDto
,
basicGridAuditingDto
);
basicGridAuditingDto
.
setPeasantHouseholdId
(
basicGridAuditing
.
getPeasantHouseholdId
());
...
...
@@ -197,25 +200,23 @@ public class BasicGridAcceptanceServiceImpl
basicGridAuditingService
.
createWithModel
(
basicGridAuditingDto
);
}
public
synchronized
HygfOnGrid
saveAndCommit
(
HygfOnGrid
grid
,
String
realName
)
{
BasicGridRecord
basicGridRecord
=
basicGridRecordService
.
getBaseMapper
()
.
selectOne
(
new
LambdaQueryWrapper
<
BasicGridRecord
>()
.
eq
(
BasicGridRecord:
:
getWorkOrderPowerStationId
,
grid
.
getWorkOrderPowerStationId
()));
.
selectOne
(
new
LambdaQueryWrapper
<
BasicGridRecord
>().
eq
(
BasicGridRecord:
:
getWorkOrderPowerStationId
,
grid
.
getWorkOrderPowerStationId
()));
LambdaUpdateWrapper
<
BasicGridRecord
>
update
=
new
LambdaUpdateWrapper
<>();
update
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
JXSGLYDSH
.
getCode
());
update
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"jxsAdmin"
);
update
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
JXSGLYDSH
.
getCode
());
update
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"jxsAdmin"
);
if
(
grid
.
getType
()
!=
null
&&
"1"
.
equals
(
grid
.
getType
()))
{
// 执行工作流
this
.
wofkflowExcute
(
basicGridRecord
.
getInstanceId
(),
"0"
,
"重新登记"
,
BusinessWorkflowKey
.
并网登记
.
getCode
());
update
.
set
(
BasicGridRecord:
:
getPowerStationAreaStatus
,
null
);
update
.
set
(
BasicGridRecord:
:
getPowerStationDesignStatus
,
null
);
update
.
set
(
BasicGridRecord:
:
getPowerStationEngineeringStatus
,
null
);
this
.
wofkflowExcute
(
basicGridRecord
.
getInstanceId
(),
"0"
,
"重新登记"
,
BusinessWorkflowKey
.
并网登记
.
getCode
());
update
.
set
(
BasicGridRecord:
:
getPowerStationAreaStatus
,
null
);
update
.
set
(
BasicGridRecord:
:
getPowerStationDesignStatus
,
null
);
update
.
set
(
BasicGridRecord:
:
getPowerStationEngineeringStatus
,
null
);
}
else
{
//开启工作流 并执行一步
//
开启工作流 并执行一步
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
params
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
...
...
@@ -236,7 +237,7 @@ public class BasicGridAcceptanceServiceImpl
basicGridAuditingDto
.
setPeasantHouseholdId
(
grid
.
getPeasantHouseholdId
());
basicGridAuditingDto
.
setPromoter
(
RequestContext
.
getExeUserId
());
basicGridAuditingService
.
createWithModel
(
basicGridAuditingDto
);
update
.
set
(
BasicGridRecord:
:
getInstanceId
,
basicGridAuditingDto
.
getInstanceId
());
update
.
set
(
BasicGridRecord:
:
getInstanceId
,
basicGridAuditingDto
.
getInstanceId
());
// 线上验收
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
...
...
@@ -246,7 +247,7 @@ public class BasicGridAcceptanceServiceImpl
peasantHouseholdMapper
.
update
(
null
,
up
);
}
//防止重复提交
//
防止重复提交
// if (grid.getSequenceNbr() != null) {
// onGridMapper.updateById(grid);
// } else {
...
...
@@ -254,17 +255,16 @@ public class BasicGridAcceptanceServiceImpl
// }
LambdaQueryWrapper
<
HygfOnGrid
>
hog
=
new
LambdaQueryWrapper
<>();
hog
.
eq
(
HygfOnGrid:
:
getPeasantHouseholdId
,
grid
.
getPeasantHouseholdId
());
hygfOnGridServiceImpl
.
saveOrUpdate
(
grid
,
hog
);
update
.
eq
(
BaseEntity:
:
getSequenceNbr
,
basicGridRecord
.
getSequenceNbr
());
basicGridRecordService
.
update
(
null
,
update
);
hygfOnGridServiceImpl
.
saveOrUpdate
(
grid
,
hog
);
update
.
eq
(
BaseEntity:
:
getSequenceNbr
,
basicGridRecord
.
getSequenceNbr
());
basicGridRecordService
.
update
(
null
,
update
);
ConstructionGirdRecords
da
=
new
ConstructionGirdRecords
(
realName
,
"提交并网资料"
,
new
Date
(),
""
,
basicGridRecord
.
getSequenceNbr
(),
basicGridRecord
.
getWorkOrderPowerStationId
(),
ConstructionGirdRecords
da
=
new
ConstructionGirdRecords
(
realName
,
"提交并网资料"
,
new
Date
(),
""
,
basicGridRecord
.
getSequenceNbr
(),
basicGridRecord
.
getWorkOrderPowerStationId
(),
basicGridRecord
.
getPeasantHouseholdId
(),
""
);
constructionGirdRecords
.
save
(
da
);
//发起待办
//
发起待办
// commonService.buildTaskModel(buildBWYSTaskModel(grid, basicGridAcceptance));
return
grid
;
}
...
...
@@ -335,7 +335,8 @@ public class BasicGridAcceptanceServiceImpl
}
try
{
// 查询并网审批信息
BasicGridAcceptance
basicGridAcceptanc
=
basicGridAcceptanceMapper
.
selectById
(
dto
.
getBasicGridAcceptanceId
());
BasicGridAcceptance
basicGridAcceptanc
=
basicGridAcceptanceMapper
.
selectById
(
dto
.
getBasicGridAcceptanceId
());
String
beforeAcceptanceStatus
=
basicGridAcceptanc
.
getAcceptanceStatus
();
String
nextNodeKey
=
basicGridAcceptanc
.
getNextNodeKey
();
if
(
OK
.
equals
(
dto
.
getApprovalStatus
()))
{
...
...
@@ -355,19 +356,21 @@ public class BasicGridAcceptanceServiceImpl
peasantHouseholdMapper
.
update
(
null
,
up
);
}
else
{
AcceptanceStatusEnum
acceptanceStatus
=
AcceptanceStatusEnum
.
getAcceptanceStatusByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
());
AcceptanceStatusEnum
acceptanceStatus
=
AcceptanceStatusEnum
.
getAcceptanceStatusByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
());
if
(
acceptanceStatus
==
null
)
{
// 说明工作流节点状态执行错误
throw
new
BadRequest
(
"其他用户正在操作,请刷新后再试!"
);
}
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
getNodeByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
()));
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
getNodeByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
()));
}
}
else
{
if
(
BasicGridAcceptancEnum
.
并网管理端工程审核
.
getCode
().
equals
(
nextNodeKey
))
{
basicGridAcceptanc
.
setGridStatus
(
GridStatusEnum
.
WTG
.
getCode
());
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
getNodeByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
()));
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
getNodeByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
()));
}
// 投融/法务/工程/线下验收审核不通过
else
if
(
BasicGridAcceptancEnum
.
管理端投融审核
.
getCode
().
equals
(
nextNodeKey
)
...
...
@@ -386,21 +389,23 @@ public class BasicGridAcceptanceServiceImpl
rectificationOrder
.
setWorkOrderPowerStationId
(
basicGridAcceptanc
.
getWorkOrderPowerStationId
());
rectificationOrder
.
setPeasantHouseholdId
(
basicGridAcceptanc
.
getPeasantHouseholdId
());
rectificationOrder
.
setProblemDescription
(
dto
.
getComment
());
rectificationOrder
.
setRectificationStatus
(
String
.
valueOf
(
RectificationStatusEnum
.
待整改
.
getCode
()));
rectificationOrder
.
setRectificationStatus
(
String
.
valueOf
(
RectificationStatusEnum
.
待整改
.
getCode
()));
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
acceptanceRectificationOrderMapper
.
insert
(
rectificationOrder
);
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
getNodeByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
()));
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
getNodeByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
()));
}
else
{
AcceptanceStatusEnum
acceptanceStatus
=
AcceptanceStatusEnum
.
getAcceptanceStatusByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
());
AcceptanceStatusEnum
acceptanceStatus
=
AcceptanceStatusEnum
.
getAcceptanceStatusByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
());
if
(
acceptanceStatus
==
null
)
{
// 说明工作流节点状态执行错误
throw
new
BadRequest
(
"其他用户正在操作,请刷新后再试!"
);
}
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
getNodeByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
()));
basicGridAcceptanc
.
setAcceptanceStatus
(
AcceptanceStatusEnum
.
getNodeByKey
(
nextNodeKey
,
dto
.
getApprovalStatus
()));
}
}
...
...
@@ -440,7 +445,8 @@ public class BasicGridAcceptanceServiceImpl
// 验收完成
System
.
out
.
println
(
"验收完成==============================="
+
workBasicGridAcceptance
.
getNextTaskId
());
System
.
out
.
println
(
"验收完成888888==============================="
+
workBasicGridAcceptance
.
getAcceptanceStatus
());
System
.
out
.
println
(
"验收完成888888==============================="
+
workBasicGridAcceptance
.
getAcceptanceStatus
());
if
(
"10"
.
equals
(
workBasicGridAcceptance
.
getAcceptanceStatus
()))
{
// 更新状态
...
...
@@ -458,18 +464,18 @@ public class BasicGridAcceptanceServiceImpl
}
}
//
工作流执行一步
public
void
wofkflowExcute
(
String
instanceId
,
String
approvalStatus
,
String
comment
,
String
taskKey
)
{
//
工作流执行一步
public
void
wofkflowExcute
(
String
instanceId
,
String
approvalStatus
,
String
comment
,
String
taskKey
)
{
LambdaQueryWrapper
<
BasicGridAuditing
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
BasicGridAuditing:
:
getInstanceId
,
instanceId
);
query
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
query
.
last
(
"limit 1"
);
BasicGridAuditing
basicGridAuditing
=
basicGridAuditingService
.
getBaseMapper
().
selectOne
(
query
);
if
(!
taskKey
.
contains
(
basicGridAuditing
.
getNextNodeKey
())){
if
(!
taskKey
.
contains
(
basicGridAuditing
.
getNextNodeKey
()))
{
throw
new
BadRequest
(
"无可执行任务"
);
}
//组装信息
//
组装信息
TaskResultDTO
task
=
new
TaskResultDTO
();
task
.
setTaskId
(
basicGridAuditing
.
getNextTaskId
());
...
...
@@ -477,11 +483,12 @@ public class BasicGridAcceptanceServiceImpl
BasicGridAuditingDto
basicGridAuditingDto
=
new
BasicGridAuditingDto
();
task
.
setResultCode
(
"approvalStatus"
);
map
.
put
(
"approvalStatus"
,
approvalStatus
);
task
.
setComment
(
comment
==
null
?
""
:
comment
);
task
.
setComment
(
comment
==
null
?
""
:
comment
);
task
.
setVariable
(
map
);
//执行流程
//
执行流程
ProcessTaskDTO
processTaskDTO
=
workFlowService
.
complete
(
basicGridAuditing
.
getNextTaskId
(),
task
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
CollectionUtil
.
newArrayList
(
processTaskDTO
));
List
<
WorkflowResultDto
>
workflowResultDtos
=
workFlowService
.
buildWorkFlowInfo
(
CollectionUtil
.
newArrayList
(
processTaskDTO
));
WorkflowResultDto
workflowResultDto
=
workflowResultDtos
.
get
(
0
);
BeanUtils
.
copyProperties
(
workflowResultDto
,
basicGridAuditingDto
);
basicGridAuditingDto
.
setPeasantHouseholdId
(
basicGridAuditing
.
getPeasantHouseholdId
());
...
...
@@ -493,28 +500,26 @@ public class BasicGridAcceptanceServiceImpl
basicGridAuditingService
.
createWithModel
(
basicGridAuditingDto
);
}
public
void
completeAdminAudit
(
Map
<
String
,
String
>
kv
)
{
public
void
completeAdminAudit
(
Map
<
String
,
String
>
kv
)
{
String
instanceId
=
kv
.
get
(
"instanceId"
);
String
sequenceNbr
=
kv
.
get
(
"sequenceNbr"
);
String
comment
=
kv
.
get
(
"comment"
);
String
approvalStatus
=
kv
.
get
(
"approvalStatus"
);
BasicGridRecord
basicGridRecord
=
basicGridRecordService
.
getBaseMapper
().
selectById
(
sequenceNbr
);
//执行工作流
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
经销商管理员审核
.
getCode
());
//修改并网数据状态
basicGridRecord
.
setGridStatus
(
approvalStatus
.
equals
(
"0"
)?
GridStatusEnum
.
PQYYDSH
.
getCode
():
GridStatusEnum
.
WTG
.
getCode
());
basicGridRecord
.
setBasicGridNode
(
approvalStatus
.
equals
(
"0"
)?
"bw-area"
:
null
);
// 执行工作流
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
经销商管理员审核
.
getCode
());
// 修改并网数据状态
basicGridRecord
.
setGridStatus
(
approvalStatus
.
equals
(
"0"
)
?
GridStatusEnum
.
PQYYDSH
.
getCode
()
:
GridStatusEnum
.
WTG
.
getCode
());
basicGridRecord
.
setBasicGridNode
(
approvalStatus
.
equals
(
"0"
)
?
"bw-area"
:
null
);
basicGridRecordService
.
updateById
(
basicGridRecord
);
// 增加操作日志
ConstructionGirdRecords
da
=
new
ConstructionGirdRecords
();
da
.
setOperationTime
(
new
Date
());
da
.
setOperationContent
(
"并网管理-经销商管理员审核-"
+(
approvalStatus
.
equals
(
"0"
)?
"通过"
:
"驳回"
));
da
.
setOperationContent
(
"并网管理-经销商管理员审核-"
+
(
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
));
da
.
setOperator
(
kv
.
get
(
"operator"
));
da
.
setOperationResults
(
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
);
da
.
setOperationResults
(
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
);
da
.
setGridId
(
basicGridRecord
.
getSequenceNbr
());
da
.
setWorkOrderPowerStationId
(
basicGridRecord
.
getWorkOrderPowerStationId
());
da
.
setPeasantHouseholdId
(
basicGridRecord
.
getPeasantHouseholdId
());
...
...
@@ -522,10 +527,7 @@ public class BasicGridAcceptanceServiceImpl
constructionGirdRecords
.
save
(
da
);
}
public
ResponseModel
completeAudit
(
Map
<
String
,
String
>
kv
)
{
public
ResponseModel
completeAudit
(
Map
<
String
,
String
>
kv
)
{
String
instanceId
=
kv
.
get
(
"instanceId"
);
String
sequenceNbr
=
kv
.
get
(
"sequenceNbr"
);
String
comment
=
kv
.
get
(
"comment"
);
...
...
@@ -536,146 +538,156 @@ public class BasicGridAcceptanceServiceImpl
ConstructionGirdRecords
da
=
new
ConstructionGirdRecords
();
LambdaUpdateWrapper
<
BasicGridRecord
>
up
=
new
LambdaUpdateWrapper
<>();
switch
(
status
){
case
"bw-area"
:
up
.
set
(
BasicGridRecord:
:
getPowerStationAreaStatus
,
approvalStatus
.
equals
(
"0"
)?
"通过"
:
"驳回"
);
if
(
approvalStatus
.
equals
(
"0"
)){
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-design,bw-engineering"
);
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ROLESDSH
.
getCode
());
int
num
=
0
;
//如果历史有未完成的整改单则片区审核完成的时候改变主流程状态为整改单的状态
LambdaQueryWrapper
<
HygfRectificationOrder
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
basicGridRecord
.
getPeasantHouseholdId
());
query
.
in
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待整改"
,
"待审核"
));
query
.
in
(
HygfRectificationOrder:
:
getRectificationSource
,
Arrays
.
asList
(
"bw-design"
,
"bw-engineering"
));
List
<
HygfRectificationOrder
>
hygfRectificationOrders
=
rectificationOrderService
.
getBaseMapper
().
selectList
(
query
);
for
(
HygfRectificationOrder
hygfRectificationOrder
:
hygfRectificationOrders
)
{
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待审核"
)){
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
num
=
1
;
break
;
}
}
if
(
CollUtil
.
isNotEmpty
(
hygfRectificationOrders
)
&&
num
==
0
){
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
switch
(
status
)
{
case
"bw-area"
:
up
.
set
(
BasicGridRecord:
:
getPowerStationAreaStatus
,
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
);
if
(
approvalStatus
.
equals
(
"0"
))
{
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-design,bw-engineering"
);
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ROLESDSH
.
getCode
());
int
num
=
0
;
// 如果历史有未完成的整改单则片区审核完成的时候改变主流程状态为整改单的状态
LambdaQueryWrapper
<
HygfRectificationOrder
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
basicGridRecord
.
getPeasantHouseholdId
());
query
.
in
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待整改"
,
"待审核"
));
query
.
in
(
HygfRectificationOrder:
:
getRectificationSource
,
Arrays
.
asList
(
"bw-design"
,
"bw-engineering"
));
List
<
HygfRectificationOrder
>
hygfRectificationOrders
=
rectificationOrderService
.
getBaseMapper
()
.
selectList
(
query
);
for
(
HygfRectificationOrder
hygfRectificationOrder
:
hygfRectificationOrders
)
{
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待审核"
))
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
num
=
1
;
break
;
}
}
if
(
CollUtil
.
isNotEmpty
(
hygfRectificationOrders
)
&&
num
==
0
)
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
}
da
.
setOperationContent
(
"并网验收-片区运营审核-"
+
(
approvalStatus
.
equals
(
"0"
)?
"通过"
:
"驳回"
));
}
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
片区运营审核
.
getCode
()
);
break
;
case
"bw-design"
:
up
.
set
(
BasicGridRecord:
:
getPowerStationDesignStatus
,
approvalStatus
.
equals
(
"0"
)?
"通过"
:
"驳回"
);
da
.
setOperationContent
(
"并网验收-设计审核-"
+
(
approvalStatus
.
equals
(
"0"
)?
"通过"
:
"驳回"
));
if
(
basicGridRecord
.
getPowerStationEngineeringStatus
()
!=
null
&&
basicGridRecord
.
getPowerStationEngineeringStatus
().
equals
(
"通过"
)&&
approvalStatus
.
equals
(
"0"
)
){
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
YWC
.
getCode
());
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
设计审核
.
getCode
()
);
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"all"
);
up
.
set
(
BasicGridRecord:
:
getGridTime
,
new
Date
());
LambdaUpdateWrapper
<
PeasantHousehold
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
并网完成
.
getCode
());
wrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
basicGridRecord
.
getPeasantHouseholdId
());
peasantHouseholdMapper
.
update
(
null
,
wrapper
);
AcceptanceCheck
acceptanceCheck
=
new
AcceptanceCheck
();
BeanUtils
.
copyProperties
(
basicGridRecord
,
acceptanceCheck
);
acceptanceCheck
.
setSequenceNbr
(
null
);
acceptanceCheck
.
setRectificationStatus
(
null
);
acceptanceCheck
.
setBasicGridNode
(
null
);
acceptanceCheck
.
setInstanceId
(
null
);
acceptanceCheck
.
setPowerStationAreaStatus
(
null
);
acceptanceCheck
.
setAcceptanceCheckStatus
(
GridStatusEnum
.
DTJYS
.
getCode
());
acceptanceCheckService
.
saveOrUpdate
(
acceptanceCheck
);
}
else
if
(
null
==
basicGridRecord
.
getPowerStationEngineeringStatus
()
&&
approvalStatus
.
equals
(
"0"
)
&&
(
Objects
.
isNull
(
basicGridRecord
.
getRectificationStatus
())||(!
basicGridRecord
.
getRectificationStatus
().
contains
(
"bw-engineering"
))
)
)
{
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-engineering"
);
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
GCDSH
.
getCode
());
}
else
if
(
null
==
basicGridRecord
.
getPowerStationEngineeringStatus
()
&&
approvalStatus
.
equals
(
"0"
)
&&
basicGridRecord
.
getRectificationStatus
().
contains
(
"bw-engineering"
)
)
{
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-engineering"
);
LambdaQueryWrapper
<
HygfRectificationOrder
>
query2
=
new
LambdaQueryWrapper
<>();
query2
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
basicGridRecord
.
getPeasantHouseholdId
());
query2
.
in
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待整改"
,
"待审核"
,
"待提交"
));
query2
.
eq
(
HygfRectificationOrder:
:
getRectificationSource
,
"bw-engineering"
);
HygfRectificationOrder
hygfRectificationOrder
=
rectificationOrderService
.
getBaseMapper
().
selectOne
(
query2
);
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待提交"
)){
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待整改"
)){
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
}
else
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
}
}
else
if
(
null
!=
basicGridRecord
.
getPowerStationEngineeringStatus
()
&&
basicGridRecord
.
getPowerStationEngineeringStatus
().
equals
(
"驳回"
)){
return
CommonResponseNewUtil
.
failureMessage
(
"该流程已被工程人员审核驳回,请刷新列表"
);
}
else
{
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
设计审核
.
getCode
()
);
da
.
setOperationContent
(
"并网验收-片区运营审核-"
+
(
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
));
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
片区运营审核
.
getCode
());
break
;
case
"bw-design"
:
up
.
set
(
BasicGridRecord:
:
getPowerStationDesignStatus
,
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
);
da
.
setOperationContent
(
"并网验收-设计审核-"
+
(
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
));
if
(
basicGridRecord
.
getPowerStationEngineeringStatus
()
!=
null
&&
basicGridRecord
.
getPowerStationEngineeringStatus
().
equals
(
"通过"
)
&&
approvalStatus
.
equals
(
"0"
))
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
YWC
.
getCode
());
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
设计审核
.
getCode
());
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"all"
);
up
.
set
(
BasicGridRecord:
:
getGridTime
,
new
Date
());
LambdaUpdateWrapper
<
PeasantHousehold
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
并网完成
.
getCode
());
wrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
basicGridRecord
.
getPeasantHouseholdId
());
peasantHouseholdMapper
.
update
(
null
,
wrapper
);
AcceptanceCheck
acceptanceCheck
=
new
AcceptanceCheck
();
BeanUtils
.
copyProperties
(
basicGridRecord
,
acceptanceCheck
);
acceptanceCheck
.
setSequenceNbr
(
null
);
acceptanceCheck
.
setRectificationStatus
(
null
);
acceptanceCheck
.
setBasicGridNode
(
null
);
acceptanceCheck
.
setInstanceId
(
null
);
acceptanceCheck
.
setPowerStationAreaStatus
(
null
);
acceptanceCheck
.
setAcceptanceCheckStatus
(
GridStatusEnum
.
DTJYS
.
getCode
());
acceptanceCheckService
.
saveOrUpdate
(
acceptanceCheck
);
}
else
if
(
null
==
basicGridRecord
.
getPowerStationEngineeringStatus
()
&&
approvalStatus
.
equals
(
"0"
)
&&
(
Objects
.
isNull
(
basicGridRecord
.
getRectificationStatus
())
||
(!
basicGridRecord
.
getRectificationStatus
().
contains
(
"bw-engineering"
))))
{
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-engineering"
);
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
GCDSH
.
getCode
());
}
else
if
(
null
==
basicGridRecord
.
getPowerStationEngineeringStatus
()
&&
approvalStatus
.
equals
(
"0"
)
&&
basicGridRecord
.
getRectificationStatus
().
contains
(
"bw-engineering"
))
{
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-engineering"
);
LambdaQueryWrapper
<
HygfRectificationOrder
>
query2
=
new
LambdaQueryWrapper
<>();
query2
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
basicGridRecord
.
getPeasantHouseholdId
());
query2
.
in
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待整改"
,
"待审核"
,
"待提交"
));
query2
.
eq
(
HygfRectificationOrder:
:
getRectificationSource
,
"bw-engineering"
);
HygfRectificationOrder
hygfRectificationOrder
=
rectificationOrderService
.
getBaseMapper
()
.
selectOne
(
query2
);
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待提交"
))
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待整改"
))
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
}
else
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
}
break
;
default
:
up
.
set
(
BasicGridRecord:
:
getPowerStationEngineeringStatus
,
approvalStatus
.
equals
(
"0"
)?
"通过"
:
"驳回"
);
da
.
setOperationContent
(
"并网验收-工程审核-"
+
(
approvalStatus
.
equals
(
"0"
)?
"通过"
:
"驳回"
));
if
(
basicGridRecord
.
getPowerStationDesignStatus
()
!=
null
&&
basicGridRecord
.
getPowerStationDesignStatus
().
equals
(
"通过"
)&&
approvalStatus
.
equals
(
"0"
)
){
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
YWC
.
getCode
());
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
工程审核
.
getCode
()
);
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"all"
);
up
.
set
(
BasicGridRecord:
:
getGridTime
,
new
Date
());
LambdaUpdateWrapper
<
PeasantHousehold
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
并网完成
.
getCode
());
wrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
basicGridRecord
.
getPeasantHouseholdId
());
peasantHouseholdMapper
.
update
(
null
,
wrapper
);
AcceptanceCheck
acceptanceCheck
=
new
AcceptanceCheck
();
BeanUtils
.
copyProperties
(
basicGridRecord
,
acceptanceCheck
);
acceptanceCheck
.
setSequenceNbr
(
null
);
acceptanceCheck
.
setRectificationStatus
(
null
);
acceptanceCheck
.
setBasicGridNode
(
null
);
acceptanceCheck
.
setPowerStationAreaStatus
(
null
);
acceptanceCheck
.
setInstanceId
(
null
);
acceptanceCheck
.
setAcceptanceCheckStatus
(
GridStatusEnum
.
DTJYS
.
getCode
());
acceptanceCheckService
.
saveOrUpdate
(
acceptanceCheck
);
}
else
if
(
null
==
basicGridRecord
.
getPowerStationDesignStatus
()
&&
approvalStatus
.
equals
(
"0"
)
&&
(
Objects
.
isNull
(
basicGridRecord
.
getRectificationStatus
())||(!
basicGridRecord
.
getRectificationStatus
().
contains
(
"bw-design"
))
))
{
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-design"
);
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
if
(
null
==
basicGridRecord
.
getPowerStationDesignStatus
()
&&
approvalStatus
.
equals
(
"0"
)
&&
!
Objects
.
isNull
(
basicGridRecord
.
getRectificationStatus
())
&&
basicGridRecord
.
getRectificationStatus
().
contains
(
"bw-design"
)
)
{
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-design"
);
}
else
if
(
null
!=
basicGridRecord
.
getPowerStationEngineeringStatus
()
&&
basicGridRecord
.
getPowerStationEngineeringStatus
().
equals
(
"驳回"
))
{
return
CommonResponseNewUtil
.
failureMessage
(
"该流程已被工程人员审核驳回,请刷新列表"
);
}
else
{
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
设计审核
.
getCode
());
}
break
;
default
:
up
.
set
(
BasicGridRecord:
:
getPowerStationEngineeringStatus
,
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
);
da
.
setOperationContent
(
"并网验收-工程审核-"
+
(
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
));
if
(
basicGridRecord
.
getPowerStationDesignStatus
()
!=
null
&&
basicGridRecord
.
getPowerStationDesignStatus
().
equals
(
"通过"
)
&&
approvalStatus
.
equals
(
"0"
))
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
YWC
.
getCode
());
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
工程审核
.
getCode
());
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"all"
);
up
.
set
(
BasicGridRecord:
:
getGridTime
,
new
Date
());
LambdaUpdateWrapper
<
PeasantHousehold
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
并网完成
.
getCode
());
wrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
basicGridRecord
.
getPeasantHouseholdId
());
peasantHouseholdMapper
.
update
(
null
,
wrapper
);
AcceptanceCheck
acceptanceCheck
=
new
AcceptanceCheck
();
BeanUtils
.
copyProperties
(
basicGridRecord
,
acceptanceCheck
);
acceptanceCheck
.
setSequenceNbr
(
null
);
acceptanceCheck
.
setRectificationStatus
(
null
);
acceptanceCheck
.
setBasicGridNode
(
null
);
acceptanceCheck
.
setPowerStationAreaStatus
(
null
);
acceptanceCheck
.
setInstanceId
(
null
);
acceptanceCheck
.
setAcceptanceCheckStatus
(
GridStatusEnum
.
DTJYS
.
getCode
());
acceptanceCheckService
.
saveOrUpdate
(
acceptanceCheck
);
}
else
if
(
null
==
basicGridRecord
.
getPowerStationDesignStatus
()
&&
approvalStatus
.
equals
(
"0"
)
&&
(
Objects
.
isNull
(
basicGridRecord
.
getRectificationStatus
())
||
(!
basicGridRecord
.
getRectificationStatus
().
contains
(
"bw-design"
))))
{
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-design"
);
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
if
(
null
==
basicGridRecord
.
getPowerStationDesignStatus
()
&&
approvalStatus
.
equals
(
"0"
)
&&
!
Objects
.
isNull
(
basicGridRecord
.
getRectificationStatus
())
&&
basicGridRecord
.
getRectificationStatus
().
contains
(
"bw-design"
))
{
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
"bw-design"
);
LambdaQueryWrapper
<
HygfRectificationOrder
>
query1
=
new
LambdaQueryWrapper
<>();
query1
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
basicGridRecord
.
getPeasantHouseholdId
());
query1
.
in
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待整改"
,
"待审核"
,
"待提交"
));
query1
.
eq
(
HygfRectificationOrder:
:
getRectificationSource
,
"bw-design"
);
HygfRectificationOrder
hygfRectificationOrder
=
rectificationOrderService
.
getBaseMapper
().
selectOne
(
query1
);
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待提交"
)){
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待整改"
)){
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
}
else
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
}
}
else
if
(
null
!=
basicGridRecord
.
getPowerStationDesignStatus
()
&&
basicGridRecord
.
getPowerStationDesignStatus
().
equals
(
"驳回"
)){
return
CommonResponseNewUtil
.
failureMessage
(
"该流程已被设计人员审核驳回,请刷新列表"
);
}
else
{
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
工程审核
.
getCode
()
);
query1
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
basicGridRecord
.
getPeasantHouseholdId
());
query1
.
in
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待整改"
,
"待审核"
,
"待提交"
));
query1
.
eq
(
HygfRectificationOrder:
:
getRectificationSource
,
"bw-design"
);
HygfRectificationOrder
hygfRectificationOrder
=
rectificationOrderService
.
getBaseMapper
()
.
selectOne
(
query1
);
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待提交"
))
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待整改"
))
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
}
else
{
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
}
break
;
}
else
if
(
null
!=
basicGridRecord
.
getPowerStationDesignStatus
()
&&
basicGridRecord
.
getPowerStationDesignStatus
().
equals
(
"驳回"
))
{
return
CommonResponseNewUtil
.
failureMessage
(
"该流程已被设计人员审核驳回,请刷新列表"
);
}
else
{
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
工程审核
.
getCode
());
}
break
;
}
if
(
approvalStatus
.
equals
(
"1"
)
)
{
up
.
eq
(
BaseEntity:
:
getSequenceNbr
,
sequenceNbr
);
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
null
);
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
WTG
.
getCode
());
if
(
approvalStatus
.
equals
(
"1"
)
)
{
up
.
eq
(
BaseEntity:
:
getSequenceNbr
,
sequenceNbr
);
up
.
set
(
BasicGridRecord:
:
getBasicGridNode
,
null
);
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
WTG
.
getCode
());
}
//修改并网数据状态
if
(
StringUtils
.
isNotEmpty
(
sequenceNbr
)){
up
.
eq
(
BaseEntity:
:
getSequenceNbr
,
sequenceNbr
);
basicGridRecordService
.
getBaseMapper
().
update
(
null
,
up
);
//
修改并网数据状态
if
(
StringUtils
.
isNotEmpty
(
sequenceNbr
))
{
up
.
eq
(
BaseEntity:
:
getSequenceNbr
,
sequenceNbr
);
basicGridRecordService
.
getBaseMapper
().
update
(
null
,
up
);
}
da
.
setOperationTime
(
new
Date
());
da
.
setOperator
(
kv
.
get
(
"operator"
));
da
.
setOperationResults
(
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
);
da
.
setOperationResults
(
approvalStatus
.
equals
(
"0"
)
?
"通过"
:
"驳回"
);
da
.
setGridId
(
basicGridRecord
.
getSequenceNbr
());
da
.
setWorkOrderPowerStationId
(
basicGridRecord
.
getWorkOrderPowerStationId
());
da
.
setPeasantHouseholdId
(
basicGridRecord
.
getPeasantHouseholdId
());
...
...
@@ -684,116 +696,118 @@ public class BasicGridAcceptanceServiceImpl
return
CommonResponseNewUtil
.
success
();
}
public
ResponseModel
addRectification
(
HygfRectificationOrder
hygfRectificationOrder
)
{
if
(
Objects
.
isNull
(
hygfRectificationOrder
.
getRectificationSource
())
)
{
return
CommonResponseNewUtil
.
failureMessage
(
"多角色用户发起整改单,发起人角色不可为空"
);
if
(
Objects
.
isNull
(
hygfRectificationOrder
.
getRectificationSource
()))
{
return
CommonResponseNewUtil
.
failureMessage
(
"多角色用户发起整改单,发起人角色不可为空"
);
}
if
(
hygfRectificationOrder
.
getAddorSubmit
().
equals
(
"0"
)
&&
Objects
.
isNull
(
hygfRectificationOrder
.
getRectificationIdea
())){
return
CommonResponseNewUtil
.
failureMessage
(
"整改类型及整改项不可为空"
);
if
(
hygfRectificationOrder
.
getAddorSubmit
().
equals
(
"0"
)
&&
Objects
.
isNull
(
hygfRectificationOrder
.
getRectificationIdea
()))
{
return
CommonResponseNewUtil
.
failureMessage
(
"整改类型及整改项不可为空"
);
}
if
(
hygfRectificationOrder
.
getAddorSubmit
().
equals
(
"0"
)
&&
!
Objects
.
isNull
(
hygfRectificationOrder
.
getRectificationIdea
())){
if
(
hygfRectificationOrder
.
getAddorSubmit
().
equals
(
"0"
)
&&
!
Objects
.
isNull
(
hygfRectificationOrder
.
getRectificationIdea
()))
{
List
<
Object
>
rectificationIdea
=
hygfRectificationOrder
.
getRectificationIdea
();
for
(
Object
item
:
rectificationIdea
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
item
));
Collection
<
Object
>
values
=
jsonObject
.
values
();
if
(
values
.
size
()
<
2
){
return
CommonResponseNewUtil
.
failureMessage
(
"整改类型及整改项不可为空"
);
if
(
values
.
size
()
<
2
)
{
return
CommonResponseNewUtil
.
failureMessage
(
"整改类型及整改项不可为空"
);
}
if
(
jsonObject
.
containsKey
(
"type"
)){
if
(
null
==
jsonObject
.
get
(
"type"
)){
return
CommonResponseNewUtil
.
failureMessage
(
"整改类型及整改项不可为空"
);
if
(
jsonObject
.
containsKey
(
"type"
))
{
if
(
null
==
jsonObject
.
get
(
"type"
))
{
return
CommonResponseNewUtil
.
failureMessage
(
"整改类型及整改项不可为空"
);
}
}
if
(
jsonObject
.
containsKey
(
"items"
)){
if
(
jsonObject
.
containsKey
(
"items"
))
{
JSONArray
item1
=
jsonObject
.
getJSONArray
(
"items"
);
for
(
Object
o
:
item1
)
{
if
(!
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
)).
containsKey
(
"value"
)){
return
CommonResponseNewUtil
.
failureMessage
(
"整改类型及整改项不可为空"
);
if
(!
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
)).
containsKey
(
"value"
))
{
return
CommonResponseNewUtil
.
failureMessage
(
"整改类型及整改项不可为空"
);
}
}
}
}
}
if
(
hygfRectificationOrder
.
getSequenceNbr
()
!=
null
)
{
LambdaQueryWrapper
<
HygfRectificationOrder
>
wr
=
new
LambdaQueryWrapper
<>();
wr
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wr
.
notIn
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"已作废"
,
"已完成"
));
wr
.
eq
(
HygfRectificationOrder:
:
getRectificationSource
,
hygfRectificationOrder
.
getRectificationSource
());
wr
.
ne
(
BaseEntity:
:
getSequenceNbr
,
hygfRectificationOrder
.
getSequenceNbr
());
if
(
hygfRectificationOrder
.
getSequenceNbr
()
!=
null
)
{
LambdaQueryWrapper
<
HygfRectificationOrder
>
wr
=
new
LambdaQueryWrapper
<>();
wr
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wr
.
notIn
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"已作废"
,
"已完成"
));
wr
.
eq
(
HygfRectificationOrder:
:
getRectificationSource
,
hygfRectificationOrder
.
getRectificationSource
());
wr
.
ne
(
BaseEntity:
:
getSequenceNbr
,
hygfRectificationOrder
.
getSequenceNbr
());
List
<
HygfRectificationOrder
>
list
=
rectificationOrderService
.
getBaseMapper
().
selectList
(
wr
);
if
(
CollectionUtil
.
isNotEmpty
(
list
)){
return
CommonResponseNewUtil
.
failureMessage
(
"当前农户存在其他进行中的整改单,不可重新发起"
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
return
CommonResponseNewUtil
.
failureMessage
(
"当前农户存在其他进行中的整改单,不可重新发起"
);
}
}
//查询当前并网数据
//
查询当前并网数据
LambdaQueryWrapper
<
BasicGridRecord
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wrapper
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
BasicGridRecord
basicGridRecord
=
basicGridRecordService
.
getBaseMapper
().
selectOne
(
wrapper
);
if
(!
Objects
.
isNull
(
basicGridRecord
)&&!
basicGridRecord
.
getBasicGridNode
().
contains
(
hygfRectificationOrder
.
getRectificationSource
())){
return
CommonResponseNewUtil
.
failureMessage
(
"当前流程发生变化,暂时无法操作,请刷新再试"
);
if
(!
Objects
.
isNull
(
basicGridRecord
)
&&
!
basicGridRecord
.
getBasicGridNode
().
contains
(
hygfRectificationOrder
.
getRectificationSource
()))
{
return
CommonResponseNewUtil
.
failureMessage
(
"当前流程发生变化,暂时无法操作,请刷新再试"
);
}
String
addorSubmit
=
hygfRectificationOrder
.
getAddorSubmit
();
LambdaUpdateWrapper
<
BasicGridRecord
>
qu
=
new
LambdaUpdateWrapper
();
qu
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
if
(!
Objects
.
isNull
(
basicGridRecord
)
&&
null
!=
basicGridRecord
.
getRectificationStatus
()
&&
!
basicGridRecord
.
getRectificationStatus
().
contains
(
hygfRectificationOrder
.
getRectificationSource
())){
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
basicGridRecord
.
getRectificationStatus
()+
","
+
hygfRectificationOrder
.
getRectificationSource
());
basicGridRecordService
.
update
(
null
,
qu
);
}
else
if
(!
Objects
.
isNull
(
basicGridRecord
)
&&
null
==
basicGridRecord
.
getRectificationStatus
()
)
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
hygfRectificationOrder
.
getRectificationSource
());
basicGridRecordService
.
update
(
null
,
qu
);
if
(!
Objects
.
isNull
(
basicGridRecord
)
&&
null
!=
basicGridRecord
.
getRectificationStatus
()
&&
!
basicGridRecord
.
getRectificationStatus
().
contains
(
hygfRectificationOrder
.
getRectificationSource
()))
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
basicGridRecord
.
getRectificationStatus
()
+
","
+
hygfRectificationOrder
.
getRectificationSource
());
basicGridRecordService
.
update
(
null
,
qu
);
}
else
if
(!
Objects
.
isNull
(
basicGridRecord
)
&&
null
==
basicGridRecord
.
getRectificationStatus
())
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
hygfRectificationOrder
.
getRectificationSource
());
basicGridRecordService
.
update
(
null
,
qu
);
}
//修改状态
if
(
addorSubmit
.
equals
(
"0"
)){
//如果历史有未完成的整改单则片区审核完成的时候改变主流程状态为整改单的状态
//
修改状态
if
(
addorSubmit
.
equals
(
"0"
))
{
//
如果历史有未完成的整改单则片区审核完成的时候改变主流程状态为整改单的状态
int
num
=
0
;
LambdaQueryWrapper
<
HygfRectificationOrder
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
basicGridRecord
.
getPeasantHouseholdId
());
query
.
in
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待整改"
,
"待提交"
,
"待审核"
));
query
.
in
(
HygfRectificationOrder:
:
getRectificationSource
,
Arrays
.
asList
(
"bw-design"
,
"bw-engineering"
));
List
<
HygfRectificationOrder
>
hygfRectificationOrders
=
rectificationOrderService
.
getBaseMapper
().
selectList
(
query
);
query
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
basicGridRecord
.
getPeasantHouseholdId
());
query
.
in
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待整改"
,
"待提交"
,
"待审核"
));
query
.
in
(
HygfRectificationOrder:
:
getRectificationSource
,
Arrays
.
asList
(
"bw-design"
,
"bw-engineering"
));
List
<
HygfRectificationOrder
>
hygfRectificationOrders
=
rectificationOrderService
.
getBaseMapper
()
.
selectList
(
query
);
for
(
HygfRectificationOrder
hygfRectificationOrderO
:
hygfRectificationOrders
)
{
if
(
hygfRectificationOrderO
.
getRectificationStatus
().
equals
(
"待审核"
)){
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
if
(
hygfRectificationOrderO
.
getRectificationStatus
().
equals
(
"待审核"
))
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
num
=
1
;
break
;
}
}
if
(
num
==
0
){
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
if
(
num
==
0
)
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
}
basicGridRecordService
.
update
(
null
,
qu
);
basicGridRecordService
.
update
(
null
,
qu
);
}
rectificationOrderAuditingService
.
addRectification
(
hygfRectificationOrder
);
return
CommonResponseNewUtil
.
success
();
return
CommonResponseNewUtil
.
success
();
}
public
ResponseModel
nextTaskExcute
(
HygfRectificationOrder
hygfRectificationOrder
)
{
//查询当前并网数据
//
查询当前并网数据
LambdaQueryWrapper
<
BasicGridRecord
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wrapper
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
BasicGridRecord
basicGridRecord
=
basicGridRecordService
.
getBaseMapper
().
selectOne
(
wrapper
);
if
(!
basicGridRecord
.
getBasicGridNode
().
contains
(
hygfRectificationOrder
.
getRectificationSource
())){
if
(!
basicGridRecord
.
getBasicGridNode
().
contains
(
hygfRectificationOrder
.
getRectificationSource
()))
{
hygfRectificationOrder
.
setRectificationStatus
(
WorkOrderEnum
.
整改中
.
getCode
());
rectificationOrderAuditingService
.
addRectification
(
hygfRectificationOrder
);
return
CommonResponseNewUtil
.
failureMessage
(
"当前流程发生变化,暂时无法操作,请刷新再试"
);
return
CommonResponseNewUtil
.
failureMessage
(
"当前流程发生变化,暂时无法操作,请刷新再试"
);
}
if
(
hygfRectificationOrder
.
getAddorSubmit
().
equals
(
"0"
)
)
{
if
(
hygfRectificationOrder
.
getAddorSubmit
().
equals
(
"0"
))
{
LambdaUpdateWrapper
<
BasicGridRecord
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
up
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
basicGridRecordService
.
update
(
null
,
up
);
up
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
up
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
basicGridRecordService
.
update
(
null
,
up
);
hygfRectificationOrder
.
setRectificationStatus
(
WorkOrderEnum
.
待审核
.
getCode
());
}
else
{
}
else
{
hygfRectificationOrder
.
setRectificationStatus
(
WorkOrderEnum
.
整改中
.
getCode
());
}
rectificationOrderAuditingService
.
nextTaskExcute
(
hygfRectificationOrder
);
...
...
@@ -803,133 +817,143 @@ public class BasicGridAcceptanceServiceImpl
public
ResponseModel
nextTaskAduit
(
HygfRectificationOrder
hygfRectificationOrder
)
{
String
auditResult
=
hygfRectificationOrder
.
getAuditResult
();
//查询当前并网数据
//
查询当前并网数据
LambdaQueryWrapper
<
BasicGridRecord
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wrapper
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
BasicGridRecord
basicGridRecord
=
basicGridRecordService
.
getBaseMapper
().
selectOne
(
wrapper
);
if
(!
basicGridRecord
.
getBasicGridNode
().
contains
(
hygfRectificationOrder
.
getRectificationSource
())){
return
CommonResponseNewUtil
.
failureMessage
(
"当前流程发生变化,暂时无法操作,请刷新再试"
);
if
(!
basicGridRecord
.
getBasicGridNode
().
contains
(
hygfRectificationOrder
.
getRectificationSource
()))
{
return
CommonResponseNewUtil
.
failureMessage
(
"当前流程发生变化,暂时无法操作,请刷新再试"
);
}
//修改整改单状态
hygfRectificationOrder
.
setRectificationStatus
(
auditResult
.
equals
(
"通过"
)?
WorkOrderEnum
.
已完成
.
getCode
():
WorkOrderEnum
.
待整改
.
getCode
());
// 修改整改单状态
hygfRectificationOrder
.
setRectificationStatus
(
auditResult
.
equals
(
"通过"
)
?
WorkOrderEnum
.
已完成
.
getCode
()
:
WorkOrderEnum
.
待整改
.
getCode
());
rectificationOrderAuditingService
.
nextTaskAduit
(
hygfRectificationOrder
);
//查询是否还有其它类型待整改的整改单存在 若存在后置节点为当前并网状态
LambdaQueryWrapper
<
HygfRectificationOrder
>
wr
=
new
LambdaQueryWrapper
<>();
wr
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wr
.
notIn
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待提交"
,
"已作废"
,
"已完成"
));
wr
.
ne
(
BaseEntity:
:
getSequenceNbr
,
hygfRectificationOrder
.
getSequenceNbr
());
//
查询是否还有其它类型待整改的整改单存在 若存在后置节点为当前并网状态
LambdaQueryWrapper
<
HygfRectificationOrder
>
wr
=
new
LambdaQueryWrapper
<>();
wr
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wr
.
notIn
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待提交"
,
"已作废"
,
"已完成"
));
wr
.
ne
(
BaseEntity:
:
getSequenceNbr
,
hygfRectificationOrder
.
getSequenceNbr
());
List
<
HygfRectificationOrder
>
list
=
rectificationOrderService
.
getBaseMapper
().
selectList
(
wr
);
//修改并网状态
//
片区不存在并行 无需复杂判断
工程与设计并行 需要做额外逻辑判断
if
(
auditResult
.
equals
(
"通过"
)){
if
(
hygfRectificationOrder
.
getRectificationSource
().
equals
(
"bw-area"
)){
//
修改并网状态
//
片区不存在并行 无需复杂判断
工程与设计并行 需要做额外逻辑判断
if
(
auditResult
.
equals
(
"通过"
))
{
if
(
hygfRectificationOrder
.
getRectificationSource
().
equals
(
"bw-area"
))
{
LambdaUpdateWrapper
<
BasicGridRecord
>
qu
=
new
LambdaUpdateWrapper
();
qu
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
PQYYDSH
.
getCode
());
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
null
);
basicGridRecordService
.
update
(
null
,
qu
);
}
else
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
PQYYDSH
.
getCode
());
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
null
);
basicGridRecordService
.
update
(
null
,
qu
);
}
else
{
LambdaUpdateWrapper
<
BasicGridRecord
>
qu
=
new
LambdaUpdateWrapper
();
qu
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
List
<
String
>
status
=
new
ArrayList
<>(
Arrays
.
asList
(
basicGridRecord
.
getRectificationStatus
().
split
(
","
)));
List
<
String
>
status
=
new
ArrayList
<>(
Arrays
.
asList
(
basicGridRecord
.
getRectificationStatus
().
split
(
","
)));
status
.
remove
(
hygfRectificationOrder
.
getRectificationSource
());
if
(
status
.
size
()<
1
)
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
null
);
}
else
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
String
.
join
(
","
,
status
));
if
(
status
.
size
()
<
1
)
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
null
);
}
else
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
String
.
join
(
","
,
status
));
}
if
(
CollectionUtil
.
isEmpty
(
list
))
{
//若两者状态都为空 说明均为审核 若某一审核状态为空 则审核状态修改为为空审核节点
if
(
Objects
.
isNull
(
basicGridRecord
.
getPowerStationDesignStatus
()
)
&&
Objects
.
isNull
(
basicGridRecord
.
getPowerStationEngineeringStatus
())){
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ROLESDSH
.
getCode
());
}
else
if
(
Objects
.
isNull
(
basicGridRecord
.
getPowerStationDesignStatus
()
)
){
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
GCDSH
.
getCode
());
}
}
else
{
List
<
String
>
collect
=
list
.
stream
().
map
(
HygfRectificationOrder:
:
getRectificationStatus
).
collect
(
Collectors
.
toList
());
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
collect
.
contains
(
WorkOrderEnum
.
待审核
.
getCode
())?
GridStatusEnum
.
ZGDSH
.
getCode
():
GridStatusEnum
.
DZG
.
getCode
());
// 若两者状态都为空 说明均为审核 若某一审核状态为空 则审核状态修改为为空审核节点
if
(
Objects
.
isNull
(
basicGridRecord
.
getPowerStationDesignStatus
())
&&
Objects
.
isNull
(
basicGridRecord
.
getPowerStationEngineeringStatus
()))
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ROLESDSH
.
getCode
());
}
else
if
(
Objects
.
isNull
(
basicGridRecord
.
getPowerStationDesignStatus
()))
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
GCDSH
.
getCode
());
}
}
else
{
List
<
String
>
collect
=
list
.
stream
().
map
(
HygfRectificationOrder:
:
getRectificationStatus
)
.
collect
(
Collectors
.
toList
());
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
collect
.
contains
(
WorkOrderEnum
.
待审核
.
getCode
())
?
GridStatusEnum
.
ZGDSH
.
getCode
()
:
GridStatusEnum
.
DZG
.
getCode
());
}
basicGridRecordService
.
update
(
null
,
qu
);
basicGridRecordService
.
update
(
null
,
qu
);
}
}
else
{
//驳回的时候 也需根据 工程或者设计 整改单状态修改并网状态
}
else
{
//
驳回的时候 也需根据 工程或者设计 整改单状态修改并网状态
LambdaUpdateWrapper
<
BasicGridRecord
>
qu
=
new
LambdaUpdateWrapper
();
qu
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
if
(!
CollectionUtil
.
isEmpty
(
list
))
{
List
<
String
>
collect
=
list
.
stream
().
map
(
HygfRectificationOrder:
:
getRectificationStatus
).
collect
(
Collectors
.
toList
());
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
collect
.
contains
(
WorkOrderEnum
.
待审核
.
getCode
())?
GridStatusEnum
.
ZGDSH
.
getCode
():
GridStatusEnum
.
DZG
.
getCode
());
}
else
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
List
<
String
>
collect
=
list
.
stream
().
map
(
HygfRectificationOrder:
:
getRectificationStatus
)
.
collect
(
Collectors
.
toList
());
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
collect
.
contains
(
WorkOrderEnum
.
待审核
.
getCode
())
?
GridStatusEnum
.
ZGDSH
.
getCode
()
:
GridStatusEnum
.
DZG
.
getCode
());
}
else
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
DZG
.
getCode
());
}
basicGridRecordService
.
update
(
null
,
qu
);
basicGridRecordService
.
update
(
null
,
qu
);
}
return
CommonResponseNewUtil
.
success
();
return
CommonResponseNewUtil
.
success
();
}
public
ResponseModel
rollback
(
Long
sequenceNbr
)
{
HygfRectificationOrder
hygfRectificationOrder
=
rectificationOrderService
.
getBaseMapper
().
selectById
(
sequenceNbr
);
//查询当前并网数据
HygfRectificationOrder
hygfRectificationOrder
=
rectificationOrderService
.
getBaseMapper
()
.
selectById
(
sequenceNbr
);
// 查询当前并网数据
LambdaQueryWrapper
<
BasicGridRecord
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wrapper
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
BasicGridRecord
basicGridRecord
=
basicGridRecordService
.
getBaseMapper
().
selectOne
(
wrapper
);
if
(!
basicGridRecord
.
getBasicGridNode
().
contains
(
hygfRectificationOrder
.
getRectificationSource
())){
return
CommonResponseNewUtil
.
failureMessage
(
"当前流程发生变化,暂时无法操作,请刷新再试"
);
if
(!
basicGridRecord
.
getBasicGridNode
().
contains
(
hygfRectificationOrder
.
getRectificationSource
()))
{
return
CommonResponseNewUtil
.
failureMessage
(
"当前流程发生变化,暂时无法操作,请刷新再试"
);
}
LambdaUpdateWrapper
<
BasicGridRecord
>
qu
=
new
LambdaUpdateWrapper
();
qu
.
eq
(
BasicGridRecord:
:
getPeasantHouseholdId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
WorkOrderEnum
.
待提交
.
getCode
())
||
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
WorkOrderEnum
.
待整改
.
getCode
()))
{
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
WorkOrderEnum
.
待提交
.
getCode
())
||
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
WorkOrderEnum
.
待整改
.
getCode
()))
{
rectificationOrderAuditingService
.
rollback
(
sequenceNbr
);
List
<
String
>
status
=
new
ArrayList
<>(
Arrays
.
asList
(
basicGridRecord
.
getRectificationStatus
().
split
(
","
)));
status
.
remove
(
hygfRectificationOrder
.
getRectificationSource
());
if
(
status
.
size
()<
1
)
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
null
);
}
else
{
if
(
status
.
size
()
<
1
)
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
null
);
}
else
{
qu
.
set
(
BasicGridRecord:
:
getRectificationStatus
,
String
.
join
(
","
,
status
));
basicGridRecordService
.
getBaseMapper
().
update
(
null
,
qu
);
}
}
else
{
return
CommonResponseNewUtil
.
failureMessage
(
"仅单据状态为待提交或待整改时方可作废"
);
}
else
{
return
CommonResponseNewUtil
.
failureMessage
(
"仅单据状态为待提交或待整改时方可作废"
);
}
if
(
hygfRectificationOrder
.
getRectificationSource
().
equals
(
"bw-area"
))
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
PQYYDSH
.
getCode
());
}
else
{
if
(
hygfRectificationOrder
.
getRectificationSource
().
equals
(
"bw-area"
)){
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
PQYYDSH
.
getCode
());
}
else
{
//查询是否还有其它类型待整改的整改单存在 若存在后置节点为当前并网状态
LambdaQueryWrapper
<
HygfRectificationOrder
>
wr
=
new
LambdaQueryWrapper
<>();
wr
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wr
.
notIn
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待提交"
,
"已作废"
,
"已完成"
));
wr
.
ne
(
BaseEntity:
:
getSequenceNbr
,
hygfRectificationOrder
.
getSequenceNbr
());
// 查询是否还有其它类型待整改的整改单存在 若存在后置节点为当前并网状态
LambdaQueryWrapper
<
HygfRectificationOrder
>
wr
=
new
LambdaQueryWrapper
<>();
wr
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
hygfRectificationOrder
.
getPeasantHouseholeId
());
wr
.
notIn
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待提交"
,
"已作废"
,
"已完成"
));
wr
.
ne
(
BaseEntity:
:
getSequenceNbr
,
hygfRectificationOrder
.
getSequenceNbr
());
List
<
HygfRectificationOrder
>
list
=
rectificationOrderService
.
getBaseMapper
().
selectList
(
wr
);
if
(
CollectionUtil
.
isEmpty
(
list
))
{
//若两者状态都为空 说明均为审核 若某一审核状态为空 则审核状态修改为为空审核节点
if
(
Objects
.
isNull
(
basicGridRecord
.
getPowerStationDesignStatus
()
)
&&
Objects
.
isNull
(
basicGridRecord
.
getPowerStationEngineeringStatus
())){
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ROLESDSH
.
getCode
());
}
else
if
(
Objects
.
isNull
(
basicGridRecord
.
getPowerStationDesignStatus
()
)
)
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
GCDSH
.
getCode
());
//
若两者状态都为空 说明均为审核 若某一审核状态为空 则审核状态修改为为空审核节点
if
(
Objects
.
isNull
(
basicGridRecord
.
getPowerStationDesignStatus
())
&&
Objects
.
isNull
(
basicGridRecord
.
getPowerStationEngineeringStatus
()))
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
ROLESDSH
.
getCode
());
}
else
if
(
Objects
.
isNull
(
basicGridRecord
.
getPowerStationDesignStatus
()))
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
SJDSH
.
getCode
());
}
else
{
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
GridStatusEnum
.
GCDSH
.
getCode
());
}
}
else
{
List
<
String
>
collect
=
list
.
stream
().
map
(
HygfRectificationOrder:
:
getRectificationStatus
).
collect
(
Collectors
.
toList
());
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
collect
.
contains
(
WorkOrderEnum
.
待审核
.
getCode
())?
GridStatusEnum
.
ZGDSH
.
getCode
():
GridStatusEnum
.
DZG
.
getCode
());
}
else
{
List
<
String
>
collect
=
list
.
stream
().
map
(
HygfRectificationOrder:
:
getRectificationStatus
)
.
collect
(
Collectors
.
toList
());
qu
.
set
(
BasicGridRecord:
:
getGridStatus
,
collect
.
contains
(
WorkOrderEnum
.
待审核
.
getCode
())
?
GridStatusEnum
.
ZGDSH
.
getCode
()
:
GridStatusEnum
.
DZG
.
getCode
());
}
}
basicGridRecordService
.
update
(
null
,
qu
);
return
CommonResponseNewUtil
.
success
();
basicGridRecordService
.
update
(
null
,
qu
);
return
CommonResponseNewUtil
.
success
();
}
}
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 @
4fdb1e06
...
...
@@ -231,12 +231,12 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
* 分页查询
*/
public
Page
<
PeasantHousehold
>
queryForPeasantHouseholdPage
(
Page
<
PeasantHousehold
>
page
,
String
developerCode
,
String
ownersName
,
Long
developerId
,
Integer
isCertified
,
String
preparationMoneyState
,
String
peasantHouseholdNo
)
{
public
Page
<
PeasantHousehold
>
queryForPeasantHouseholdPage
(
Page
<
PeasantHousehold
>
page
,
String
developerCode
,
String
ownersName
,
Long
developerId
,
Integer
isCertified
,
String
preparationMoneyState
,
String
peasantHouseholdNo
,
String
province
)
{
int
current
=
(
int
)
page
.
getCurrent
();
int
size
=
(
int
)
page
.
getSize
();
PageHelper
.
startPage
(
current
,
size
);
List
<
PeasantHousehold
>
records
=
peasantHouseholdMapper
.
queryForPage
(
developerCode
,
ownersName
,
developerId
,
isCertified
,
preparationMoneyState
,
peasantHouseholdNo
);
List
<
PeasantHousehold
>
records
=
peasantHouseholdMapper
.
queryForPage
(
developerCode
,
ownersName
,
developerId
,
isCertified
,
preparationMoneyState
,
peasantHouseholdNo
,
province
);
PageInfo
<
PeasantHousehold
>
objectPageInfo
=
new
PageInfo
<
PeasantHousehold
>(
records
);
...
...
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