Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
entrance_api
Project
Project
Details
Activity
Releases
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
王琮
entrance_api
Commits
961bf223
Commit
961bf223
authored
Dec 27, 2022
by
zhangyanduan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'import' of
http://gitlab.91isoft.com:90/wangcong/entrance_api-
into import
parents
1f6156e4
225c1615
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
221 additions
and
112 deletions
+221
-112
DoorDeviceInfoController.java
...s/doordeviceinfo/controller/DoorDeviceInfoController.java
+45
-36
DoorDeviceInfoRepository.java
...soft/sys/doordeviceinfo/dao/DoorDeviceInfoRepository.java
+11
-7
DoorDeviceInfo.java
...org/rcisoft/sys/doordeviceinfo/entity/DoorDeviceInfo.java
+53
-13
DoorDeviceInfoServiceImpl.java
...oordeviceinfo/service/impl/DoorDeviceInfoServiceImpl.java
+62
-51
VisitInfomationServiceImpl.java
...ft/sys/visit/service/impl/VisitInfomationServiceImpl.java
+1
-1
DoorDeviceInfoMapper.xml
src/main/resources/mapper/DoorDeviceInfoMapper.xml
+49
-4
No files found.
src/main/java/org/rcisoft/sys/doordeviceinfo/controller/DoorDeviceInfoController.java
View file @
961bf223
...
...
@@ -2,6 +2,7 @@ package org.rcisoft.sys.doordeviceinfo.controller;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -20,6 +21,7 @@ import org.rcisoft.core.controller.CyPaginationController;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.model.CyGridModel
;
import
org.rcisoft.core.exception.CyServiceException
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
...
...
@@ -30,8 +32,8 @@ import org.rcisoft.sys.doordeviceinfo.service.DoorDeviceInfoService;
import
java.util.List
;
/**
* Created by cy on 2022年12月23日 下午2:04:50.
*/
* Created by cy on 2022年12月23日 下午2:04:50.
*/
@RestController
@RequestMapping
(
"/doordeviceinfo"
)
public
class
DoorDeviceInfoController
extends
CyPaginationController
<
DoorDeviceInfo
>
{
...
...
@@ -42,69 +44,70 @@ public class DoorDeviceInfoController extends CyPaginationController<DoorDeviceI
//@PreAuthorize("@cyPerm.hasPerm('sys:rDeviceInfo:add')")
@CyOpeLogAnno
(
title
=
"system-门磁设备记录表管理-新增门磁设备记录表"
,
businessType
=
CyLogTypeEnum
.
INSERT
)
@ApiOperation
(
value
=
"添加门磁设备记录表"
,
notes
=
"添加门磁设备记录表"
)
@ApiOperation
(
value
=
"添加门磁设备记录表"
,
notes
=
"添加门磁设备记录表"
)
@PostMapping
(
value
=
"/add"
)
public
CyResult
add
(
@Valid
DoorDeviceInfo
doorDeviceInfo
,
BindingResult
bindingResult
)
{
CyPersistModel
data
=
doorDeviceInfoServiceImpl
.
persist
(
doorDeviceInfo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfo
);
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfo
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:rDeviceInfo:delete')")
@CyOpeLogAnno
(
title
=
"system-门磁设备记录表管理-删除门磁设备记录表"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@ApiOperation
(
value
=
"删除门磁设备记录表"
,
notes
=
"删除门磁设备记录表"
)
@ApiOperation
(
value
=
"删除门磁设备记录表"
,
notes
=
"删除门磁设备记录表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/delete/{businessId:\\w+}"
)
public
CyResult
delete
(
@PathVariable
int
businessId
,
DoorDeviceInfo
doorDeviceInfo
)
{
public
CyResult
delete
(
@PathVariable
int
businessId
,
DoorDeviceInfo
doorDeviceInfo
)
{
doorDeviceInfo
.
setBusinessId
(
businessId
);
CyPersistModel
data
=
doorDeviceInfoServiceImpl
.
remove
(
doorDeviceInfo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:rDeviceInfo:update')")
@CyOpeLogAnno
(
title
=
"system-门磁设备记录表管理-修改门磁设备记录表"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"修改门磁设备记录表"
,
notes
=
"修改门磁设备记录表"
)
@ApiOperation
(
value
=
"修改门磁设备记录表"
,
notes
=
"修改门磁设备记录表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/update
/{businessId:\\w+}
"
)
public
CyResult
update
(
@
PathVariable
int
businessId
,
@Valid
DoorDeviceInfo
doorDeviceInfo
,
BindingResult
bindingResult
)
{
doorDeviceInfo
.
setBusinessId
(
businessId
);
@PutMapping
(
"/update"
)
public
CyResult
update
(
@
RequestBody
DoorDeviceInfo
doorDeviceInfo
,
BindingResult
bindingResult
)
{
//
doorDeviceInfo.setBusinessId(businessId);
CyPersistModel
data
=
doorDeviceInfoServiceImpl
.
merge
(
doorDeviceInfo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfo
);
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfo
);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:rDeviceInfo:query')")
@CyOpeLogAnno
(
title
=
"system-门磁设备记录表管理-查询门磁设备记录表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询单一门磁设备记录表"
,
notes
=
"查询单一门磁设备记录表"
)
@ApiOperation
(
value
=
"查询单一门磁设备记录表"
,
notes
=
"查询单一门磁设备记录表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)})
@GetMapping
(
"/detail/{businessId:\\w+}"
)
public
CyResult
detail
(
@PathVariable
int
businessId
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfoServiceImpl
.
findById
(
businessId
));
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfoServiceImpl
.
findById
(
businessId
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:rDeviceInfo:list')")
@CyOpeLogAnno
(
title
=
"system-门磁设备记录表管理-查询门磁设备记录表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"查询门磁设备记录表集合"
,
notes
=
"查询门磁设备记录表集合"
)
@ApiOperation
(
value
=
"查询门磁设备记录表集合"
,
notes
=
"查询门磁设备记录表集合"
)
@GetMapping
(
value
=
"/queryDoorDeviceInfos"
)
public
CyResult
queryDoorDeviceInfos
(
DoorDeviceInfo
doorDeviceInfo
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfoServiceImpl
.
findAll
(
doorDeviceInfo
));
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfoServiceImpl
.
findAll
(
doorDeviceInfo
));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:rDeviceInfo:list')")
@CyOpeLogAnno
(
title
=
"system-门磁设备记录表管理-查询门磁设备记录表"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@ApiOperation
(
value
=
"分页查询门磁设备记录表集合"
,
notes
=
"分页查询门磁设备记录表集合"
)
@ApiOperation
(
value
=
"分页查询门磁设备记录表集合"
,
notes
=
"分页查询门磁设备记录表集合"
)
@GetMapping
(
value
=
"/queryDoorDeviceInfoByPagination"
)
public
CyGridModel
listByPagination
(
DoorDeviceInfo
doorDeviceInfo
)
{
doorDeviceInfoServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
doorDeviceInfo
);
...
...
@@ -114,18 +117,24 @@ public class DoorDeviceInfoController extends CyPaginationController<DoorDeviceI
@CyOpeLogAnno
(
title
=
"system-门磁设备记录表管理-查询门磁设备记录表"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@ApiOperation
(
value
=
"导出门磁设备记录表信息"
,
notes
=
"导出门磁设备记录表信息"
)
@GetMapping
(
value
=
"/export"
)
public
CyResult
outDoorDeviceInfo
(
HttpServletResponse
response
,
DoorDeviceInfo
doorDeviceInfo
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
String
excelName
=
""
;
switch
(
excelId
){
case
"0"
:
excelName
=
"门磁设备记录表信息.xls"
;
break
;
case
"1"
:
excelName
=
"门磁设备记录表信息.xlsx"
;
break
;
case
"2"
:
excelName
=
"门磁设备记录表信息.csv"
;
break
;
public
CyResult
outDoorDeviceInfo
(
HttpServletResponse
response
,
DoorDeviceInfo
doorDeviceInfo
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
String
excelName
=
""
;
switch
(
excelId
)
{
case
"0"
:
excelName
=
"门磁设备记录表信息.xls"
;
break
;
case
"1"
:
excelName
=
"门磁设备记录表信息.xlsx"
;
break
;
case
"2"
:
excelName
=
"门磁设备记录表信息.csv"
;
break
;
}
List
<
DoorDeviceInfo
>
doorDeviceInfoList
=
doorDeviceInfoServiceImpl
.
export
(
doorDeviceInfo
);
CyEpExcelUtil
.
exportExcel
(
doorDeviceInfoList
,
"门磁设备记录表信息"
,
"门磁设备记录表信息"
,
DoorDeviceInfo
.
class
,
excelName
,
response
);
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfoList
);
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
doorDeviceInfoList
);
}
}
src/main/java/org/rcisoft/sys/doordeviceinfo/dao/DoorDeviceInfoRepository.java
View file @
961bf223
package
org
.
rcisoft
.
sys
.
doordeviceinfo
.
dao
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.rcisoft.core.mapper.CyBaseMapper
;
import
org.rcisoft.sys.doordeviceinfo.entity.DoorDeviceInfo
;
import
org.apache.ibatis.annotations.ResultMap
;
...
...
@@ -12,18 +13,21 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
java.util.List
;
/**
* Created with cy on 2022年12月23日 下午2:04:50.
*/
* Created with cy on 2022年12月23日 下午2:04:50.
*/
@Mapper
public
interface
DoorDeviceInfoRepository
extends
CyBaseMapper
<
DoorDeviceInfo
>
{
List
<
DoorDeviceInfo
>
queryDoorDeviceInfos
(
@Param
(
"entity"
)
DoorDeviceInfo
doorDeviceInfo
);
/**
* 分页查询 doorDeviceInfo
*
*/
IPage
<
DoorDeviceInfo
>
queryDoorDeviceInfosPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
DoorDeviceInfo
doorDeviceInfo
);
* 分页查询 doorDeviceInfo
*/
IPage
<
DoorDeviceInfo
>
queryDoorDeviceInfosPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
DoorDeviceInfo
doorDeviceInfo
);
DoorDeviceInfo
queryDoorDeviceInfosById
(
Integer
business_id
);
public
int
updateDoorDeviceInfos
(
@Param
(
"entity"
)
DoorDeviceInfo
doorDeviceInfo
);
}
src/main/java/org/rcisoft/sys/doordeviceinfo/entity/DoorDeviceInfo.java
View file @
961bf223
...
...
@@ -2,48 +2,88 @@ package org.rcisoft.sys.doordeviceinfo.entity;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.*
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
org.rcisoft.core.entity.CyIdNotDataEntity
;
import
org.springframework.data.annotation.Transient
;
/**
* Created with cy on 2022年12月23日 下午2:04:50.
*/
* Created with cy on 2022年12月23日 下午2:04:50.
*/
@Data
@TableName
(
"door_device_info"
)
public
class
DoorDeviceInfo
extends
CyIdIncreEntity
<
DoorDeviceInfo
>
{
public
class
DoorDeviceInfo
extends
CyIdIncreEntity
<
DoorDeviceInfo
>
{
//id
private
Integer
id
;
/**
//设备所在地址中文
private
String
deviceAddressLabel
;
//排序
@Transient
private
String
px
;
@Transient
//标记异常(0 异常 1非异常)
private
String
abnormal
;
@Transient
/**
* @desc 设备上报数据类型
* open:开门
* close:关门
* warn:警告
* up:设备上线
* down:设备下线
* @column data_type
* @default
*/
private
String
dataType
;
/**
* 开始时间
*/
@Transient
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
String
beginTime
;
//结束时间
@Transient
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
String
endTime
;
/**
* @desc 设备imei码
* @column device_imei
* @default
*/
private
String
deviceImei
;
/**
private
String
deviceImei
;
/**
* @desc 设备名称
* @column device_name
* @default
*/
private
String
deviceName
;
/**
private
String
deviceName
;
/**
* @desc 设备所在地址
* @column device_address
* @default
*/
private
String
deviceAddress
;
/**
private
String
deviceAddress
;
/**
* @desc 设备所在区域
* @column device_area
* @default
*/
private
String
deviceArea
;
/**
private
String
deviceArea
;
/**
* @desc 设备所在点位
* @column device_point
* @default
*/
private
String
devicePoint
;
private
String
devicePoint
;
}
src/main/java/org/rcisoft/sys/doordeviceinfo/service/impl/DoorDeviceInfoServiceImpl.java
View file @
961bf223
...
...
@@ -22,94 +22,105 @@ import org.springframework.transaction.annotation.Transactional;
import
org.rcisoft.core.model.CyPageInfo
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
* Created by cy on 2022年12月23日 下午2:04:50.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
DoorDeviceInfoServiceImpl
extends
ServiceImpl
<
DoorDeviceInfoRepository
,
DoorDeviceInfo
>
implements
DoorDeviceInfoService
{
public
class
DoorDeviceInfoServiceImpl
extends
ServiceImpl
<
DoorDeviceInfoRepository
,
DoorDeviceInfo
>
implements
DoorDeviceInfoService
{
@Autowired
DoorDeviceInfoRepository
doorDeviceInfoRepository
;
/**
* 保存 门磁设备记录表
* @param doorDeviceInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
* 保存 门磁设备记录表
*
* @param doorDeviceInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
DoorDeviceInfo
doorDeviceInfo
){
public
CyPersistModel
persist
(
DoorDeviceInfo
doorDeviceInfo
)
{
//增加操作
int
line
=
baseMapper
.
insert
(
doorDeviceInfo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"新增了ID为"
+
doorDeviceInfo
.
getBusinessId
()+
"的门磁设备记录表信息"
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"新增了ID为"
+
doorDeviceInfo
.
getBusinessId
()
+
"的门磁设备记录表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 删除 门磁设备记录表
* @param doorDeviceInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
* 删除 门磁设备记录表
*
* @param doorDeviceInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
remove
(
DoorDeviceInfo
doorDeviceInfo
){
public
CyPersistModel
remove
(
DoorDeviceInfo
doorDeviceInfo
)
{
int
line
=
baseMapper
.
realDelete
(
doorDeviceInfo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"删除了ID为"
+
doorDeviceInfo
.
getBusinessId
()+
"的门磁设备记录表信息"
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"删除了ID为"
+
doorDeviceInfo
.
getBusinessId
()
+
"的门磁设备记录表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 修改 门磁设备记录表
* @param doorDeviceInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
* 修改 门磁设备记录表
*
* @param doorDeviceInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
DoorDeviceInfo
doorDeviceInfo
){
int
line
=
baseMapper
.
updateById
(
doorDeviceInfo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
doorDeviceInfo
.
getBusinessId
()+
"的门磁设备记录表信息"
);
public
CyPersistModel
merge
(
DoorDeviceInfo
doorDeviceInfo
)
{
int
line
=
doorDeviceInfoRepository
.
updateDoorDeviceInfos
(
doorDeviceInfo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
doorDeviceInfo
.
getBusinessId
()
+
"的门磁设备记录表信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询 门磁设备记录表
* @param id
* @return
*/
* 根据id查询 门磁设备记录表
*
* @param id
* @return
*/
@Override
public
DoorDeviceInfo
findById
(
int
id
){
return
baseMapper
.
select
ById
(
id
);
public
DoorDeviceInfo
findById
(
int
id
)
{
return
doorDeviceInfoRepository
.
queryDoorDeviceInfos
ById
(
id
);
}
/**
* 分页查询 门磁设备记录表
* @param doorDeviceInfo
* @return
*/
* 分页查询 门磁设备记录表
*
* @param doorDeviceInfo
* @return
*/
@Override
public
IPage
<
DoorDeviceInfo
>
findAllByPagination
(
CyPageInfo
<
DoorDeviceInfo
>
paginationUtility
,
DoorDeviceInfo
doorDeviceInfo
)
{
return
baseMapper
.
queryDoorDeviceInfosPaged
(
paginationUtility
,
doorDeviceInfo
);
DoorDeviceInfo
doorDeviceInfo
)
{
return
baseMapper
.
queryDoorDeviceInfosPaged
(
paginationUtility
,
doorDeviceInfo
);
}
/**
* 查询list 门磁设备记录表
* @param doorDeviceInfo
* @return
*/
* 查询list 门磁设备记录表
*
* @param doorDeviceInfo
* @return
*/
@Override
public
List
<
DoorDeviceInfo
>
findAll
(
DoorDeviceInfo
doorDeviceInfo
){
public
List
<
DoorDeviceInfo
>
findAll
(
DoorDeviceInfo
doorDeviceInfo
)
{
return
baseMapper
.
queryDoorDeviceInfos
(
doorDeviceInfo
);
}
/**
* 导出门磁设备记录表
* @return
*/
* 导出门磁设备记录表
*
* @return
*/
@Override
public
List
<
DoorDeviceInfo
>
export
(
DoorDeviceInfo
doorDeviceInfo
)
{
List
<
DoorDeviceInfo
>
doorDeviceInfoList
=
baseMapper
.
queryDoorDeviceInfos
(
doorDeviceInfo
);
...
...
@@ -124,12 +135,12 @@ public class DoorDeviceInfoServiceImpl extends ServiceImpl<DoorDeviceInfoReposit
@Override
public
DoorDeviceInfo
getDeviceInfoByIMEICode
(
String
deviceImei
)
{
QueryWrapper
<
DoorDeviceInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"device_imei"
,
deviceImei
);
queryWrapper
.
eq
(
"del_flag"
,
"0"
);
queryWrapper
.
eq
(
"device_imei"
,
deviceImei
);
queryWrapper
.
eq
(
"del_flag"
,
"0"
);
List
<
DoorDeviceInfo
>
doorDeviceInfos
=
baseMapper
.
selectList
(
queryWrapper
);
if
(
doorDeviceInfos
!=
null
&&
!
doorDeviceInfos
.
isEmpty
())
{
if
(
doorDeviceInfos
!=
null
&&
!
doorDeviceInfos
.
isEmpty
())
{
return
doorDeviceInfos
.
get
(
0
);
}
else
{
}
else
{
return
null
;
}
}
...
...
src/main/java/org/rcisoft/sys/visit/service/impl/VisitInfomationServiceImpl.java
View file @
961bf223
...
...
@@ -166,7 +166,7 @@ public class VisitInfomationServiceImpl extends ServiceImpl<VisitInfomationRepos
sysUserList
.
get
(
0
).
setName
(
u
.
getUserName
());
sysUserRepositorys
.
updateSysUser
(
sysUserList
.
get
(
0
));
}
u
.
setPersonId
(
sysUserList
.
get
(
0
).
getPersonId
());
u
.
setPersonId
(
UUID
.
randomUUID
().
toString
());
u
.
setUserId
(
sysUserList
.
get
(
0
).
getBusinessId
());
}
}
...
...
src/main/resources/mapper/DoorDeviceInfoMapper.xml
View file @
961bf223
...
...
@@ -15,12 +15,57 @@
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"queryDoorDeviceInfos"
resultMap=
"BaseResultMap"
>
select * from door_device_info
where 1=1
select *
from door_device_info
where 1 = 1
</select>
<select
id=
"queryDoorDeviceInfosPaged"
resultMap=
"BaseResultMap"
>
select * from door_device_info
where 1=1
SELECT drd.business_id AS id,ddi.*,drd.*
FROM door_device_info ddi
LEFT JOIN door_report_data drd ON ddi.business_id = drd.device_id
LEFT JOIN sys_dict_data sdd ON ddi.device_address = sdd.dict_value
WHERE ddi.del_flag = 0
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and ddi.flag = #{entity.flag}
</if>
<if
test=
"entity.beginTime != null and entity.beginTime !='' "
>
<!-- 开始时间检索 -->
and date_format(ddi.create_date,'%Y-%m-%d')
>
= date_format(#{entity.beginTime},'%Y-%m-%d')
</if>
<if
test=
"entity.endTime != null and entity.endTime !='' "
>
<!-- 结束时间检索 -->
and date_format(ddi.create_date,'%Y-%m-%d')
<
= date_format(#{entity.endTime},'%Y-%m-%d')
</if>
<if
test=
"entity.deviceAddress !=null and entity.deviceAddress != '' "
>
and ddi.device_address = #{entity.deviceAddress}
</if>
<if
test=
"entity.dataType !=null and entity.dataType != '' "
>
and ddi.data_type = #{entity.dataType}
</if>
<if
test=
"entity.abnormal !=null and entity.abnormal != '' "
>
and ddi.abnormal = #{entity.abnormal}
</if>
<if
test=
"entity.px == '1'.toString() "
>
<!-- 排序-->
order BY ddi.create_date desc
</if>
<if
test=
"entity.px == '2'.toString() "
>
<!-- 排序-->
ORDER BY sdd.dict_sort desc
</if>
</select>
<select
id=
"queryDoorDeviceInfosById"
resultMap=
"BaseResultMap"
>
SELECT drd.business_id AS id, ddi.*, drd.*
FROM door_device_info ddi
LEFT JOIN door_report_data drd ON ddi.business_id = drd.device_id
WHERE ddi.del_flag = 0
AND drd.business_id = #{id}
</select>
<update
id=
"updateDoorDeviceInfos"
parameterType=
"org.rcisoft.sys.doordeviceinfo.entity.DoorDeviceInfo"
>
update door_report_data
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"entity.abnormal != null"
>
abnormal = #{entity.abnormal},
</if>
</trim>
where business_id = #{entity.businessId}
</update>
</mapper>
\ No newline at end of file
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