Commit 03be540f authored by mx's avatar mx

通行

parent eecab2bc
......@@ -28,6 +28,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate;
import java.math.BigInteger;
import java.util.*;
/**
......@@ -511,7 +512,7 @@ public class JieLinkServiceImpl implements IJieLinkService {
}
DoorRecord record = new DoorRecord();
record.setRecordId(recordDto.getRecordId());
record.setUserId(sysUserData.getBusinessId());
record.setUserId(BigInteger.valueOf(sysUserData.getBusinessId()));
record.setPersonId(sysUserData.getPersonId());
record.setMobile(sysUserData.getPhone());
record.setTenementType(sysUserData.getUserType());
......
......@@ -2,6 +2,7 @@ package org.rcisoft.sys.sysuser.controller;
/*固定导入*/
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
......@@ -22,16 +23,16 @@ 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;
import java.util.List;
/**
* Created by cy on 年11月24日 下午12:47:46.
*/
* Created by cy on 年11月24日 下午12:47:46.
*/
@RestController
@RequestMapping("/doorrecord")
public class DoorRecordController extends CyPaginationController<DoorRecord> {
......@@ -42,82 +43,83 @@ public class DoorRecordController extends CyPaginationController<DoorRecord> {
//@PreAuthorize("@cyPerm.hasPerm('sys:rRecord:add')")
@CyOpeLogAnno(title = "system-通行记录信息表管理-新增通行记录信息表", businessType = CyLogTypeEnum.INSERT)
@ApiOperation(value="添加通行记录信息表", notes="添加通行记录信息表")
@ApiOperation(value = "添加通行记录信息表", notes = "添加通行记录信息表")
@PostMapping(value = "/add")
public CyResult add(@Valid DoorRecord doorRecord, BindingResult bindingResult) {
CyPersistModel data = doorRecordServiceImpl.persist(doorRecord);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecord);
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecord);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:rRecord:delete')")
@CyOpeLogAnno(title = "system-通行记录信息表管理-删除通行记录信息表", businessType = CyLogTypeEnum.DELETE)
@ApiOperation(value="逻辑删除通行记录信息表", notes="逻辑删除通行记录信息表")
@ApiOperation(value = "逻辑删除通行记录信息表", notes = "逻辑删除通行记录信息表")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@DeleteMapping("/deleteLogical/{businessId:\\w+}")
public CyResult deleteLogical(@PathVariable String businessId,DoorRecord doorRecord) {
public CyResult deleteLogical(@PathVariable String businessId, DoorRecord doorRecord) {
doorRecord.setBusinessId(businessId);
CyPersistModel data = doorRecordServiceImpl.removeLogical(doorRecord);
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:rRecord: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 String businessId,DoorRecord doorRecord) {
public CyResult delete(@PathVariable String businessId, DoorRecord doorRecord) {
doorRecord.setBusinessId(businessId);
CyPersistModel data = doorRecordServiceImpl.remove(doorRecord);
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:rRecord: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 String businessId, @Valid DoorRecord doorRecord, BindingResult bindingResult) {
doorRecord.setBusinessId(businessId);
@PutMapping("/update")
public CyResult update(@RequestBody DoorRecord doorRecord, BindingResult bindingResult) {
CyPersistModel data = doorRecordServiceImpl.merge(doorRecord);
return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecord);
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecord);
}
//@PreAuthorize("@cyPerm.hasPerm('sys:rRecord:query')")
@CyOpeLogAnno(title = "system-通行记录信息表管理-查询通行记录信息表", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="查询单一通行记录信息表", notes="查询单一通行记录信息表")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@GetMapping("/detail/{businessId:\\w+}")
public CyResult detail(@PathVariable String businessId) {
@ApiOperation(value = "查询单一通行记录信息表", notes = "查询单一通行记录信息表")
@ApiImplicitParams({@ApiImplicitParam(name = "userId", value = "userId", required = true, dataType = "varchar")})
@GetMapping("/detail")
public CyResult detail(@RequestBody DoorRecord doorRecord) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecordServiceImpl.findById(businessId));
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecordServiceImpl.findById(doorRecord));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:rRecord:list')")
@CyOpeLogAnno(title = "system-通行记录信息表管理-查询通行记录信息表", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="查询通行记录信息表集合", notes="查询通行记录信息表集合")
@ApiOperation(value = "查询通行记录信息表集合", notes = "查询通行记录信息表集合")
@GetMapping(value = "/queryDoorRecords")
public CyResult queryDoorRecords(DoorRecord doorRecord) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecordServiceImpl.findAll(doorRecord));
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecordServiceImpl.findAll(doorRecord));
}
//@PreAuthorize("@cyPerm.hasPerm('sys:rRecord:list')")
@CyOpeLogAnno(title = "system-通行记录信息表管理-查询通行记录信息表", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="分页查询通行记录信息表集合", notes="分页查询通行记录信息表集合")
@ApiOperation(value = "分页查询通行记录信息表集合", notes = "分页查询通行记录信息表集合")
@GetMapping(value = "/queryDoorRecordByPagination")
public CyGridModel listByPagination(DoorRecord doorRecord) {
doorRecordServiceImpl.findAllByPagination(getPaginationUtility(), doorRecord);
......@@ -127,18 +129,24 @@ public class DoorRecordController extends CyPaginationController<DoorRecord> {
@CyOpeLogAnno(title = "system-通行记录信息表管理-查询通行记录信息表", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出通行记录信息表信息", notes = "导出通行记录信息表信息")
@GetMapping(value = "/export")
public CyResult outDoorRecord(HttpServletResponse response,DoorRecord doorRecord,@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 outDoorRecord(HttpServletResponse response, DoorRecord doorRecord, @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<DoorRecord> doorRecordList = doorRecordServiceImpl.export(doorRecord);
CyEpExcelUtil.exportExcel(doorRecordList, "通行记录信息表信息", "通行记录信息表信息", DoorRecord.class, excelName, response);
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecordList);
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
doorRecordList);
}
}
......@@ -15,8 +15,8 @@ import javax.mail.MailSessionDefinition;
import java.util.List;
/**
* Created with cy on 2022年11月24日 下午12:47:46.
*/
* Created with cy on 2022年11月24日 下午12:47:46.
*/
@Mapper
public interface DoorRecordRepository extends CyBaseMapper<DoorRecord> {
......@@ -24,9 +24,14 @@ public interface DoorRecordRepository extends CyBaseMapper<DoorRecord> {
List<DoorRecord> queryDoorRecords(@Param("entity") DoorRecord doorRecord);
/**
* 分页查询 doorRecord
*
*/
IPage<DoorRecord> queryDoorRecordsPaged(CyPageInfo cyPageInfo,@Param("entity") DoorRecord doorRecord);
* 分页查询 doorRecord
*/
IPage<DoorRecord> queryDoorRecordsPaged(CyPageInfo cyPageInfo, @Param("entity") DoorRecord doorRecord);
//单个查询
DoorRecord queryDoorRecordById(String recordId);
public int updateDoorRecordById(DoorRecord doorRecord);
}
......@@ -41,6 +41,6 @@ public interface SysDictDataRepositorys extends CyBaseMapper<SysDictData> {
SysDictData queryDataByDeptIdC(String dictLabel);
//查询登记方式
SysDictData queryDataByDeviceIoType(String deviceIoType);
SysDictData queryDataByCardType(String cardType);
}
......@@ -24,6 +24,15 @@ import org.springframework.data.annotation.Transient;
@TableName("door_record")
public class DoorRecord extends CyIdEntity<DoorRecord> {
@Excel(name = "同行人员姓名", orderNum = "4", width = 20)
//通行人员姓名
private String name;
//排序
@Transient
private String px;
/**
* 开始时间
*/
......@@ -40,12 +49,6 @@ public class DoorRecord extends CyIdEntity<DoorRecord> {
@Transient
private String deviceIoType;
//登记状态
/**
* 闸机类型
* 1:进口 2出口
*/
private String deviceType;
//登记日期
@Transient
......@@ -66,55 +69,55 @@ public class DoorRecord extends CyIdEntity<DoorRecord> {
* @column record_id
* @default
*/
@Excel(name = "记录主键", orderNum = "0", width = 20)
// @Excel(name = "记录主键", orderNum = "0", width = 20)
private String recordId;
/**
* @desc 用户ID
* @desc 系统内部用户主键id
* @column user_id
* @default
*/
@Excel(name = "用户ID", orderNum = "1", width = 20)
private Integer userId;
// @Excel(name = "系统内部用户主键id", orderNum = "1", width = 20)
private BigInteger userId;
/**
* @desc 通行人唯一标识
* @column person_id
* @default
*/
@Excel(name = "通行人唯一标识", orderNum = "1", width = 20)
// @Excel(name = "通行人唯一标识", orderNum = "2", width = 20)
private String personId;
/**
* @desc 人员手机号
* @desc 手机号码
* @column mobile
* @default
*/
@Excel(name = "人员手机号", orderNum = "1", width = 20)
// @Excel(name = "手机号码", orderNum = "3", width = 20)
private String mobile;
/**
* @desc 记录备注信息
* @column remark
* @desc 人员身份(0内部员工 1外部访客)
* @column tenement_type
* @default
*/
@Excel(name = "记录备注信息", orderNum = "19", width = 20)
private String remark;
@Excel(name = "同行人员身份", orderNum = "4", width = 20)
private String tenementType;
/**
* @desc 人员身份 0: 内部员工 1 访客
* @column tenement_type
* @desc 备注信息
* @column remark
* @default
*/
@Excel(name = "人员身份", orderNum = "19", width = 20)
private String tenementType;
// @Excel(name = "备注信息", orderNum = "5", width = 20)
private String remark;
/**
* @desc 设备id
* @column device_id
* @default
*/
@Excel(name = "设备id", orderNum = "20", width = 20)
// @Excel(name = "设备id", orderNum = "6", width = 20)
private String deviceId;
/**
......@@ -122,23 +125,39 @@ public class DoorRecord extends CyIdEntity<DoorRecord> {
* @column device_name
* @default
*/
@Excel(name = "设备名称", orderNum = "21", width = 20)
@Excel(name = "登记设备", orderNum = "7", width = 20)
private String deviceName;
/**
* @desc 闸门类型(判断进口还是出口 , 1 : 进口 2 : 出口)
* @column device_type
* @default
*/
@Excel(name = "登记状态", orderNum = "8", width = 20)
private String deviceType;
/**
* @desc 凭证类型(数据字典)
* @column card_type
* @default
*/
@Excel(name = "凭证类型(数据字典)", orderNum = "22", width = 20)
// @Excel(name = "凭证类型(数据字典)", orderNum = "9", width = 20)
private String cardType;
/**
* @desc 凭证类型中文
* @column card_type_label
* @default
*/
@Excel(name = "登记方式", orderNum = "10", width = 20)
private String cardTypeLabel;
/**
* @desc 卡号
* @column card_no
* @default
*/
@Excel(name = "卡号", orderNum = "23", width = 20)
// @Excel(name = "卡号", orderNum = "11", width = 20)
private String cardNo;
/**
......@@ -146,23 +165,15 @@ public class DoorRecord extends CyIdEntity<DoorRecord> {
* @column cross_time
* @default
*/
@Excel(name = "触发时间(根据触发时间按年分表)", orderNum = "24", width = 20)
// @Excel(name = "触发时间(根据触发时间按年分表)", orderNum = "12", width = 20)
private Date crossTime;
/**
* @desc 抓拍照片路径
* @column picture_file
* @default
*/
@Excel(name = "抓拍照片路径", orderNum = "25", width = 20)
private String pictureFile;
/**
* @desc 记录类型 0:未知 1:正常记录 2:非法记录 3:报警记录
* @column record_type
* @default
*/
@Excel(name = "记录类型 0:未知 1:正常记录 2:非法记录 3:报警记录", orderNum = "26", width = 20)
@Excel(name = "登记结果", orderNum = "13", width = 20)
private String recordType;
/**
......@@ -170,9 +181,16 @@ public class DoorRecord extends CyIdEntity<DoorRecord> {
* @column event_type
* @default
*/
@Excel(name = "门禁事件类型(数据字典)", orderNum = "27", width = 20)
// @Excel(name = "门禁事件类型(数据字典)", orderNum = "14", width = 20)
private String eventType;
/**
* @desc 标记异常(0 异常 1非异常)
* @column abnormal
* @default
*/
// @Excel(name = "标记异常(0 异常 1非异常)", orderNum = "15", width = 20)
private String abnormal;
}
......@@ -43,10 +43,10 @@ public interface DoorRecordService {
/**
* 根据id查询 通行记录信息表
* @param id
* @param doorRecord
* @return
*/
DoorRecord findById(String id);
DoorRecord findById(DoorRecord doorRecord);
/**
* 分页查询 通行记录信息表
......
......@@ -99,21 +99,22 @@ public class DoorRecordServiceImpl extends ServiceImpl<DoorRecordRepository, Doo
@Override
public CyPersistModel merge(DoorRecord doorRecord) {
//TODO 需要重写
int line = baseMapper.updateById(doorRecord);
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + doorRecord.getBusinessId() + "的通行记录信息表信息");
int line = baseMapper.updateDoorRecordById(doorRecord);
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + doorRecord.getRecordId() + "的通行记录信息表信息");
return new CyPersistModel(line);
}
/**
* 根据id查询 通行记录信息表
*
* @param id
* @param doorRecord
* @return
*/
@Override
public DoorRecord findById(String id) {
public DoorRecord findById(DoorRecord doorRecord) {
//TODO 需要重写
return baseMapper.selectById(id);
DoorRecord doorRecord1 = baseMapper.queryDoorRecordById(doorRecord.getRecordId());
return doorRecord1;
}
/**
......@@ -136,11 +137,14 @@ public class DoorRecordServiceImpl extends ServiceImpl<DoorRecordRepository, Doo
//截取登记时间
SimpleDateFormat sf2 = new SimpleDateFormat("HH:mm:ss");
doorRecordIPage.getRecords().get(i).setTime(sf2.format(createDate));
//获取登记方式id
String deviceIoType = doorRecordIPage.getRecords().get(i).getDeviceIoType();
String cardType = doorRecordIPage.getRecords().get(i).getCardType();
//获取登记方式中文
SysDictData sysDictData = sysDictDataRepositorys.queryDataByDeviceIoType(deviceIoType);
SysDictData sysDictData = sysDictDataRepositorys.queryDataByCardType(cardType);
if (sysDictData != null) {
doorRecordIPage.getRecords().get(i).setCardTypeLabel(sysDictData.getDictLabel());
}
}
return doorRecordIPage;
......@@ -169,6 +173,35 @@ public class DoorRecordServiceImpl extends ServiceImpl<DoorRecordRepository, Doo
//TODO 需要重写
//条件加上年份,默认查询当年的,因此代码里面需要判断是否传递有年代的逻辑
List<DoorRecord> doorRecordList = baseMapper.queryDoorRecords(doorRecord);
for (int i = 0; i < doorRecordList.size(); i++) {
//获取同行人员身份
String tenementType = doorRecordList.get(i).getTenementType();
if (tenementType != null) {
if (tenementType.equals("0")) {
doorRecordList.get(i).setTenementType("内部员工");
} else if (tenementType.equals("1")) {
doorRecordList.get(i).setTenementType("外部访客");
}
}
//获取登记状态
String deviceType = doorRecordList.get(i).getDeviceType();
if (deviceType != null) {
if (deviceType.equals("1")) {
doorRecordList.get(i).setDeviceType("进口");
} else if (deviceType.equals("2")) {
doorRecordList.get(i).setDeviceType("出口");
}
}
//获取登记结果
String recordType = doorRecordList.get(i).getRecordType();
if (recordType != null) {
if (recordType.equals("1")) {
doorRecordList.get(i).setRecordType("成功");
} else {
doorRecordList.get(i).setRecordType("失败");
}
}
}
return doorRecordList;
}
......
......@@ -22,29 +22,88 @@
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="abnormal" jdbcType="VARCHAR" property="abnormal"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryDoorRecords" resultMap="BaseResultMap">
select * from door_record
where 1=1
<if test="entity.delFlag !=null and entity.delFlag != '' ">
and del_flag = #{entity.delFlag}
SELECT
dr.record_id,su.name,dr.tenement_type,dr.create_date,dr.device_type,dr.device_name,dr.card_type,dr.record_type,dr.card_type_label,dr.abnormal
FROM door_record_2022 dr
left JOIN sys_user su ON dr.person_id = su.person_id
WHERE dr.del_flag = 0
<if test="entity.deviceType !=null and entity.deviceType != '' ">
and dr.device_type = #{entity.deviceType}
</if>
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
<if test="entity.beginTime != null and entity.beginTime !='' "><!-- 开始时间检索 -->
and date_format(su.create_date,'%Y-%m-%d') &gt;= date_format(#{entity.beginTime},'%Y-%m-%d')
</if>
<if test="entity.endTime != null and entity.endTime !='' "><!-- 结束时间检索 -->
and date_format(su.create_date,'%Y-%m-%d') &lt;= date_format(#{entity.endTime},'%Y-%m-%d')
</if>
<if test="entity.deviceName !=null and entity.deviceName != '' ">
and dr.device_name = #{entity.deviceName}
</if>
<if test="entity.tenementType !=null and entity.tenementType != '' ">
and dr.tenement_type = #{entity.tenementType}
</if>
<if test="entity.cardType !=null and entity.cardType != '' ">
and dr.card_type = #{entity.cardType}
</if>
<if test="entity.px == '1'.toString() "><!-- 排序-->
order BY dr.create_date desc
</if>
</select>
<select id="queryDoorRecordsPaged" resultMap="BaseResultMap">
SELECT su.user_type,d.device_type,d.deviceIo_type,dr.*
FROM door_record dr
JOIN sys_user su ON dr.person_id = su.person_id
JOIN devices d ON dr.device_id = d.device_id
where dr.del_flag = 0
<if test="entity.flag !=null and entity.flag != '' ">
and dr.flag = #{entity.flag}
SELECT
dr.record_id,su.name,dr.tenement_type,dr.create_date,dr.device_type,dr.device_name,dr.card_type,dr.record_type,dr.card_type_label,dr.abnormal
FROM door_record_2022 dr
left JOIN sys_user su ON dr.person_id = su.person_id
WHERE dr.del_flag = 0
<if test="entity.deviceType !=null and entity.deviceType != '' ">
and dr.device_type = #{entity.deviceType}
</if>
<if test="entity.beginTime != null and entity.beginTime !='' "><!-- 开始时间检索 -->
and date_format(dr.create_date,'%Y-%m-%d') &gt;= date_format(#{entity.beginTime},'%Y-%m-%d')
</if>
<if test="entity.endTime != null and entity.endTime !='' "><!-- 结束时间检索 -->
and date_format(dr.create_date,'%Y-%m-%d') &lt;= date_format(#{entity.endTime},'%Y-%m-%d')
</if>
<if test="entity.deviceName !=null and entity.deviceName != '' ">
and dr.device_name in(${entity.deviceName})
</if>
<if test="entity.tenementType !=null and entity.tenementType != '' ">
and dr.tenement_type = #{entity.tenementType}
</if>
<if test="entity.cardType !=null and entity.cardType != '' ">
and dr.card_type = #{entity.cardType}
</if>
<if test="entity.px == '1'.toString() "><!-- 排序-->
order BY dr.create_date desc
</if>
</select>
<select id="queryDoorRecordById" resultMap="BaseResultMap">
SELECT dr.record_id,
su.name,
dr.tenement_type,
dr.create_date,
dr.device_type,
dr.device_name,
dr.card_type,
dr.record_type,
dr.card_type_label,
dr.abnormal
FROM door_record_2022 dr
left JOIN sys_user su ON dr.person_id = su.person_id
WHERE dr.del_flag = 0
and record_id = #{recordId}
</select>
<update id="updateDoorRecordById" parameterType="org.rcisoft.sys.sysuser.entity.DoorRecord">
UPDATE door_record_2022
SET abnormal = #{abnormal}
WHERE record_id = #{recordId}
</update>
</mapper>
\ No newline at end of file
......@@ -75,11 +75,11 @@
and dict_label = #{dictLabel}
</select>
<select id="queryDataByDeviceIoType" resultMap="BaseResultMap">
<select id="queryDataByCardType" resultMap="BaseResultMap">
SELECT *
FROM sys_dict_data
WHERE del_flag = 0
and dict_type = "dj"
and dict_label = #{deviceIoType}
and dict_value = #{cardType}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment