Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王浩
zh-baseversion-project
Commits
7cc5be28
Commit
7cc5be28
authored
Sep 20, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 基础信息维护-居住区(村庄)查询-外部对接接口开发
parent
2a38f679
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
214 additions
and
16 deletions
+214
-16
lpgGasController.java
...b/controller/externaldocking/lpggas/lpgGasController.java
+40
-10
TUserManageVillage.java
...ain/java/com/zehong/system/domain/TUserManageVillage.java
+6
-6
TUserManageVillageThirdPartyVo.java
...hong/system/domain/vo/TUserManageVillageThirdPartyVo.java
+110
-0
TUserManageVillageMapper.java
...va/com/zehong/system/mapper/TUserManageVillageMapper.java
+6
-0
ITUserManageVillageService.java
...com/zehong/system/service/ITUserManageVillageService.java
+8
-0
TUserManageVillageServiceImpl.java
...ng/system/service/impl/TUserManageVillageServiceImpl.java
+18
-0
TUserManageVillageMapper.xml
...main/resources/mapper/system/TUserManageVillageMapper.xml
+26
-0
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/externaldocking/lpggas/lpgGasController.java
View file @
7cc5be28
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.page.TableDataInfo
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.*
;
...
...
@@ -12,10 +13,8 @@ import com.zehong.system.mapper.TEnterpriseInfoMapper;
import
com.zehong.system.service.*
;
import
com.zehong.web.controller.tool.DESEncoder
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.imageio.ImageIO
;
...
...
@@ -86,7 +85,6 @@ public class lpgGasController {
@Resource
private
ITUserManageVillageService
itUserManageVillageService
;
@Resource
DecryptService
decryptService
;
...
...
@@ -2150,6 +2148,38 @@ public class lpgGasController {
}
/**
* 查询基本信息维护-用户管理-居住区(村庄)列表
*/
@GetMapping
(
"/queryUserManageVillage"
)
public
AjaxResult
queryUserManageVillage
(
Integer
pageNum
,
Integer
pageSize
,
String
qybm
)
{
if
(
pageNum
==
null
||
pageSize
==
null
||
StringUtils
.
isBlank
(
qybm
))
{
return
AjaxResult
.
error
(
"分页参数会企业编码不许不为空!!!"
);
}
if
(
pageSize
>
1000
)
{
return
AjaxResult
.
error
(
"分页参数不能超过1000"
);
}
keyInformation
selectkey
=
decryptService
.
selectkey
(
qybm
);
if
(
selectkey
==
null
)
{
return
AjaxResult
.
error
(
"企业编码不存在!!!"
);
}
TEnterpriseInfo
tEnterpriseInfo
=
tEnterpriseInfoMapper
.
selectTEnterpriseInfoById
(
selectkey
.
getEnterpriseId
());
if
(
tEnterpriseInfo
==
null
)
{
return
AjaxResult
.
error
(
"监管平台配置企业信息不存在!!!"
);
}
return
AjaxResult
.
success
(
itUserManageVillageService
.
queryUserManageVillageForThirdParty
(
pageNum
,
pageSize
));
}
/**
* 创建 居住区(村庄)接口
* @return r
...
...
@@ -2333,7 +2363,7 @@ public class lpgGasController {
}
userManageVillage
.
setfVillageName
(
fVillageName
);
userManageVillage
.
setCountyCo
u
de
(
countyCode
);
userManageVillage
.
setCountyCode
(
countyCode
);
userManageVillage
.
setfTotalNumHouse
(
fTotalNumHousel
);
userManageVillage
.
setfPipeGasUsers
(
fPipeGasUsersl
);
userManageVillage
.
setfBottledGasUsers
(
fBottledGasUsersl
);
...
...
@@ -2349,16 +2379,16 @@ public class lpgGasController {
if
(
userManageVillages
.
size
()
>
0
)
{
//1 查看 录入的行政区是否符合要求
List
<
String
>
collect
=
userManageVillages
.
stream
().
filter
(
item
->
StringUtils
.
isNotBlank
(
item
.
getCountyCo
u
de
()))
.
map
(
TUserManageVillage:
:
getCountyCo
u
de
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
userManageVillages
.
stream
().
filter
(
item
->
StringUtils
.
isNotBlank
(
item
.
getCountyCode
()))
.
map
(
TUserManageVillage:
:
getCountyCode
).
collect
(
Collectors
.
toList
());
List
<
TCountyLevelRegion
>
tCountyLevelRegions
=
countyLevelRegionService
.
queryByCountyCodes
(
collect
);
Map
<
String
,
List
<
TCountyLevelRegion
>>
collect1
=
tCountyLevelRegions
.
stream
().
collect
(
Collectors
.
groupingBy
(
TCountyLevelRegion:
:
getfCountyCode
));
Iterator
<
TUserManageVillage
>
iterator
=
userManageVillages
.
iterator
();
while
(
iterator
.
hasNext
())
{
TUserManageVillage
next
=
iterator
.
next
();
if
(
StringUtils
.
isNotBlank
(
next
.
getCountyCo
u
de
()))
{
List
<
TCountyLevelRegion
>
tCountyLevelRegions1
=
collect1
.
get
(
next
.
getCountyCo
u
de
());
if
(
StringUtils
.
isNotBlank
(
next
.
getCountyCode
()))
{
List
<
TCountyLevelRegion
>
tCountyLevelRegions1
=
collect1
.
get
(
next
.
getCountyCode
());
if
(
tCountyLevelRegions1
==
null
||
tCountyLevelRegions1
.
size
()
==
0
)
{
lpgThirdPartyDockingInterfaceRecord
=
errorRecord
(
"createUserManageVillage"
,
next
.
toString
(),
"县(市、区)行政区划编码 不符合要求!!!"
,
encryption
.
getQybm
());
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/TUserManageVillage.java
View file @
7cc5be28
...
...
@@ -66,7 +66,7 @@ public class TUserManageVillage extends BaseEntity
/**
* 县(市、区)行政区划编码 第三方接口对接时使用
*/
private
String
countyCo
u
de
;
private
String
countyCode
;
public
void
setfVillageId
(
Long
fVillageId
)
{
...
...
@@ -174,12 +174,12 @@ public class TUserManageVillage extends BaseEntity
this
.
beyondEnterpriseName
=
beyondEnterpriseName
;
}
public
String
getCountyCo
u
de
()
{
return
countyCo
u
de
;
public
String
getCountyCode
()
{
return
countyCode
;
}
public
void
setCountyCo
ude
(
String
countyCou
de
)
{
this
.
countyCo
ude
=
countyCou
de
;
public
void
setCountyCo
de
(
String
countyCo
de
)
{
this
.
countyCo
de
=
countyCo
de
;
}
@Override
...
...
@@ -205,7 +205,7 @@ public class TUserManageVillage extends BaseEntity
.
append
(
"fBottledGasUsers"
,
getfBottledGasUsers
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"countyCoude"
,
getCountyCo
u
de
())
.
append
(
"countyCoude"
,
getCountyCode
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/vo/TUserManageVillageThirdPartyVo.java
0 → 100644
View file @
7cc5be28
package
com
.
zehong
.
system
.
domain
.
vo
;
import
java.math.BigDecimal
;
public
class
TUserManageVillageThirdPartyVo
{
/**
* 名称
*/
private
String
fVillageName
;
/**
* 县级行政区名称
*/
private
String
fRegionName
;
/**
* 县级行政区编码
*/
private
String
countyCode
;
/**
* 居民总户数
*/
private
Long
fTotalNumHouse
;
/**
* 管道燃气用户数
*/
private
Long
fPipeGasUsers
;
/**
* 瓶装燃气用户数
*/
private
Long
fBottledGasUsers
;
/** 经度 */
private
BigDecimal
longitude
;
/** 纬度 */
private
BigDecimal
latitude
;
/** 备注 */
private
String
remarks
;
public
String
getfVillageName
()
{
return
fVillageName
;
}
public
void
setfVillageName
(
String
fVillageName
)
{
this
.
fVillageName
=
fVillageName
;
}
public
String
getfRegionName
()
{
return
fRegionName
;
}
public
void
setfRegionName
(
String
fRegionName
)
{
this
.
fRegionName
=
fRegionName
;
}
public
String
getCountyCode
()
{
return
countyCode
;
}
public
void
setCountyCode
(
String
countyCode
)
{
this
.
countyCode
=
countyCode
;
}
public
Long
getfTotalNumHouse
()
{
return
fTotalNumHouse
;
}
public
void
setfTotalNumHouse
(
Long
fTotalNumHouse
)
{
this
.
fTotalNumHouse
=
fTotalNumHouse
;
}
public
Long
getfPipeGasUsers
()
{
return
fPipeGasUsers
;
}
public
void
setfPipeGasUsers
(
Long
fPipeGasUsers
)
{
this
.
fPipeGasUsers
=
fPipeGasUsers
;
}
public
Long
getfBottledGasUsers
()
{
return
fBottledGasUsers
;
}
public
void
setfBottledGasUsers
(
Long
fBottledGasUsers
)
{
this
.
fBottledGasUsers
=
fBottledGasUsers
;
}
public
BigDecimal
getLongitude
()
{
return
longitude
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
{
this
.
longitude
=
longitude
;
}
public
BigDecimal
getLatitude
()
{
return
latitude
;
}
public
void
setLatitude
(
BigDecimal
latitude
)
{
this
.
latitude
=
latitude
;
}
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
}
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TUserManageVillageMapper.java
View file @
7cc5be28
...
...
@@ -29,6 +29,12 @@ public interface TUserManageVillageMapper
*/
public
List
<
TUserManageVillage
>
selectTUserManageVillageList
(
TUserManageVillage
tUserManageVillage
);
/**
* 提供给第三方使用的查询接口
* @return r
*/
public
List
<
TUserManageVillage
>
queryUserManageVillageForThirdParty
();
/**
* 导出用
* @param tUserManageVillage tUserManageVillage
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/ITUserManageVillageService.java
View file @
7cc5be28
...
...
@@ -27,6 +27,14 @@ public interface ITUserManageVillageService
*/
public
List
<
TUserManageVillage
>
selectTUserManageVillageList
(
TUserManageVillage
tUserManageVillage
);
/**
* 提供给第三方使用的 分页查询
* @param pageNum p
* @param pageSize p
* @return r
*/
public
List
<
TUserManageVillage
>
queryUserManageVillageForThirdParty
(
Integer
pageNum
,
Integer
pageSize
);
/**
* 查询基本信息维护-用户管理-居住区(村庄)列表
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TUserManageVillageServiceImpl.java
View file @
7cc5be28
...
...
@@ -2,8 +2,11 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.security.core.parameters.P
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TUserManageVillageMapper
;
import
com.zehong.system.domain.TUserManageVillage
;
...
...
@@ -50,6 +53,21 @@ public class TUserManageVillageServiceImpl implements ITUserManageVillageService
return
tUserManageVillageMapper
.
selectTUserManageVillageList
(
tUserManageVillage
);
}
/**
* 提供给第三方使用的 分页查询
* @param pageNum p
* @param pageSize p
* @return
*/
@Override
public
List
<
TUserManageVillage
>
queryUserManageVillageForThirdParty
(
Integer
pageNum
,
Integer
pageSize
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
List
<
TUserManageVillage
>
userManageVillages
=
tUserManageVillageMapper
.
queryUserManageVillageForThirdParty
();
PageInfo
<
TUserManageVillage
>
pageInfo
=
new
PageInfo
<>(
userManageVillages
);
return
pageInfo
.
getList
();
}
/**
* 查询基本信息维护-用户管理-居住区(村庄)导出
*
...
...
zh-baseversion-system/src/main/resources/mapper/system/TUserManageVillageMapper.xml
View file @
7cc5be28
...
...
@@ -18,6 +18,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"beyondEnterpriseName"
column=
"enterprise_name"
/>
</resultMap>
<resultMap
type=
"TUserManageVillageThirdPartyVo"
id=
"TUserManageVillageThirdPartyVoResult"
>
<result
property=
"fVillageName"
column=
"f_village_name"
/>
<result
property=
"fRegionName"
column=
"fRegionName"
/>
<result
property=
"countyCode"
column=
"countyCode"
/>
<result
property=
"fTotalNumHouse"
column=
"f_total_num_house"
/>
<result
property=
"fPipeGasUsers"
column=
"f_pipe_gas_users"
/>
<result
property=
"fBottledGasUsers"
column=
"f_bottled_gas_users"
/>
<result
property=
"longitude"
column=
"longitude"
/>
<result
property=
"latitude"
column=
"latitude"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
<sql
id=
"selectTUserManageVillageVo"
>
select village.f_village_id,
village.f_village_name,
...
...
@@ -79,6 +91,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"beyondEnterpriseId != null and beyondEnterpriseId != '-2' and beyondEnterpriseId != ''"
>
and f_beyond_enterprise_id = #{beyondEnterpriseId}
</if>
</where>
</select>
<select
id=
"queryUserManageVillageForThirdParty"
resultMap=
"TUserManageVillageThirdPartyVoResult"
>
select village.f_village_id,
village.f_village_name,
region.f_name as fRegionName,
region.f_county_code as countyCode,
village.f_total_num_house,
village.f_pipe_gas_users,
village.f_bottled_gas_users,
village.longitude,
village.latitude,
village.remarks
from t_user_manage_village village
left join t_county_level_region region on village.f_region = region.f_id
</select>
<select
id=
"exportUserManageVillageList"
parameterType=
"TUserManageVillage"
resultMap=
"exportTUserManageVillageResult"
>
<include
refid=
"exportTUserManageVillageVo"
/>
...
...
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