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
9ac1e8a5
Commit
9ac1e8a5
authored
Nov 01, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电站统计添加投融时间
parent
f05fe12e
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
112 additions
and
15 deletions
+112
-15
FinancingInfoDto.java
...ejoin/amos/boot/module/hygf/api/dto/FinancingInfoDto.java
+3
-1
PowerStationTimeStatisticsDto.java
...ot/module/hygf/api/dto/PowerStationTimeStatisticsDto.java
+9
-0
FinancingInfo.java
...ejoin/amos/boot/module/hygf/api/entity/FinancingInfo.java
+6
-0
FinancingInfoMapper.java
...amos/boot/module/hygf/api/mapper/FinancingInfoMapper.java
+1
-0
PeasantHouseholdMapper.java
...s/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
+2
-0
FinancingInfoMapper.xml
...i/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
+8
-0
PeasantHouseholdMapper.xml
...rc/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
+15
-0
TestController.java
.../amos/boot/module/hygf/biz/controller/TestController.java
+20
-5
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+2
-1
PowerStationStatisticsServiceImpl.java
...f/biz/service/impl/PowerStationStatisticsServiceImpl.java
+26
-0
PowerStationTimeStatisticsExcelVO.java
...module/hygf/biz/vo/PowerStationTimeStatisticsExcelVO.java
+12
-0
application-dev.properties
...le-hygf-biz/src/main/resources/application-dev.properties
+8
-8
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/FinancingInfoDto.java
View file @
9ac1e8a5
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.api.dto;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.support.spring.annotation.FastJsonFilter
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -68,6 +69,7 @@ public class FinancingInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"单价"
)
private
String
unitPrice
;
@ApiModelProperty
(
value
=
"投融创建时间"
)
private
Date
trCreateTime
;
List
<
PeasantHousehold
>
peasantHouseholds
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/PowerStationTimeStatisticsDto.java
View file @
9ac1e8a5
...
...
@@ -102,4 +102,13 @@ public class PowerStationTimeStatisticsDto implements Serializable {
@ApiModelProperty
(
value
=
"验收停留时间"
)
private
String
ysStopTime
;
@ApiModelProperty
(
value
=
"投融开始时间"
)
private
Date
trCreateTime
;
@ApiModelProperty
(
value
=
"投融结束时间"
)
private
Date
trEndTime
;
@ApiModelProperty
(
value
=
"投融停留时间"
)
private
String
trStopTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/FinancingInfo.java
View file @
9ac1e8a5
...
...
@@ -82,4 +82,10 @@ public class FinancingInfo extends BaseEntity {
*/
@TableField
(
"unit_price"
)
private
String
unitPrice
;
/**
* 投融创建时间
*/
@TableField
(
"tr_create_time"
)
private
Date
trCreateTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/FinancingInfoMapper.java
View file @
9ac1e8a5
...
...
@@ -35,4 +35,5 @@ public interface FinancingInfoMapper extends BaseMapper<FinancingInfo> {
List
<
Map
<
String
,
Object
>>
selectRegionByParentCode
(
String
parentCode
,
String
level
);
List
<
Map
<
String
,
Object
>>
getTrCreateTime
();
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
View file @
9ac1e8a5
...
...
@@ -92,5 +92,7 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
List
<
PowerStationTimeStatisticsDto
>
getYsTime
(
@Param
(
"list"
)
List
<
Long
>
peasantHouseholdIdList
);
List
<
PowerStationTimeStatisticsDto
>
getTrTime
(
@Param
(
"list"
)
List
<
Long
>
peasantHouseholdIdList
);
// String getHygfCommercialScale(Long surveyInformationId);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
View file @
9ac1e8a5
...
...
@@ -143,4 +143,12 @@
PARENT_REGION_CODE = #{parentCode} and LEVEL = #{level}
</select>
<select
id=
"getTrCreateTime"
resultType=
"java.util.Map"
>
SELECT hfi.sequence_nbr as sequenceNbr,hfa.rec_date AS time
FROM
hygf_financing_info hfi
LEFT JOIN hygf_financing_auditing hfa ON hfa.peasant_household_id=hfi.peasant_household_id
WHERE hfi.status='放款完成' and hfa.next_node_name='融资审核'
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
View file @
9ac1e8a5
...
...
@@ -371,6 +371,21 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
</if>
</where>
</select>
<select
id=
"getTrTime"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationTimeStatisticsDto"
>
SELECT peasant_household_id as sequenceNbr,tr_create_time,disbursement_time as trEndTime
FROM
hygf_financing_info
<where>
<if
test=
"list != null and list.size()>0"
>
AND peasant_household_id IN
<foreach
collection=
"list"
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-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TestController.java
View file @
9ac1e8a5
...
...
@@ -63,6 +63,8 @@ public class TestController extends BaseController {
BasicGridRecordMapper
basicGridRecordMapper
;
@Autowired
AcceptanceCheckMapper
acceptanceCheckMapper
;
@Autowired
FinancingInfoMapper
financingInfoMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/initTime"
)
...
...
@@ -72,16 +74,29 @@ public class TestController extends BaseController {
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
5
);
// 提交不同的方法
executorService
.
submit
(
this
::
dealKcTime
);
executorService
.
submit
(
this
::
dealDzhtqyTime
);
executorService
.
submit
(
this
::
dealSgTime
);
executorService
.
submit
(
this
::
dealBwTime
);
executorService
.
submit
(
this
::
dealYsTime
);
// executorService.submit(this::dealKcTime);
// executorService.submit(this::dealDzhtqyTime);
// executorService.submit(this::dealSgTime);
// executorService.submit(this::dealBwTime);
// executorService.submit(this::dealYsTime);
executorService
.
submit
(
this
::
dealTrTime
);
// 关闭线程池
executorService
.
shutdown
();
return
CommonResponseNewUtil
.
success
();
}
private
void
dealTrTime
()
{
log
.
info
(
"================开始初始投融时间========================="
);
List
<
Map
<
String
,
Object
>>
trCreateTime
=
financingInfoMapper
.
getTrCreateTime
();
for
(
Map
<
String
,
Object
>
stringObjectMap
:
trCreateTime
)
{
LambdaUpdateWrapper
<
FinancingInfo
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
set
(
FinancingInfo:
:
getTrCreateTime
,
dealHour
(
stringObjectMap
.
get
(
"time"
)))
.
eq
(
FinancingInfo:
:
getSequenceNbr
,
stringObjectMap
.
get
(
"sequenceNbr"
));
financingInfoMapper
.
update
(
null
,
wrapper
);
}
log
.
info
(
"================投融时间更新完成========================="
);
}
private
void
dealYsTime
()
{
log
.
info
(
"================开始初始验收时间========================="
);
List
<
Map
<
String
,
Object
>>
ysCreateTime
=
acceptanceCheckMapper
.
getYsCreateTime
();
...
...
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 @
9ac1e8a5
...
...
@@ -187,6 +187,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
financingInfoDto
.
setSequenceNbr
(
null
);
financingInfoDto
.
setBatchNo
(
batcvNo
);
financingInfoDto
.
setRegionalCompaniesSeq
(
peasantHousehold
.
getRegionalCompaniesSeq
());
financingInfoDto
.
setTrCreateTime
(
new
Date
());
this
.
createWithModel
(
financingInfoDto
);
//开启工作流 并执行一步
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
...
...
@@ -219,7 +220,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
//批量 兼容审核不通过及整改待推送
else
if
(
financingInfos
.
getStatus
().
equals
(
FinancingAuditEnum
.
审核不通过
.
getName
())
||
financingInfos
.
getStatus
().
equals
(
"待推送"
)
){
financingInfos
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
financingInfos
.
setTrCreateTime
(
new
Date
());
Map
<
String
,
Object
>
orgInfo1
=
this
.
getBaseMapper
().
selectRZOrgInfo
(
model
.
getFinancingCompaniesSeq
());
//业务表中无工作流id 需要补充
LambdaQueryWrapper
<
FinancingAuditing
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PowerStationStatisticsServiceImpl.java
View file @
9ac1e8a5
...
...
@@ -56,6 +56,7 @@ public class PowerStationStatisticsServiceImpl {
Map
<
Long
,
List
<
PowerStationTimeStatisticsDto
>>
sgMap
=
getSgTime
(
sequenceNbrList
);
Map
<
Long
,
List
<
PowerStationTimeStatisticsDto
>>
bwMap
=
getBwTime
(
sequenceNbrList
);
Map
<
Long
,
List
<
PowerStationTimeStatisticsDto
>>
ysMap
=
getYsTime
(
sequenceNbrList
);
Map
<
Long
,
List
<
PowerStationTimeStatisticsDto
>>
trMap
=
getTrTime
(
sequenceNbrList
);
for
(
PowerStationTimeStatisticsDto
statisticsDto
:
statisticsDtos
)
{
dealKcTime
(
statisticsDto
,
kcMap
);
dealDzhtqyTime
(
statisticsDto
,
dzhtqyMap
);
...
...
@@ -64,10 +65,33 @@ public class PowerStationStatisticsServiceImpl {
dealSgTime
(
statisticsDto
,
sgMap
);
dealBwTime
(
statisticsDto
,
bwMap
);
dealYsTime
(
statisticsDto
,
ysMap
);
dealTrTime
(
statisticsDto
,
trMap
);
}
}
}
private
void
dealTrTime
(
PowerStationTimeStatisticsDto
statisticsDto
,
Map
<
Long
,
List
<
PowerStationTimeStatisticsDto
>>
map
)
{
List
<
PowerStationTimeStatisticsDto
>
time
=
map
.
get
(
statisticsDto
.
getSequenceNbr
());
if
(
CollectionUtil
.
isNotEmpty
(
time
))
{
statisticsDto
.
setTrCreateTime
(
time
.
get
(
0
).
getTrCreateTime
());
statisticsDto
.
setTrEndTime
(
time
.
get
(
0
).
getTrEndTime
());
statisticsDto
.
setTrStopTime
(
dealStopTime
(
time
.
get
(
0
).
getTrCreateTime
(),
time
.
get
(
0
).
getTrEndTime
()));
}
}
private
Map
<
Long
,
List
<
PowerStationTimeStatisticsDto
>>
getTrTime
(
List
<
Long
>
sequenceNbrList
)
{
List
<
PowerStationTimeStatisticsDto
>
statisticsDtos
=
new
ArrayList
<>();
if
(
sequenceNbrList
.
size
()
<
1000
)
{
statisticsDtos
=
peasantHouseholdMapper
.
getTrTime
(
sequenceNbrList
);
}
else
{
List
<
List
<
Long
>>
lists
=
ListUtils
.
splitList
(
sequenceNbrList
,
1000
);
for
(
List
<
Long
>
list
:
lists
)
{
statisticsDtos
.
addAll
(
peasantHouseholdMapper
.
getTrTime
(
list
));
}
}
return
statisticsDtos
.
stream
().
collect
(
Collectors
.
groupingBy
(
PowerStationTimeStatisticsDto:
:
getSequenceNbr
));
}
private
Map
<
Long
,
List
<
PowerStationTimeStatisticsDto
>>
getYsTime
(
List
<
Long
>
sequenceNbrList
)
{
List
<
PowerStationTimeStatisticsDto
>
statisticsDtos
=
new
ArrayList
<>();
if
(
sequenceNbrList
.
size
()
<
1000
)
{
...
...
@@ -302,6 +326,8 @@ public class PowerStationStatisticsServiceImpl {
excelVO
.
setSjEndTime
(
DateUtils
.
dateFormat
(
statisticsDto
.
getSjEndTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
excelVO
.
setFhbhCreateTime
(
DateUtils
.
dateFormat
(
statisticsDto
.
getFhbhCreateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
excelVO
.
setFhbhEndTime
(
DateUtils
.
dateFormat
(
statisticsDto
.
getFhbhEndTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
excelVO
.
setTrCreateTime
(
DateUtils
.
dateFormat
(
statisticsDto
.
getTrCreateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
excelVO
.
setTrEndTime
(
DateUtils
.
dateFormat
(
statisticsDto
.
getTrEndTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
dataList
.
add
(
excelVO
);
}
ExcelUtils
.
exportExcelDefaultGroundColor
(
dataList
,
null
,
"电站时间统计"
,
PowerStationTimeStatisticsExcelVO
.
class
,
"电站时间统计"
+
DateUtils
.
dateFormat
(
new
Date
(),
"YYYY-MM-dd-HH-mm"
)
+
".xlsx"
,
response
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/vo/PowerStationTimeStatisticsExcelVO.java
View file @
9ac1e8a5
...
...
@@ -120,4 +120,16 @@ public class PowerStationTimeStatisticsExcelVO implements Serializable {
@Excel
(
name
=
"验收停留时间"
,
width
=
30
,
orderNum
=
"27"
)
@ApiModelProperty
(
value
=
"验收停留时间"
)
private
String
ysStopTime
;
@Excel
(
name
=
"投融开始时间"
,
width
=
30
,
orderNum
=
"28"
)
@ApiModelProperty
(
value
=
"投融开始时间"
)
private
String
trCreateTime
;
@Excel
(
name
=
"投融结束时间"
,
width
=
30
,
orderNum
=
"29"
)
@ApiModelProperty
(
value
=
"投融结束时间"
)
private
String
trEndTime
;
@Excel
(
name
=
"投融停留时间"
,
width
=
30
,
orderNum
=
"30"
)
@ApiModelProperty
(
value
=
"投融停留时间"
)
private
String
trStopTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev.properties
View file @
9ac1e8a5
...
...
@@ -173,16 +173,16 @@ hygf.user.group.empty=1775056568031645697
#
qiyuesuo.serverUrl = https://openapi.qiyuesuo.cn
#
qiyuesuo.accessKey = a1lcd3WRRV
#
qiyuesuo.accessSecret = haqYIOxTP20ZYiDNEN92GVBa6aoJLu
#
qiyuesuo.secretKey=Fp2LQAqK5gc68hi5
qiyuesuo.serverUrl
=
https://openapi.qiyuesuo.cn
qiyuesuo.accessKey
=
a1lcd3WRRV
qiyuesuo.accessSecret
=
haqYIOxTP20ZYiDNEN92GVBa6aoJLu
qiyuesuo.secretKey
=
Fp2LQAqK5gc68hi5
qiyuesuo.serverUrl
=
https://openapi.qiyuesuo.com
qiyuesuo.accessKey
=
QcmHQu55pl
qiyuesuo.accessSecret
=
em0zvOMRNCAXoD1ePNTL7hGR5KpKUs
qiyuesuo.secretKey
=
B6OYbHyfXikAghB2
#
qiyuesuo.serverUrl = https://openapi.qiyuesuo.com
#
qiyuesuo.accessKey = QcmHQu55pl
#
qiyuesuo.accessSecret = em0zvOMRNCAXoD1ePNTL7hGR5KpKUs
#
qiyuesuo.secretKey=B6OYbHyfXikAghB2
...
...
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