更新检测员工相关功能
This commit is contained in:
parent
7b206d8f7c
commit
07b9e5b562
@ -15,6 +15,7 @@ import cn.iocoder.yudao.module.core.controller.BaseController;
|
|||||||
import cn.iocoder.yudao.module.inspection.enums.DriverLicenseType;
|
import cn.iocoder.yudao.module.inspection.enums.DriverLicenseType;
|
||||||
import cn.iocoder.yudao.module.inspection.query.InspectionStaffQuery;
|
import cn.iocoder.yudao.module.inspection.query.InspectionStaffQuery;
|
||||||
import cn.iocoder.yudao.module.inspection.service.InspectionStaffService;
|
import cn.iocoder.yudao.module.inspection.service.InspectionStaffService;
|
||||||
|
import cn.iocoder.yudao.module.inspection.vo.InspectionStaffExportVo;
|
||||||
import cn.iocoder.yudao.module.inspection.vo.InspectionStaffSaveVo;
|
import cn.iocoder.yudao.module.inspection.vo.InspectionStaffSaveVo;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserRespVO;
|
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserRespVO;
|
||||||
@ -149,9 +150,9 @@ public class InspectionStaffController extends BaseController {
|
|||||||
@ApiAccessLog(operateType = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportUserList(InspectionStaffQuery query,
|
public void exportUserList(InspectionStaffQuery query,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
List<InspectionStaffSaveVo> list = inspectionStaffService.getAll(query);
|
List<InspectionStaffExportVo> list = inspectionStaffService.getAll(query);
|
||||||
// 输出 Excel
|
// 输出 Excel
|
||||||
ExcelUtils.write(response, "用户数据.xls", "数据", InspectionStaffSaveVo.class,
|
ExcelUtils.write(response, "用户数据.xls", "数据", InspectionStaffExportVo.class,
|
||||||
list);
|
list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,42 +24,36 @@ public class InspectionStaff extends TenantBaseDO {
|
|||||||
* 员工id
|
* 员工id
|
||||||
*/
|
*/
|
||||||
@TableId(type = IdType.NONE)
|
@TableId(type = IdType.NONE)
|
||||||
@ExcelIgnore
|
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 身份证号
|
* 身份证号
|
||||||
*/
|
*/
|
||||||
@TableField("id_card")
|
@TableField("id_card")
|
||||||
@ExcelProperty("身份证号")
|
|
||||||
private String idCard;
|
private String idCard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 居住地址
|
* 居住地址
|
||||||
*/
|
*/
|
||||||
@TableField("address")
|
@TableField("address")
|
||||||
@ExcelProperty("居住地址")
|
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学历
|
* 学历
|
||||||
*/
|
*/
|
||||||
@TableField("educational")
|
@TableField("educational")
|
||||||
@ExcelProperty("学历")
|
|
||||||
private String educational;
|
private String educational;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 毕业院校
|
* 毕业院校
|
||||||
*/
|
*/
|
||||||
@TableField("school")
|
@TableField("school")
|
||||||
@ExcelProperty("毕业院校")
|
|
||||||
private String school;
|
private String school;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短号
|
* 短号
|
||||||
*/
|
*/
|
||||||
@TableField("short_number")
|
@TableField("short_number")
|
||||||
@ExcelProperty("短号")
|
|
||||||
private String shortNumber;
|
private String shortNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,14 +61,12 @@ public class InspectionStaff extends TenantBaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField("join_date")
|
@TableField("join_date")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
@ExcelProperty("入职日期")
|
|
||||||
private Date joinDate;
|
private Date joinDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 试用期
|
* 试用期
|
||||||
*/
|
*/
|
||||||
@TableField("probation_period")
|
@TableField("probation_period")
|
||||||
@ExcelProperty("试用期")
|
|
||||||
private String probationPeriod;
|
private String probationPeriod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -82,34 +74,23 @@ public class InspectionStaff extends TenantBaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField("social_security_buy_date")
|
@TableField("social_security_buy_date")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
@ExcelProperty("社保购买日期")
|
|
||||||
private Date socialSecurityBuyDate;
|
private Date socialSecurityBuyDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 紧急联系人
|
* 紧急联系人
|
||||||
*/
|
*/
|
||||||
@TableField("emergency_contact_name")
|
@TableField("emergency_contact_name")
|
||||||
@ExcelProperty("紧急联系人")
|
|
||||||
private String emergencyContactName;
|
private String emergencyContactName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 紧急联系人电话
|
* 紧急联系人电话
|
||||||
*/
|
*/
|
||||||
@TableField("emergency_contact_phone")
|
@TableField("emergency_contact_phone")
|
||||||
@ExcelProperty("联系人电话")
|
|
||||||
private String emergencyContactPhone;
|
private String emergencyContactPhone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 驾驶证类型
|
* 驾驶证类型
|
||||||
*/
|
*/
|
||||||
@TableField("driver_license_type")
|
@TableField("driver_license_type")
|
||||||
@ExcelProperty("驾驶证类型")
|
|
||||||
private String driverLicenseType;
|
private String driverLicenseType;
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@TableField("remark")
|
|
||||||
@ExcelIgnore
|
|
||||||
private String remark;
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.inspection.entity.ShopInspectionGoods;
|
|||||||
import cn.iocoder.yudao.module.inspection.query.GoodsQuery;
|
import cn.iocoder.yudao.module.inspection.query.GoodsQuery;
|
||||||
import cn.iocoder.yudao.module.inspection.query.InspectionStaffQuery;
|
import cn.iocoder.yudao.module.inspection.query.InspectionStaffQuery;
|
||||||
import cn.iocoder.yudao.module.inspection.vo.GoodsVo;
|
import cn.iocoder.yudao.module.inspection.vo.GoodsVo;
|
||||||
|
import cn.iocoder.yudao.module.inspection.vo.InspectionStaffExportVo;
|
||||||
import cn.iocoder.yudao.module.inspection.vo.InspectionStaffSaveVo;
|
import cn.iocoder.yudao.module.inspection.vo.InspectionStaffSaveVo;
|
||||||
import cn.iocoder.yudao.module.inspection.vo.PartnerListVo;
|
import cn.iocoder.yudao.module.inspection.vo.PartnerListVo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
@ -47,6 +48,6 @@ public interface InspectionStaffMapper extends BaseMapper<InspectionStaff> {
|
|||||||
* @param query
|
* @param query
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<InspectionStaffSaveVo> getAll(InspectionStaffQuery query);
|
List<InspectionStaffExportVo> getAll(InspectionStaffQuery query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public interface InspectionStaffService extends IService<InspectionStaff> {
|
|||||||
* @param query
|
* @param query
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<InspectionStaffSaveVo> getAll(InspectionStaffQuery query);
|
List<InspectionStaffExportVo> getAll(InspectionStaffQuery query);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑检测员工
|
* 编辑检测员工
|
||||||
|
@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.inspection.entity.InspectionStaff;
|
|||||||
import cn.iocoder.yudao.module.inspection.mapper.InspectionStaffMapper;
|
import cn.iocoder.yudao.module.inspection.mapper.InspectionStaffMapper;
|
||||||
import cn.iocoder.yudao.module.inspection.query.InspectionStaffQuery;
|
import cn.iocoder.yudao.module.inspection.query.InspectionStaffQuery;
|
||||||
import cn.iocoder.yudao.module.inspection.service.InspectionStaffService;
|
import cn.iocoder.yudao.module.inspection.service.InspectionStaffService;
|
||||||
|
import cn.iocoder.yudao.module.inspection.vo.InspectionStaffExportVo;
|
||||||
import cn.iocoder.yudao.module.inspection.vo.InspectionStaffSaveVo;
|
import cn.iocoder.yudao.module.inspection.vo.InspectionStaffSaveVo;
|
||||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.UserDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.UserDTO;
|
||||||
@ -69,7 +70,7 @@ public class InspectionStaffServiceImpl extends ServiceImpl<InspectionStaffMappe
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<InspectionStaffSaveVo> getAll(InspectionStaffQuery query) {
|
public List<InspectionStaffExportVo> getAll(InspectionStaffQuery query) {
|
||||||
return baseMapper.getAll(query);
|
return baseMapper.getAll(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,183 @@
|
|||||||
|
package cn.iocoder.yudao.module.inspection.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 检测员工导出vo
|
||||||
|
* @Author: 86187
|
||||||
|
* @Date: 2025/01/23 17:51
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class InspectionStaffExportVo {
|
||||||
|
/**
|
||||||
|
* 员工编号
|
||||||
|
*/
|
||||||
|
@ExcelIgnore
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 用户账号
|
||||||
|
*/
|
||||||
|
@ExcelProperty("员工账号")
|
||||||
|
private String username;
|
||||||
|
/**
|
||||||
|
* 用户昵称
|
||||||
|
*/
|
||||||
|
@ExcelProperty("员工名称")
|
||||||
|
private String nickname;
|
||||||
|
/**
|
||||||
|
* 用户类型
|
||||||
|
*/
|
||||||
|
@ExcelIgnore
|
||||||
|
private String userType;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelIgnore
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门编号
|
||||||
|
*/
|
||||||
|
@ExcelIgnore
|
||||||
|
private Long deptId;
|
||||||
|
/**
|
||||||
|
* 用户手机号码
|
||||||
|
*/
|
||||||
|
@ExcelProperty("手机号")
|
||||||
|
private String mobile;
|
||||||
|
/**
|
||||||
|
* 用户密码
|
||||||
|
*/
|
||||||
|
@ExcelIgnore
|
||||||
|
private String password;
|
||||||
|
/**
|
||||||
|
* 用户头像
|
||||||
|
*/
|
||||||
|
@ExcelIgnore
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户性别
|
||||||
|
**/
|
||||||
|
@ExcelIgnore
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户性别
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "用户性别")
|
||||||
|
private String sexStr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户状态
|
||||||
|
*/
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty("状态")
|
||||||
|
private String statusStr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户邮箱
|
||||||
|
*/
|
||||||
|
@ExcelProperty("邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工id
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.NONE)
|
||||||
|
@ExcelIgnore
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证号
|
||||||
|
*/
|
||||||
|
@TableField("id_card")
|
||||||
|
@ExcelProperty("身份证号")
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 居住地址
|
||||||
|
*/
|
||||||
|
@TableField("address")
|
||||||
|
@ExcelProperty("居住地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学历
|
||||||
|
*/
|
||||||
|
@TableField("educational")
|
||||||
|
@ExcelProperty("学历")
|
||||||
|
private String educational;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毕业院校
|
||||||
|
*/
|
||||||
|
@TableField("school")
|
||||||
|
@ExcelProperty("毕业院校")
|
||||||
|
private String school;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短号
|
||||||
|
*/
|
||||||
|
@TableField("short_number")
|
||||||
|
@ExcelProperty("短号")
|
||||||
|
private String shortNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入职日期
|
||||||
|
*/
|
||||||
|
@TableField("join_date")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("入职日期")
|
||||||
|
private Date joinDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试用期
|
||||||
|
*/
|
||||||
|
@TableField("probation_period")
|
||||||
|
@ExcelProperty("试用期")
|
||||||
|
private String probationPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社保购买日期
|
||||||
|
*/
|
||||||
|
@TableField("social_security_buy_date")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("社保购买日期")
|
||||||
|
private Date socialSecurityBuyDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 紧急联系人
|
||||||
|
*/
|
||||||
|
@TableField("emergency_contact_name")
|
||||||
|
@ExcelProperty("紧急联系人")
|
||||||
|
private String emergencyContactName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 紧急联系人电话
|
||||||
|
*/
|
||||||
|
@TableField("emergency_contact_phone")
|
||||||
|
@ExcelProperty("联系人电话")
|
||||||
|
private String emergencyContactPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 驾驶证类型
|
||||||
|
*/
|
||||||
|
@TableField("driver_license_type")
|
||||||
|
@ExcelProperty("驾驶证类型")
|
||||||
|
private String driverLicenseType;
|
||||||
|
}
|
@ -77,7 +77,7 @@
|
|||||||
and su.id = #{id}
|
and su.id = #{id}
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="getAll" resultType="cn.iocoder.yudao.module.inspection.vo.InspectionStaffSaveVo"
|
<select id="getAll" resultType="cn.iocoder.yudao.module.inspection.vo.InspectionStaffExportVo"
|
||||||
parameterType="cn.iocoder.yudao.module.inspection.query.InspectionStaffQuery">
|
parameterType="cn.iocoder.yudao.module.inspection.query.InspectionStaffQuery">
|
||||||
SELECT distinct
|
SELECT distinct
|
||||||
su.id,
|
su.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user