forked from dyf/fys-Multi-tenant
Merge remote-tracking branch 'upstream/main' into fys-prod
# Conflicts: # fys-admin/pom.xml
This commit is contained in:
@ -36,6 +36,11 @@ public class AppPersonnelInfo extends TenantEntity {
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 职位
|
||||
*/
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
@ -46,5 +51,6 @@ public class AppPersonnelInfo extends TenantEntity {
|
||||
*/
|
||||
private String sendMsg;
|
||||
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
@ -23,13 +23,11 @@ public class AppPersonnelInfoBo extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@NotNull(message = "设备id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long deviceId;
|
||||
|
||||
/**
|
||||
@ -37,6 +35,11 @@ public class AppPersonnelInfoBo extends BaseEntity {
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 职位
|
||||
*/
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@ -52,5 +55,8 @@ public class AppPersonnelInfoBo extends BaseEntity {
|
||||
*/
|
||||
private String sendMsg;
|
||||
|
||||
|
||||
/**
|
||||
* ID号
|
||||
*/
|
||||
private String code;
|
||||
}
|
||||
|
@ -69,4 +69,9 @@ public class AppDeviceDetailVo {
|
||||
* 人员信息
|
||||
*/
|
||||
private AppPersonnelInfoVo personnelInfo;
|
||||
|
||||
/**
|
||||
* 发送信息
|
||||
*/
|
||||
private String sendMsg;
|
||||
}
|
||||
|
@ -41,6 +41,10 @@ public class AppDeviceShareVo implements Serializable {
|
||||
@ExcelProperty(value = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/**
|
||||
* 设备IMEI
|
||||
*/
|
||||
private String deviceImei;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
|
@ -47,10 +47,10 @@ public class AppPersonnelInfoVo implements Serializable {
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
* 岗位
|
||||
*/
|
||||
@ExcelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
@ExcelProperty(value = "岗位")
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 单位名称
|
||||
@ -59,10 +59,10 @@ public class AppPersonnelInfoVo implements Serializable {
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 发送信息
|
||||
* ID号
|
||||
*/
|
||||
@ExcelProperty(value = "发送信息")
|
||||
private String sendMsg;
|
||||
@ExcelProperty(value = "ID号")
|
||||
private String code;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,12 @@
|
||||
package com.fuyuanshen.app.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuyuanshen.app.domain.AppDeviceShare;
|
||||
import com.fuyuanshen.app.domain.bo.AppDeviceShareBo;
|
||||
import com.fuyuanshen.app.domain.vo.AppDeviceShareVo;
|
||||
import com.fuyuanshen.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 设备分享Mapper接口
|
||||
@ -11,5 +15,5 @@ import com.fuyuanshen.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
public interface AppDeviceShareMapper extends BaseMapperPlus<AppDeviceShare, AppDeviceShareVo> {
|
||||
|
||||
IPage<AppDeviceShareVo> otherDeviceShareList(@Param("bo") AppDeviceShareBo bo, Page<AppDeviceShareVo> page);
|
||||
}
|
||||
|
@ -65,4 +65,6 @@ public interface IAppDeviceShareService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
TableDataInfo<AppDeviceShareVo> otherDeviceShareList(AppDeviceShareBo bo, PageQuery pageQuery);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuyuanshen.app.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.fuyuanshen.common.core.utils.MapstructUtils;
|
||||
import com.fuyuanshen.common.core.utils.StringUtils;
|
||||
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
||||
@ -68,6 +69,7 @@ public class AppDeviceShareServiceImpl implements IAppDeviceShareService {
|
||||
if(device != null){
|
||||
r.setDevicePic(device.getDevicePic());
|
||||
r.setDeviceName(device.getDeviceName());
|
||||
r.setDeviceImei(device.getDeviceImei());
|
||||
}
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
@ -146,4 +148,22 @@ public class AppDeviceShareServiceImpl implements IAppDeviceShareService {
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<AppDeviceShareVo> otherDeviceShareList(AppDeviceShareBo bo, PageQuery pageQuery) {
|
||||
String username = AppLoginHelper.getUsername();
|
||||
bo.setPhonenumber(username);
|
||||
Page<AppDeviceShareVo> page = new Page<>(pageQuery.getPageNum(), pageQuery.getPageSize());
|
||||
IPage<AppDeviceShareVo> result = baseMapper.otherDeviceShareList(bo, page);
|
||||
List<AppDeviceShareVo> records = result.getRecords();
|
||||
records.forEach(r -> {
|
||||
Device device = deviceMapper.selectById(r.getDeviceId());
|
||||
if(device != null){
|
||||
r.setDevicePic(device.getDevicePic());
|
||||
r.setDeviceName(device.getDeviceName());
|
||||
r.setDeviceImei(device.getDeviceImei());
|
||||
}
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuyuanshen.app.mapper.AppDeviceShareMapper">
|
||||
|
||||
<select id="otherDeviceShareList" resultType="com.fuyuanshen.app.domain.vo.AppDeviceShareVo">
|
||||
SELECT * FROM app_device_share a where a.phonenumber = #{bo.phonenumber}
|
||||
</select>
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user