Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
6be70214
Commit
6be70214
authored
Jan 16, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
施工自审
parent
6a462d9c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
221 additions
and
14 deletions
+221
-14
ConstructionRecordsDto.java
...amos/boot/module/hygf/api/dto/ConstructionRecordsDto.java
+3
-0
PowerStationEngineeringInfoAllDto.java
...odule/hygf/api/dto/PowerStationEngineeringInfoAllDto.java
+5
-7
ConstructionRecords.java
...amos/boot/module/hygf/api/entity/ConstructionRecords.java
+26
-0
HygfOnGrid.java
.../yeejoin/amos/boot/module/hygf/api/entity/HygfOnGrid.java
+1
-1
WorkOrderController.java
.../boot/module/hygf/biz/controller/WorkOrderController.java
+18
-0
WorkOrderServiceImpl.java
...ot/module/hygf/biz/service/impl/WorkOrderServiceImpl.java
+168
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/ConstructionRecordsDto.java
View file @
6be70214
...
...
@@ -42,4 +42,7 @@ public class ConstructionRecordsDto extends BaseDto {
@ApiModelProperty
(
value
=
"农户id"
)
private
Long
peasantHouseholdId
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
notes
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/PowerStationEngineeringInfoAllDto.java
View file @
6be70214
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HygfOnGrid
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PowerStationConstructionData
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PowerStationEngineeringInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.WorkOrder
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
lombok.Data
;
/**
...
...
@@ -14,10 +11,12 @@ import lombok.Data;
@Data
public
class
PowerStationEngineeringInfoAllDto
{
// 基本信息
SurveyInformationDto
surveyInformation
;
//自审信息
ConstructionRecords
constructionRecords
;
// 基本信息
SurveyInformationDto
surveyInformation
;
Long
workOrderPowerStationId
;
...
...
@@ -28,7 +27,6 @@ public class PowerStationEngineeringInfoAllDto {
SurveyDetailsDto
surveyDetails
;
// 扩展信息
ExtendedInformationDto
extendedInformation
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/ConstructionRecords.java
View file @
6be70214
...
...
@@ -3,10 +3,12 @@ package com.yeejoin.amos.boot.module.hygf.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.List
;
/**
* 施工日志
...
...
@@ -64,4 +66,28 @@ public class ConstructionRecords extends BaseEntity {
@TableField
(
"peasant_household_id"
)
private
Long
peasantHouseholdId
;
@TableField
(
"notes"
)
private
String
notes
;
public
ConstructionRecords
(
String
operator
,
String
operationContent
,
Date
operationTime
,
String
operationResults
,
Long
workOrderId
,
Long
workOrderPowerStationId
,
Long
peasantHouseholdId
,
String
notes
)
{
this
.
operator
=
operator
;
this
.
operationContent
=
operationContent
;
this
.
operationTime
=
operationTime
;
this
.
operationResults
=
operationResults
;
this
.
workOrderId
=
workOrderId
;
this
.
workOrderPowerStationId
=
workOrderPowerStationId
;
this
.
peasantHouseholdId
=
peasantHouseholdId
;
this
.
notes
=
notes
;
}
public
ConstructionRecords
()
{
}
@TableField
(
exist
=
false
)
List
<
ConstructionRecords
>
constructionRecordsList
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/HygfOnGrid.java
View file @
6be70214
...
...
@@ -21,7 +21,7 @@ import java.util.List;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
value
=
"hygf_on_grid"
,
autoResultMap
=
true
)
@TableName
(
value
=
"hygf_on_grid
_and_acceptance
"
,
autoResultMap
=
true
)
public
class
HygfOnGrid
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/WorkOrderController.java
View file @
6be70214
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.ConstructionRecords
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PowerStationConstructionData
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.WorkOrder
;
...
...
@@ -272,9 +273,26 @@ public class WorkOrderController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"完工登记审核详情"
,
notes
=
"完工登记审核详情"
)
@GetMapping
(
value
=
"/getConstructionRecords"
)
public
ResponseModel
<
PowerStationEngineeringInfoAllDto
>
getConstructionRecords
(
@RequestParam
(
value
=
"workOrderPowerStationId"
)
Long
workOrderPowerStationId
)
{
PowerStationEngineeringInfoAllDto
returnDto
=
workOrderServiceImpl
.
getConstructionRecords
(
workOrderPowerStationId
,
getUserInfo
().
getRealName
());
return
ResponseHelper
.
buildResponse
(
returnDto
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"完工登记审核"
,
notes
=
"完工登记审核"
)
@PostMapping
(
value
=
"/addConstructionRecords"
)
public
ResponseModel
<
ConstructionRecords
>
addConstructionRecords
(
@RequestBody
PowerStationEngineeringInfoAllDto
constructionRecords
)
{
ConstructionRecords
da
=
constructionRecords
.
getConstructionRecords
();
da
.
setWorkOrderPowerStationId
(
constructionRecords
.
getWorkOrderPowerStationId
());
ConstructionRecords
returnDto
=
workOrderServiceImpl
.
addConstructionRecords
(
da
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
}
...
...
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 @
6be70214
...
...
@@ -81,7 +81,10 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
@Autowired
HygfOnGridMapper
hygfOnGridMapper
;
@Autowired
ConstructionRecordsServiceImpl
constructionRecordsServiceImpl
;
@Autowired
ConstructionRecordsMapper
constructionRecordsMapper
;
/**
* 分页查询
*/
...
...
@@ -99,7 +102,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
@Transactional
public
WorkOrder
saveWorkOrder
(
WorkOrder
model
,
UserUnitInformationDto
userUnitInformationDto
)
{
//保存派工单
RegionalCompanies
regionalCompanies
=
regionalCompaniesMapper
.
selectRegionName
(
model
.
getRegionCompanyId
());
...
...
@@ -117,6 +120,8 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
workOrderMapper
.
insert
(
model
);
//保存派工单 电站信息
List
<
PeasantHousehold
>
peasantHouseholdId
=
model
.
getPeasantHouseholdId
();
List
<
ConstructionRecords
>
constructionRecordlist
=
new
ArrayList
<>();
List
<
WorkOrderPowerStation
>
li
=
new
ArrayList
<>();
for
(
PeasantHousehold
peasantHousehold
:
peasantHouseholdId
)
{
WorkOrderPowerStation
workOrderPowerStation
=
new
WorkOrderPowerStation
();
...
...
@@ -124,11 +129,30 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
workOrderPowerStation
.
setWorkOrderId
(
model
.
getSequenceNbr
());
workOrderPowerStation
.
setPowerStationConstructionStatus
(
WorkOrderEnum
.
待施工
.
getCode
());
li
.
add
(
workOrderPowerStation
);
}
workOrderPowerStationServiceImpl
.
saveBatch
(
li
);
return
model
;
}
for
(
WorkOrderPowerStation
workOrderPowerStation
:
li
)
{
//增加操作日志
ConstructionRecords
da
=
new
ConstructionRecords
(
workOrderPowerStation
.
getRecUserName
(),
"新建派工单"
,
new
Date
(),
""
,
workOrderPowerStation
.
getWorkOrderId
(),
workOrderPowerStation
.
getSequenceNbr
(),
workOrderPowerStation
.
getPeasantHouseholdId
(),
""
);
constructionRecordlist
.
add
(
da
);
}
constructionRecordsServiceImpl
.
saveBatch
(
constructionRecordlist
);
return
model
;
}
@Transactional
public
WorkOrder
updateWorkOrder
(
WorkOrder
model
,
UserUnitInformationDto
userUnitInformationDto
)
{
//保存派工单
RegionalCompanies
regionalCompanies
=
regionalCompaniesMapper
.
selectRegionName
(
model
.
getRegionCompanyId
());
...
...
@@ -155,6 +179,25 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
li
.
add
(
workOrderPowerStation
);
}
workOrderPowerStationServiceImpl
.
saveBatch
(
li
);
List
<
ConstructionRecords
>
constructionRecordlist
=
new
ArrayList
<>();
for
(
WorkOrderPowerStation
workOrderPowerStation
:
li
)
{
//增加操作日志
ConstructionRecords
da
=
new
ConstructionRecords
(
workOrderPowerStation
.
getRecUserName
(),
"编辑派工单"
,
new
Date
(),
""
,
workOrderPowerStation
.
getWorkOrderId
(),
workOrderPowerStation
.
getSequenceNbr
(),
workOrderPowerStation
.
getPeasantHouseholdId
(),
""
);
constructionRecordlist
.
add
(
da
);
}
constructionRecordsServiceImpl
.
saveBatch
(
constructionRecordlist
);
return
model
;
}
...
...
@@ -255,6 +298,38 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
powerStationConstructionDataService
.
saveOrUpdate
(
powerStationConstructionData
);
//增加操作日志
if
(
powerStationConstructionData
.
getSequenceNbr
()!=
null
){
ConstructionRecords
da
=
new
ConstructionRecords
(
powerStationConstructionData
.
getRecUserName
(),
"编辑施工资料"
,
new
Date
(),
""
,
powerStationConstructionData
.
getWorkOrderId
(),
powerStationConstructionData
.
getWorkOrderPowerStationId
(),
null
,
""
);
constructionRecordsServiceImpl
.
save
(
da
);
}
else
{
ConstructionRecords
da
=
new
ConstructionRecords
(
powerStationConstructionData
.
getRecUserName
(),
"新增施工资料"
,
new
Date
(),
""
,
powerStationConstructionData
.
getWorkOrderId
(),
powerStationConstructionData
.
getWorkOrderPowerStationId
(),
null
,
""
);
constructionRecordsServiceImpl
.
save
(
da
);
}
// }else{
// //修改施工电站状态
// LambdaUpdateWrapper<WorkOrderPowerStation> up=new LambdaUpdateWrapper();
...
...
@@ -592,6 +667,15 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
surveyInfoAllDto
.
setPowerStationEngineeringInfo
(
powerStationEngineeringInfo
);
surveyInfoAllDto
.
setWorkOrder
(
workOrder
);
//施工自审
LambdaQueryWrapper
<
ConstructionRecords
>
up5
=
new
LambdaQueryWrapper
();
up5
.
eq
(
ConstructionRecords:
:
getWorkOrderId
,
workOrderId
);
up5
.
eq
(
ConstructionRecords:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
up5
.
orderByDesc
(
ConstructionRecords:
:
getRecDate
);
List
<
ConstructionRecords
>
li
=
constructionRecordsMapper
.
selectList
(
up5
);
ConstructionRecords
data
=
new
ConstructionRecords
();
data
.
setConstructionRecordsList
(
li
);
surveyInfoAllDto
.
setConstructionRecords
(
data
);
return
surveyInfoAllDto
;
// LambdaQueryWrapper<PeasantHousehold> peasantHouseholdWrapper = new LambdaQueryWrapper<>();
// peasantHouseholdWrapper.eq(PeasantHousehold::getSequenceNbr, peasantHouseholdId);
...
...
@@ -662,7 +746,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
@Transactional
public
PowerStationEngineeringInfoAllDto
addPowerStationEngineeringInfo
(
PowerStationEngineeringInfoAllDto
powerStationEngineeringInfoAllDto
){
LambdaQueryWrapper
<
WorkOrderPowerStation
>
qu
=
new
LambdaQueryWrapper
();
qu
.
eq
(
WorkOrderPowerStation:
:
getSequenceNbr
,
powerStationEngineeringInfoAllDto
.
getWorkOrderPowerStationId
());
WorkOrderPowerStation
workOrderPowerStation
=
workOrderPowerStationMapper
.
selectOne
(
qu
);
...
...
@@ -684,12 +767,90 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
upq
.
set
(
WorkOrder:
:
getWorkOrderStatus
,
WorkOrderEnum
.
登记中
.
getCode
());
workOrderMapper
.
update
(
null
,
upq
);
}
//新增完工登记
PowerStationEngineeringInfo
powerStationEngineeringInfo
=
powerStationEngineeringInfoAllDto
.
getPowerStationEngineeringInfo
();
powerStationEngineeringInfo
.
setWorkOrderId
(
workOrderPowerStation
.
getWorkOrderId
());
powerStationEngineeringInfo
.
setWorkOrderPowerStationId
(
powerStationEngineeringInfoAllDto
.
getWorkOrderPowerStationId
());
powerStationEngineeringInfoMapper
.
insert
(
powerStationEngineeringInfo
);
//增加操作日志
ConstructionRecords
da
=
new
ConstructionRecords
(
powerStationEngineeringInfo
.
getRecUserName
(),
"完工登记"
,
new
Date
(),
""
,
workOrderPowerStation
.
getWorkOrderId
(),
workOrderPowerStation
.
getSequenceNbr
(),
workOrderPowerStation
.
getPeasantHouseholdId
(),
""
);
constructionRecordsServiceImpl
.
save
(
da
);
return
powerStationEngineeringInfoAllDto
;
}
public
PowerStationEngineeringInfoAllDto
getConstructionRecords
(
Long
workOrderPowerStationId
,
String
rename
)
{
LambdaQueryWrapper
<
WorkOrderPowerStation
>
qu
=
new
LambdaQueryWrapper
();
qu
.
eq
(
WorkOrderPowerStation:
:
getSequenceNbr
,
workOrderPowerStationId
);
WorkOrderPowerStation
workOrderPowerStation
=
workOrderPowerStationMapper
.
selectOne
(
qu
);
Long
peasantHouseholdId
=
workOrderPowerStation
.
getPeasantHouseholdId
();
Long
workOrderId
=
workOrderPowerStation
.
getWorkOrderId
();
PowerStationEngineeringInfoAllDto
surveyInfoAllDto
=
new
PowerStationEngineeringInfoAllDto
();
//施工自审
LambdaQueryWrapper
<
ConstructionRecords
>
up5
=
new
LambdaQueryWrapper
();
up5
.
eq
(
ConstructionRecords:
:
getWorkOrderId
,
workOrderId
);
up5
.
eq
(
ConstructionRecords:
:
getWorkOrderPowerStationId
,
workOrderPowerStationId
);
up5
.
orderByDesc
(
ConstructionRecords:
:
getRecDate
);
List
<
ConstructionRecords
>
li
=
constructionRecordsMapper
.
selectList
(
up5
);
ConstructionRecords
data
=
new
ConstructionRecords
();
data
.
setConstructionRecordsList
(
li
);
data
.
setOperationTime
(
new
Date
());
data
.
setOperator
(
rename
);
surveyInfoAllDto
.
setConstructionRecords
(
data
);
return
surveyInfoAllDto
;
}
@Transactional
public
ConstructionRecords
addConstructionRecords
(
ConstructionRecords
constructionRecords
){
LambdaQueryWrapper
<
WorkOrderPowerStation
>
qu
=
new
LambdaQueryWrapper
();
qu
.
eq
(
WorkOrderPowerStation:
:
getSequenceNbr
,
constructionRecords
.
getWorkOrderPowerStationId
());
WorkOrderPowerStation
workOrderPowerStation
=
workOrderPowerStationMapper
.
selectOne
(
qu
);
if
(
constructionRecords
.
getOperationResults
().
equals
(
"通过"
)){
//修改电站状态
workOrderPowerStation
.
setPowerStationConstructionStatus
(
WorkOrderEnum
.
已完工
.
getCode
());
}
else
{
//修改电站状态
workOrderPowerStation
.
setPowerStationConstructionStatus
(
WorkOrderEnum
.
未通过
.
getCode
());
}
workOrderPowerStationMapper
.
updateById
(
workOrderPowerStation
);
//修改派工单状态
LambdaQueryWrapper
<
WorkOrderPowerStation
>
qu1
=
new
LambdaQueryWrapper
();
qu1
.
eq
(
WorkOrderPowerStation:
:
getWorkOrderId
,
workOrderPowerStation
.
getWorkOrderId
());
List
<
String
>
d
=
new
ArrayList
<>();
d
.
add
(
WorkOrderEnum
.
施工中
.
getCode
());
d
.
add
(
WorkOrderEnum
.
待施工
.
getCode
());
d
.
add
(
WorkOrderEnum
.
待登记
.
getCode
());
d
.
add
(
WorkOrderEnum
.
待审核
.
getCode
());
qu1
.
in
(
WorkOrderPowerStation:
:
getPowerStationConstructionStatus
,
d
);
List
<
WorkOrderPowerStation
>
list
=
workOrderPowerStationMapper
.
selectList
(
qu1
);
LambdaUpdateWrapper
<
WorkOrder
>
upq
=
new
LambdaUpdateWrapper
();
upq
.
eq
(
WorkOrder:
:
getSequenceNbr
,
workOrderPowerStation
.
getWorkOrderId
());
if
(
list
==
null
&&
list
.
isEmpty
()){
upq
.
set
(
WorkOrder:
:
getWorkOrderStatus
,
WorkOrderEnum
.
已完工
.
getCode
());
workOrderMapper
.
update
(
null
,
upq
);
}
//增加操作日志
constructionRecords
.
setWorkOrderId
(
workOrderPowerStation
.
getWorkOrderId
());
constructionRecords
.
setWorkOrderPowerStationId
(
workOrderPowerStation
.
getSequenceNbr
());
constructionRecords
.
setPeasantHouseholdId
(
workOrderPowerStation
.
getPeasantHouseholdId
());
constructionRecordsServiceImpl
.
save
(
constructionRecords
);
return
constructionRecords
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment