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
57f14343
Commit
57f14343
authored
Sep 19, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 液化石油气-安检记录 外部接口开发。
parent
527db5f1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
658 additions
and
35 deletions
+658
-35
lpgGasController.java
...b/controller/externaldocking/lpggas/lpgGasController.java
+513
-30
DESEncoder.java
.../main/java/com/zehong/web/controller/tool/DESEncoder.java
+55
-4
TLpgSafeCheckRecord.java
...in/java/com/zehong/system/domain/TLpgSafeCheckRecord.java
+14
-0
TLpgSafeCheckRecordMapper.java
...a/com/zehong/system/mapper/TLpgSafeCheckRecordMapper.java
+7
-0
TYehuaqiUserMapper.java
...ain/java/com/zehong/system/mapper/TYehuaqiUserMapper.java
+8
-0
ITLpgSafeCheckRecordService.java
...om/zehong/system/service/ITLpgSafeCheckRecordService.java
+7
-0
ITYehuaqiUserService.java
.../java/com/zehong/system/service/ITYehuaqiUserService.java
+8
-0
TLpgSafeCheckRecordServiceImpl.java
...g/system/service/impl/TLpgSafeCheckRecordServiceImpl.java
+10
-0
TYehuaqiUserServiceImpl.java
...m/zehong/system/service/impl/TYehuaqiUserServiceImpl.java
+11
-0
TLpgSafeCheckRecordMapper.xml
...ain/resources/mapper/system/TLpgSafeCheckRecordMapper.xml
+18
-1
TYehuaqiUserMapper.xml
...m/src/main/resources/mapper/system/TYehuaqiUserMapper.xml
+7
-0
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/externaldocking/lpggas/lpgGasController.java
View file @
57f14343
This diff is collapsed.
Click to expand it.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/tool/DESEncoder.java
View file @
57f14343
...
@@ -3,6 +3,7 @@ package com.zehong.web.controller.tool;
...
@@ -3,6 +3,7 @@ package com.zehong.web.controller.tool;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zehong.common.utils.StringUtils
;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
...
@@ -158,15 +159,65 @@ public class DESEncoder {
...
@@ -158,15 +159,65 @@ public class DESEncoder {
// System.out.println(DESEncoder.encrypt(skcs1,"23546324"));
// System.out.println(DESEncoder.encrypt(skcs1,"23546324"));
String
lpggasdata
=
"[\n"
+
String
lpggasdata
=
"[\n"
+
"{\"onState\":\"1\",\"vehicleLimt\":\"车辆限乘01\",\"vehicleLoad\":\"车辆载重01\",\"carNum\":\"SE123\",\"vehicleCode\":\"代码01\",\"brandModel\":\"品牌型号01\",\"vehicleInspect\":\"车辆检查信息01\",\"vehicleUser\":\"使用人01\",\"carNumber\":\"车辆编号01\",\"phone\":\"888888888\",\"personLiable\":\"责任人88888888\",\"stationName\":\"储备站88888888\",\"vehicleSize\":\"车辆大小01\",\"vehicleType\":\"车辆类型01\",\"remarks\":\"备注01\"},\n"
+
" {\n"
+
"{\"onState\":\"0\",\"vehicleLimt\":\"车辆限乘02\",\"vehicleLoad\":\"车辆载重02\",\"carNum\":\"SE456\",\"vehicleCode\":\"代码02\",\"brandModel\":\"品牌型号02\",\"vehicleInspect\":\"车辆检查信息02\",\"vehicleUser\":\"使用人02\",\"carNumber\":\"车辆编号02\",\"phone\":\"联系电话02\",\"personLiable\":\"责任人02\",\"stationName\":\"储备站02\",\"vehicleSize\":\"车辆大小02\",\"vehicleType\":\"车辆类型02\",\"remarks\":\"备注02\"}\n"
+
" \"userOwnId\": \"1\",\n"
+
"{\"onState\":\"1\",\"vehicleLimt\":\"车辆限乘01\",\"vehicleLoad\":\"车辆载重01\",\"carNum\":\"SE123\",\"vehicleCode\":\"代码01\",\"brandModel\":\"品牌型号01\",\"vehicleInspect\":\"车辆检查信息01\",\"vehicleUser\":\"使用人01\",\"carNumber\":\"车辆编号01\",\"phone\":\"888888888\",\"personLiable\":\"责任人88888888\",\"stationName\":\"储备站88888888\",\"vehicleSize\":\"车辆大小01\",\"vehicleType\":\"车辆类型01\",\"remarks\":\"备注01\"},\n"
+
" \"stationName\": \"储备站01-接口来的-01\",\n"
+
"]"
;
" \"gasUser\": \"用户名01-接口来的-01\",\n"
+
" \"telNum\": \"电话01-接口来的-01\",\n"
+
" \"gasUserAddress\": \"用户地址01-接口来的-01\",\n"
+
" \"gasUserType\": \"0\",\n"
+
" \"safeCheckDate\": \"2024-12-16\",\n"
+
" \"safeCheckPerson\": \"安检人-接口来的-01\",\n"
+
" \"bottleNum\": \"15\",\n"
+
" \"checkInStatus\": \"0\",\n"
+
" \"stoveCheckStatus\": \"0\",\n"
+
" \"hoseCheckStatus\": \"0\",\n"
+
" \"valveCheckStatus\": \"0\",\n"
+
" \"bottleCheckStatus\": \"0\",\n"
+
" \"alarmCheckStatus\": \"0\",\n"
+
" \"placeCheckStatus\": \"0\",\n"
+
"\n"
+
" \"stoveCheckPic\": \"0\",\n"
+
" \"hoseCheckPic\": \"0\",\n"
+
" \"valveCheckPic\": \"0\",\n"
+
" \"bottleCheckPic\": \"0\",\n"
+
" \"alarmCheckPic\": \"0\",\n"
+
" \"placeCheckPic\": \"0\",\n"
+
" },\n"
+
" {\n"
+
" \"userOwnId\": \"2\",\n"
+
" \"stationName\": \"储备站01-接口来的-01\",\n"
+
" \"gasUser\": \"用户名01-接口来的-01\",\n"
+
" \"telNum\": \"电话01-接口来的-01\",\n"
+
" \"gasUserAddress\": \"用户地址01-接口来的-01\",\n"
+
" \"gasUserType\": \"用户类型-接口来的-01\",\n"
+
" \"safeCheckDate\": \"2024-12-16\",\n"
+
" \"safeCheckPerson\": \"安检人-接口来的-01\",\n"
+
" \"bottleNum\": \"设定净重-接口来的-01\",\n"
+
" \"checkInStatus\": \"入户状态01-接口来的-01\",\n"
+
" \"stoveCheckStatus\": \"0\",\n"
+
" \"hoseCheckStatus\": \"0\",\n"
+
" \"valveCheckStatus\": \"0\",\n"
+
" \"bottleCheckStatus\": \"0\",\n"
+
" \"alarmCheckStatus\": \"0\",\n"
+
" \"placeCheckStatus\": \"0\",\n"
+
"\n"
+
" \"stoveCheckPic\": \"0\",\n"
+
" \"hoseCheckPic\": \"0\",\n"
+
" \"valveCheckPic\": \"0\",\n"
+
" \"bottleCheckPic\": \"0\",\n"
+
" \"alarmCheckPic\": \"0\",\n"
+
" \"placeCheckPic\": \"0\",\n"
+
" }\n"
+
"]\n"
+
"\n"
;
JSONArray
objects
=
JSON
.
parseArray
(
lpggasdata
);
JSONArray
objects
=
JSON
.
parseArray
(
lpggasdata
);
System
.
out
.
println
(
objects
);
System
.
out
.
println
(
objects
);
System
.
out
.
println
(
DESEncoder
.
encrypt
(
objects
.
toString
(),
"GCQYTRQ00001"
));
System
.
out
.
println
(
DESEncoder
.
encrypt
(
objects
.
toString
(),
"GCQYTRQ00001"
));
}
}
}
}
zh-baseversion-system/src/main/java/com/zehong/system/domain/TLpgSafeCheckRecord.java
View file @
57f14343
...
@@ -119,6 +119,12 @@ public class TLpgSafeCheckRecord extends BaseEntity
...
@@ -119,6 +119,12 @@ public class TLpgSafeCheckRecord extends BaseEntity
private
Long
userId
;
private
Long
userId
;
/**
* 用户自有编号 接收第三方数据时暂时使用
*/
private
String
userOwnId
;
public
void
setSafeCheckId
(
Long
safeCheckId
)
public
void
setSafeCheckId
(
Long
safeCheckId
)
{
{
this
.
safeCheckId
=
safeCheckId
;
this
.
safeCheckId
=
safeCheckId
;
...
@@ -353,6 +359,14 @@ public class TLpgSafeCheckRecord extends BaseEntity
...
@@ -353,6 +359,14 @@ public class TLpgSafeCheckRecord extends BaseEntity
this
.
userId
=
userId
;
this
.
userId
=
userId
;
}
}
public
String
getUserOwnId
()
{
return
userOwnId
;
}
public
void
setUserOwnId
(
String
userOwnId
)
{
this
.
userOwnId
=
userOwnId
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TLpgSafeCheckRecordMapper.java
View file @
57f14343
...
@@ -43,6 +43,13 @@ public interface TLpgSafeCheckRecordMapper
...
@@ -43,6 +43,13 @@ public interface TLpgSafeCheckRecordMapper
* @return r
* @return r
*/
*/
public
int
insertBatch
(
@Param
(
"list"
)
List
<
TLpgSafeCheckRecord
>
list
);
public
int
insertBatch
(
@Param
(
"list"
)
List
<
TLpgSafeCheckRecord
>
list
);
/**
* 批量插入 包含图片
* @param list list
* @return r
*/
public
int
insertBatchContainPic
(
@Param
(
"list"
)
List
<
TLpgSafeCheckRecord
>
list
);
/**
/**
* 修改液化石油安检记录
* 修改液化石油安检记录
*
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TYehuaqiUserMapper.java
View file @
57f14343
...
@@ -84,6 +84,14 @@ public interface TYehuaqiUserMapper
...
@@ -84,6 +84,14 @@ public interface TYehuaqiUserMapper
*/
*/
public
List
<
TYehuaqiUser
>
selectForExportTYehuaqiUserList
(
TYehuaqiUser
tDetectorUser
);
public
List
<
TYehuaqiUser
>
selectForExportTYehuaqiUserList
(
TYehuaqiUser
tDetectorUser
);
/**
* 根据userOwnIds 和 enterpriseId 查询数据
* @param userOwnIds u
* @param enterpriseId e
* @return r
*/
public
List
<
TYehuaqiUser
>
queryByUserOwnIdsAndEnterpriseId
(
@Param
(
"userOwnIds"
)
List
<
String
>
userOwnIds
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
public
List
<
TYehuaqiUser
>
queryErrorDetectorUserList
(
String
depId
);
public
List
<
TYehuaqiUser
>
queryErrorDetectorUserList
(
String
depId
);
/**
/**
* 修改燃气用户
* 修改燃气用户
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/ITLpgSafeCheckRecordService.java
View file @
57f14343
...
@@ -39,6 +39,13 @@ public interface ITLpgSafeCheckRecordService
...
@@ -39,6 +39,13 @@ public interface ITLpgSafeCheckRecordService
*/
*/
public
int
insertTLpgSafeCheckRecord
(
TLpgSafeCheckRecord
tLpgSafeCheckRecord
);
public
int
insertTLpgSafeCheckRecord
(
TLpgSafeCheckRecord
tLpgSafeCheckRecord
);
/**
* 批量插入
* @param tLpgSafeCheckRecords t
* @return r
*/
public
int
insertBatchContainPic
(
List
<
TLpgSafeCheckRecord
>
tLpgSafeCheckRecords
);
/**
/**
* 修改液化石油安检记录
* 修改液化石油安检记录
*
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/ITYehuaqiUserService.java
View file @
57f14343
...
@@ -57,6 +57,14 @@ public interface ITYehuaqiUserService
...
@@ -57,6 +57,14 @@ public interface ITYehuaqiUserService
*/
*/
public
List
<
TYehuaqiUser
>
selectForExportTYehuaqiUserList
(
TYehuaqiUser
tDetectorUser
);
public
List
<
TYehuaqiUser
>
selectForExportTYehuaqiUserList
(
TYehuaqiUser
tDetectorUser
);
/**
* 根据用户自有id 集合 和 企业id 查询数据
* @param userOwnIds u
* @param enterpriseId e
* @return r
*/
public
List
<
TYehuaqiUser
>
queryByUserOwnIdsAndEnterpriseId
(
List
<
String
>
userOwnIds
,
String
enterpriseId
);
/**
/**
* 查询导入的错误数据
* 查询导入的错误数据
* @return r
* @return r
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TLpgSafeCheckRecordServiceImpl.java
View file @
57f14343
...
@@ -70,6 +70,16 @@ public class TLpgSafeCheckRecordServiceImpl implements ITLpgSafeCheckRecordServi
...
@@ -70,6 +70,16 @@ public class TLpgSafeCheckRecordServiceImpl implements ITLpgSafeCheckRecordServi
return
tLpgSafeCheckRecordMapper
.
insertTLpgSafeCheckRecord
(
tLpgSafeCheckRecord
);
return
tLpgSafeCheckRecordMapper
.
insertTLpgSafeCheckRecord
(
tLpgSafeCheckRecord
);
}
}
/**
* 批量插入
* @param tLpgSafeCheckRecords t
* @return r
*/
@Override
public
int
insertBatchContainPic
(
List
<
TLpgSafeCheckRecord
>
tLpgSafeCheckRecords
)
{
return
tLpgSafeCheckRecordMapper
.
insertBatchContainPic
(
tLpgSafeCheckRecords
);
}
/**
/**
* 修改液化石油安检记录
* 修改液化石油安检记录
*
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TYehuaqiUserServiceImpl.java
View file @
57f14343
...
@@ -208,6 +208,17 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
...
@@ -208,6 +208,17 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
return
tYehuaqiUserMapper
.
selectForExportTYehuaqiUserList
(
yehuaqiUser
);
return
tYehuaqiUserMapper
.
selectForExportTYehuaqiUserList
(
yehuaqiUser
);
}
}
/**
* 根据userOwnIds 和 enterpriseId 查询数据
* @param userOwnIds u
* @param enterpriseId e
* @return r
*/
@Override
public
List
<
TYehuaqiUser
>
queryByUserOwnIdsAndEnterpriseId
(
List
<
String
>
userOwnIds
,
String
enterpriseId
)
{
return
tYehuaqiUserMapper
.
queryByUserOwnIdsAndEnterpriseId
(
userOwnIds
,
enterpriseId
);
}
/**
/**
* 处理解析好的 自定义模版的导入的数据 多sheet
* 处理解析好的 自定义模版的导入的数据 多sheet
* @param gasUserExportVos d 燃气用户数据
* @param gasUserExportVos d 燃气用户数据
...
...
zh-baseversion-system/src/main/resources/mapper/system/TLpgSafeCheckRecordMapper.xml
View file @
57f14343
...
@@ -105,7 +105,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -105,7 +105,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
</select>
<insert
id=
"insertBatch"
parameterType=
"list"
>
<insert
id=
"insertBatch"
parameterType=
"list"
>
insert into t_lpg_safe_check_record (station_name, user_id,gas_user_type,gas_user_address,tel_num,safe_check_date,
insert into t_lpg_safe_check_record (station_name, user_id,gas_user_type,gas_user_address,tel_num,safe_check_date,
safe_check_person,bottle_num,check_in_status,stove_check_status,hose_check_status,valve_check_status,bottle_check_status,
safe_check_person,bottle_num,check_in_status,stove_check_status,hose_check_status,valve_check_status,bottle_check_status,
alarm_check_status,place_check_status)
alarm_check_status,place_check_status)
...
@@ -119,6 +118,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -119,6 +118,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
)
</foreach>
</foreach>
</insert>
</insert>
<insert
id=
"insertBatchContainPic"
parameterType=
"list"
>
insert into t_lpg_safe_check_record (station_name, user_id,gas_user_type,gas_user_address,tel_num,safe_check_date,
safe_check_person,bottle_num,check_in_status,stove_check_status,hose_check_status,valve_check_status,bottle_check_status,
alarm_check_status,place_check_status,stove_check_pic,hose_check_pic,valve_check_pic,bottle_check_pic,alarm_check_pic,place_check_pic)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.stationName,jdbcType=VARCHAR}, #{item.userId}, #{item.gasUserType,jdbcType=VARCHAR},
#{item.gasUserAddress,jdbcType=VARCHAR}, #{item.telNum,jdbcType=VARCHAR}, #{item.safeCheckDate},
#{item.safeCheckPerson},#{item.bottleNum},#{item.checkInStatus},#{item.stoveCheckStatus},
#{item.hoseCheckStatus},#{item.valveCheckStatus},#{item.bottleCheckStatus},#{item.alarmCheckStatus},
#{item.placeCheckStatus},#{item.stoveCheckPic},#{item.hoseCheckPic},#{item.valveCheckPic},#{item.bottleCheckPic},
#{item.alarmCheckPic},#{item.placeCheckPic}
)
</foreach>
</insert>
<insert
id=
"insertTLpgSafeCheckRecord"
parameterType=
"TLpgSafeCheckRecord"
useGeneratedKeys=
"true"
keyProperty=
"safeCheckId"
>
<insert
id=
"insertTLpgSafeCheckRecord"
parameterType=
"TLpgSafeCheckRecord"
useGeneratedKeys=
"true"
keyProperty=
"safeCheckId"
>
insert into t_lpg_safe_check_record
insert into t_lpg_safe_check_record
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
zh-baseversion-system/src/main/resources/mapper/system/TYehuaqiUserMapper.xml
View file @
57f14343
...
@@ -133,6 +133,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -133,6 +133,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</if>
</select>
</select>
<select
id=
"queryByUserOwnIdsAndEnterpriseId"
resultMap=
"TYehuaqiUserResult"
>
<include
refid=
"selectTYehuaqiUserVo"
/>
where beyond_enterprise_id = #{enterpriseId} and user_own_id in
<foreach
collection=
"userOwnIds"
close=
")"
separator=
","
open=
"("
item=
"item"
index=
"i"
>
#{item}
</foreach>
</select>
<select
id=
"selectForExportTYehuaqiUserList"
parameterType=
"TYehuaqiUser"
resultMap=
"TYehuaqiUserExportResult"
>
<select
id=
"selectForExportTYehuaqiUserList"
parameterType=
"TYehuaqiUser"
resultMap=
"TYehuaqiUserExportResult"
>
select a.user_id,
select a.user_id,
...
...
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