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
ffca4df9
Commit
ffca4df9
authored
Oct 08, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
存量合同新增
parent
cd5fd404
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
228 additions
and
24 deletions
+228
-24
SurveyInformationDto.java
...n/amos/boot/module/hygf/api/dto/SurveyInformationDto.java
+29
-12
PeasantHousehold.java
...in/amos/boot/module/hygf/api/entity/PeasantHousehold.java
+5
-0
PowerStationEngineeringInfo.java
...t/module/hygf/api/entity/PowerStationEngineeringInfo.java
+1
-0
SurveyInformation.java
...n/amos/boot/module/hygf/api/entity/SurveyInformation.java
+2
-0
PeasantHouseholdMapper.java
...s/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
+3
-2
PowerStationEngineeringInfoMapper.java
...le/hygf/api/mapper/PowerStationEngineeringInfoMapper.java
+2
-0
FinancingInfoMapper.xml
...i/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
+10
-0
PeasantHouseholdMapper.xml
...rc/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
+29
-0
PowerStationEngineeringInfoMapper.xml
...ources/mapper/mysql/PowerStationEngineeringInfoMapper.xml
+11
-0
FinancingInfoController.java
...t/module/hygf/biz/controller/FinancingInfoController.java
+2
-1
PeasantHouseholdController.java
...odule/hygf/biz/controller/PeasantHouseholdController.java
+38
-1
PeasantHouseholdWxController.java
...ule/hygf/biz/controller/PeasantHouseholdWxController.java
+8
-0
SurveyInformationController.java
...dule/hygf/biz/controller/SurveyInformationController.java
+15
-3
WorkOrderController.java
.../boot/module/hygf/biz/controller/WorkOrderController.java
+9
-0
CommonServiceImpl.java
.../boot/module/hygf/biz/service/impl/CommonServiceImpl.java
+42
-0
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+22
-5
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+0
-0
WorkOrderServiceImpl.java
...ot/module/hygf/biz/service/impl/WorkOrderServiceImpl.java
+0
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/SurveyInformationDto.java
View file @
ffca4df9
...
...
@@ -9,6 +9,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -21,10 +23,10 @@ import java.util.List;
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"SurveyInformationDto"
,
description
=
"勘察信息"
)
public
class
SurveyInformationDto
extends
BaseDto
{
@ApiModel
(
value
=
"SurveyInformationDto"
,
description
=
"勘察信息"
)
public
class
SurveyInformationDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"勘察编号"
)
...
...
@@ -49,7 +51,7 @@ public class SurveyInformationDto extends BaseDto {
@ApiModelProperty
(
value
=
"制单人"
)
private
String
creator
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"制单时间"
)
private
Date
creatorTime
;
...
...
@@ -81,12 +83,12 @@ public class SurveyInformationDto extends BaseDto {
private
String
permanentAddressDetail
;
@ApiModelProperty
(
value
=
"项目地址code"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Integer
>
projectAddress
;
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Integer
>
projectAddress
;
@ApiModelProperty
(
value
=
"项目地址文字"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
projectAddressText
;
@ApiModelProperty
(
value
=
"项目地址文字"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
projectAddressText
;
@ApiModelProperty
(
value
=
"项目地址"
)
private
String
projectAddressName
;
...
...
@@ -95,9 +97,9 @@ public class SurveyInformationDto extends BaseDto {
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Integer
>
permanentAddress
;
@ApiModelProperty
(
value
=
"常住地址文字"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
permanentAddressText
;
@ApiModelProperty
(
value
=
"常住地址文字"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
permanentAddressText
;
@ApiModelProperty
(
value
=
"常住是否相同"
)
private
String
isPermanent
;
...
...
@@ -106,4 +108,19 @@ public class SurveyInformationDto extends BaseDto {
@ApiModelProperty
(
value
=
"定金"
)
private
Float
deposit
;
@ApiModelProperty
(
value
=
"区域公司id"
)
@NotNull
(
message
=
"区域公司id不能为空"
)
private
Long
regionalCompaniesSeq
;
@ApiModelProperty
(
value
=
"农户id"
)
private
Long
peasantHouseholdId
;
@ApiModelProperty
(
value
=
"身份证正面"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
idCardFront
;
@ApiModelProperty
(
value
=
"身份证反面"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
idCardOpposite
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PeasantHousehold.java
View file @
ffca4df9
...
...
@@ -183,6 +183,11 @@ public class PeasantHousehold extends BaseEntity {
* */
@TableField
(
"amos_user_id"
)
private
String
amosUserId
;
/*
* 是否历史电站
* */
@TableField
(
"is_history"
)
private
String
isHistory
;
@TableField
(
exist
=
false
)
protected
Long
stationId
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PowerStationEngineeringInfo.java
View file @
ffca4df9
...
...
@@ -112,6 +112,7 @@ public class PowerStationEngineeringInfo extends BaseEntity {
@TableField
(
value
=
"completion_date"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
completionDate
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/SurveyInformation.java
View file @
ffca4df9
...
...
@@ -3,11 +3,13 @@ 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
org.joda.time.LocalDateTime
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
View file @
ffca4df9
...
...
@@ -29,8 +29,8 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
@Param
(
"ids"
)
String
ids
);
@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
,
String
province
);
@UserEmpower
(
field
={
"regional_companies_code"
},
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
,
String
province
,
String
isHistory
,
String
regionalCompaniesSeq
);
List
<
Map
<
String
,
Object
>>
selectUserIsHouse
(
String
telephone
);
...
...
@@ -52,5 +52,6 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
void
deleteHhcByNo
(
String
peasantHouseholdNo
);
List
<
PeasantHousehold
>
getInfoByIds
(
@Param
(
value
=
"ids"
)
List
<
String
>
ids
);
List
<
PeasantHousehold
>
getInfoByIdsHistory
(
@Param
(
value
=
"ids"
)
List
<
String
>
ids
);
// String getHygfCommercialScale(Long surveyInformationId);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PowerStationEngineeringInfoMapper.java
View file @
ffca4df9
...
...
@@ -17,4 +17,6 @@ public interface PowerStationEngineeringInfoMapper extends BaseMapper<PowerStati
String
getRealScaleByPeasantHouseholdNo
(
String
peasantHouseholdNumber
);
List
<
Map
<
String
,
String
>>
getRealScaleByPeasantHouseholdNoList
(
@Param
(
"list"
)
List
<
String
>
peasantHouseholdNumberList
);
String
getRealScaleByPeasantHouseholdNoIsHisotry
(
String
peasantHouseholdNumber
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
View file @
ffca4df9
...
...
@@ -18,6 +18,7 @@
CONCAT(info.disbursement_money,'') as disbursementMoney,
hph.regional_companies_code,
hph.developer_code,
hph.is_history isHistory,
info.financing_companies_name financingCompaniesName
FROM
`hygf_peasant_household` hph
...
...
@@ -28,9 +29,18 @@
<if
test=
"params.ownersName != null and params.ownersName !=''"
>
and hph.owners_name like concat('%',#{params.ownersName},'%')
</if>
<if
test=
"params.isHistory != null and params.isHistory !='' and params.type != 2 "
>
and hph.is_history is not null
</if>
<if
test=
"(params.isHistory == null or params.isHistory == '') and params.type != 2"
>
and hph.is_history is null
</if>
<if
test=
"params.regionalCompaniesCode != null and params.regionalCompaniesCode !=''"
>
and hph.regional_companies_code = #{params.regionalCompaniesCode}
</if>
<if
test=
"params.batchNo != null and params.batchNo !=''"
>
and info.batch_no = #{batchNo}
</if>
<if
test=
"params.type == 2 "
>
and info.status in ('待融资审核','审核通过','放款完成','已放款','审核不通过' ) and info.financing_companies_seq = #{params.financingCompaniesSeq}
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
View file @
ffca4df9
...
...
@@ -77,6 +77,15 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
<if
test=
"province != null and province != ''"
>
and project_address like concat(concat('%',#{province}),'%')
</if>
<if
test=
"isHistory != null and isHistory != ''"
>
and is_history = '1'
</if>
<if
test=
"regionalCompaniesSeq != null and regionalCompaniesSeq != ''"
>
and regional_companies_seq = #{regionalCompaniesSeq}
</if>
<if
test=
"isHistory == null or isHistory == ''"
>
and is_history is null
</if>
ORDER BY creation_time DESC
</select>
<select
id=
"selectUserIsHouse"
resultType=
"java.util.Map"
>
...
...
@@ -158,6 +167,26 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
</where>
</select>
<select
id=
"getInfoByIdsHistory"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold"
>
SELECT
ph.sequence_nbr,
ph.owners_name,
concat( ph.project_address_name, ph.project_address_detail ) AS project_address_name,
(ei.component_quantity * ei.component_specification / 1000) as realScale
FROM
hygf_peasant_household ph
LEFT JOIN hygf_power_station_engineering_info ei ON ei.work_order_power_station_id= ph.sequence_nbr
<where>
ph.is_delete = 0
<if
test=
"ids != null and ids.size()>0"
>
AND ph.sequence_nbr IN
<foreach
collection=
"ids"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
</select>
<!-- <select id="getHygfCommercialScale" resultType="String">-->
<!-- select scale from hygf_commercial where survey_information_id=${surveyInformationId}-->
<!-- </select>-->
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PowerStationEngineeringInfoMapper.xml
View file @
ffca4df9
...
...
@@ -27,4 +27,15 @@
#{peasantHouseholdNo}
</foreach>
</select>
<select
id=
"getRealScaleByPeasantHouseholdNoIsHisotry"
resultType=
"String"
>
select
hpsei.real_scale realScale
from
hygf_peasant_household hph,
hygf_power_station_engineering_info hpsei
where
hph.peasant_household_no = #{peasantHouseholdNo} and
hph.sequence_nbr = hpsei.work_order_power_station_id
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/FinancingInfoController.java
View file @
ffca4df9
...
...
@@ -165,11 +165,12 @@ public class FinancingInfoController extends BaseController {
@RequestParam
(
value
=
"regionalCompaniesCode"
,
required
=
false
)
String
regionalCompaniesCode
,
@RequestParam
(
value
=
"region"
,
required
=
false
)
String
region
,
@RequestParam
(
value
=
"batchNo"
,
required
=
false
)
String
batchNo
,
@RequestParam
(
value
=
"isHistory"
,
required
=
false
)
String
isHistory
,
@RequestParam
(
value
=
"ownersName"
,
required
=
false
)
String
ownersName
){
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<
Map
<
String
,
Object
>>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
financingInfoServiceImpl
.
queryForFinancingInfoPage
(
page
,
type
,
status
,
regionalCompaniesCode
,
ownersName
,
region
,
batchNo
));
return
ResponseHelper
.
buildResponse
(
financingInfoServiceImpl
.
queryForFinancingInfoPage
(
page
,
type
,
status
,
regionalCompaniesCode
,
ownersName
,
region
,
batchNo
,
isHistory
));
}
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PeasantHouseholdController.java
View file @
ffca4df9
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.hygf.api.Enum.PeasantHouseholdEnum;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PeasantHouseholdDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationEngineeringInfoAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.SurveyInformationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
...
...
@@ -209,7 +210,9 @@ public class PeasantHouseholdController extends BaseController {
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"ownersName"
,
required
=
false
)
String
ownersName
,
@RequestParam
(
value
=
"preparationMoneyState"
,
required
=
false
)
String
preparationMoneyState
,
@RequestParam
(
value
=
"isHistory"
,
required
=
false
)
String
isHistory
,
@RequestParam
(
value
=
"developerId"
,
required
=
false
)
Long
developerId
,
@RequestParam
(
value
=
"regionalCompaniesSeq"
,
required
=
false
)
String
regionalCompaniesSeq
,
@RequestParam
(
value
=
"peasantHouseholdNo"
,
required
=
false
)
String
peasantHouseholdNo
,
@RequestParam
(
value
=
"province"
,
required
=
false
)
String
province
)
{
Page
<
PeasantHousehold
>
page
=
new
Page
<
PeasantHousehold
>();
...
...
@@ -224,7 +227,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
,
province
));
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
queryForPeasantHouseholdPage
(
page
,
null
,
ownersName
,
developerId
,
isCertified
,
preparationMoneyState
,
peasantHouseholdNo
,
province
,
isHistory
,
regionalCompaniesSeq
));
}
/**
...
...
@@ -281,6 +284,13 @@ public class PeasantHouseholdController extends BaseController {
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
getInfoByIds
(
ids
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"农户信息列表根据ids查询历史电站"
,
notes
=
"农户信息列表根据ids查询历史电站"
)
@GetMapping
(
value
=
"/getInfoByIdsHistory"
)
public
ResponseModel
<
List
<
PeasantHousehold
>>
getInfoByIdsHistory
(
String
ids
)
{
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
getInfoByIdsHistory
(
ids
));
}
/**
* 根据sequenceNbr和userId删除用户信息
...
...
@@ -294,4 +304,31 @@ public class PeasantHouseholdController extends BaseController {
public
ResponseModel
<
Boolean
>
deleteUser
(
@PathVariable
String
sequenceNbr
,
@PathVariable
String
peasantHouseholdNo
)
{
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
deleteUser
(
sequenceNbr
,
peasantHouseholdNo
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新详情信息"
,
notes
=
"更新详情信息"
)
@PostMapping
(
value
=
"/saveHistory"
)
public
ResponseModel
updateDetail
(
@RequestBody
PowerStationEngineeringInfoAllDto
powerStationEngineeringInfoAllDto
,
@RequestParam
(
value
=
"operationType"
)
String
operationType
)
{
peasantHouseholdServiceImpl
.
saveHistoryPeasantHousehold
(
powerStationEngineeringInfoAllDto
,
operationType
);
return
ResponseHelper
.
buildResponse
(
null
);
}
/**
* 批量删除
*
* @param sequenceNbrList 主键
* @return 返回结果
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Boolean
>
batchDeleteBySequenceNbrList
(
@RequestParam
List
<
Long
>
sequenceNbrList
)
{
for
(
Long
aLong
:
sequenceNbrList
)
{
peasantHouseholdServiceImpl
.
deletePeasantHouseholdBySequenceNbr
(
aLong
);
}
return
ResponseHelper
.
buildResponse
(
null
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PeasantHouseholdWxController.java
View file @
ffca4df9
...
...
@@ -136,6 +136,14 @@ public class PeasantHouseholdWxController extends BaseController {
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
getPeasantHousePage
(
peasantHouseholdPageDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getPeasantHouseHistoryPage"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"分页获取农户"
,
notes
=
"分页获取农户信息"
)
public
ResponseModel
<
IPage
<
PeasantHousehold
>>
getPeasantHouseHistoryPage
(
@RequestBody
PeasantHouseholdPageDto
peasantHouseholdPageDto
)
{
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
getPeasantHouseHistoryPage
(
peasantHouseholdPageDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/addPeasantHousehold"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增农户"
,
notes
=
"新增农户"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/SurveyInformationController.java
View file @
ffca4df9
...
...
@@ -2,12 +2,15 @@ package com.yeejoin.amos.boot.module.hygf.biz.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationEngineeringInfoAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.SurveyInfoAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.SurveyInformationDto
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.SurveyInformationServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.WorkOrderServiceImpl
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -31,6 +34,8 @@ public class SurveyInformationController extends BaseController {
@Autowired
SurveyInformationServiceImpl
surveyInformationServiceImpl
;
@Autowired
WorkOrderServiceImpl
workOrderService
;
/**
* 新增勘察信息
...
...
@@ -138,11 +143,18 @@ public class SurveyInformationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"勘察信息编辑"
,
notes
=
"勘察信息编辑"
)
@GetMapping
(
value
=
"/surveyQuery"
)
public
ResponseModel
<
SurveyInfoAllDto
>
surveyQuery
(
@RequestParam
(
value
=
"surveyInformationId"
,
required
=
false
)
String
surveyInformationId
,
public
ResponseModel
<
Object
>
surveyQuery
(
@RequestParam
(
value
=
"surveyInformationId"
,
required
=
false
)
String
surveyInformationId
,
@RequestParam
(
value
=
"peasantHouseholdId"
,
required
=
false
)
String
peasantHouseholdId
,
@RequestParam
(
value
=
"isHistory"
,
required
=
false
)
String
isHistory
,
@RequestParam
(
value
=
"processInstanceId"
,
required
=
false
)
String
processInstanceId
)
{
AgencyUserModel
userInfo
=
getUserInfo
();
SurveyInfoAllDto
returnDto
=
surveyInformationServiceImpl
.
querySurveyInfo
(
surveyInformationId
,
peasantHouseholdId
,
processInstanceId
,
userInfo
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
if
(
StringUtils
.
isNotEmpty
(
isHistory
)){
PowerStationEngineeringInfoAllDto
powerStationEngineeringInfoHistory
=
workOrderService
.
getPowerStationEngineeringInfoHistory
(
Long
.
valueOf
(
peasantHouseholdId
),
processInstanceId
);
return
ResponseHelper
.
buildResponse
(
powerStationEngineeringInfoHistory
);
}
else
{
SurveyInfoAllDto
returnDto
=
surveyInformationServiceImpl
.
querySurveyInfo
(
surveyInformationId
,
peasantHouseholdId
,
processInstanceId
,
userInfo
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/WorkOrderController.java
View file @
ffca4df9
...
...
@@ -337,6 +337,15 @@ public class WorkOrderController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"完工登记详情"
,
notes
=
"完工登记详情"
)
@GetMapping
(
value
=
"/getPowerStationEngineeringInfoHistory"
)
public
ResponseModel
<
PowerStationEngineeringInfoAllDto
>
getPowerStationEngineeringInfoHistory
(
@RequestParam
(
value
=
"peasantHouseholdId"
)
Long
peasantHouseholdId
,
@RequestParam
(
value
=
"processInstanceId"
,
required
=
false
)
String
processInstanceId
)
{
PowerStationEngineeringInfoAllDto
returnDto
=
workOrderServiceImpl
.
getPowerStationEngineeringInfoHistory
(
peasantHouseholdId
,
processInstanceId
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"完工登记"
,
notes
=
"完工登记"
)
@PostMapping
(
value
=
"/addPowerStationEngineeringInfo"
)
public
ResponseModel
<
PowerStationEngineeringInfoAllDto
>
addPowerStationEngineeringInfo
(
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/CommonServiceImpl.java
View file @
ffca4df9
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -13,6 +14,9 @@ import com.yeejoin.amos.boot.module.hygf.api.Enum.FlowStatusEnum;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.hygf.api.util.JsonUtils
;
import
com.yeejoin.amos.boot.module.hygf.biz.feign.TaskV2FeignService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -45,6 +49,10 @@ public class CommonServiceImpl {
@Value
(
"classpath:/json/urlInfo.json"
)
private
Resource
urlInfo
;
private
static
final
String
regionRedis
=
"app_region_redis"
;
@Autowired
RedisUtils
redisUtil
;
private
static
String
toQueryParams2
(
JSONObject
jsonObject
)
{
StringBuilder
sb
=
new
StringBuilder
();
Set
<
String
>
keys
=
jsonObject
.
keySet
();
...
...
@@ -362,4 +370,37 @@ public class CommonServiceImpl {
return
sb
.
length
()
>
0
?
sb
.
substring
(
0
,
sb
.
length
()
-
1
)
:
""
;
}
public
JSONArray
getRegionName
()
{
JSONArray
jsonArray
=
new
JSONArray
();
if
(
redisUtil
.
hasKey
(
regionRedis
))
{
jsonArray
=
JSONArray
.
parseArray
(
redisUtil
.
get
(
regionRedis
).
toString
());
}
else
{
Collection
<
RegionModel
>
regionChild
=
new
ArrayList
<>();
RegionModel
regionModel1
=
new
RegionModel
();
regionChild
.
add
(
regionModel1
);
FeignClientResult
<
Collection
<
RegionModel
>>
collectionFeignClientResult
=
Systemctl
.
regionClient
.
queryForTreeParent
(
null
);
Collection
<
RegionModel
>
result
=
collectionFeignClientResult
.
getResult
();
for
(
RegionModel
regionModel
:
result
)
{
if
(
null
!=
regionModel
&&
null
!=
regionModel
.
getChildren
())
{
for
(
RegionModel
child
:
regionModel
.
getChildren
())
{
if
(
null
!=
child
&&
null
!=
child
.
getChildren
())
{
for
(
RegionModel
childChild
:
child
.
getChildren
())
{
jsonArray
.
add
(
childChild
);
}
child
.
setChildren
(
regionChild
);
jsonArray
.
add
(
child
);
}
}
regionModel
.
setChildren
(
regionChild
);
jsonArray
.
add
(
regionModel
);
}
else
{
jsonArray
.
add
(
regionModel
);
}
}
redisUtil
.
set
(
regionRedis
,
jsonArray
);
}
return
jsonArray
;
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingInfoServiceImpl.java
View file @
ffca4df9
...
...
@@ -88,7 +88,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
private
RedisLockUtil
redisLockUtil
;
@UserLimits
public
Page
<
Map
<
String
,
Object
>>
queryForFinancingInfoPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
type
,
String
status
,
String
regionalCompaniesCode
,
String
ownersName
,
String
region
,
String
batchNo
)
{
public
Page
<
Map
<
String
,
Object
>>
queryForFinancingInfoPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
type
,
String
status
,
String
regionalCompaniesCode
,
String
ownersName
,
String
region
,
String
batchNo
,
String
isHistory
)
{
StdUserEmpower
orgCode
=
(
StdUserEmpower
)
redisUtils
.
get
(
"Emp_"
+
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()));
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
List
<
String
>
amosOrgCodes
=
orgCode
.
getAmosOrgCode
();
...
...
@@ -99,6 +99,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
}
params
.
put
(
"regionalCompaniesCode"
,
regionalCompaniesCode
);
params
.
put
(
"type"
,
type
);
params
.
put
(
"batchNo"
,
batchNo
);
params
.
put
(
"isHistory"
,
isHistory
);
params
.
put
(
"region"
,
region
);
// 1 投融人员 2.融资 3经销商管理员
switch
(
type
)
{
...
...
@@ -115,8 +117,11 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
List
<
Map
<
String
,
Object
>>
list
=
financingInfoMapper
.
getStationFinancingInfoList
(
params
,
amosOrgCodes
);
list
.
forEach
(
e
->
{
e
.
put
(
"scale"
,
householdContractMapper
.
getHygfCommercialScale
((
String
)
e
.
get
(
"peasantHouseholdNo"
)));
e
.
put
(
"realScale"
,
powerStationEngineeringInfoMapper
.
getRealScaleByPeasantHouseholdNo
((
String
)
e
.
get
(
"peasantHouseholdNo"
)));
if
(
e
.
containsKey
(
"isHistory"
)
&&
e
.
get
(
"isHistory"
).
toString
().
equals
(
"1"
)){
e
.
put
(
"realScale"
,
powerStationEngineeringInfoMapper
.
getRealScaleByPeasantHouseholdNoIsHisotry
((
String
)
e
.
get
(
"peasantHouseholdNo"
)));
}
else
{
e
.
put
(
"realScale"
,
powerStationEngineeringInfoMapper
.
getRealScaleByPeasantHouseholdNo
((
String
)
e
.
get
(
"peasantHouseholdNo"
)));
}
e
.
put
(
"regionName"
,
e
.
get
(
"projectAddress"
).
toString
().
split
(
"/"
)[
0
]);
if
(
null
!=
e
.
get
(
"instanceId"
)
&&
e
.
get
(
"instanceId"
).
toString
().
contains
(
","
))
{
String
[]
instanceIds
=
e
.
get
(
"instanceId"
).
toString
().
split
(
","
);
...
...
@@ -351,16 +356,28 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
//标识对于整改待推送状态
if
(
params
.
containsKey
(
"isZG"
))
{
financingInfo
.
setStatus
(
"待推送"
);
}
else
{
}
else
{
financingInfo
.
setStatus
(
statusName
);
}
if
(
params
.
containsKey
(
"isHistory"
))
{
financingInfo
.
setStatus
(
"退回建档"
);
}
this
.
updateById
(
financingInfo
);
//节点为待整改时生成整改单
if
(
params
.
containsKey
(
"isFlag"
)
&&
params
.
get
(
"isFlag"
).
equals
(
"1"
)
&&
workflowResultDto
.
getNextNodeKey
().
equals
(
FinancingAuditEnum
.
待整改
.
getCode
()))
{
this
.
sendBack
(
financingInfo
.
getPeasantHouseholdId
());
if
(
params
.
containsKey
(
"isHistory"
)){
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
"待提交"
);
up
.
eq
(
BaseEntity:
:
getSequenceNbr
,
financingAuditing
.
getPeasantHouseholdId
());
peasantHouseholdService
.
getBaseMapper
().
update
(
null
,
up
);
}
else
if
(!
params
.
containsKey
(
"isHistory"
)){
this
.
sendBack
(
financingInfo
.
getPeasantHouseholdId
());
}
// LambdaQueryWrapper<FinancingRectificationOrder> queryWrapper = new LambdaQueryWrapper<>();
// queryWrapper.eq(FinancingRectificationOrder::getPeasantHouseholdId, financingInfo.getPeasantHouseholdId());
...
...
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 @
ffca4df9
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/WorkOrderServiceImpl.java
View file @
ffca4df9
This diff is collapsed.
Click to expand it.
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