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
50ea7b4a
Commit
50ea7b4a
authored
Jan 02, 2025
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加聚富通导出 增加定时获取回盘文件
parent
5a4cb052
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
186 additions
and
18 deletions
+186
-18
application-dev.properties
...-housepvapi/src/main/resources/application-dev.properties
+7
-6
HygfIcbcRecordExportDTO.java
...mos/boot/module/hygf/api/dto/HygfIcbcRecordExportDTO.java
+8
-2
HygfIcbcWithholdRecordExportDTO.java
.../module/hygf/api/dto/HygfIcbcWithholdRecordExportDTO.java
+80
-0
IcbcWithhold.java
...eejoin/amos/boot/module/hygf/api/entity/IcbcWithhold.java
+1
-1
HygfIcbcRecordMapper.java
...mos/boot/module/hygf/api/mapper/HygfIcbcRecordMapper.java
+3
-0
SFTPUtil.java
.../com/yeejoin/amos/boot/module/hygf/api/util/SFTPUtil.java
+5
-2
HygfIcbcRecordMapper.xml
.../src/main/resources/mapper/mysql/HygfIcbcRecordMapper.xml
+68
-1
IcbcWithholdController.java
...ot/module/hygf/biz/controller/IcbcWithholdController.java
+14
-6
IcbcWithholdServiceImpl.java
...module/hygf/biz/service/impl/IcbcWithholdServiceImpl.java
+0
-0
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/resources/application-dev.properties
View file @
50ea7b4a
## DB properties hygf
## db1-production database
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url
=
jdbc:mysql://47.92.234.253:13306/amos_openapi?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.url
=
jdbc:kingbase8://39.98.224.23:54321/amos_openapi_47?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.username
=
root
spring.db1.datasource.password
=
Yeejoin
_1234
spring.db1.datasource.driver-class-name
=
com.
mysql.cj.jdbc
.Driver
spring.db1.datasource.password
=
Yeejoin
@2020
spring.db1.datasource.driver-class-name
=
com.
kingbase8
.Driver
## db2-sync_data
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url
=
jdbc:
mysql://47.92.234.253:13306/amos_project
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.url
=
jdbc:
kingbase8://39.98.224.23:54321/amos_project_47
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.username
=
root
spring.db2.datasource.password
=
Yeejoin
_1234
spring.db2.datasource.driver-class-name
=
com.
mysql.cj.jdbc
.Driver
spring.db2.datasource.password
=
Yeejoin
@2020
spring.db2.datasource.driver-class-name
=
com.
kingbase8
.Driver
## db3-taosiData
spring.db3.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url
=
jdbc:TAOS-RS://47.92.234.253:6041/house_pv_data?user=root&password=taosdata&characterEncoding=utf8
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/HygfIcbcRecordExportDTO.java
View file @
50ea7b4a
...
...
@@ -56,7 +56,7 @@ public class HygfIcbcRecordExportDTO {
/**
* 聚富通电子账户账号
*/
@ExcelProperty
(
value
=
"
银行卡号
"
,
index
=
4
)
@ExcelProperty
(
value
=
"
聚富通账户
"
,
index
=
4
)
@ApiModelProperty
(
value
=
"聚富通电子账户账号"
)
private
String
mediumId
;
...
...
@@ -74,7 +74,12 @@ public class HygfIcbcRecordExportDTO {
@ApiModelProperty
(
value
=
"协议状态, 0-未生效,1-已生效,2-过期,3-作废,4-待短信确认"
)
private
String
protocolStatus
;
/**
* 协议状态, 0-未生效,1-已生效,2-过期,3-作废,4-待短信确认
*/
@ExcelProperty
(
value
=
"扣款总金额"
,
index
=
7
)
@ApiModelProperty
(
value
=
"扣款总金额"
)
private
double
paymentAmount
;
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/HygfIcbcWithholdRecordExportDTO.java
0 → 100644
View file @
50ea7b4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* (hygf_icbc_record)实体类
*
* @author yangyang
* @description
* @since 2024-07-18 11:40:46
*/
@Data
@NoArgsConstructor
@ApiModel
(
value
=
"HygfIcbcRecordExportDTO"
,
description
=
"聚富通钱包开户DTO"
)
public
class
HygfIcbcWithholdRecordExportDTO
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
@ExcelIgnore
protected
Long
sequenceNbr
;
@ExcelProperty
(
value
=
"开户名"
,
index
=
0
)
@ApiModelProperty
(
value
=
"开户名"
)
private
String
custName
;
/**
* 身份证号
*/
@ExcelProperty
(
value
=
"项目公司"
,
index
=
1
)
@ApiModelProperty
(
value
=
"项目公司"
)
private
String
regionalCompaniesName
;
/**
* 手机号码
*/
@ExcelProperty
(
value
=
"批次号"
,
index
=
2
)
@ApiModelProperty
(
value
=
"批次号"
)
private
String
batchNo
;
/**
* 聚富通电子账户账号
*/
@ExcelProperty
(
value
=
"聚富通账户"
,
index
=
3
)
@ApiModelProperty
(
value
=
"聚富通电子账户账号"
)
private
String
mediumId
;
/**
*
*/
@ExcelProperty
(
value
=
"扣款金额"
,
index
=
4
)
@ApiModelProperty
(
value
=
"扣款金额"
)
private
double
paymentAmount
;
@ExcelProperty
(
value
=
"扣款状态"
,
index
=
5
)
@ApiModelProperty
(
value
=
"扣款状态"
)
private
String
withholdStatus
;
@ExcelProperty
(
value
=
"扣款时间"
,
index
=
6
)
@ApiModelProperty
(
value
=
"扣款时间"
)
private
Date
paymentTime
;
@ExcelProperty
(
value
=
"操作人"
,
index
=
7
)
@ApiModelProperty
(
value
=
"操作人"
)
private
String
uploader
;
@ExcelProperty
(
value
=
"说明"
,
index
=
8
)
@ApiModelProperty
(
value
=
"说明"
)
private
String
desc
;
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/IcbcWithhold.java
View file @
50ea7b4a
...
...
@@ -114,7 +114,7 @@ public class IcbcWithhold extends BaseEntity {
private
String
paymentErrorDesc
;
/**
* 户主icbcid
* 户主icbcid
弃用冗余 传递导出参数使用
*/
@TableField
(
"icbc_id"
)
private
String
icbcId
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/HygfIcbcRecordMapper.java
View file @
50ea7b4a
...
...
@@ -32,4 +32,7 @@ public interface HygfIcbcRecordMapper extends BaseMapper<HygfIcbcRecord> {
@UserEmpower
(
field
=
{
"ph.regional_companies_code"
},
dealerField
=
{
"ph.developer_code"
,
"ph.regional_companies_code"
,
"ph.developer_user_id"
},
fieldConditions
=
{
"in"
,
"in"
,
"in"
},
relationship
=
"and"
)
List
<
HygfIcbcRecordExportDTO
>
exportTotal
(
String
developerCode
,
String
regionalCompaniesCode
,
String
province
,
String
city
,
String
district
);
@UserEmpower
(
field
=
{
"ph.regional_companies_code"
},
dealerField
=
{
"ph.developer_code"
,
"ph.regional_companies_code"
,
"ph.developer_user_id"
},
fieldConditions
=
{
"in"
,
"in"
,
"in"
},
relationship
=
"and"
)
List
<
HygfIcbcRecordExportDTO
>
paymentAmountExport
(
String
developerCode
,
String
regionalCompaniesCode
,
String
province
,
String
city
,
String
district
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/util/SFTPUtil.java
View file @
50ea7b4a
...
...
@@ -316,7 +316,7 @@ public class SFTPUtil {
// return success;
// }
public
boolean
downloadAndZipFiles
(
String
remotePath
,
String
filenamePattern
,
String
localZipPath
)
{
public
boolean
downloadAndZipFiles
(
String
remotePath
,
String
filenamePattern
,
String
localZipPath
,
Boolean
flag
)
{
boolean
success
=
false
;
Path
tempDir
=
null
;
try
{
...
...
@@ -336,7 +336,10 @@ public class SFTPUtil {
downloadedFiles
.
add
(
localFilePath
);
}
}
disconnect
();
if
(
flag
){
disconnect
();
}
// 确保本地ZIP路径的父目录存在
Path
localZipFilePath
=
Paths
.
get
(
localZipPath
);
Path
parentDir
=
localZipFilePath
.
getParent
();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/HygfIcbcRecordMapper.xml
View file @
50ea7b4a
...
...
@@ -180,10 +180,13 @@
'待短信确认' ELSE''
END
) AS protocolStatus,
MAX( CASE re.open_account_status WHEN 02 THEN '开户成功' WHEN 03 THEN '开户失败' ELSE'未开户' END ) AS openAccountStatus
MAX( CASE re.open_account_status WHEN 02 THEN '开户成功' WHEN 03 THEN '开户失败' ELSE'未开户' END ) AS openAccountStatus,
SUM(iw.payment_amount) as paymentAmount
FROM
`hygf_peasant_household` ph
LEFT JOIN hygf_icbc_record re ON re.amos_user_id = ph.amos_user_id
LEFT JOIN hygf_icbc_withhold_record iw ON re.amos_user_id = iw.amos_user_id
<where>
<if
test=
"developerCode != null and developerCode != ''"
>
AND ph.developer_code = #{developerCode}
...
...
@@ -204,4 +207,67 @@
GROUP BY
ph.amos_user_id
</select>
<select
id=
"paymentAmountExport"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordExportDTO"
>
WITH PaymentAmounts AS (
SELECT
iw.amos_user_id,
SUM(iw.payment_amount) AS paymentAmount
FROM
hygf_icbc_withhold_record iw
WHERE
iw.withhold_status = '成功'
GROUP BY
iw.amos_user_id
)
SELECT
MAX(ph.owners_name) AS custName,
MAX(ph.telephone) AS phone,
MAX(ph.id_card) AS idCard,
MAX(ph.regional_companies_name) AS regionalCompaniesName,
MAX(re.medium_id) AS mediumId,
MAX(
CASE re.protocol_status
WHEN 0 THEN '未生效'
WHEN 1 THEN '已生效'
WHEN 2 THEN '过期'
WHEN 3 THEN '作废'
WHEN 4 THEN '待短信确认'
ELSE ''
END
) AS protocolStatus,
MAX(
CASE re.open_account_status
WHEN '02' THEN '开户成功'
WHEN '03' THEN '开户失败'
ELSE '未开户'
END
) AS openAccountStatus,
pa.paymentAmount AS paymentAmount
FROM
`hygf_peasant_household` ph
LEFT JOIN
hygf_icbc_record re ON re.amos_user_id = ph.amos_user_id
LEFT JOIN
PaymentAmounts pa ON pa.amos_user_id = ph.amos_user_id
<where>
<if
test=
"developerCode != null and developerCode != ''"
>
AND ph.developer_code = #{developerCode}
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND ph.regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"province != null and province != ''"
>
AND ph.project_address LIKE CONCAT ('%',#{province},'%')
</if>
<if
test=
"city != null and city != ''"
>
AND ph.project_address LIKE CONCAT ('%',#{city},'%')
</if>
<if
test=
"district != null and district != ''"
>
AND ph.project_address LIKE CONCAT ('%',#{district},'%')
</if>
</where>
GROUP BY
ph.amos_user_id, pa.paymentAmount;
</select>
</mapper>
\ 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/controller/IcbcWithholdController.java
View file @
50ea7b4a
...
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.IcbcWithholdRecordDto;
import
com.yeejoin.amos.boot.module.hygf.api.entity.IcbcWithhold
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.IcbcWithholdRecord
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -16,6 +17,8 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.IcbcWithholdServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -157,9 +160,11 @@ public class IcbcWithholdController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
" 聚富通代扣信息文件生成"
,
notes
=
" 聚富通代扣信息文件生成"
)
@PostMapping
(
value
=
"/fileGeneration"
)
public
ResponseModel
fileGeneration
(
@RequestBody
IcbcWithhold
model
)
throws
Exception
{
icbcWithholdServiceImpl
.
fileGeneration
(
model
);
@Transactional
public
ResponseModel
fileGeneration
(
@RequestBody
List
<
IcbcWithhold
>
models
)
throws
Exception
{
for
(
IcbcWithhold
model
:
models
)
{
icbcWithholdServiceImpl
.
fileGeneration
(
model
);
}
return
CommonResponseNewUtil
.
success
();
}
/**
...
...
@@ -170,9 +175,12 @@ public class IcbcWithholdController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
" 聚富通代扣信息文件上传"
,
notes
=
" 聚富通代扣信息文件上传"
)
@GetMapping
(
value
=
"/sftpUploadAndUnzip"
)
public
ResponseModel
sftpUploadAndUnzip
(
String
fileUrl
,
String
batchNo
)
throws
Exception
{
@Transactional
public
ResponseModel
sftpUploadAndUnzip
(
List
<
Map
<
String
,
String
>>
maps
)
throws
Exception
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
icbcWithholdServiceImpl
.
sftpUploadAndUnzip
(
fileUrl
,
batchNo
,
reginParams
.
getUserModel
().
getRealName
());
for
(
Map
<
String
,
String
>
map
:
maps
)
{
icbcWithholdServiceImpl
.
sftpUploadAndUnzip
(
map
.
get
(
"fileUrl"
),
map
.
get
(
"batchNo"
),
reginParams
.
getUserModel
().
getRealName
());
}
return
CommonResponseNewUtil
.
success
();
}
...
...
@@ -207,7 +215,7 @@ public class IcbcWithholdController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批次
人员信息下载"
,
notes
=
"批次人员
信息下载"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批次
明细信息下载"
,
notes
=
"批次明细
信息下载"
)
@PostMapping
(
value
=
"/export"
)
public
void
downTemplate
(
HttpServletResponse
response
,
@RequestBody
IcbcWithhold
model
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/IcbcWithholdServiceImpl.java
View file @
50ea7b4a
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