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
2a38f679
Commit
2a38f679
authored
Sep 20, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 基础信息维护-居住区(村庄)新增-外部对接接口开发
parent
6d824f6e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
455 additions
and
26 deletions
+455
-26
lpgGasController.java
...b/controller/externaldocking/lpggas/lpgGasController.java
+291
-0
DESEncoder.java
.../main/java/com/zehong/web/controller/tool/DESEncoder.java
+33
-22
TUserManageVillage.java
...ain/java/com/zehong/system/domain/TUserManageVillage.java
+28
-0
TCountyLevelRegionMapper.java
...va/com/zehong/system/mapper/TCountyLevelRegionMapper.java
+7
-0
TUserManageVillageMapper.java
...va/com/zehong/system/mapper/TUserManageVillageMapper.java
+14
-0
ITCountyLevelRegionService.java
...com/zehong/system/service/ITCountyLevelRegionService.java
+7
-0
ITUserManageVillageService.java
...com/zehong/system/service/ITUserManageVillageService.java
+14
-0
TCountyLevelRegionServiceImpl.java
...ng/system/service/impl/TCountyLevelRegionServiceImpl.java
+11
-1
TUserManageVillageServiceImpl.java
...ng/system/service/impl/TUserManageVillageServiceImpl.java
+23
-2
TCountyLevelRegionMapper.xml
...main/resources/mapper/system/TCountyLevelRegionMapper.xml
+7
-0
TUserManageVillageMapper.xml
...main/resources/mapper/system/TUserManageVillageMapper.xml
+20
-1
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/externaldocking/lpggas/lpgGasController.java
View file @
2a38f679
This diff is collapsed.
Click to expand it.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/tool/DESEncoder.java
View file @
2a38f679
...
...
@@ -159,28 +159,39 @@ public class DESEncoder {
// System.out.println(DESEncoder.encrypt(skcs1,"23546324"));
String
lpggasdata
=
"[\n"
+
" {\n"
+
" \"bottleCode\": \"32323\",\n"
+
" \"userOwnId\": \"1\",\n"
+
" \"stationName\": \"储备站-接口来的-01\",\n"
+
" \"deliveryPerson\": \"配送人-接口来的-01\",\n"
+
" \"vehicleCode\": \"车辆代码-接口来的-01\",\n"
+
" \"gasUserType\": \"1\",\n"
+
" \"deliveryAddress\": \"配送地址-接口来的-01\",\n"
+
" \"deliveryDate\": \"2024-12-21 23:12:20\"\n"
+
" },\n"
+
" {\n"
+
" \"bottleCode\": \"222222\",\n"
+
" \"userOwnId\": \"89\",\n"
+
" \"stationName\": \"储备站-接口来的-01\",\n"
+
" \"deliveryPerson\": \"配送人-接口来的-01\",\n"
+
" \"vehicleCode\": \"车辆代码-接口来的-01\",\n"
+
" \"gasUserType\": \"0\",\n"
+
" \"deliveryAddress\": \"配送地址-接口来的-01\",\n"
+
" \"deliveryDate\": \"2024-12-21 23:12:21\"\n"
+
" }\n"
+
"]\n"
+
"\n"
;
"\t{\n"
+
"\t\t\"fVillageName\":\"村庄名称-接口来的-01\",\n"
+
"\t\t\"fTotalNumHouse\":\"49\",\n"
+
"\t\t\"countyCode\":\"130104\",\n"
+
"\t\t\"fBottledGasUsers\":\"15\",\n"
+
"\t\t\"fPipeGasUsers\":\"14\",\n"
+
"\t\t\"longitude\":\"14.56\",\n"
+
"\t\t\"latitude\":\"18.96\",\n"
+
"\t\t\"remarks\":\"备注-接口来的-01\"\n"
+
"\t},\n"
+
"\t{\n"
+
"\n"
+
"\t\t\"fVillageName\":\"村庄名称-接口来的-02\",\n"
+
"\t\t\"fTotalNumHouse\":\"49\",\n"
+
"\t\t\"countyCode\":\"130105\",\n"
+
"\t\t\"fBottledGasUsers\":\"15\",\n"
+
"\t\t\"fPipeGasUsers\":\"14\",\n"
+
"\t\t\"longitude\":\"14.56\",\n"
+
"\t\t\"latitude\":\"18.96\",\n"
+
"\t\t\"remarks\":\"备注-接口来的-01\"\n"
+
"\t},\n"
+
"\t{\n"
+
"\n"
+
"\t\t\"fVillageName\":\"村庄名称-接口来的-02\",\n"
+
"\t\t\"fTotalNumHouse\":\"49\",\n"
+
"\t\t\"countyCode\":\"130107\",\n"
+
"\t\t\"fBottledGasUsers\":\"15\",\n"
+
"\t\t\"fPipeGasUsers\":\"14\",\n"
+
"\t\t\"longitude\":\"14.56\",\n"
+
"\t\t\"latitude\":\"18.96\",\n"
+
"\t\t\"remarks\":\"备注-接口来的-01\"\n"
+
"\t}\n"
+
"]"
;
JSONArray
objects
=
JSON
.
parseArray
(
lpggasdata
);
System
.
out
.
println
(
objects
);
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/TUserManageVillage.java
View file @
2a38f679
package
com
.
zehong
.
system
.
domain
;
import
java.math.BigDecimal
;
import
java.util.Objects
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
...
...
@@ -61,6 +63,11 @@ public class TUserManageVillage extends BaseEntity
/** 备注 */
private
String
remarks
;
/**
* 县(市、区)行政区划编码 第三方接口对接时使用
*/
private
String
countyCoude
;
public
void
setfVillageId
(
Long
fVillageId
)
{
this
.
fVillageId
=
fVillageId
;
...
...
@@ -167,6 +174,26 @@ public class TUserManageVillage extends BaseEntity
this
.
beyondEnterpriseName
=
beyondEnterpriseName
;
}
public
String
getCountyCoude
()
{
return
countyCoude
;
}
public
void
setCountyCoude
(
String
countyCoude
)
{
this
.
countyCoude
=
countyCoude
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
return
true
;
if
(
obj
==
null
||
getClass
()
!=
obj
.
getClass
())
return
false
;
TUserManageVillage
tUserManageVillage
=
(
TUserManageVillage
)
obj
;
return
Objects
.
equals
(
fVillageName
,
tUserManageVillage
.
getfVillageName
());
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
fVillageName
);
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
@@ -178,6 +205,7 @@ public class TUserManageVillage extends BaseEntity
.
append
(
"fBottledGasUsers"
,
getfBottledGasUsers
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"countyCoude"
,
getCountyCoude
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TCountyLevelRegionMapper.java
View file @
2a38f679
...
...
@@ -2,6 +2,7 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
com.zehong.system.domain.TCountyLevelRegion
;
import
org.apache.ibatis.annotations.Param
;
/**
* 县级行政区Mapper接口
...
...
@@ -27,6 +28,12 @@ public interface TCountyLevelRegionMapper
*/
public
List
<
TCountyLevelRegion
>
selectTCountyLevelRegionList
(
TCountyLevelRegion
tCountyLevelRegion
);
/**
* 根据 countyCodes 集合查询数据
* @param list c
* @return r
*/
public
List
<
TCountyLevelRegion
>
queryByCountyCodes
(
@Param
(
"list"
)
List
<
String
>
list
);
/**
* 根据city_code 查询
* @param fCityId c
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TUserManageVillageMapper.java
View file @
2a38f679
...
...
@@ -2,6 +2,8 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
com.zehong.system.domain.TUserManageVillage
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.security.core.parameters.P
;
/**
* 基本信息维护-用户管理-居住区(村庄)Mapper接口
...
...
@@ -34,6 +36,12 @@ public interface TUserManageVillageMapper
*/
public
List
<
TUserManageVillage
>
exportUserManageVillageList
(
TUserManageVillage
tUserManageVillage
);
/**
* 根据 村名称集合 查询 村列表
* @param list v
* @return r
*/
List
<
TUserManageVillage
>
queryByVillageNames
(
@Param
(
"list"
)
List
<
String
>
list
);
/**
* 新增基本信息维护-用户管理-居住区(村庄)
*
...
...
@@ -42,6 +50,12 @@ public interface TUserManageVillageMapper
*/
public
int
insertTUserManageVillage
(
TUserManageVillage
tUserManageVillage
);
/**
* 批量插入
* @param userManageVillages s
* @return s
*/
int
insertBatch
(
List
<
TUserManageVillage
>
userManageVillages
);
/**
* 修改基本信息维护-用户管理-居住区(村庄)
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/ITCountyLevelRegionService.java
View file @
2a38f679
...
...
@@ -27,6 +27,13 @@ public interface ITCountyLevelRegionService
*/
public
List
<
TCountyLevelRegion
>
selectTCountyLevelRegionList
(
TCountyLevelRegion
tCountyLevelRegion
);
/**
* 根据县(市、区)行政区划编码 集合查询数据
* @param countyCodes c
* @return r
*/
public
List
<
TCountyLevelRegion
>
queryByCountyCodes
(
List
<
String
>
countyCodes
);
/**
* 新增县级行政区
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/ITUserManageVillageService.java
View file @
2a38f679
...
...
@@ -34,6 +34,13 @@ public interface ITUserManageVillageService
* @return 基本信息维护-用户管理-居住区(村庄)集合
*/
public
List
<
TUserManageVillage
>
exportTUserManageVillageList
(
TUserManageVillage
tUserManageVillage
);
/**
* 根据 名称集合查询 村列表
* @param villageNames v
* @return r
*/
public
List
<
TUserManageVillage
>
queryByVillageNames
(
List
<
String
>
villageNames
);
/**
* 新增基本信息维护-用户管理-居住区(村庄)
*
...
...
@@ -42,6 +49,13 @@ public interface ITUserManageVillageService
*/
public
int
insertTUserManageVillage
(
TUserManageVillage
tUserManageVillage
);
/**
* 批量插入
* @param userManageVillages s
* @return r
*/
public
int
insertBatch
(
List
<
TUserManageVillage
>
userManageVillages
);
/**
* 修改基本信息维护-用户管理-居住区(村庄)
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TCountyLevelRegionServiceImpl.java
View file @
2a38f679
...
...
@@ -23,7 +23,7 @@ import javax.annotation.Resource;
@Service
public
class
TCountyLevelRegionServiceImpl
implements
ITCountyLevelRegionService
{
@
Autowired
@
Resource
private
TCountyLevelRegionMapper
tCountyLevelRegionMapper
;
@Resource
...
...
@@ -53,6 +53,16 @@ public class TCountyLevelRegionServiceImpl implements ITCountyLevelRegionService
return
tCountyLevelRegionMapper
.
selectTCountyLevelRegionList
(
tCountyLevelRegion
);
}
/**
* 根据 县(市、区)行政区划编码 查询数据
* @param countyCodes c
* @return r
*/
@Override
public
List
<
TCountyLevelRegion
>
queryByCountyCodes
(
List
<
String
>
countyCodes
)
{
return
tCountyLevelRegionMapper
.
queryByCountyCodes
(
countyCodes
);
}
/**
* 新增县级行政区
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TUserManageVillageServiceImpl.java
View file @
2a38f679
...
...
@@ -4,12 +4,13 @@ import java.util.List;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TUserManageVillageMapper
;
import
com.zehong.system.domain.TUserManageVillage
;
import
com.zehong.system.service.ITUserManageVillageService
;
import
javax.annotation.Resource
;
/**
* 基本信息维护-用户管理-居住区(村庄)Service业务层处理
*
...
...
@@ -19,7 +20,7 @@ import com.zehong.system.service.ITUserManageVillageService;
@Service
public
class
TUserManageVillageServiceImpl
implements
ITUserManageVillageService
{
@
Autowired
@
Resource
private
TUserManageVillageMapper
tUserManageVillageMapper
;
/**
...
...
@@ -63,6 +64,16 @@ public class TUserManageVillageServiceImpl implements ITUserManageVillageService
return
tUserManageVillageMapper
.
exportUserManageVillageList
(
tUserManageVillage
);
}
/**
* 根据 村名称集合 查询 村集合
* @param villageNames v
* @return r
*/
@Override
public
List
<
TUserManageVillage
>
queryByVillageNames
(
List
<
String
>
villageNames
)
{
return
tUserManageVillageMapper
.
queryByVillageNames
(
villageNames
);
}
/**
* 新增基本信息维护-用户管理-居住区(村庄)
*
...
...
@@ -75,6 +86,16 @@ public class TUserManageVillageServiceImpl implements ITUserManageVillageService
return
tUserManageVillageMapper
.
insertTUserManageVillage
(
tUserManageVillage
);
}
/**
* 批量插入
* @param userManageVillages s
* @return r
*/
@Override
public
int
insertBatch
(
List
<
TUserManageVillage
>
userManageVillages
)
{
return
tUserManageVillageMapper
.
insertBatch
(
userManageVillages
);
}
/**
* 修改基本信息维护-用户管理-居住区(村庄)
*
...
...
zh-baseversion-system/src/main/resources/mapper/system/TCountyLevelRegionMapper.xml
View file @
2a38f679
...
...
@@ -26,6 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fIsMajor != null "
>
and f_is_major = #{fIsMajor}
</if>
</where>
</select>
<select
id=
"queryByCountyCodes"
resultMap=
"TCountyLevelRegionResult"
>
<include
refid=
"selectTCountyLevelRegionVo"
></include>
where f_county_code in
<foreach
collection=
"list"
index=
"i"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<select
id=
"queryByCityId"
resultMap=
"TCountyLevelRegionResult"
>
<include
refid=
"selectTCountyLevelRegionVo"
/>
where f_city_id = #{fCityId}
...
...
zh-baseversion-system/src/main/resources/mapper/system/TUserManageVillageMapper.xml
View file @
2a38f679
...
...
@@ -87,12 +87,31 @@ 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=
"queryByVillageNames"
parameterType=
"list"
resultMap=
"TUserManageVillageResult"
>
<include
refid=
"exportTUserManageVillageVo"
/>
where f_village_name in
<foreach
collection=
"list"
close=
")"
separator=
","
open=
"("
item=
"item"
index=
"i"
>
#{item}
</foreach>
</select>
<select
id=
"selectTUserManageVillageById"
parameterType=
"Long"
resultMap=
"TUserManageVillageResult"
>
<include
refid=
"selectTUserManageVillageVo"
/>
where f_village_id = #{fVillageId}
</select>
<insert
id=
"insertBatch"
parameterType=
"list"
>
insert into t_user_manage_village (f_village_name, f_region,f_total_num_house, f_pipe_gas_users, f_bottled_gas_users,
longitude,latitude,remarks)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.fVillageName,jdbcType=VARCHAR}, #{item.fRegion}, #{item.fTotalNumHouse},
#{item.fPipeGasUsers}, #{item.fBottledGasUsers},#{item.longitude},#{item.latitude},#{item.remarks}
)
</foreach>
</insert>
<insert
id=
"insertTUserManageVillage"
parameterType=
"TUserManageVillage"
useGeneratedKeys=
"true"
keyProperty=
"fVillageId"
>
insert into t_user_manage_village
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
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