修改设备操作日志表,添加获取用户端刷卡记录列表接口
This commit is contained in:
parent
470154356d
commit
ca1fd4a3d8
@ -38,6 +38,19 @@ public class NgCardSwipeRecordsController extends BaseController
|
||||
@Autowired
|
||||
private INgCardSwipeRecordsService ngCardSwipeRecordsService;
|
||||
|
||||
/**
|
||||
* 用户查询刷卡记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:records:list')")
|
||||
@GetMapping("/list/user")
|
||||
@ApiOperation("查询刷卡记录列表")
|
||||
public TableDataInfo userList(NgCardSwipeRecords ngCardSwipeRecords)
|
||||
{
|
||||
startPage();
|
||||
List<NgCardSwipeRecords> list = ngCardSwipeRecordsService.selectNgCardSwipeRecordsUserList(ngCardSwipeRecords);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询刷卡记录列表
|
||||
*/
|
||||
@ -51,6 +64,7 @@ public class NgCardSwipeRecordsController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出刷卡记录列表
|
||||
*/
|
||||
|
@ -68,4 +68,9 @@ public class NgDeviceOperationRecords extends BaseEntity
|
||||
@ApiModelProperty("失败原因")
|
||||
private String failureReason;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
@ApiModelProperty("设备编码")
|
||||
private String deviceNumber;
|
||||
|
||||
}
|
||||
|
@ -21,6 +21,14 @@ public interface NgCardSwipeRecordsMapper
|
||||
*/
|
||||
public NgCardSwipeRecords selectNgCardSwipeRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户刷卡记录列表
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 刷卡记录集合
|
||||
*/
|
||||
public List<NgCardSwipeRecords> selectNgCardSwipeRecordsUserList(NgCardSwipeRecords ngCardSwipeRecords);
|
||||
|
||||
/**
|
||||
* 查询刷卡记录列表
|
||||
*
|
||||
|
@ -19,6 +19,14 @@ public interface INgCardSwipeRecordsService
|
||||
*/
|
||||
public NgCardSwipeRecords selectNgCardSwipeRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户刷卡记录列表根据卡号
|
||||
*
|
||||
* @param ngCardSwipeRecords 刷卡记录
|
||||
* @return 刷卡记录集合
|
||||
*/
|
||||
public List<NgCardSwipeRecords> selectNgCardSwipeRecordsUserList(NgCardSwipeRecords ngCardSwipeRecords);
|
||||
|
||||
/**
|
||||
* 查询刷卡记录列表
|
||||
*
|
||||
|
@ -32,6 +32,11 @@ public class NgCardSwipeRecordsServiceImpl implements INgCardSwipeRecordsService
|
||||
return ngCardSwipeRecordsMapper.selectNgCardSwipeRecordsById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NgCardSwipeRecords> selectNgCardSwipeRecordsUserList(NgCardSwipeRecords ngCardSwipeRecords) {
|
||||
return ngCardSwipeRecordsMapper.selectNgCardSwipeRecordsUserList(ngCardSwipeRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询刷卡记录列表
|
||||
*
|
||||
|
@ -39,6 +39,20 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNgCardSwipeRecordsUserList" parameterType="NgCardSwipeRecords" resultMap="NgCardSwipeRecordsResult">
|
||||
<include refid="selectNgCardSwipeRecordsVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
|
||||
<if test="cardSwipeType != null "> and card_swipe_type = #{cardSwipeType}</if>
|
||||
card_number = #{cardNumber}
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="cardSwipeTime != null "> and card_swipe_time = #{cardSwipeTime}</if>
|
||||
<if test="amountDue != null "> and amount_due = #{amountDue}</if>
|
||||
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNgCardSwipeRecordsById" parameterType="Long" resultMap="NgCardSwipeRecordsResult">
|
||||
<include refid="selectNgCardSwipeRecordsVo"/>
|
||||
where id = #{id}
|
||||
|
@ -19,10 +19,11 @@
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="deviceNumber" column="device_number" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNgDeviceOperationRecordsVo">
|
||||
select id, user_id, dept_id, operation_message, operation_type, operation_content, operation_time, operation_result, failure_reason, remark, create_time, update_time, create_by, update_by from ng_device_operation_records
|
||||
select id, user_id, dept_id, operation_message, operation_type, operation_content, operation_time, operation_result, failure_reason, remark, create_time, update_time, create_by, update_by, device_number from ng_device_operation_records
|
||||
</sql>
|
||||
|
||||
<select id="selectNgDeviceOperationRecordsList" parameterType="NgDeviceOperationRecords" resultMap="NgDeviceOperationRecordsResult">
|
||||
@ -36,6 +37,7 @@
|
||||
<if test="operationTime != null "> and operation_time = #{operationTime}</if>
|
||||
<if test="operationResult != null "> and operation_result = #{operationResult}</if>
|
||||
<if test="failureReason != null and failureReason != ''"> and failure_reason = #{failureReason}</if>
|
||||
<if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -60,6 +62,7 @@
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="deviceNumber != null">device_number,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
@ -75,6 +78,7 @@
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="deviceNumber != null">#{deviceNumber},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -94,6 +98,7 @@
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="deviceNumber != null">device_number = #{deviceNumber},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
Loading…
x
Reference in New Issue
Block a user