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
54f896e9
Commit
54f896e9
authored
Sep 06, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
投融资 优化
parent
d6cf299e
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
182 additions
and
59 deletions
+182
-59
FinancingAuditEnum.java
...in/amos/boot/module/hygf/api/Enum/FinancingAuditEnum.java
+1
-1
FinancingInfoDto.java
...ejoin/amos/boot/module/hygf/api/dto/FinancingInfoDto.java
+5
-3
FinancingInfo.java
...ejoin/amos/boot/module/hygf/api/entity/FinancingInfo.java
+5
-0
FinancingInfoMapper.java
...amos/boot/module/hygf/api/mapper/FinancingInfoMapper.java
+2
-0
FinancingInfoMapper.xml
...i/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
+15
-0
CommonController.java
...mos/boot/module/hygf/biz/controller/CommonController.java
+35
-0
FinancingInfoController.java
...t/module/hygf/biz/controller/FinancingInfoController.java
+16
-1
AcceptanceCheckServiceImpl.java
...ule/hygf/biz/service/impl/AcceptanceCheckServiceImpl.java
+16
-18
CommonServiceImpl.java
.../boot/module/hygf/biz/service/impl/CommonServiceImpl.java
+1
-0
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+86
-36
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/FinancingAuditEnum.java
View file @
54f896e9
...
...
@@ -10,7 +10,7 @@ public enum FinancingAuditEnum {
待融资审核
(
"FinancingAudit"
,
"待融资审核"
,
"/hygf/drzsh"
),
审核不通过
(
"AuditReject"
,
"整改待推送"
,
"/hygf/zgdts"
),
待整改
(
"WaitAbarbeitung"
,
"
待整改
"
,
"/hygf/dzg"
),
待整改
(
"WaitAbarbeitung"
,
"
重新验收
"
,
"/hygf/dzg"
),
整改待推送
(
"AbarbeitungWaitPush"
,
"审核不通过"
,
"/hygf/shym"
),
审核通过
(
"AuditPass"
,
"审核通过"
,
"/hygf/fkym"
),
放款完成
(
"complete"
,
"放款完成"
,
""
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/FinancingInfoDto.java
View file @
54f896e9
...
...
@@ -8,18 +8,17 @@ 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-04-01
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"FinancingInfoDto"
,
description
=
""
)
@ApiModel
(
value
=
"FinancingInfoDto"
,
description
=
""
)
public
class
FinancingInfoDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -55,6 +54,9 @@ public class FinancingInfoDto extends BaseDto {
private
String
instanceId
;
@ApiModelProperty
(
value
=
"批次号"
)
private
String
batchNo
;
@ApiModelProperty
(
value
=
"附件"
)
private
List
<
Object
>
files
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/FinancingInfo.java
View file @
54f896e9
...
...
@@ -57,6 +57,11 @@ public class FinancingInfo extends BaseEntity {
*/
@TableField
(
"disbursement_money"
)
private
Double
disbursementMoney
;
/**
* 批次号
*/
@TableField
(
"bacth_no"
)
private
String
batchNo
;
/**
* 附件
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/FinancingInfoMapper.java
View file @
54f896e9
...
...
@@ -26,4 +26,6 @@ public interface FinancingInfoMapper extends BaseMapper<FinancingInfo> {
Map
<
String
,
Object
>
selectRZOrgInfo
(
Long
id
);
List
<
Map
<
String
,
Object
>>
selectRegion
();
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
View file @
54f896e9
...
...
@@ -35,6 +35,9 @@
<if
test=
"params.type == 3 "
>
and info.status in ('待整改','整改未完成')
</if>
<if
test=
"params.region != null and params.region !='' "
>
and hph.project_address like concat ('%',#{params.region},'%')
</if>
</where>
ORDER BY
info.rec_date DESC ,hph.sequence_nbr DESC ) as sta
...
...
@@ -71,4 +74,16 @@
where
SEQUENCE_NBR=#{id}
</select>
<select
id=
"selectRegion"
resultType=
"java.util.Map"
>
select
REGION_NAME regionName,
REGION_CODE regionCode
from
systemctl_region
where
PARENT_ID = '0'
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/CommonController.java
0 → 100644
View file @
54f896e9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.CommerceInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingInfoServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@Api
(
tags
=
"公共接口"
)
@RequestMapping
(
value
=
"/common"
)
public
class
CommonController
{
@Autowired
FinancingInfoServiceImpl
financingInfoService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/selectRegion"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询全国省份"
,
notes
=
"查询全国省份"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectRegion
()
{
return
ResponseHelper
.
buildResponse
(
financingInfoService
.
selectRegion
());
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/FinancingInfoController.java
View file @
54f896e9
...
...
@@ -55,6 +55,20 @@ public class FinancingInfoController extends BaseController {
}
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/updateState"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"新增"
,
notes
=
"新增"
)
@Transactional
public
ResponseModel
updateState
(
@RequestBody
List
<
Long
>
ids
)
{
financingInfoServiceImpl
.
updateState
(
ids
);
return
ResponseHelper
.
buildResponse
(
null
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
...
...
@@ -125,11 +139,12 @@ public class FinancingInfoController extends BaseController {
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"status"
,
required
=
false
)
String
status
,
@RequestParam
(
value
=
"regionalCompaniesCode"
,
required
=
false
)
String
regionalCompaniesCode
,
@RequestParam
(
value
=
"region"
,
required
=
false
)
String
region
,
@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
));
return
ResponseHelper
.
buildResponse
(
financingInfoServiceImpl
.
queryForFinancingInfoPage
(
page
,
type
,
status
,
regionalCompaniesCode
,
ownersName
,
region
));
}
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/AcceptanceCheckServiceImpl.java
View file @
54f896e9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -61,6 +62,10 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
HouseholdContractMapper
householdContractMapper
;
@Autowired
ConstructionAcceptanceRecordsServiceImpl
acceptanceRecordsService
;
@Autowired
FinancingInfoServiceImpl
financingInfoService
;
@Autowired
FinancingAuditingServiceImpl
financingAuditingService
;
public
Page
<
AcceptanceCheckDto
>
selectPage
(
Long
regionCompanyId
,
Long
amosDealerId
,
int
current
,
int
size
,
...
...
@@ -286,23 +291,6 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
up
.
set
(
AcceptanceCheck:
:
getAcceptanceCheckStatus
,
GridStatusEnum
.
DZG
.
getCode
());
}
}
Boolean
flag
=
true
;
up
.
set
(
AcceptanceCheck:
:
getAcceptanceCheckStatus
,
GridStatusEnum
.
YSROLESDSH
.
getCode
());
LambdaQueryWrapper
<
HygfRectificationOrder
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
HygfRectificationOrder:
:
getPeasantHouseholeId
,
basicGridRecord
.
getPeasantHouseholdId
());
query
.
in
(
HygfRectificationOrder:
:
getRectificationStatus
,
Arrays
.
asList
(
"待整改"
,
"待审核"
));
query
.
in
(
HygfRectificationOrder:
:
getRectificationSource
,
Arrays
.
asList
(
"ys-fawu"
,
"ys-tourong"
,
"ys-zichan"
));
List
<
HygfRectificationOrder
>
hygfRectificationOrders
=
rectificationOrderService
.
getBaseMapper
().
selectList
(
query
);
for
(
HygfRectificationOrder
hygfRectificationOrder
:
hygfRectificationOrders
)
{
if
(
hygfRectificationOrder
.
getRectificationStatus
().
equals
(
"待审核"
)){
up
.
set
(
AcceptanceCheck:
:
getAcceptanceCheckStatus
,
GridStatusEnum
.
ZGDSH
.
getCode
());
flag
=
false
;
break
;
}
}
if
(
CollectionUtil
.
isNotEmpty
(
hygfRectificationOrders
)
&&
flag
){
up
.
set
(
AcceptanceCheck:
:
getAcceptanceCheckStatus
,
GridStatusEnum
.
DZG
.
getCode
());
}
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
片区运营审核
.
getCode
()
);
break
;
case
"ys-fawu"
:
...
...
@@ -375,7 +363,17 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
up
.
set
(
AcceptanceCheck:
:
getAcceptanceTime
,
new
Date
());
up
.
set
(
AcceptanceCheck:
:
getAcceptanceCheckStatus
,
GridStatusEnum
.
YWC
.
getCode
());
//验收完成后需对投融数据进行处理。
LambdaUpdateWrapper
<
FinancingInfo
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
basicGridRecord
.
getPeasantHouseholdId
());
wrapper
.
set
(
FinancingInfo:
:
getStatus
,
"待推送"
);
financingInfoService
.
update
(
null
,
wrapper
);
LambdaQueryWrapper
<
FinancingAuditing
>
finQuery
=
new
LambdaQueryWrapper
<>();
finQuery
.
eq
(
FinancingAuditing:
:
getPeasantHouseholdId
,
basicGridRecord
.
getPeasantHouseholdId
());
finQuery
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
finQuery
.
last
(
"limit 1"
);
FinancingAuditing
financingAuditing
=
financingAuditingService
.
getBaseMapper
().
selectOne
(
finQuery
);
financingInfoService
.
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"instanceId"
,
financingAuditing
.
getInstanceId
()).
put
(
"approvalStatus"
,
"0"
).
put
(
"isZG"
,
"1"
).
build
());
}
this
.
wofkflowExcute
(
instanceId
,
approvalStatus
,
comment
,
BusinessWorkflowKey
.
资产审核
.
getCode
()
);
...
...
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 @
54f896e9
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
...
...
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 @
54f896e9
...
...
@@ -6,6 +6,7 @@ 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.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -15,19 +16,13 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.FinancingAuditEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.TaskStatusEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.*
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingAuditingDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.WorkflowResultDto
;
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.FinancingRectificationOrder
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IFinancingInfoService
;
import
com.yeejoin.amos.boot.module.hygf.api.util.RedisLockUtil
;
...
...
@@ -72,12 +67,17 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
private
FinancingRectificationOrderServiceImpl
financingRectificationOrderService
;
@Autowired
private
CommonServiceImpl
commonService
;
@Autowired
private
AcceptanceCheckServiceImpl
acceptanceCheckService
;
@Autowired
private
AcceptanceCheckAuditingServiceImpl
acceptanceCheckAuditingService
;
@Resource
(
type
=
RedisLockUtil
.
class
)
private
RedisLockUtil
redisLockUtil
;
@UserLimits
public
Page
<
Map
<
String
,
Object
>>
queryForFinancingInfoPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
type
,
String
status
,
String
regionalCompaniesCode
,
String
ownersName
)
{
public
Page
<
Map
<
String
,
Object
>>
queryForFinancingInfoPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
type
,
String
status
,
String
regionalCompaniesCode
,
String
ownersName
,
String
region
)
{
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
();
...
...
@@ -86,6 +86,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
params
.
put
(
"status"
,
status
);
params
.
put
(
"regionalCompaniesCode"
,
regionalCompaniesCode
);
params
.
put
(
"type"
,
type
);
params
.
put
(
"region"
,
region
);
// 1 投融人员 2.融资 3经销商管理员
switch
(
type
)
{
case
"1"
:
...
...
@@ -100,6 +101,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
PageHelper
.
startPage
((
int
)
page
.
getCurrent
(),
(
int
)
page
.
getSize
());
List
<
Map
<
String
,
Object
>>
list
=
financingInfoMapper
.
getStationFinancingInfoList
(
params
,
amosOrgCodes
);
list
.
forEach
(
e
->
{
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
(
","
);
e
.
put
(
"instanceId"
,
instanceIds
[
0
]);
...
...
@@ -112,6 +114,12 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
return
page
;
}
public
List
<
Map
<
String
,
Object
>>
selectRegion
(){
return
financingInfoMapper
.
selectRegion
();
}
/**
* 列表查询 示例
*/
...
...
@@ -128,6 +136,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
}
List
<
String
>
ids
;
long
time
=
new
Date
().
getTime
();
String
batcvNo
=
String
.
valueOf
(
time
);
if
(
model
.
getPeasantHouseholdIds
().
contains
(
","
))
{
ids
=
Arrays
.
asList
(
model
.
getPeasantHouseholdIds
().
split
(
","
));
}
else
{
...
...
@@ -146,6 +156,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
FinancingInfoDto
financingInfoDto
=
new
FinancingInfoDto
();
BeanUtils
.
copyProperties
(
model
,
financingInfoDto
);
financingInfoDto
.
setSequenceNbr
(
null
);
financingInfoDto
.
setBatchNo
(
batcvNo
);
this
.
createWithModel
(
financingInfoDto
);
//开启工作流 并执行一步
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
...
...
@@ -280,11 +291,10 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
task
.
setResultCode
(
"isFlag"
);
map
.
put
(
"isFlag"
,
params
.
get
(
"isFlag"
));
if
(
params
.
get
(
"isFlag"
).
equals
(
"1"
))
{
params
.
put
(
"comments"
,
"退回
整改
"
);
params
.
put
(
"comments"
,
"退回
经销商重新验收
"
);
params
.
put
(
"approvalStatus"
,
params
.
getOrDefault
(
"problemDescription"
,
""
));
}
else
{
params
.
put
(
"approvalStatus"
,
""
);
}
}
else
{
task
.
setResultCode
(
"approvalStatus"
);
...
...
@@ -317,7 +327,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
}
//标识对于整改待推送状态
if
(
params
.
containsKey
(
"isZG"
))
{
financingInfo
.
setStatus
(
"
整改
待推送"
);
financingInfo
.
setStatus
(
"待推送"
);
}
else
{
financingInfo
.
setStatus
(
statusName
);
}
...
...
@@ -327,30 +337,31 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
//节点为待整改时生成整改单
if
(
params
.
containsKey
(
"isFlag"
)
&&
params
.
get
(
"isFlag"
).
equals
(
"1"
)
&&
workflowResultDto
.
getNextNodeKey
().
equals
(
FinancingAuditEnum
.
待整改
.
getCode
()))
{
LambdaQueryWrapper
<
FinancingRectificationOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
FinancingRectificationOrder:
:
getPeasantHouseholdId
,
financingInfo
.
getPeasantHouseholdId
());
queryWrapper
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
queryWrapper
.
last
(
"limit 1"
);
FinancingRectificationOrder
oldData
=
financingRectificationOrderService
.
getBaseMapper
().
selectOne
(
queryWrapper
);
FinancingRectificationOrder
financingRectificationOrder
=
new
FinancingRectificationOrder
();
//若存在历史整改单 将历史整改单数据同步至新整改单 便于修改
if
(
ObjectUtils
.
isNotEmpty
(
oldData
))
{
BeanUtils
.
copyProperties
(
oldData
,
financingRectificationOrder
);
financingRectificationOrder
.
setSequenceNbr
(
null
);
financingRectificationOrder
.
setCompleteDate
(
null
);
financingRectificationOrder
.
setRectificationPhoto
(
null
);
}
financingRectificationOrder
.
setRectificationOrderCode
(
String
.
valueOf
(
new
Date
().
getTime
()));
financingRectificationOrder
.
setRectificationStatus
(
"待整改"
);
financingRectificationOrder
.
setProblemDescription
(
params
.
getOrDefault
(
"problemDescription"
,
""
).
toString
());
financingRectificationOrder
.
setPeasantHouseholdName
(
params
.
getOrDefault
(
"peasantHouseholdName"
,
""
).
toString
());
financingRectificationOrder
.
setRectificationDescription
(
params
.
getOrDefault
(
"rectificationDescription"
,
""
).
toString
());
financingRectificationOrder
.
setPeasantHouseholdId
(
financingInfo
.
getPeasantHouseholdId
());
financingRectificationOrder
.
setResponsibleUserName
(
params
.
getOrDefault
(
"responsibleUserName"
,
""
).
toString
());
financingRectificationOrder
.
setResponsibleUserPhone
(
params
.
getOrDefault
(
"responsibleUserPhone"
,
""
).
toString
());
financingRectificationOrderService
.
save
(
financingRectificationOrder
);
this
.
sendBack
(
financingInfo
.
getPeasantHouseholdId
());
// LambdaQueryWrapper<FinancingRectificationOrder> queryWrapper = new LambdaQueryWrapper<>();
// queryWrapper.eq(FinancingRectificationOrder::getPeasantHouseholdId, financingInfo.getPeasantHouseholdId());
// queryWrapper.orderByDesc(BaseEntity::getRecDate);
// queryWrapper.last("limit 1");
// FinancingRectificationOrder oldData = financingRectificationOrderService.getBaseMapper().selectOne(queryWrapper);
//
// FinancingRectificationOrder financingRectificationOrder = new FinancingRectificationOrder();
// //若存在历史整改单 将历史整改单数据同步至新整改单 便于修改
// if (ObjectUtils.isNotEmpty(oldData)) {
// BeanUtils.copyProperties(oldData, financingRectificationOrder);
// financingRectificationOrder.setSequenceNbr(null);
// financingRectificationOrder.setCompleteDate(null);
// financingRectificationOrder.setRectificationPhoto(null);
// }
// financingRectificationOrder.setRectificationOrderCode(String.valueOf(new Date().getTime()));
// financingRectificationOrder.setRectificationStatus("待整改");
// financingRectificationOrder.setProblemDescription(params.getOrDefault("problemDescription", "").toString());
// financingRectificationOrder.setPeasantHouseholdName(params.getOrDefault("peasantHouseholdName", "").toString());
// financingRectificationOrder.setRectificationDescription(params.getOrDefault("rectificationDescription", "").toString());
// financingRectificationOrder.setPeasantHouseholdId(financingInfo.getPeasantHouseholdId());
// financingRectificationOrder.setResponsibleUserName(params.getOrDefault("responsibleUserName", "").toString());
// financingRectificationOrder.setResponsibleUserPhone(params.getOrDefault("responsibleUserPhone", "").toString());
// financingRectificationOrderService.save(financingRectificationOrder);
}
...
...
@@ -360,4 +371,42 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
return
this
.
getBaseMapper
().
selectOrgList
();
}
public
void
sendBack
(
Long
peasantHouseholdId
){
//删除投融资表数据
LambdaUpdateWrapper
<
FinancingInfo
>
financingUp
=
new
LambdaUpdateWrapper
<>();
financingUp
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
financingUp
.
set
(
BaseEntity:
:
getIsDelete
,
true
);
this
.
update
(
null
,
financingUp
);
//删除验收审核数据
LambdaQueryWrapper
<
AcceptanceCheckAuditing
>
checkAuditUp
=
new
LambdaQueryWrapper
<>();
checkAuditUp
.
eq
(
AcceptanceCheckAuditing:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
acceptanceCheckAuditingService
.
getBaseMapper
().
delete
(
checkAuditUp
);
//重置验收数据
LambdaUpdateWrapper
<
AcceptanceCheck
>
checkUp
=
new
LambdaUpdateWrapper
<>();
checkUp
.
eq
(
AcceptanceCheck:
:
getPeasantHouseholdId
,
peasantHouseholdId
);
checkUp
.
set
(
AcceptanceCheck:
:
getAcceptanceCheckStatus
,
GridStatusEnum
.
WTG
.
getCode
());
checkUp
.
set
(
AcceptanceCheck:
:
getBasicGridNode
,
null
);
checkUp
.
set
(
AcceptanceCheck:
:
getPowerStationFinancingStatus
,
null
);
checkUp
.
set
(
AcceptanceCheck:
:
getPowerStationLegalStatus
,
null
);
checkUp
.
set
(
AcceptanceCheck:
:
getPowerStationAssetsStatus
,
null
);
checkUp
.
set
(
AcceptanceCheck:
:
getPowerStationAreaStatus
,
null
);
checkUp
.
set
(
AcceptanceCheck:
:
getInstanceId
,
null
);
checkUp
.
set
(
AcceptanceCheck:
:
getAcceptanceTime
,
null
);
acceptanceCheckService
.
getBaseMapper
().
update
(
null
,
checkUp
);
}
public
void
updateState
(
List
<
Long
>
ids
){
LambdaUpdateWrapper
<
FinancingInfo
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
in
(
FinancingInfo:
:
getPeasantHouseholdId
,
ids
);
up
.
set
(
FinancingInfo:
:
getStatus
,
"已放款"
);
this
.
getBaseMapper
().
update
(
null
,
up
);
}
}
\ 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