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
5d169bb4
Commit
5d169bb4
authored
Jul 01, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz
into developer
parents
9d72a439
365ecc03
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
141 additions
and
7 deletions
+141
-7
PeasantHousehold.java
...in/amos/boot/module/hygf/api/entity/PeasantHousehold.java
+6
-0
PeasantHouseholdMapper.java
...s/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
+9
-0
UnitInfoMapper.java
...join/amos/boot/module/hygf/api/mapper/UnitInfoMapper.java
+2
-0
IPeasantHouseholdService.java
...oot/module/hygf/api/service/IPeasantHouseholdService.java
+2
-0
PeasantHouseholdMapper.xml
...rc/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
+31
-0
UnitInfoMapper.xml
...gf-api/src/main/resources/mapper/mysql/UnitInfoMapper.xml
+13
-0
PeasantHouseholdController.java
...odule/hygf/biz/controller/PeasantHouseholdController.java
+12
-1
WorkFlowFeignService.java
...amos/boot/module/hygf/biz/feign/WorkFlowFeignService.java
+1
-1
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+13
-2
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+41
-0
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+3
-2
application-dev.properties
...le-hygf-biz/src/main/resources/application-dev.properties
+7
-1
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+1
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PeasantHousehold.java
View file @
5d169bb4
...
...
@@ -203,4 +203,10 @@ public class PeasantHousehold extends BaseEntity {
@TableField
(
exist
=
false
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
projectAddressText
;
/**
* 当前农户下所有的合同是否已废弃, 1(全部已废弃), 0(未全部废弃)
*/
@TableField
(
exist
=
false
)
private
Integer
isAllRevoke
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
View file @
5d169bb4
...
...
@@ -35,4 +35,13 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
List
<
Map
<
String
,
Object
>>
selectUserIsHouse
(
String
telephone
);
Integer
selectIsAllRevoke
(
String
amosUserId
);
void
deleteHphByUserId
(
String
userId
);
void
deletePauByUserId
(
String
userId
);
void
deleteAliByUserId
(
String
userId
);
void
deleteHhcByUserId
(
String
userId
);
Integer
selectSurveyOrNot
(
String
sequenceNbr
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/UnitInfoMapper.java
View file @
5d169bb4
...
...
@@ -36,4 +36,6 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
Integer
getUserListHuiCount
(
String
phone
,
String
userName
);
Integer
getUserListPauCount
(
String
phone
,
String
userName
);
Integer
getUserListSubCount
(
String
phone
,
String
userName
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IPeasantHouseholdService.java
View file @
5d169bb4
...
...
@@ -16,4 +16,6 @@ public interface IPeasantHouseholdService {
List
<
PeasantHousehold
>
getInfoByIds
(
String
ids
);
Boolean
deleteUser
(
String
sequenceNbr
,
String
userId
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
View file @
5d169bb4
...
...
@@ -77,4 +77,35 @@ and hygf_document_station.station_id is not null
`user`.MOBILE = #{telephone}
</select>
<select
id=
"selectSurveyOrNot"
resultType=
"Integer"
>
select survey_or_not from hygf_peasant_household where sequence_nbr = #{sequenceNbr}
</select>
<select
id=
"selectIsAllRevoke"
resultType=
"Integer"
>
SELECT
count(*) = ( SELECT count(*) FROM hygf_household_contract WHERE project_user_id = #{amosUserId} and initiate_status = '已发起' AND STATUS = '已作废' )
FROM
hygf_household_contract
WHERE
project_user_id = #{amosUserId} and initiate_status = '已发起'
</select>
<select
id=
"deleteHphByUserId"
>
DELETE FROM hygf_peasant_household WHERE amos_user_id=#{userId}
</select>
<select
id=
"deletePauByUserId"
>
DELETE FROM privilege_agency_user WHERE USER_ID=#{userId}
</select>
<select
id=
"deleteAliByUserId"
>
DELETE FROM auth_login_info WHERE USER_ID=#{userId}
</select>
<select
id=
"deleteHhcByUserId"
>
DELETE FROM hygf_household_contract WHERE project_user_id=#{userId}
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/UnitInfoMapper.xml
View file @
5d169bb4
...
...
@@ -141,6 +141,7 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
<select
id=
"getUserListPauCount"
resultType=
"integer"
>
select count(*) from privilege_agency_user
<where>
IS_DELETED != 1
<if
test=
"phone != null and phone !=''"
>
and MOBILE = #{phone}
</if>
...
...
@@ -150,4 +151,16 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
</where>
</select>
<select
id=
"getUserListSubCount"
resultType=
"integer"
>
select count(*) from std_user_biz
<where>
<if
test=
"phone != null and phone !=''"
>
and emergency_telephone = #{phone}
</if>
<if
test=
"userName != null and userName !=''"
>
and amos_user_name = #{userName}
</if>
</where>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PeasantHouseholdController.java
View file @
5d169bb4
...
...
@@ -279,5 +279,16 @@ public class PeasantHouseholdController extends BaseController {
}
/**
* 根据sequenceNbr和userId删除用户信息
* sequenceNbr 唯一标识
* @param userId 用户id
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}/{userId}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据userId删除用户信息和合同"
,
notes
=
"根据userId删除用户信息和合同"
)
public
ResponseModel
<
Boolean
>
deleteUser
(
@PathVariable
String
sequenceNbr
,
@PathVariable
String
userId
)
{
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
deleteUser
(
sequenceNbr
,
userId
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/feign/WorkFlowFeignService.java
View file @
5d169bb4
...
...
@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
import
java.util.Map
;
@FeignClient
(
name
=
"
AMOS-API-WORKFLOW
"
,
path
=
"workflow"
,
configuration
=
{
XidFeignConfiguration
.
class
})
@FeignClient
(
name
=
"
${workflow.feign.name}
"
,
path
=
"workflow"
,
configuration
=
{
XidFeignConfiguration
.
class
})
public
interface
WorkFlowFeignService
{
/***
...
...
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 @
5d169bb4
...
...
@@ -157,15 +157,26 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
financingAuditingDto
.
setPeasantHouseholdId
(
Long
.
valueOf
(
e
));
financingAuditingDto
.
setPromoter
(
RequestContext
.
getExeUserId
());
financingAuditingService
.
createWithModel
(
financingAuditingDto
);
}
else
if
(
financingInfos
.
getStatus
().
equals
(
FinancingAuditEnum
.
审核不通过
.
getName
())
||
financingInfos
.
getStatus
().
equals
(
FinancingAuditEnum
.
整改待推送
.
getName
())
){
}
//批量 兼容审核不通过及整改待推送
else
if
(
financingInfos
.
getStatus
().
equals
(
FinancingAuditEnum
.
审核不通过
.
getName
())
||
financingInfos
.
getStatus
().
equals
(
FinancingAuditEnum
.
整改待推送
.
getName
())
){
financingInfos
.
setStatus
(
FinancingAuditEnum
.
待融资审核
.
getName
());
Map
<
String
,
Object
>
orgInfo1
=
this
.
getBaseMapper
().
selectRZOrgInfo
(
model
.
getFinancingCompaniesSeq
());
//业务表中无工作流id 需要补充
LambdaQueryWrapper
<
FinancingAuditing
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
FinancingAuditing:
:
getPeasantHouseholdId
,
Long
.
valueOf
(
e
));
queryWrapper1
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
queryWrapper1
.
last
(
"limit 1"
);
FinancingAuditing
financingInfos1
=
financingAuditingService
.
getBaseMapper
().
selectOne
(
queryWrapper1
);
financingInfos
.
setFinancingCompaniesCode
(
orgInfo1
.
getOrDefault
(
"ORG_CODE"
,
""
).
toString
());
financingInfos
.
setFinancingCompaniesName
(
orgInfo1
.
getOrDefault
(
"COMPANY_NAME"
,
""
).
toString
());
this
.
updateById
(
financingInfos
);
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
financingInfos
);
map
.
put
(
"isFlag"
,
"0"
);
map
.
put
(
"instanceId"
,
financingInfos1
.
getInstanceId
());
this
.
execueFlow
(
map
);
}
...
...
@@ -280,7 +291,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
LambdaQueryWrapper
<
FinancingInfo
>
info
=
new
LambdaQueryWrapper
<>();
info
.
eq
(
FinancingInfo:
:
getPeasantHouseholdId
,
financingAuditing
.
getPeasantHouseholdId
());
FinancingInfo
financingInfo
=
this
.
getBaseMapper
().
selectOne
(
info
);
if
(
params
.
containsKey
(
"financingCompaniesSeq"
))
{
if
(
params
.
containsKey
(
"financingCompaniesSeq"
)
&&
params
.
get
(
"financingCompaniesSeq"
)!=
null
)
{
financingInfo
.
setFinancingCompaniesSeq
(
Long
.
valueOf
(
params
.
get
(
"financingCompaniesSeq"
).
toString
()));
}
//标识对于整改待推送状态
...
...
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 @
5d169bb4
...
...
@@ -244,6 +244,10 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
List
<
PeasantHousehold
>
newRecords
=
records
.
stream
().
map
(
item
->
{
// 查询该条数据能否被删除, 0不能删除, 1可以删除
item
.
setIsAllRevoke
(
peasantHouseholdMapper
.
selectIsAllRevoke
(
item
.
getAmosUserId
()));
if
(
item
.
getSurveyOrNot
()
!=
null
){
if
(
item
.
getSurveyOrNot
()
==
0
)
{
item
.
setSurveyOrNotText
(
"待勘察"
);
...
...
@@ -790,4 +794,40 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
return
peasantHouseholds
;
}
@Override
public
Boolean
deleteUser
(
String
sequenceNbr
,
String
userId
)
{
try
{
// 根据sequenceNbr获取农户勘察状态
Integer
surveyOrNot
=
peasantHouseholdMapper
.
selectSurveyOrNot
(
sequenceNbr
);
if
(
surveyOrNot
!=
0
)
{
throw
new
BadRequest
(
"该用户已勘察, 不允许删除!"
);
}
// 查询该条数据能否被删除, 0不能删除, 1可以删除
Integer
isAllRevok
=
peasantHouseholdMapper
.
selectIsAllRevoke
(
userId
);
if
(
isAllRevok
!=
1
)
{
throw
new
BadRequest
(
"该用户有未完成的任务, 不允许删除!"
);
}
// 删除hygf_peasant_household表中数据
peasantHouseholdMapper
.
deleteHphByUserId
(
userId
);
// 删除privilege_agency_user表中数据
peasantHouseholdMapper
.
deletePauByUserId
(
userId
);
// 删除auth_login_info表中数据
peasantHouseholdMapper
.
deleteAliByUserId
(
userId
);
// 删除hygf_household_contract表中数据
peasantHouseholdMapper
.
deleteHhcByUserId
(
userId
);
return
true
;
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"删除失败!"
);
}
}
}
\ 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/UnitInfoServiceImpl.java
View file @
5d169bb4
...
...
@@ -1060,12 +1060,13 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
public
Boolean
hasExistPhoneOrUserName
(
String
phone
,
String
userName
)
{
Integer
userListHuiCount
=
unitInfoMapper
.
getUserListHuiCount
(
phone
,
userName
);
Integer
userListPauCount
=
unitInfoMapper
.
getUserListPauCount
(
phone
,
userName
);
Integer
userListSubCount
=
unitInfoMapper
.
getUserListSubCount
(
phone
,
userName
);
if
((
userListHuiCount
!=
0
||
userListPauCount
!=
0
)
&&
phone
!=
null
)
{
if
((
userListHuiCount
!=
0
||
userListPauCount
!=
0
||
userListSubCount
!=
0
)
&&
phone
!=
null
)
{
throw
new
BadRequest
(
"该手机号已经注册"
);
}
if
((
userListHuiCount
!=
0
||
userListPauCount
!=
0
)
&&
userName
!=
null
)
{
if
((
userListHuiCount
!=
0
||
userListPauCount
!=
0
||
userListSubCount
!=
0
)
&&
userName
!=
null
)
{
throw
new
BadRequest
(
"该用户名已经注册"
);
}
return
true
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev.properties
View file @
5d169bb4
...
...
@@ -234,9 +234,14 @@ seata.service.grouplist.hygf-seata=47.92.234.253:8091
# Seata 配置
seata.enabled
=
true
seata.enable-auto-data-source-proxy
=
false
#seata.client.undo.log-serialization=kryo
seata.datasource.autoproxy.datasource-proxy-mode
=
original
seata.datasource.autoproxy.enabled
=
true
seata.datasource.autoproxy.data-source-names
=
mysql
## 47环境 排除es报错引进无用配置 业务未实际使用es
spring.elasticsearch.rest.uris
=
http://47.92.234.253:9200
spring.elasticsearch.rest.connection-timeout
=
30000
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.password
=
123456
spring.elasticsearch.rest.read-timeout
=
30000
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
View file @
5d169bb4
...
...
@@ -74,6 +74,7 @@ public class MonitorServiceImpl implements MonitorService {
for
(
StationType
value
:
StationType
.
values
())
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
List
<
StationCacheInfoDto
>
dtos
=
listMap
.
get
(
value
.
getCode
());
map
.
put
(
"key"
,
value
.
getCode
());
map
.
put
(
"data"
,
dtos
==
null
?
0
:
dtos
.
size
());
map
.
put
(
"title"
,
dtos
==
null
?
0
:
dtos
.
stream
().
filter
(
obj
->
!
ObjectUtils
.
isEmpty
(
obj
.
getInstalledCapacity
())).
mapToDouble
(
l
->
Double
.
parseDouble
(
l
.
getInstalledCapacity
())).
sum
());
map
.
put
(
"title"
,
keepTwodecimalPlaces
(
Double
.
valueOf
(
map
.
get
(
"title"
).
toString
())));
...
...
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