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
1bf8f515
Commit
1bf8f515
authored
Oct 23, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
存量合同2.0开发
parent
8e13e551
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
880 additions
and
2 deletions
+880
-2
FinancingInfoHistoryDto.java
...mos/boot/module/hygf/api/dto/FinancingInfoHistoryDto.java
+60
-0
HistoryPeasantHouseholdDto.java
.../boot/module/hygf/api/dto/HistoryPeasantHouseholdDto.java
+85
-0
FinancingInfoHistory.java
...mos/boot/module/hygf/api/entity/FinancingInfoHistory.java
+91
-0
HistoryPeasantHousehold.java
.../boot/module/hygf/api/entity/HistoryPeasantHousehold.java
+98
-0
FinancingInfoHistoryMapper.java
...ot/module/hygf/api/mapper/FinancingInfoHistoryMapper.java
+14
-0
HistoryPeasantHouseholdMapper.java
...module/hygf/api/mapper/HistoryPeasantHouseholdMapper.java
+14
-0
IFinancingInfoHistoryService.java
...module/hygf/api/service/IFinancingInfoHistoryService.java
+12
-0
IHistoryPeasantHouseholdService.java
...ule/hygf/api/service/IHistoryPeasantHouseholdService.java
+12
-0
FinancingInfoHistoryMapper.xml
...ain/resources/mapper/mysql/FinancingInfoHistoryMapper.xml
+5
-0
HistoryPeasantHouseholdMapper.xml
.../resources/mapper/mysql/HistoryPeasantHouseholdMapper.xml
+5
-0
FinancingInfoHistoryController.java
...e/hygf/biz/controller/FinancingInfoHistoryController.java
+151
-0
HistoryPeasantHouseholdController.java
...ygf/biz/controller/HistoryPeasantHouseholdController.java
+162
-0
BasicGridAcceptanceServiceImpl.java
...hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
+1
-2
FinancingInfoHistoryServiceImpl.java
...ygf/biz/service/impl/FinancingInfoHistoryServiceImpl.java
+80
-0
HistoryPeasantHouseholdServiceImpl.java
.../biz/service/impl/HistoryPeasantHouseholdServiceImpl.java
+90
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/FinancingInfoHistoryDto.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
/**
* 投融信息
*
* @author system_generator
* @date 2024-10-22
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"FinancingInfoHistoryDto"
,
description
=
"投融信息"
)
public
class
FinancingInfoHistoryDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"所属融资公司id"
)
private
Long
financingCompaniesSeq
;
@ApiModelProperty
(
value
=
"所属融资公司名称"
)
private
String
financingCompaniesName
;
@ApiModelProperty
(
value
=
"所属融资公司code"
)
private
String
financingCompaniesCode
;
@ApiModelProperty
(
value
=
"农户id"
)
private
Long
peasantHouseholdId
;
@ApiModelProperty
(
value
=
"放款时间"
)
private
Date
disbursementTime
;
@ApiModelProperty
(
value
=
"元"
)
private
Double
disbursementMoney
;
@ApiModelProperty
(
value
=
"附件"
)
private
String
file
;
@ApiModelProperty
(
value
=
"状态"
)
private
String
status
;
@ApiModelProperty
(
value
=
"放款单价"
)
private
String
unitPrice
;
@ApiModelProperty
(
value
=
"批次号"
)
private
String
bacthNo
;
private
Long
regionalCompaniesSeq
;
@ApiModelProperty
(
value
=
"附件"
)
private
List
<
Object
>
files
;
List
<
PeasantHousehold
>
peasantHouseholds
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/HistoryPeasantHouseholdDto.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
/**
* 存量合同电站
*
* @author system_generator
* @date 2024-10-18
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"HistoryPeasantHouseholdDto"
,
description
=
"存量合同电站"
)
public
class
HistoryPeasantHouseholdDto
extends
BaseDto
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
@ExcelProperty
(
value
=
"农户姓名"
,
index
=
0
)
@ApiModelProperty
(
value
=
"农户姓名"
)
private
String
ownersName
;
@ExcelProperty
(
value
=
"身份证号"
,
index
=
1
)
@ApiModelProperty
(
value
=
"身份证号"
)
private
String
idCard
;
@ExcelProperty
(
value
=
"联系方式"
,
index
=
2
)
@ApiModelProperty
(
value
=
"联系方式"
)
private
String
telephone
;
@ExcelProperty
(
value
=
"省份"
,
index
=
3
)
@ApiModelProperty
(
value
=
"省份"
)
private
String
province
;
@ExcelProperty
(
value
=
"房屋地址"
,
index
=
4
)
@ApiModelProperty
(
value
=
"房屋地址"
)
private
String
houseAddress
;
@ExcelProperty
(
value
=
"并网容量"
,
index
=
5
)
@ApiModelProperty
(
value
=
"并网容量"
)
private
String
basicGridCapacity
;
@ExcelProperty
(
value
=
"并网日期"
,
index
=
6
)
@ApiModelProperty
(
value
=
"并网日期"
)
private
String
basicGridDate
;
@ExcelProperty
(
value
=
"农户编号"
,
index
=
7
)
@ApiModelProperty
(
value
=
"农户编号"
)
private
String
peasantHouseholdNo
;
@ExcelProperty
(
value
=
"购电合同"
,
index
=
8
)
@ApiModelProperty
(
value
=
"购电合同"
)
private
String
powerPurchaseContract
;
@ExcelProperty
(
value
=
"租赁合同"
,
index
=
9
)
@ApiModelProperty
(
value
=
"租赁合同"
)
private
String
leaseContract
;
/**
* 状态
*/
@ExcelIgnore
private
String
status
;
/**
* 附件地址
*/
@ExcelIgnore
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
fileUrl
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/FinancingInfoHistory.java
0 → 100644
View file @
1bf8f515
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
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* 投融信息
*
* @author system_generator
* @date 2024-10-22
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"hygf_financing_info_history"
)
public
class
FinancingInfoHistory
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 所属融资公司id
*/
@TableField
(
"financing_companies_seq"
)
private
Long
financingCompaniesSeq
;
/**
* 所属融资公司名称
*/
@TableField
(
"financing_companies_name"
)
private
String
financingCompaniesName
;
/**
* 所属融资公司code
*/
@TableField
(
"financing_companies_code"
)
private
String
financingCompaniesCode
;
/**
* 农户id
*/
@TableField
(
"peasant_household_id"
)
private
Long
peasantHouseholdId
;
/**
* 放款时间
*/
@TableField
(
"disbursement_time"
)
private
Date
disbursementTime
;
/**
* 元
*/
@TableField
(
"disbursement_money"
)
private
Double
disbursementMoney
;
/**
* 附件
*/
@TableField
(
"file"
)
private
String
file
;
/**
* 状态
*/
@TableField
(
"status"
)
private
String
status
;
/**
* 放款单价
*/
@TableField
(
"unit_price"
)
private
String
unitPrice
;
/**
* 批次号
*/
@TableField
(
"bacth_no"
)
private
String
bacthNo
;
/**
*
*/
@TableField
(
"regional_companies_seq"
)
private
Long
regionalCompaniesSeq
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/HistoryPeasantHousehold.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.List
;
/**
* 存量合同电站
*
* @author system_generator
* @date 2024-10-18
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"hygf_history_peasant_household"
)
public
class
HistoryPeasantHousehold
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 农户姓名
*/
@TableField
(
"owners_name"
)
private
String
ownersName
;
/**
* 身份证号
*/
@TableField
(
"id_card"
)
private
String
idCard
;
/**
* 联系方式
*/
@TableField
(
"telephone"
)
private
String
telephone
;
/**
* 房屋地址
*/
@TableField
(
"house_address"
)
private
String
houseAddress
;
/**
* 并网容量
*/
@TableField
(
"basic_grid_capacity"
)
private
String
basicGridCapacity
;
/**
* 并网日期
*/
@TableField
(
"basic_grid_date"
)
private
String
basicGridDate
;
/**
* 农户编号
*/
@TableField
(
"peasant_household_no"
)
private
String
peasantHouseholdNo
;
/**
* 购电合同
*/
@TableField
(
"power_purchase_contract"
)
private
String
powerPurchaseContract
;
/**
* 租赁合同
*/
@TableField
(
"lease_contract"
)
private
String
leaseContract
;
/**
* 状态
*/
@TableField
(
"status"
)
private
String
status
;
/**
* 附件信息
*/
@TableField
(
value
=
"file_url"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
fileUrl
;
/**
* 省份
*/
@TableField
(
"province"
)
private
String
province
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/FinancingInfoHistoryMapper.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfoHistory
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 投融信息 Mapper 接口
*
* @author system_generator
* @date 2024-10-22
*/
public
interface
FinancingInfoHistoryMapper
extends
BaseMapper
<
FinancingInfoHistory
>
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/HistoryPeasantHouseholdMapper.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HistoryPeasantHousehold
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 存量合同电站 Mapper 接口
*
* @author system_generator
* @date 2024-10-18
*/
public
interface
HistoryPeasantHouseholdMapper
extends
BaseMapper
<
HistoryPeasantHousehold
>
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IFinancingInfoHistoryService.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
/**
* 投融信息接口类
*
* @author system_generator
* @date 2024-10-22
*/
public
interface
IFinancingInfoHistoryService
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IHistoryPeasantHouseholdService.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
/**
* 存量合同电站接口类
*
* @author system_generator
* @date 2024-10-18
*/
public
interface
IHistoryPeasantHouseholdService
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingInfoHistoryMapper.xml
0 → 100644
View file @
1bf8f515
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoHistoryMapper"
>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/HistoryPeasantHouseholdMapper.xml
0 → 100644
View file @
1bf8f515
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.HistoryPeasantHouseholdMapper"
>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/FinancingInfoHistoryController.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.IdsDTO
;
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.List
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingInfoHistoryServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoHistoryDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
* 投融信息
*
* @author system_generator
* @date 2024-10-22
*/
@RestController
@Api
(
tags
=
"投融信息Api"
)
@RequestMapping
(
value
=
"/financing-info-history"
)
public
class
FinancingInfoHistoryController
extends
BaseController
{
@Autowired
FinancingInfoHistoryServiceImpl
financingInfoHistoryServiceImpl
;
/**
* 新增投融信息
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增投融信息"
,
notes
=
"新增投融信息"
)
public
ResponseModel
<
FinancingInfoHistoryDto
>
save
(
@RequestBody
FinancingInfoHistoryDto
model
)
{
model
=
financingInfoHistoryServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新投融信息"
,
notes
=
"根据sequenceNbr更新投融信息"
)
public
ResponseModel
<
FinancingInfoHistoryDto
>
updateBySequenceNbrFinancingInfoHistory
(
@RequestBody
FinancingInfoHistoryDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
financingInfoHistoryServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除投融信息"
,
notes
=
"根据sequenceNbr删除投融信息"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
financingInfoHistoryServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个投融信息"
,
notes
=
"根据sequenceNbr查询单个投融信息"
)
public
ResponseModel
<
FinancingInfoHistoryDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
financingInfoHistoryServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"投融信息分页查询"
,
notes
=
"投融信息分页查询"
)
public
ResponseModel
<
Page
<
FinancingInfoHistoryDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
FinancingInfoHistoryDto
>
page
=
new
Page
<
FinancingInfoHistoryDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
financingInfoHistoryServiceImpl
.
queryForFinancingInfoHistoryPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"投融信息列表全部数据查询"
,
notes
=
"投融信息列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
FinancingInfoHistoryDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
financingInfoHistoryServiceImpl
.
queryForFinancingInfoHistoryList
());
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/updateMoney"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"批量放款录入"
,
notes
=
"批量放款录入"
)
@Transactional
public
ResponseModel
<
FinancingInfoHistoryDto
>
updateMoney
(
@RequestBody
FinancingInfoHistoryDto
financingInfoDto
)
{
financingInfoHistoryServiceImpl
.
upDateMoney
(
financingInfoDto
);
return
ResponseHelper
.
buildResponse
(
null
);
}
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/updateState"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"新增"
,
notes
=
"新增"
)
@Transactional
public
ResponseModel
updateState
(
@RequestBody
IdsDTO
ids
)
{
financingInfoHistoryServiceImpl
.
updateState
(
ids
.
getIds
());
return
ResponseHelper
.
buildResponse
(
null
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HistoryPeasantHouseholdController.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
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.List
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.HistoryPeasantHouseholdServiceImpl
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HistoryPeasantHouseholdDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
* 存量合同电站
*
* @author system_generator
* @date 2024-10-18
*/
@RestController
@Api
(
tags
=
"存量合同电站Api"
)
@RequestMapping
(
value
=
"/history-peasant-household"
)
public
class
HistoryPeasantHouseholdController
extends
BaseController
{
@Autowired
HistoryPeasantHouseholdServiceImpl
historyPeasantHouseholdServiceImpl
;
/**
* 新增存量合同电站
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增存量合同电站"
,
notes
=
"新增存量合同电站"
)
public
ResponseModel
<
HistoryPeasantHouseholdDto
>
save
(
@RequestBody
HistoryPeasantHouseholdDto
model
)
{
model
=
historyPeasantHouseholdServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新存量合同电站"
,
notes
=
"根据sequenceNbr更新存量合同电站"
)
public
ResponseModel
<
HistoryPeasantHouseholdDto
>
updateBySequenceNbrHistoryPeasantHousehold
(
@RequestBody
HistoryPeasantHouseholdDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
historyPeasantHouseholdServiceImpl
.
updateStation
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除存量合同电站"
,
notes
=
"根据sequenceNbr删除存量合同电站"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
historyPeasantHouseholdServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个存量合同电站"
,
notes
=
"根据sequenceNbr查询单个存量合同电站"
)
public
ResponseModel
<
HistoryPeasantHouseholdDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
historyPeasantHouseholdServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"存量合同电站分页查询"
,
notes
=
"存量合同电站分页查询"
)
public
ResponseModel
<
Page
<
HistoryPeasantHouseholdDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
HistoryPeasantHouseholdDto
>
page
=
new
Page
<
HistoryPeasantHouseholdDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
historyPeasantHouseholdServiceImpl
.
queryForHistoryPeasantHouseholdPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"存量合同电站列表全部数据查询"
,
notes
=
"存量合同电站列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
HistoryPeasantHouseholdDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
historyPeasantHouseholdServiceImpl
.
queryForHistoryPeasantHouseholdList
());
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"存量合同电站模板下载"
,
notes
=
"存量合同电站模板下载"
)
@GetMapping
(
value
=
"/downTemplate"
)
public
void
downTemplate
(
HttpServletResponse
response
)
{
ExcelUtil
.
createTemplate
(
response
,
"存量合同电站模板"
,
"存量合同电站"
,
null
,
HistoryPeasantHouseholdDto
.
class
,
null
,
false
);
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"存量合同电站下载"
,
notes
=
"存量合同电站下载"
)
@GetMapping
(
value
=
"/export"
)
public
void
downTemplate
(
HttpServletResponse
response
,
@RequestParam
(
value
=
"ids"
)
List
<
String
>
ids
)
{
historyPeasantHouseholdServiceImpl
.
exportData
(
response
,
ids
);
}
/**
* 存量合同电站上传
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"存量合同电站上传"
,
notes
=
"存量合同电站上传"
)
@PostMapping
(
value
=
"/uploadData"
)
public
void
upload
(
MultipartFile
multipartFile
)
throws
Exception
{
historyPeasantHouseholdServiceImpl
.
uploadData
(
multipartFile
);
}
}
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 @
1bf8f515
...
@@ -81,8 +81,7 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
...
@@ -81,8 +81,7 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
PeasantHouseholdMapper
peasantHouseholdMapper
;
PeasantHouseholdMapper
peasantHouseholdMapper
;
@Autowired
@Autowired
HouseholdContractMapper
householdContractMapper
;
HouseholdContractMapper
householdContractMapper
;
@Autowired
private
CommonServiceImpl
commonService
;
@Autowired
@Autowired
RectificationOrderAuditingServiceImpl
rectificationOrderAuditingService
;
RectificationOrderAuditingServiceImpl
rectificationOrderAuditingService
;
@Autowired
@Autowired
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingInfoHistoryServiceImpl.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingAuditing
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfoHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoHistoryMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IFinancingInfoHistoryService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoHistoryDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 投融信息服务实现类
*
* @author system_generator
* @date 2024-10-22
*/
@Service
public
class
FinancingInfoHistoryServiceImpl
extends
BaseService
<
FinancingInfoHistoryDto
,
FinancingInfoHistory
,
FinancingInfoHistoryMapper
>
implements
IFinancingInfoHistoryService
{
/**
* 分页查询
*/
public
Page
<
FinancingInfoHistoryDto
>
queryForFinancingInfoHistoryPage
(
Page
<
FinancingInfoHistoryDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
FinancingInfoHistoryDto
>
queryForFinancingInfoHistoryList
()
{
return
this
.
queryForList
(
""
,
false
);
}
public
void
updateState
(
List
<
Long
>
ids
){
LambdaUpdateWrapper
<
FinancingInfoHistory
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
in
(
FinancingInfoHistory:
:
getPeasantHouseholdId
,
ids
);
up
.
set
(
FinancingInfoHistory:
:
getStatus
,
"已放款"
);
this
.
getBaseMapper
().
update
(
null
,
up
);
}
public
void
upDateMoney
(
FinancingInfoHistoryDto
financingInfoDto
)
{
Map
<
Long
,
Double
>
maps
=
financingInfoDto
.
getPeasantHouseholds
().
stream
()
.
collect
(
Collectors
.
toMap
(
PeasantHousehold:
:
getSequenceNbr
,
// key extractor
PeasantHousehold:
:
getDisbursementMoney
,
// value mapper
(
existingValue
,
newValue
)
->
existingValue
// merge function
));
LambdaQueryWrapper
<
FinancingInfoHistory
>
up
=
new
LambdaQueryWrapper
<>();
up
.
in
(
FinancingInfoHistory:
:
getPeasantHouseholdId
,
maps
.
keySet
());
List
<
FinancingInfoHistory
>
financingInfos
=
this
.
getBaseMapper
().
selectList
(
up
);
financingInfos
.
forEach
(
e
->{
e
.
setDisbursementMoney
(
maps
.
get
(
e
.
getPeasantHouseholdId
()));
e
.
setDisbursementTime
(
financingInfoDto
.
getDisbursementTime
());
e
.
setUnitPrice
(
financingInfoDto
.
getUnitPrice
());
e
.
setStatus
(
"已完成"
);
if
(
financingInfoDto
.
getFiles
()
!=
null
){
e
.
setFile
(
JSON
.
toJSONString
(
financingInfoDto
.
getFiles
()));
}
this
.
getBaseMapper
().
updateById
(
e
);
});
}
}
\ 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/HistoryPeasantHouseholdServiceImpl.java
0 → 100644
View file @
1bf8f515
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfoHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HistoryPeasantHousehold
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.SurveyInformation
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.HistoryPeasantHouseholdMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IHistoryPeasantHouseholdService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HistoryPeasantHouseholdDto
;
import
com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 存量合同电站服务实现类
*
* @author system_generator
* @date 2024-10-18
*/
@Service
public
class
HistoryPeasantHouseholdServiceImpl
extends
BaseService
<
HistoryPeasantHouseholdDto
,
HistoryPeasantHousehold
,
HistoryPeasantHouseholdMapper
>
implements
IHistoryPeasantHouseholdService
{
@Autowired
FinancingInfoHistoryServiceImpl
financingInfoHistoryService
;
/**
* 分页查询
*/
public
Page
<
HistoryPeasantHouseholdDto
>
queryForHistoryPeasantHouseholdPage
(
Page
<
HistoryPeasantHouseholdDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
HistoryPeasantHouseholdDto
>
queryForHistoryPeasantHouseholdList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Transactional
public
void
uploadData
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
HistoryPeasantHouseholdDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
HistoryPeasantHouseholdDto
.
class
,
1
);
List
<
HistoryPeasantHousehold
>
list
=
new
ArrayList
<>();
for
(
HistoryPeasantHouseholdDto
dto
:
excelDtoList
)
{
HistoryPeasantHousehold
convert
=
BeanDtoUtils
.
convert
(
dto
,
HistoryPeasantHousehold
.
class
);
convert
.
setStatus
(
"待上传"
);
list
.
add
(
convert
);
}
this
.
saveBatch
(
list
);
}
public
void
exportData
(
HttpServletResponse
response
,
List
<
String
>
ids
){
LambdaQueryWrapper
<
HistoryPeasantHousehold
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
BaseEntity:
:
getSequenceNbr
,
ids
);
List
<
HistoryPeasantHousehold
>
list
=
this
.
getBaseMapper
().
selectBatchIds
(
ids
);
if
(
CollectionUtil
.
isNotEmpty
(
list
)){
ExcelUtil
.
createTemplate
(
response
,
"存量合同电站"
,
"存量合同电站"
,
list
,
HistoryPeasantHouseholdDto
.
class
,
null
,
false
);
}
}
public
HistoryPeasantHouseholdDto
updateStation
(
HistoryPeasantHouseholdDto
model
){
if
(
model
.
getStatus
().
equals
(
"已提交"
)){
FinancingInfoHistory
financingInfoHistory
=
new
FinancingInfoHistory
();
financingInfoHistory
.
setPeasantHouseholdId
(
model
.
getSequenceNbr
());
financingInfoHistory
.
setStatus
(
"待放款"
);
financingInfoHistoryService
.
save
(
financingInfoHistory
);
}
if
(
null
!=
model
.
getFileUrl
()
&&
model
.
getStatus
().
equals
(
"待上传"
)){
model
.
setStatus
(
"待提交"
);
}
HistoryPeasantHousehold
convert
=
BeanDtoUtils
.
convert
(
model
,
HistoryPeasantHousehold
.
class
);
this
.
saveOrUpdate
(
convert
);
return
model
;
}
}
\ 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