Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
1928ed55
Commit
1928ed55
authored
Sep 25, 2021
by
jianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BASE
parent
a32aae14
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
12 deletions
+44
-12
TUserLocationController.java
...controller/inspectorLocation/TUserLocationController.java
+12
-10
TUserLocation.java
...src/main/java/com/zehong/system/domain/TUserLocation.java
+14
-0
TUserLocationMapper.java
...in/java/com/zehong/system/mapper/TUserLocationMapper.java
+1
-0
ITUserLocationService.java
...java/com/zehong/system/service/ITUserLocationService.java
+1
-0
TUserLocationServiceImpl.java
.../zehong/system/service/impl/TUserLocationServiceImpl.java
+6
-1
TUserLocationMapper.xml
.../src/main/resources/mapper/system/TUserLocationMapper.xml
+10
-1
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/inspectorLocation/TUserLocationController.java
View file @
1928ed55
...
...
@@ -11,14 +11,7 @@ import com.zehong.system.domain.vo.TUserLocationVo;
import
com.zehong.system.service.ISysUserService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
...
...
@@ -123,7 +116,17 @@ public class TUserLocationController extends BaseController
{
return
toAjax
(
tUserLocationService
.
insertTUserLocation
(
tUserLocation
));
}
/**
* 小程序巡检员批量定位
* @param tUserLocationList
* @return
*/
@Log
(
title
=
"巡检员定位"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
value
=
"/addlist"
)
public
AjaxResult
addlist
(
@RequestParam
String
tUserLocationList
)
{
return
toAjax
(
tUserLocationService
.
addTUserLocationList
(
tUserLocationList
));
}
/**
* 修改巡检员定位
*/
...
...
@@ -134,7 +137,6 @@ public class TUserLocationController extends BaseController
{
return
toAjax
(
tUserLocationService
.
updateTUserLocation
(
tUserLocation
));
}
/**
* 删除巡检员定位
*/
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TUserLocation.java
View file @
1928ed55
package
com
.
zehong
.
system
.
domain
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
org.springframework.format.annotation.DateTimeFormat
;
/**
* 巡检员定位对象 t_user_location
...
...
@@ -36,7 +39,18 @@ public class TUserLocation extends BaseEntity
private
String
phonenumber
;
private
String
nickName
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@Override
public
Date
getCreateTime
()
{
return
createTime
;
}
@Override
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getNickName
()
{
return
nickName
;
}
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/TUserLocationMapper.java
View file @
1928ed55
...
...
@@ -43,6 +43,7 @@ public interface TUserLocationMapper
* @return 结果
*/
public
int
insertTUserLocation
(
TUserLocation
tUserLocation
);
public
int
insertTUserLocationList
(
List
<
TUserLocation
>
list
);
/**
* 修改巡检员定位
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITUserLocationService.java
View file @
1928ed55
...
...
@@ -43,6 +43,7 @@ public interface ITUserLocationService
* @return 结果
*/
public
int
insertTUserLocation
(
TUserLocation
tUserLocation
);
public
int
addTUserLocationList
(
String
tUserLocationList
);
/**
* 修改巡检员定位
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TUserLocationServiceImpl.java
View file @
1928ed55
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
java.util.Map
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -63,7 +64,11 @@ public class TUserLocationServiceImpl implements ITUserLocationService
tUserLocation
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tUserLocationMapper
.
insertTUserLocation
(
tUserLocation
);
}
@Override
public
int
addTUserLocationList
(
String
tUserLocationList
){
List
<
TUserLocation
>
list
=(
List
<
TUserLocation
>
)
JSONObject
.
parse
(
tUserLocationList
);
return
tUserLocationMapper
.
insertTUserLocationList
(
list
);
}
/**
* 修改巡检员定位
*
...
...
gassafety-system/src/main/resources/mapper/system/TUserLocationMapper.xml
View file @
1928ed55
...
...
@@ -61,7 +61,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createTime != null"
>
#{createTime},
</if>
</trim>
</insert>
<insert
id=
"insertTUserLocationList"
>
INSERT INTO t_user_location (user_id,longitude,latitude,create_time)
VALUES
<foreach
collection=
"list"
index=
"index"
separator=
","
item=
"item"
>
(#{item.userId},
#{item.longitude},
#{item.latitude},
#{item.createTime})
</foreach>
</insert>
<update
id=
"updateTUserLocation"
parameterType=
"TUserLocation"
>
update t_user_location
<trim
prefix=
"SET"
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