update code
parent
d27312f85b
commit
88c5960665
|
@ -0,0 +1,139 @@
|
|||
package com.yanzhu.manage.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.yanzhu.common.core.annotation.Excel;
|
||||
import com.yanzhu.common.core.web.domain.BaseEntity;
|
||||
/**
|
||||
* 考勤配置对象 attendance_cfg
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
public class AttendanceCfg extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 公司主键 */
|
||||
@Excel(name = "公司主键")
|
||||
private Long comId;
|
||||
|
||||
/** 分包单位 */
|
||||
@Excel(name = "分包单位")
|
||||
private Long projectId;
|
||||
|
||||
/** 厂商编号(参考字典attendance_vendors) */
|
||||
@Excel(name = " 厂商编号(参考字典attendance_vendors)")
|
||||
private String vendorsCode;
|
||||
|
||||
/** 厂商参数 */
|
||||
@Excel(name = "厂商参数")
|
||||
private String vendorsParameter;
|
||||
|
||||
/** 1-启用,0-停用 */
|
||||
@Excel(name = "1-启用,0-停用")
|
||||
private Long enabled;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long state;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setVendorsCode(String vendorsCode)
|
||||
{
|
||||
this.vendorsCode = vendorsCode;
|
||||
}
|
||||
|
||||
public String getVendorsCode()
|
||||
{
|
||||
return vendorsCode;
|
||||
}
|
||||
public void setVendorsParameter(String vendorsParameter)
|
||||
{
|
||||
this.vendorsParameter = vendorsParameter;
|
||||
}
|
||||
|
||||
public String getVendorsParameter()
|
||||
{
|
||||
return vendorsParameter;
|
||||
}
|
||||
public void setEnabled(Long enabled)
|
||||
{
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public Long getEnabled()
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
public void setState(Long state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
public void setIsDel(Long isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public Long getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("vendorsCode", getVendorsCode())
|
||||
.append("vendorsParameter", getVendorsParameter())
|
||||
.append("enabled", getEnabled())
|
||||
.append("state", getState())
|
||||
.append("remark", getRemark())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,324 @@
|
|||
package com.yanzhu.manage.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.yanzhu.common.core.annotation.Excel;
|
||||
import com.yanzhu.common.core.web.domain.BaseEntity;
|
||||
/**
|
||||
* 宇泛的设备信息对象 attendance_ubi_device
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
public class AttendanceUbiDevice extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 公司主键 */
|
||||
@Excel(name = "公司主键")
|
||||
private Long comId;
|
||||
|
||||
/** 分包单位 */
|
||||
@Excel(name = "分包单位")
|
||||
private Long projectId;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String name;
|
||||
|
||||
/** 设备标签 */
|
||||
@Excel(name = "设备标签")
|
||||
private String tag;
|
||||
|
||||
/** 场景 Guid */
|
||||
@Excel(name = "场景 Guid")
|
||||
private String sceneGuid;
|
||||
|
||||
/** 设备来源,字典ubi_device_source */
|
||||
@Excel(name = "设备来源,字典ubi_device_source")
|
||||
private String source;
|
||||
|
||||
/** 设备序列号 */
|
||||
@Excel(name = "设备序列号")
|
||||
private String deviceNo;
|
||||
|
||||
/** 扩展字段(uface 设备(recType 设备的识别方式, 默认为 1) */
|
||||
@Excel(name = "扩展字段", readConverterExp = "u=face,设=备(recType,设=备的识别方式,,默=认为,1=")
|
||||
private String addition;
|
||||
|
||||
/** 是否绑定默认场景(场景 Guid 为空此字段生效) */
|
||||
@Excel(name = "是否绑定默认场景", readConverterExp = "场=景,G=uid,为=空此字段生效")
|
||||
private Integer bindDefaultScene;
|
||||
|
||||
/** 是否清空设备数据,默认为false */
|
||||
@Excel(name = "是否清空设备数据,默认为false")
|
||||
private Integer forceEmptyDevice;
|
||||
|
||||
/** 当forceEmptyDevice为true,传入设备密码 */
|
||||
@Excel(name = "当forceEmptyDevice为true,传入设备密码")
|
||||
private String password;
|
||||
|
||||
/** 设备模式 */
|
||||
@Excel(name = "设备模式")
|
||||
private String deviceModel;
|
||||
|
||||
/** 设备状态 */
|
||||
@Excel(name = "设备状态")
|
||||
private Long deviceState;
|
||||
|
||||
/** 比对模式,1:本地识别 2:云端识别 */
|
||||
@Excel(name = "比对模式,1:本地识别 2:云端识别")
|
||||
private Long recType;
|
||||
|
||||
/** 在线状态 */
|
||||
@Excel(name = "在线状态")
|
||||
private Long onlineState;
|
||||
|
||||
/** 版本号 */
|
||||
@Excel(name = "版本号")
|
||||
private String versionNo;
|
||||
|
||||
/** 最后激活时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "最后激活时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date lastActiveTime;
|
||||
|
||||
/** 是否已注册 */
|
||||
@Excel(name = "是否已注册")
|
||||
private Long hasRegister;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long state;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setTag(String tag)
|
||||
{
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public String getTag()
|
||||
{
|
||||
return tag;
|
||||
}
|
||||
public void setSceneGuid(String sceneGuid)
|
||||
{
|
||||
this.sceneGuid = sceneGuid;
|
||||
}
|
||||
|
||||
public String getSceneGuid()
|
||||
{
|
||||
return sceneGuid;
|
||||
}
|
||||
public void setSource(String source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
public void setDeviceNo(String deviceNo)
|
||||
{
|
||||
this.deviceNo = deviceNo;
|
||||
}
|
||||
|
||||
public String getDeviceNo()
|
||||
{
|
||||
return deviceNo;
|
||||
}
|
||||
public void setAddition(String addition)
|
||||
{
|
||||
this.addition = addition;
|
||||
}
|
||||
|
||||
public String getAddition()
|
||||
{
|
||||
return addition;
|
||||
}
|
||||
public void setBindDefaultScene(Integer bindDefaultScene)
|
||||
{
|
||||
this.bindDefaultScene = bindDefaultScene;
|
||||
}
|
||||
|
||||
public Integer getBindDefaultScene()
|
||||
{
|
||||
return bindDefaultScene;
|
||||
}
|
||||
public void setForceEmptyDevice(Integer forceEmptyDevice)
|
||||
{
|
||||
this.forceEmptyDevice = forceEmptyDevice;
|
||||
}
|
||||
|
||||
public Integer getForceEmptyDevice()
|
||||
{
|
||||
return forceEmptyDevice;
|
||||
}
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
public void setDeviceModel(String deviceModel)
|
||||
{
|
||||
this.deviceModel = deviceModel;
|
||||
}
|
||||
|
||||
public String getDeviceModel()
|
||||
{
|
||||
return deviceModel;
|
||||
}
|
||||
public void setDeviceState(Long deviceState)
|
||||
{
|
||||
this.deviceState = deviceState;
|
||||
}
|
||||
|
||||
public Long getDeviceState()
|
||||
{
|
||||
return deviceState;
|
||||
}
|
||||
public void setRecType(Long recType)
|
||||
{
|
||||
this.recType = recType;
|
||||
}
|
||||
|
||||
public Long getRecType()
|
||||
{
|
||||
return recType;
|
||||
}
|
||||
public void setOnlineState(Long onlineState)
|
||||
{
|
||||
this.onlineState = onlineState;
|
||||
}
|
||||
|
||||
public Long getOnlineState()
|
||||
{
|
||||
return onlineState;
|
||||
}
|
||||
public void setVersionNo(String versionNo)
|
||||
{
|
||||
this.versionNo = versionNo;
|
||||
}
|
||||
|
||||
public String getVersionNo()
|
||||
{
|
||||
return versionNo;
|
||||
}
|
||||
public void setLastActiveTime(Date lastActiveTime)
|
||||
{
|
||||
this.lastActiveTime = lastActiveTime;
|
||||
}
|
||||
|
||||
public Date getLastActiveTime()
|
||||
{
|
||||
return lastActiveTime;
|
||||
}
|
||||
public void setHasRegister(Long hasRegister)
|
||||
{
|
||||
this.hasRegister = hasRegister;
|
||||
}
|
||||
|
||||
public Long getHasRegister()
|
||||
{
|
||||
return hasRegister;
|
||||
}
|
||||
public void setState(Long state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
public void setIsDel(Long isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public Long getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("name", getName())
|
||||
.append("tag", getTag())
|
||||
.append("sceneGuid", getSceneGuid())
|
||||
.append("source", getSource())
|
||||
.append("deviceNo", getDeviceNo())
|
||||
.append("addition", getAddition())
|
||||
.append("bindDefaultScene", getBindDefaultScene())
|
||||
.append("forceEmptyDevice", getForceEmptyDevice())
|
||||
.append("password", getPassword())
|
||||
.append("deviceModel", getDeviceModel())
|
||||
.append("deviceState", getDeviceState())
|
||||
.append("recType", getRecType())
|
||||
.append("onlineState", getOnlineState())
|
||||
.append("versionNo", getVersionNo())
|
||||
.append("lastActiveTime", getLastActiveTime())
|
||||
.append("hasRegister", getHasRegister())
|
||||
.append("state", getState())
|
||||
.append("remark", getRemark())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.manage.domain.AttendanceCfg;
|
||||
|
||||
/**
|
||||
* 考勤配置Mapper接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
public interface AttendanceCfgMapper
|
||||
{
|
||||
/**
|
||||
* 查询考勤配置
|
||||
*
|
||||
* @param id 考勤配置主键
|
||||
* @return 考勤配置
|
||||
*/
|
||||
public AttendanceCfg selectAttendanceCfgById(Long id);
|
||||
|
||||
/**
|
||||
* 查询考勤配置列表
|
||||
*
|
||||
* @param attendanceCfg 考勤配置
|
||||
* @return 考勤配置集合
|
||||
*/
|
||||
public List<AttendanceCfg> selectAttendanceCfgList(AttendanceCfg attendanceCfg);
|
||||
|
||||
/**
|
||||
* 新增考勤配置
|
||||
*
|
||||
* @param attendanceCfg 考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAttendanceCfg(AttendanceCfg attendanceCfg);
|
||||
|
||||
/**
|
||||
* 修改考勤配置
|
||||
*
|
||||
* @param attendanceCfg 考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAttendanceCfg(AttendanceCfg attendanceCfg);
|
||||
|
||||
/**
|
||||
* 删除考勤配置
|
||||
*
|
||||
* @param id 考勤配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttendanceCfgById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除考勤配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttendanceCfgByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.manage.domain.AttendanceUbiDevice;
|
||||
|
||||
/**
|
||||
* 宇泛的设备信息Mapper接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
public interface AttendanceUbiDeviceMapper
|
||||
{
|
||||
/**
|
||||
* 查询宇泛的设备信息
|
||||
*
|
||||
* @param id 宇泛的设备信息主键
|
||||
* @return 宇泛的设备信息
|
||||
*/
|
||||
public AttendanceUbiDevice selectAttendanceUbiDeviceById(Long id);
|
||||
|
||||
/**
|
||||
* 查询宇泛的设备信息列表
|
||||
*
|
||||
* @param attendanceUbiDevice 宇泛的设备信息
|
||||
* @return 宇泛的设备信息集合
|
||||
*/
|
||||
public List<AttendanceUbiDevice> selectAttendanceUbiDeviceList(AttendanceUbiDevice attendanceUbiDevice);
|
||||
|
||||
/**
|
||||
* 新增宇泛的设备信息
|
||||
*
|
||||
* @param attendanceUbiDevice 宇泛的设备信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAttendanceUbiDevice(AttendanceUbiDevice attendanceUbiDevice);
|
||||
|
||||
/**
|
||||
* 修改宇泛的设备信息
|
||||
*
|
||||
* @param attendanceUbiDevice 宇泛的设备信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAttendanceUbiDevice(AttendanceUbiDevice attendanceUbiDevice);
|
||||
|
||||
/**
|
||||
* 删除宇泛的设备信息
|
||||
*
|
||||
* @param id 宇泛的设备信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttendanceUbiDeviceById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除宇泛的设备信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttendanceUbiDeviceByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.manage.mapper.AttendanceCfgMapper">
|
||||
|
||||
<resultMap type="AttendanceCfg" id="AttendanceCfgResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="vendorsCode" column="vendors_code" />
|
||||
<result property="vendorsParameter" column="vendors_parameter" />
|
||||
<result property="enabled" column="enabled" />
|
||||
<result property="state" column="state" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAttendanceCfgVo">
|
||||
select id, com_id, project_id, vendors_code, vendors_parameter, enabled, state, remark, is_del, create_by, create_time, update_by, update_time from attendance_cfg
|
||||
</sql>
|
||||
|
||||
<select id="selectAttendanceCfgList" parameterType="AttendanceCfg" resultMap="AttendanceCfgResult">
|
||||
<include refid="selectAttendanceCfgVo"/>
|
||||
<where>
|
||||
<if test="comId != null "> and com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||
<if test="vendorsParameter != null and vendorsParameter != ''"> and vendors_parameter = #{vendorsParameter}</if>
|
||||
<if test="enabled != null "> and enabled = #{enabled}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAttendanceCfgById" parameterType="Long" resultMap="AttendanceCfgResult">
|
||||
<include refid="selectAttendanceCfgVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAttendanceCfg" parameterType="AttendanceCfg" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into attendance_cfg
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="vendorsCode != null">vendors_code,</if>
|
||||
<if test="vendorsParameter != null">vendors_parameter,</if>
|
||||
<if test="enabled != null">enabled,</if>
|
||||
<if test="state != null">state,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="vendorsCode != null">#{vendorsCode},</if>
|
||||
<if test="vendorsParameter != null">#{vendorsParameter},</if>
|
||||
<if test="enabled != null">#{enabled},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAttendanceCfg" parameterType="AttendanceCfg">
|
||||
update attendance_cfg
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="vendorsCode != null">vendors_code = #{vendorsCode},</if>
|
||||
<if test="vendorsParameter != null">vendors_parameter = #{vendorsParameter},</if>
|
||||
<if test="enabled != null">enabled = #{enabled},</if>
|
||||
<if test="state != null">state = #{state},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAttendanceCfgById" parameterType="Long">
|
||||
delete from attendance_cfg where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAttendanceCfgByIds" parameterType="String">
|
||||
delete from attendance_cfg where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,173 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.manage.mapper.AttendanceUbiDeviceMapper">
|
||||
|
||||
<resultMap type="AttendanceUbiDevice" id="AttendanceUbiDeviceResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="tag" column="tag" />
|
||||
<result property="sceneGuid" column="scene_guid" />
|
||||
<result property="source" column="source" />
|
||||
<result property="deviceNo" column="device_no" />
|
||||
<result property="addition" column="addition" />
|
||||
<result property="bindDefaultScene" column="bind_default_scene" />
|
||||
<result property="forceEmptyDevice" column="force_empty_device" />
|
||||
<result property="password" column="password" />
|
||||
<result property="deviceModel" column="device_model" />
|
||||
<result property="deviceState" column="device_state" />
|
||||
<result property="recType" column="rec_type" />
|
||||
<result property="onlineState" column="online_state" />
|
||||
<result property="versionNo" column="version_no" />
|
||||
<result property="lastActiveTime" column="last_active_time" />
|
||||
<result property="hasRegister" column="has_register" />
|
||||
<result property="state" column="state" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAttendanceUbiDeviceVo">
|
||||
select id, com_id, project_id, name, tag, scene_guid, source, device_no, addition, bind_default_scene, force_empty_device, password, device_model, device_state, rec_type, online_state, version_no, last_active_time, has_register, state, remark, is_del, create_by, create_time, update_by, update_time from attendance_ubi_device
|
||||
</sql>
|
||||
|
||||
<select id="selectAttendanceUbiDeviceList" parameterType="AttendanceUbiDevice" resultMap="AttendanceUbiDeviceResult">
|
||||
<include refid="selectAttendanceUbiDeviceVo"/>
|
||||
<where>
|
||||
<if test="comId != null "> and com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="tag != null and tag != ''"> and tag = #{tag}</if>
|
||||
<if test="sceneGuid != null and sceneGuid != ''"> and scene_guid = #{sceneGuid}</if>
|
||||
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||
<if test="deviceNo != null and deviceNo != ''"> and device_no = #{deviceNo}</if>
|
||||
<if test="addition != null and addition != ''"> and addition = #{addition}</if>
|
||||
<if test="bindDefaultScene != null "> and bind_default_scene = #{bindDefaultScene}</if>
|
||||
<if test="forceEmptyDevice != null "> and force_empty_device = #{forceEmptyDevice}</if>
|
||||
<if test="password != null and password != ''"> and password = #{password}</if>
|
||||
<if test="deviceModel != null and deviceModel != ''"> and device_model = #{deviceModel}</if>
|
||||
<if test="deviceState != null "> and device_state = #{deviceState}</if>
|
||||
<if test="recType != null "> and rec_type = #{recType}</if>
|
||||
<if test="onlineState != null "> and online_state = #{onlineState}</if>
|
||||
<if test="versionNo != null and versionNo != ''"> and version_no = #{versionNo}</if>
|
||||
<if test="lastActiveTime != null "> and last_active_time = #{lastActiveTime}</if>
|
||||
<if test="hasRegister != null "> and has_register = #{hasRegister}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAttendanceUbiDeviceById" parameterType="Long" resultMap="AttendanceUbiDeviceResult">
|
||||
<include refid="selectAttendanceUbiDeviceVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAttendanceUbiDevice" parameterType="AttendanceUbiDevice">
|
||||
insert into attendance_ubi_device
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="tag != null">tag,</if>
|
||||
<if test="sceneGuid != null">scene_guid,</if>
|
||||
<if test="source != null">source,</if>
|
||||
<if test="deviceNo != null">device_no,</if>
|
||||
<if test="addition != null">addition,</if>
|
||||
<if test="bindDefaultScene != null">bind_default_scene,</if>
|
||||
<if test="forceEmptyDevice != null">force_empty_device,</if>
|
||||
<if test="password != null">password,</if>
|
||||
<if test="deviceModel != null">device_model,</if>
|
||||
<if test="deviceState != null">device_state,</if>
|
||||
<if test="recType != null">rec_type,</if>
|
||||
<if test="onlineState != null">online_state,</if>
|
||||
<if test="versionNo != null">version_no,</if>
|
||||
<if test="lastActiveTime != null">last_active_time,</if>
|
||||
<if test="hasRegister != null">has_register,</if>
|
||||
<if test="state != null">state,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="tag != null">#{tag},</if>
|
||||
<if test="sceneGuid != null">#{sceneGuid},</if>
|
||||
<if test="source != null">#{source},</if>
|
||||
<if test="deviceNo != null">#{deviceNo},</if>
|
||||
<if test="addition != null">#{addition},</if>
|
||||
<if test="bindDefaultScene != null">#{bindDefaultScene},</if>
|
||||
<if test="forceEmptyDevice != null">#{forceEmptyDevice},</if>
|
||||
<if test="password != null">#{password},</if>
|
||||
<if test="deviceModel != null">#{deviceModel},</if>
|
||||
<if test="deviceState != null">#{deviceState},</if>
|
||||
<if test="recType != null">#{recType},</if>
|
||||
<if test="onlineState != null">#{onlineState},</if>
|
||||
<if test="versionNo != null">#{versionNo},</if>
|
||||
<if test="lastActiveTime != null">#{lastActiveTime},</if>
|
||||
<if test="hasRegister != null">#{hasRegister},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAttendanceUbiDevice" parameterType="AttendanceUbiDevice">
|
||||
update attendance_ubi_device
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="tag != null">tag = #{tag},</if>
|
||||
<if test="sceneGuid != null">scene_guid = #{sceneGuid},</if>
|
||||
<if test="source != null">source = #{source},</if>
|
||||
<if test="deviceNo != null">device_no = #{deviceNo},</if>
|
||||
<if test="addition != null">addition = #{addition},</if>
|
||||
<if test="bindDefaultScene != null">bind_default_scene = #{bindDefaultScene},</if>
|
||||
<if test="forceEmptyDevice != null">force_empty_device = #{forceEmptyDevice},</if>
|
||||
<if test="password != null">password = #{password},</if>
|
||||
<if test="deviceModel != null">device_model = #{deviceModel},</if>
|
||||
<if test="deviceState != null">device_state = #{deviceState},</if>
|
||||
<if test="recType != null">rec_type = #{recType},</if>
|
||||
<if test="onlineState != null">online_state = #{onlineState},</if>
|
||||
<if test="versionNo != null">version_no = #{versionNo},</if>
|
||||
<if test="lastActiveTime != null">last_active_time = #{lastActiveTime},</if>
|
||||
<if test="hasRegister != null">has_register = #{hasRegister},</if>
|
||||
<if test="state != null">state = #{state},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAttendanceUbiDeviceById" parameterType="Long">
|
||||
delete from attendance_ubi_device where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAttendanceUbiDeviceByIds" parameterType="String">
|
||||
delete from attendance_ubi_device where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -32,50 +32,71 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<association property="user" javaType="com.yanzhu.system.api.domain.SysUser" resultMap="com.yanzhu.system.mapper.SysUserMapper.SysUserResult"></association>
|
||||
<association property="user" javaType="com.yanzhu.system.api.domain.SysUser" resultMap="ProSysUserResult"></association>
|
||||
</resultMap>
|
||||
<resultMap id="ProSysUserResult" type="com.yanzhu.system.api.domain.SysUser">
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="userType" column="user_type" />
|
||||
<result property="cardType" column="card_type" />
|
||||
<result property="cardCode" column="card_code" />
|
||||
<result property="userPicture" column="user_picture" />
|
||||
<result property="cardImgPos" column="card_img_pos" />
|
||||
<result property="cardImgInv" column="card_img_inv" />
|
||||
<result property="userInfos" column="user_infos" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="avatar" column="avatar" />
|
||||
<result property="password" column="password" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="loginIp" column="login_ip" />
|
||||
<result property="loginDate" column="login_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProProjectInfoSubdeptsUsersVo">
|
||||
select pi.project_name,
|
||||
psu.id, psu.com_id, psu.project_id, psu.sub_dept_id, psu.sub_dept_type, psu.sub_dept_name, psu.user_id,
|
||||
psu.sub_dept_group, psu.sub_dept_group_name, psu.craft_type, psu.craft_post, psu.edu_status,
|
||||
psu.edu_file_path, psu.edu_sign_path, psu.edu_date, psu.approve_status, psu.use_status, psu.sub_step, psu.illness_status,
|
||||
psu.sup_illness_status, psu.is_del, psu.create_by, psu.create_time, psu.update_by, psu.update_time, psu.remark
|
||||
from pro_project_info_subdepts_users psu
|
||||
left join pro_project_info pi on pi.id = psu.project_id
|
||||
left join sys_dept sd on sd.dept_id = pi.com_id
|
||||
SELECT pi.project_name, psu.id, psu.com_id, psu.project_id, psu.sub_dept_id, psu.sub_dept_type, psu.sub_dept_name, psu.user_id, psu.sub_dept_group,
|
||||
psu.sub_dept_group_name, psu.craft_type, psu.craft_post, psu.edu_status, psu.edu_file_path, psu.edu_sign_path, psu.edu_date, psu.approve_status,
|
||||
psu.use_status, psu.sub_step, psu.illness_status, psu.sup_illness_status, psu.is_del, psu.create_by, psu.create_time, psu.update_by, psu.update_time,
|
||||
psu.remark,su.`user_name`,su.`nick_name`,su.`user_type`,su.`card_type`,su.`card_code`,
|
||||
su.`user_picture`, su.`card_img_inv`,su.`card_img_pos`,su.`user_infos`,su.`email`,su.`phonenumber`,su.`sex`,su.`avatar`,su.`login_ip`,su.`login_date`
|
||||
FROM pro_project_info_subdepts_users psu
|
||||
LEFT JOIN sys_user su ON psu.user_id=su.user_id
|
||||
LEFT JOIN pro_project_info PI ON pi.id = psu.project_id
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = pi.com_id
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectProProjectInfoSubdeptsUsersList" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult">
|
||||
<include refid="selectProProjectInfoSubdeptsUsersVo"/>
|
||||
<where>
|
||||
<if test="comId != null "> and com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null "> and sub_dept_id = #{subDeptId}</if>
|
||||
<if test="subDeptType != null and subDeptType != ''"> and sub_dept_type = #{subDeptType}</if>
|
||||
<if test="subDeptName != null and subDeptName != ''"> and sub_dept_name like concat('%', #{subDeptName}, '%')</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="subDeptGroup != null "> and sub_dept_group = #{subDeptGroup}</if>
|
||||
<if test="subDeptGroupName != null and subDeptGroupName != ''"> and sub_dept_group_name like concat('%', #{subDeptGroupName}, '%')</if>
|
||||
<if test="craftType != null and craftType != ''"> and craft_type = #{craftType}</if>
|
||||
<if test="craftPost != null and craftPost != ''"> and craft_post = #{craftPost}</if>
|
||||
<if test="eduStatus != null and eduStatus != ''"> and edu_status = #{eduStatus}</if>
|
||||
<if test="eduFilePath != null and eduFilePath != ''"> and edu_file_path = #{eduFilePath}</if>
|
||||
<if test="eduSignPath != null and eduSignPath != ''"> and edu_sign_path = #{eduSignPath}</if>
|
||||
<if test="eduDate != null "> and edu_date = #{eduDate}</if>
|
||||
<if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
|
||||
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
|
||||
<if test="subStep != null "> and sub_step = #{subStep}</if>
|
||||
<if test="illnessStatus != null "> and illness_status = #{illnessStatus}</if>
|
||||
<if test="supIllnessStatus != null "> and sup_illness_status = #{supIllnessStatus}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="comId != null "> and psu.com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and psu.project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null "> and psu.sub_dept_id = #{subDeptId}</if>
|
||||
<if test="subDeptType != null and subDeptType != ''"> and psu.sub_dept_type = #{subDeptType}</if>
|
||||
<if test="subDeptName != null and subDeptName != ''"> and psu.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
|
||||
<if test="userId != null "> and psu.user_id = #{userId}</if>
|
||||
<if test="subDeptGroup != null "> and psu.sub_dept_group = #{subDeptGroup}</if>
|
||||
<if test="subDeptGroupName != null and subDeptGroupName != ''"> and psu.sub_dept_group_name like concat('%', #{subDeptGroupName}, '%')</if>
|
||||
<if test="craftType != null and craftType != ''"> and psu.craft_type = #{craftType}</if>
|
||||
<if test="craftPost != null and craftPost != ''"> and psu.craft_post = #{craftPost}</if>
|
||||
<if test="eduStatus != null and eduStatus != ''"> and psu.edu_status = #{eduStatus}</if>
|
||||
<if test="eduFilePath != null and eduFilePath != ''"> and psu.edu_file_path = #{eduFilePath}</if>
|
||||
<if test="eduSignPath != null and eduSignPath != ''"> and psu.edu_sign_path = #{eduSignPath}</if>
|
||||
<if test="eduDate != null "> and psu.edu_date = #{eduDate}</if>
|
||||
<if test="approveStatus != null "> and psu.approve_status = #{approveStatus}</if>
|
||||
<if test="useStatus != null and useStatus != ''"> and psu.use_status = #{useStatus}</if>
|
||||
<if test="subStep != null "> and psu.sub_step = #{subStep}</if>
|
||||
<if test="illnessStatus != null "> and psu.illness_status = #{illnessStatus}</if>
|
||||
<if test="supIllnessStatus != null "> and psu.sup_illness_status = #{supIllnessStatus}</if>
|
||||
<if test="isDel != null "> and psu.is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectProProjectInfoSubdeptsUsersById" parameterType="Long" resultMap="ProProjectInfoSubdeptsUsersResult">
|
||||
<include refid="selectProProjectInfoSubdeptsUsersVo"/>
|
||||
where id = #{id}
|
||||
where psu.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProProjectInfoSubdeptsUsers" parameterType="ProProjectInfoSubdeptsUsers" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
package com.yanzhu.manage.controller;
|
||||
|
||||
import com.yanzhu.common.core.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.common.core.web.controller.BaseController;
|
||||
import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||
import com.yanzhu.common.core.web.page.TableDataInfo;
|
||||
import com.yanzhu.common.log.annotation.Log;
|
||||
import com.yanzhu.common.log.enums.BusinessType;
|
||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||
import com.yanzhu.manage.domain.AttendanceCfg;
|
||||
import com.yanzhu.manage.domain.BusExamInfo;
|
||||
import com.yanzhu.manage.service.IAttendanceCfgService;
|
||||
import com.yanzhu.manage.service.IBusExamInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 考勤配置Controller
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/attendance_cfg")
|
||||
public class AttendanceCfgController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAttendanceCfgService attendanceCfgService;
|
||||
|
||||
/**
|
||||
* 查询考勤配置列表
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_cfg:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AttendanceCfg attendanceCfg)
|
||||
{
|
||||
startPage();
|
||||
List<AttendanceCfg> list = attendanceCfgService.selectAttendanceCfgList(attendanceCfg);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考勤配置列表
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_cfg:export")
|
||||
@Log(title = "考勤配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AttendanceCfg attendanceCfg)
|
||||
{
|
||||
List<AttendanceCfg> list = attendanceCfgService.selectAttendanceCfgList(attendanceCfg);
|
||||
ExcelUtil<AttendanceCfg> util = new ExcelUtil<AttendanceCfg>(AttendanceCfg.class);
|
||||
util.exportExcel(response, list, "考勤配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考勤配置详细信息
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_cfg:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(attendanceCfgService.selectAttendanceCfgById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考勤配置
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_cfg:add")
|
||||
@Log(title = "考勤配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AttendanceCfg attendanceCfg)
|
||||
{
|
||||
return toAjax(attendanceCfgService.insertAttendanceCfg(attendanceCfg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考勤配置
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_cfg:edit")
|
||||
@Log(title = "考勤配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AttendanceCfg attendanceCfg)
|
||||
{
|
||||
return toAjax(attendanceCfgService.updateAttendanceCfg(attendanceCfg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤配置
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_cfg:remove")
|
||||
@Log(title = "考勤配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(attendanceCfgService.deleteAttendanceCfgByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
package com.yanzhu.manage.controller;
|
||||
|
||||
import com.yanzhu.common.core.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.common.core.web.controller.BaseController;
|
||||
import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||
import com.yanzhu.common.core.web.page.TableDataInfo;
|
||||
import com.yanzhu.common.log.annotation.Log;
|
||||
import com.yanzhu.common.log.enums.BusinessType;
|
||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||
import com.yanzhu.manage.domain.AttendanceUbiDevice;
|
||||
import com.yanzhu.manage.domain.BusExamInfo;
|
||||
import com.yanzhu.manage.service.IAttendanceUbiDeviceService;
|
||||
import com.yanzhu.manage.service.IBusExamInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 宇泛的设备信息Controller
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/attendance_ubi_device")
|
||||
public class AttendanceUbiDeviceController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAttendanceUbiDeviceService attendanceUbiDeviceService;
|
||||
|
||||
/**
|
||||
* 查询宇泛的设备信息列表
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_ubi_device:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AttendanceUbiDevice attendanceUbiDevice)
|
||||
{
|
||||
startPage();
|
||||
List<AttendanceUbiDevice> list = attendanceUbiDeviceService.selectAttendanceUbiDeviceList(attendanceUbiDevice);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出宇泛的设备信息列表
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_ubi_device:export")
|
||||
@Log(title = "宇泛的设备信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AttendanceUbiDevice attendanceUbiDevice)
|
||||
{
|
||||
List<AttendanceUbiDevice> list = attendanceUbiDeviceService.selectAttendanceUbiDeviceList(attendanceUbiDevice);
|
||||
ExcelUtil<AttendanceUbiDevice> util = new ExcelUtil<AttendanceUbiDevice>(AttendanceUbiDevice.class);
|
||||
util.exportExcel(response, list, "宇泛的设备信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取宇泛的设备信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_ubi_device:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(attendanceUbiDeviceService.selectAttendanceUbiDeviceById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增宇泛的设备信息
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_ubi_device:add")
|
||||
@Log(title = "宇泛的设备信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AttendanceUbiDevice attendanceUbiDevice)
|
||||
{
|
||||
return toAjax(attendanceUbiDeviceService.insertAttendanceUbiDevice(attendanceUbiDevice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改宇泛的设备信息
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_ubi_device:edit")
|
||||
@Log(title = "宇泛的设备信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AttendanceUbiDevice attendanceUbiDevice)
|
||||
{
|
||||
return toAjax(attendanceUbiDeviceService.updateAttendanceUbiDevice(attendanceUbiDevice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除宇泛的设备信息
|
||||
*/
|
||||
@RequiresPermissions("manage:attendance_ubi_device:remove")
|
||||
@Log(title = "宇泛的设备信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(attendanceUbiDeviceService.deleteAttendanceUbiDeviceByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.manage.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.manage.domain.AttendanceCfg;
|
||||
|
||||
/**
|
||||
* 考勤配置Service接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
public interface IAttendanceCfgService
|
||||
{
|
||||
/**
|
||||
* 查询考勤配置
|
||||
*
|
||||
* @param id 考勤配置主键
|
||||
* @return 考勤配置
|
||||
*/
|
||||
public AttendanceCfg selectAttendanceCfgById(Long id);
|
||||
|
||||
/**
|
||||
* 查询考勤配置列表
|
||||
*
|
||||
* @param attendanceCfg 考勤配置
|
||||
* @return 考勤配置集合
|
||||
*/
|
||||
public List<AttendanceCfg> selectAttendanceCfgList(AttendanceCfg attendanceCfg);
|
||||
|
||||
/**
|
||||
* 新增考勤配置
|
||||
*
|
||||
* @param attendanceCfg 考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAttendanceCfg(AttendanceCfg attendanceCfg);
|
||||
|
||||
/**
|
||||
* 修改考勤配置
|
||||
*
|
||||
* @param attendanceCfg 考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAttendanceCfg(AttendanceCfg attendanceCfg);
|
||||
|
||||
/**
|
||||
* 批量删除考勤配置
|
||||
*
|
||||
* @param ids 需要删除的考勤配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttendanceCfgByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除考勤配置信息
|
||||
*
|
||||
* @param id 考勤配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttendanceCfgById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.manage.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.manage.domain.AttendanceUbiDevice;
|
||||
|
||||
/**
|
||||
* 宇泛的设备信息Service接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
public interface IAttendanceUbiDeviceService
|
||||
{
|
||||
/**
|
||||
* 查询宇泛的设备信息
|
||||
*
|
||||
* @param id 宇泛的设备信息主键
|
||||
* @return 宇泛的设备信息
|
||||
*/
|
||||
public AttendanceUbiDevice selectAttendanceUbiDeviceById(Long id);
|
||||
|
||||
/**
|
||||
* 查询宇泛的设备信息列表
|
||||
*
|
||||
* @param attendanceUbiDevice 宇泛的设备信息
|
||||
* @return 宇泛的设备信息集合
|
||||
*/
|
||||
public List<AttendanceUbiDevice> selectAttendanceUbiDeviceList(AttendanceUbiDevice attendanceUbiDevice);
|
||||
|
||||
/**
|
||||
* 新增宇泛的设备信息
|
||||
*
|
||||
* @param attendanceUbiDevice 宇泛的设备信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAttendanceUbiDevice(AttendanceUbiDevice attendanceUbiDevice);
|
||||
|
||||
/**
|
||||
* 修改宇泛的设备信息
|
||||
*
|
||||
* @param attendanceUbiDevice 宇泛的设备信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAttendanceUbiDevice(AttendanceUbiDevice attendanceUbiDevice);
|
||||
|
||||
/**
|
||||
* 批量删除宇泛的设备信息
|
||||
*
|
||||
* @param ids 需要删除的宇泛的设备信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttendanceUbiDeviceByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除宇泛的设备信息信息
|
||||
*
|
||||
* @param id 宇泛的设备信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAttendanceUbiDeviceById(Long id);
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
package com.yanzhu.manage.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
/**
|
||||
* 宇泛服务封装
|
||||
*/
|
||||
public interface IUniService {
|
||||
/**
|
||||
* 鉴权接口
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public String auth(JSON data);
|
||||
|
||||
/**
|
||||
* 人员接口-识别主体创建
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON admitCreate(JSON data);
|
||||
|
||||
/**
|
||||
* 人员接口-识别主体更新
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON admitUpdate(JSON data);
|
||||
|
||||
/**
|
||||
* 人员接口-识别主体删除
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON admitDeletee(JSON data);
|
||||
|
||||
/**
|
||||
* 人员接口-查询识别主体详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON admitDetail(JSON data);
|
||||
|
||||
/**
|
||||
* 人员接口-识别主体列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON admitPage(JSON data);
|
||||
|
||||
|
||||
/**
|
||||
* 人员接口-人像注册
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON faceRegister(JSON data);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 人员接口-人像删除
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON faceDelete(JSON data);
|
||||
|
||||
/**
|
||||
* 人员接口-人员照片信息查询
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON faceDetail(JSON data);
|
||||
|
||||
/**
|
||||
* 设备接口-设备添加
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON deviceCreate(JSON data);
|
||||
|
||||
/**
|
||||
* 设备接口-设备更新
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON deviceUpdate(JSON data);
|
||||
|
||||
/**
|
||||
* 设备接口-设备删除
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON deviceDelete(JSON data);
|
||||
|
||||
/**
|
||||
* 设备接口-设备详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON deviceDetail(JSON data);
|
||||
|
||||
/**
|
||||
* 授权接口-设备授权识别主体
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON authDevice(JSON data);
|
||||
|
||||
/**
|
||||
* 授权接口-设备修改识别主体权限
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON authDeviceUpdate(JSON data);
|
||||
|
||||
|
||||
/**
|
||||
* 授权接口-设备销权识别主体
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public JSON authDeviceRevoke(JSON data);
|
||||
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.yanzhu.manage.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.yanzhu.common.core.context.SecurityContextHolder;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.manage.mapper.AttendanceCfgMapper;
|
||||
import com.yanzhu.manage.domain.AttendanceCfg;
|
||||
import com.yanzhu.manage.service.IAttendanceCfgService;
|
||||
|
||||
/**
|
||||
* 考勤配置Service业务层处理
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
@Service
|
||||
public class AttendanceCfgServiceImpl implements IAttendanceCfgService
|
||||
{
|
||||
@Autowired
|
||||
private AttendanceCfgMapper attendanceCfgMapper;
|
||||
|
||||
/**
|
||||
* 查询考勤配置
|
||||
*
|
||||
* @param id 考勤配置主键
|
||||
* @return 考勤配置
|
||||
*/
|
||||
@Override
|
||||
public AttendanceCfg selectAttendanceCfgById(Long id)
|
||||
{
|
||||
return attendanceCfgMapper.selectAttendanceCfgById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考勤配置列表
|
||||
*
|
||||
* @param attendanceCfg 考勤配置
|
||||
* @return 考勤配置
|
||||
*/
|
||||
@Override
|
||||
public List<AttendanceCfg> selectAttendanceCfgList(AttendanceCfg attendanceCfg)
|
||||
{
|
||||
return attendanceCfgMapper.selectAttendanceCfgList(attendanceCfg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考勤配置
|
||||
*
|
||||
* @param attendanceCfg 考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAttendanceCfg(AttendanceCfg attendanceCfg)
|
||||
{
|
||||
attendanceCfg.setCreateBy(SecurityContextHolder.getUserName());
|
||||
attendanceCfg.setCreateTime(DateUtils.getNowDate());
|
||||
return attendanceCfgMapper.insertAttendanceCfg(attendanceCfg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考勤配置
|
||||
*
|
||||
* @param attendanceCfg 考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAttendanceCfg(AttendanceCfg attendanceCfg)
|
||||
{
|
||||
attendanceCfg.setUpdateBy(SecurityContextHolder.getUserName());
|
||||
attendanceCfg.setUpdateTime(DateUtils.getNowDate());
|
||||
return attendanceCfgMapper.updateAttendanceCfg(attendanceCfg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除考勤配置
|
||||
*
|
||||
* @param ids 需要删除的考勤配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAttendanceCfgByIds(Long[] ids)
|
||||
{
|
||||
return attendanceCfgMapper.deleteAttendanceCfgByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤配置信息
|
||||
*
|
||||
* @param id 考勤配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAttendanceCfgById(Long id)
|
||||
{
|
||||
return attendanceCfgMapper.deleteAttendanceCfgById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.yanzhu.manage.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.yanzhu.common.core.context.SecurityContextHolder;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.manage.mapper.AttendanceUbiDeviceMapper;
|
||||
import com.yanzhu.manage.domain.AttendanceUbiDevice;
|
||||
import com.yanzhu.manage.service.IAttendanceUbiDeviceService;
|
||||
|
||||
/**
|
||||
* 宇泛的设备信息Service业务层处理
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
@Service
|
||||
public class AttendanceUbiDeviceServiceImpl implements IAttendanceUbiDeviceService
|
||||
{
|
||||
@Autowired
|
||||
private AttendanceUbiDeviceMapper attendanceUbiDeviceMapper;
|
||||
|
||||
/**
|
||||
* 查询宇泛的设备信息
|
||||
*
|
||||
* @param id 宇泛的设备信息主键
|
||||
* @return 宇泛的设备信息
|
||||
*/
|
||||
@Override
|
||||
public AttendanceUbiDevice selectAttendanceUbiDeviceById(Long id)
|
||||
{
|
||||
return attendanceUbiDeviceMapper.selectAttendanceUbiDeviceById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询宇泛的设备信息列表
|
||||
*
|
||||
* @param attendanceUbiDevice 宇泛的设备信息
|
||||
* @return 宇泛的设备信息
|
||||
*/
|
||||
@Override
|
||||
public List<AttendanceUbiDevice> selectAttendanceUbiDeviceList(AttendanceUbiDevice attendanceUbiDevice)
|
||||
{
|
||||
return attendanceUbiDeviceMapper.selectAttendanceUbiDeviceList(attendanceUbiDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增宇泛的设备信息
|
||||
*
|
||||
* @param attendanceUbiDevice 宇泛的设备信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAttendanceUbiDevice(AttendanceUbiDevice attendanceUbiDevice)
|
||||
{
|
||||
attendanceUbiDevice.setCreateBy(SecurityContextHolder.getUserName());
|
||||
attendanceUbiDevice.setCreateTime(DateUtils.getNowDate());
|
||||
return attendanceUbiDeviceMapper.insertAttendanceUbiDevice(attendanceUbiDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改宇泛的设备信息
|
||||
*
|
||||
* @param attendanceUbiDevice 宇泛的设备信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAttendanceUbiDevice(AttendanceUbiDevice attendanceUbiDevice)
|
||||
{
|
||||
attendanceUbiDevice.setUpdateBy(SecurityContextHolder.getUserName());
|
||||
attendanceUbiDevice.setUpdateTime(DateUtils.getNowDate());
|
||||
return attendanceUbiDeviceMapper.updateAttendanceUbiDevice(attendanceUbiDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除宇泛的设备信息
|
||||
*
|
||||
* @param ids 需要删除的宇泛的设备信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAttendanceUbiDeviceByIds(Long[] ids)
|
||||
{
|
||||
return attendanceUbiDeviceMapper.deleteAttendanceUbiDeviceByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除宇泛的设备信息信息
|
||||
*
|
||||
* @param id 宇泛的设备信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAttendanceUbiDeviceById(Long id)
|
||||
{
|
||||
return attendanceUbiDeviceMapper.deleteAttendanceUbiDeviceById(id);
|
||||
}
|
||||
}
|
|
@ -85,6 +85,14 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
{
|
||||
proProjectInfoSubdeptsUsers.setUpdateTime(DateUtils.getNowDate());
|
||||
proProjectInfoSubdeptsUsers.setUpdateBy(SecurityContextHolder.getUserName());
|
||||
SysUser user=proProjectInfoSubdeptsUsers.getUser();
|
||||
if(user.getUserId()==null||user.getUserId().intValue()==0){
|
||||
Long userId= remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
|
||||
user.setUserId(userId);
|
||||
proProjectInfoSubdeptsUsers.setUserId(userId);
|
||||
}else{
|
||||
remoteUserService.updateUserInfo(user,SecurityConstants.INNER).getData();
|
||||
}
|
||||
return proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询考勤配置列表
|
||||
export function listAttendance_cfg(query) {
|
||||
return request({
|
||||
url: '/manage/attendance_cfg/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询考勤配置详细
|
||||
export function getAttendance_cfg(id) {
|
||||
return request({
|
||||
url: '/manage/attendance_cfg/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增考勤配置
|
||||
export function addAttendance_cfg(data) {
|
||||
return request({
|
||||
url: '/manage/attendance_cfg',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改考勤配置
|
||||
export function updateAttendance_cfg(data) {
|
||||
return request({
|
||||
url: '/manage/attendance_cfg',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除考勤配置
|
||||
export function delAttendance_cfg(id) {
|
||||
return request({
|
||||
url: '/manage/attendance_cfg/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询宇泛的设备信息列表
|
||||
export function listAttendance_ubi_device(query) {
|
||||
return request({
|
||||
url: '/manage/attendance_ubi_device/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询宇泛的设备信息详细
|
||||
export function getAttendance_ubi_device(id) {
|
||||
return request({
|
||||
url: '/manage/attendance_ubi_device/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增宇泛的设备信息
|
||||
export function addAttendance_ubi_device(data) {
|
||||
return request({
|
||||
url: '/manage/attendance_ubi_device',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改宇泛的设备信息
|
||||
export function updateAttendance_ubi_device(data) {
|
||||
return request({
|
||||
url: '/manage/attendance_ubi_device',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除宇泛的设备信息
|
||||
export function delAttendance_ubi_device(id) {
|
||||
return request({
|
||||
url: '/manage/attendance_ubi_device/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,258 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input v-model="queryParams.comId" placeholder="请输入公司主键" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位" prop="projectId">
|
||||
<el-input v-model="queryParams.projectId" placeholder="请输入分包单位" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" 厂商编号(参考字典attendance_vendors)" prop="vendorsCode">
|
||||
<el-input v-model="queryParams.vendorsCode" placeholder="请输入 厂商编号(参考字典attendance_vendors)" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="1-启用,0-停用" prop="enabled">
|
||||
<el-input v-model="queryParams.enabled" placeholder="请输入1-启用,0-停用" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="queryParams.state" placeholder="请输入状态" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="queryParams.isDel" placeholder="请输入${comment}" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['manage:attendance_cfg:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['manage:attendance_cfg:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['manage:attendance_cfg:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['manage:attendance_cfg:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="attendance_cfgList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="公司主键" align="center" prop="comId" />
|
||||
<el-table-column label="分包单位" align="center" prop="projectId" />
|
||||
<el-table-column label=" 厂商编号(参考字典attendance_vendors)" align="center" prop="vendorsCode" />
|
||||
<el-table-column label="厂商参数" align="center" prop="vendorsParameter" />
|
||||
<el-table-column label="1-启用,0-停用" align="center" prop="enabled" />
|
||||
<el-table-column label="状态" align="center" prop="state" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="${comment}" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['manage:attendance_cfg:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['manage:attendance_cfg:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改考勤配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="attendance_cfgRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input v-model="form.comId" placeholder="请输入公司主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入分包单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" 厂商编号(参考字典attendance_vendors)" prop="vendorsCode">
|
||||
<el-input v-model="form.vendorsCode" placeholder="请输入 厂商编号(参考字典attendance_vendors)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂商参数" prop="vendorsParameter">
|
||||
<el-input v-model="form.vendorsParameter" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="1-启用,0-停用" prop="enabled">
|
||||
<el-input v-model="form.enabled" placeholder="请输入1-启用,0-停用" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Attendance_cfg">
|
||||
import { listAttendance_cfg, getAttendance_cfg, delAttendance_cfg, addAttendance_cfg, updateAttendance_cfg } from "@/api/manage/attendanceCfg";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const attendance_cfgList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
vendorsCode: null,
|
||||
vendorsParameter: null,
|
||||
enabled: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询考勤配置列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listAttendance_cfg(queryParams.value).then(response => {
|
||||
attendance_cfgList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
vendorsCode: null,
|
||||
vendorsParameter: null,
|
||||
enabled: null,
|
||||
state: null,
|
||||
remark: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
proxy.resetForm("attendance_cfgRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加考勤配置";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const _id = row.id || ids.value
|
||||
getAttendance_cfg(_id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改考勤配置";
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["attendance_cfgRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateAttendance_cfg(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addAttendance_cfg(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除考勤配置编号为"' + _ids + '"的数据项?').then(function () {
|
||||
return delAttendance_cfg(_ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('manage/attendance_cfg/export', {
|
||||
...queryParams.value
|
||||
}, `attendance_cfg_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
|
@ -0,0 +1,380 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input v-model="queryParams.comId" placeholder="请输入公司主键" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位" prop="projectId">
|
||||
<el-input v-model="queryParams.projectId" placeholder="请输入分包单位" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备标签" prop="tag">
|
||||
<el-input v-model="queryParams.tag" placeholder="请输入设备标签" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场景 Guid" prop="sceneGuid">
|
||||
<el-input v-model="queryParams.sceneGuid" placeholder="请输入场景 Guid" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备来源,字典ubi_device_source" prop="source">
|
||||
<el-input v-model="queryParams.source" placeholder="请输入设备来源,字典ubi_device_source" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceNo">
|
||||
<el-input v-model="queryParams.deviceNo" placeholder="请输入设备序列号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否绑定默认场景" prop="bindDefaultScene">
|
||||
<el-input v-model="queryParams.bindDefaultScene" placeholder="请输入是否绑定默认场景" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否清空设备数据,默认为false" prop="forceEmptyDevice">
|
||||
<el-input v-model="queryParams.forceEmptyDevice" placeholder="请输入是否清空设备数据,默认为false" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当forceEmptyDevice为true,传入设备密码" prop="password">
|
||||
<el-input v-model="queryParams.password" placeholder="请输入当forceEmptyDevice为true,传入设备密码" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备模式" prop="deviceModel">
|
||||
<el-input v-model="queryParams.deviceModel" placeholder="请输入设备模式" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="deviceState">
|
||||
<el-input v-model="queryParams.deviceState" placeholder="请输入设备状态" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="在线状态" prop="onlineState">
|
||||
<el-input v-model="queryParams.onlineState" placeholder="请输入在线状态" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="versionNo">
|
||||
<el-input v-model="queryParams.versionNo" placeholder="请输入版本号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最后激活时间" prop="lastActiveTime">
|
||||
<el-date-picker clearable v-model="queryParams.lastActiveTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择最后激活时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否已注册" prop="hasRegister">
|
||||
<el-input v-model="queryParams.hasRegister" placeholder="请输入是否已注册" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="queryParams.state" placeholder="请输入状态" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="queryParams.isDel" placeholder="请输入${comment}" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['manage:attendance_ubi_device:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['manage:attendance_ubi_device:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['manage:attendance_ubi_device:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['manage:attendance_ubi_device:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="attendance_ubi_deviceList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="${comment}" align="center" prop="id" />
|
||||
<el-table-column label="公司主键" align="center" prop="comId" />
|
||||
<el-table-column label="分包单位" align="center" prop="projectId" />
|
||||
<el-table-column label="设备名称" align="center" prop="name" />
|
||||
<el-table-column label="设备标签" align="center" prop="tag" />
|
||||
<el-table-column label="场景 Guid" align="center" prop="sceneGuid" />
|
||||
<el-table-column label="设备来源,字典ubi_device_source" align="center" prop="source" />
|
||||
<el-table-column label="设备序列号" align="center" prop="deviceNo" />
|
||||
<el-table-column label="扩展字段" align="center" prop="addition" />
|
||||
<el-table-column label="是否绑定默认场景" align="center" prop="bindDefaultScene" />
|
||||
<el-table-column label="是否清空设备数据,默认为false" align="center" prop="forceEmptyDevice" />
|
||||
<el-table-column label="当forceEmptyDevice为true,传入设备密码" align="center" prop="password" />
|
||||
<el-table-column label="设备模式" align="center" prop="deviceModel" />
|
||||
<el-table-column label="设备状态" align="center" prop="deviceState" />
|
||||
<el-table-column label="比对模式,1:本地识别 2:云端识别" align="center" prop="recType" />
|
||||
<el-table-column label="在线状态" align="center" prop="onlineState" />
|
||||
<el-table-column label="版本号" align="center" prop="versionNo" />
|
||||
<el-table-column label="最后激活时间" align="center" prop="lastActiveTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.lastActiveTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否已注册" align="center" prop="hasRegister" />
|
||||
<el-table-column label="状态" align="center" prop="state" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="${comment}" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['manage:attendance_ubi_device:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['manage:attendance_ubi_device:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改宇泛的设备信息对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="attendance_ubi_deviceRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input v-model="form.comId" placeholder="请输入公司主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入分包单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备标签" prop="tag">
|
||||
<el-input v-model="form.tag" placeholder="请输入设备标签" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场景 Guid" prop="sceneGuid">
|
||||
<el-input v-model="form.sceneGuid" placeholder="请输入场景 Guid" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备来源,字典ubi_device_source" prop="source">
|
||||
<el-input v-model="form.source" placeholder="请输入设备来源,字典ubi_device_source" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceNo">
|
||||
<el-input v-model="form.deviceNo" placeholder="请输入设备序列号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="扩展字段" prop="addition">
|
||||
<el-input v-model="form.addition" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否绑定默认场景" prop="bindDefaultScene">
|
||||
<el-input v-model="form.bindDefaultScene" placeholder="请输入是否绑定默认场景" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否清空设备数据,默认为false" prop="forceEmptyDevice">
|
||||
<el-input v-model="form.forceEmptyDevice" placeholder="请输入是否清空设备数据,默认为false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当forceEmptyDevice为true,传入设备密码" prop="password">
|
||||
<el-input v-model="form.password" placeholder="请输入当forceEmptyDevice为true,传入设备密码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备模式" prop="deviceModel">
|
||||
<el-input v-model="form.deviceModel" placeholder="请输入设备模式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="deviceState">
|
||||
<el-input v-model="form.deviceState" placeholder="请输入设备状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="在线状态" prop="onlineState">
|
||||
<el-input v-model="form.onlineState" placeholder="请输入在线状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="versionNo">
|
||||
<el-input v-model="form.versionNo" placeholder="请输入版本号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最后激活时间" prop="lastActiveTime">
|
||||
<el-date-picker clearable v-model="form.lastActiveTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择最后激活时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否已注册" prop="hasRegister">
|
||||
<el-input v-model="form.hasRegister" placeholder="请输入是否已注册" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Attendance_ubi_device">
|
||||
import { listAttendance_ubi_device, getAttendance_ubi_device, delAttendance_ubi_device, addAttendance_ubi_device, updateAttendance_ubi_device } from "@/api/manage/attendanceUbiDevice";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const attendance_ubi_deviceList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
name: null,
|
||||
tag: null,
|
||||
sceneGuid: null,
|
||||
source: null,
|
||||
deviceNo: null,
|
||||
addition: null,
|
||||
bindDefaultScene: null,
|
||||
forceEmptyDevice: null,
|
||||
password: null,
|
||||
deviceModel: null,
|
||||
deviceState: null,
|
||||
recType: null,
|
||||
onlineState: null,
|
||||
versionNo: null,
|
||||
lastActiveTime: null,
|
||||
hasRegister: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询宇泛的设备信息列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listAttendance_ubi_device(queryParams.value).then(response => {
|
||||
attendance_ubi_deviceList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
name: null,
|
||||
tag: null,
|
||||
sceneGuid: null,
|
||||
source: null,
|
||||
deviceNo: null,
|
||||
addition: null,
|
||||
bindDefaultScene: null,
|
||||
forceEmptyDevice: null,
|
||||
password: null,
|
||||
deviceModel: null,
|
||||
deviceState: null,
|
||||
recType: null,
|
||||
onlineState: null,
|
||||
versionNo: null,
|
||||
lastActiveTime: null,
|
||||
hasRegister: null,
|
||||
state: null,
|
||||
remark: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
proxy.resetForm("attendance_ubi_deviceRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加宇泛的设备信息";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const _id = row.id || ids.value
|
||||
getAttendance_ubi_device(_id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改宇泛的设备信息";
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["attendance_ubi_deviceRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateAttendance_ubi_device(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addAttendance_ubi_device(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除宇泛的设备信息编号为"' + _ids + '"的数据项?').then(function () {
|
||||
return delAttendance_ubi_device(_ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('manage/attendance_ubi_device/export', {
|
||||
...queryParams.value
|
||||
}, `attendance_ubi_device_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
|
@ -59,8 +59,8 @@
|
|||
<el-table v-loading="loading" :data="proProjectInfoSubdeptsUsersList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="所属单位" align="center" prop="subDeptName" />
|
||||
<el-table-column label="姓名" align="center" prop="userName" />
|
||||
<el-table-column label="联系电话" align="center" prop="userPhone" />
|
||||
<el-table-column label="姓名" align="center" prop="user.userName" />
|
||||
<el-table-column label="联系电话" align="center" prop="user.phonenumber" />
|
||||
<el-table-column label="班组" align="center" prop="subDeptGroupName" />
|
||||
<el-table-column label="工种类型" align="center" prop="craftType">
|
||||
<template #default="scope">
|
||||
|
@ -72,11 +72,11 @@
|
|||
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="民族" align="center" prop="nation" width="80" />
|
||||
<el-table-column label="年龄" align="center" prop="age" width="80" />
|
||||
<el-table-column label="性别" align="center" prop="sex" width="80" />
|
||||
<el-table-column label="出生日期" align="center" prop="birthDay" />
|
||||
<el-table-column label="籍贯" align="center" prop="nativePlace" />
|
||||
<el-table-column label="民族" align="center" prop="info.nation" width="80" />
|
||||
<el-table-column label="年龄" align="center" prop="info.age" width="80" />
|
||||
<el-table-column label="性别" align="center" prop="user.sex" width="80" />
|
||||
<el-table-column label="出生日期" align="center" prop="info.birthDayStr" />
|
||||
<el-table-column label="籍贯" align="center" prop="info.nativePlace" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
|
@ -98,8 +98,8 @@
|
|||
<el-form ref="proProjectInfoSubdeptsUsersRef" :model="form" :rules="rules" label-width="120px" style="position: relative;">
|
||||
<div style="width: 50%;">
|
||||
<el-form-item label="联系电话" prop="userPhone">
|
||||
<el-input v-model="form.userPhone" placeholder="请输入联系电话" minlength="11" maxlength="11" style="width: 200px;" />
|
||||
<el-button type="primary" style="margin-left:10px;" @click="queryPhone">查询</el-button>
|
||||
<el-input v-model="form.userPhone" :disabled="data.mode!='edit'" placeholder="请输入联系电话" minlength="11" maxlength="11" style="width: 200px;" />
|
||||
<el-button type="primary" v-if="data.mode!='edit'" style="margin-left:10px;" @click="queryPhone">查询</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-row v-if="data.phoneState">
|
||||
|
@ -233,6 +233,7 @@ import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts"
|
|||
import { listProProjectInfoSubdeptsGroup } from "@/api/manage/proProjectInfoSubdeptsGroup";
|
||||
import { listUser } from "@/api/system/user";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import dayjs from 'dayjs'
|
||||
const userStore = useUserStore()
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_use_status, pro_craft_type, sys_is_del, pro_craft_post, certificate_type, educational_type } = proxy.useDict('sys_use_status', 'pro_craft_type', 'sys_is_del', 'pro_craft_post', 'certificate_type', 'educational_type');
|
||||
|
@ -301,6 +302,7 @@ const data = reactive({
|
|||
isManager: false,
|
||||
phoneState:'',
|
||||
userInfo:null,
|
||||
mode:'',
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
@ -329,11 +331,27 @@ function queryPhone(){
|
|||
});
|
||||
|
||||
}
|
||||
function tryToJson(str){
|
||||
try{
|
||||
return JSON.parse(str);
|
||||
}catch{
|
||||
return {};
|
||||
}
|
||||
}
|
||||
/** 查询分包单位工人列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listProProjectInfoSubdeptsUsers(queryParams.value).then(response => {
|
||||
proProjectInfoSubdeptsUsersList.value = response.rows || [];
|
||||
proProjectInfoSubdeptsUsersList.value = (response.rows || []).map(d=>{
|
||||
d.info=tryToJson(d.user?.userInfos||"{}")
|
||||
d.user=d.user||{};
|
||||
if(d.info.birthDay){
|
||||
let birthDay=dayjs(d.info.birthDay).format("YYYY-MM-DD");
|
||||
d.info.birthDayStr=birthDay;
|
||||
d.info.age=dayjs(new Date()).diff(d.info.birthDay,'year');
|
||||
}
|
||||
return d;
|
||||
});
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
|
@ -488,7 +506,7 @@ function handleAdd() {
|
|||
return false;
|
||||
}
|
||||
reset();
|
||||
|
||||
data.mode='add';
|
||||
form.value.certificateType = "";
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
|
@ -500,10 +518,45 @@ function handleAdd() {
|
|||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
if (!userStore.currentProId) {
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
reset();
|
||||
const _id = row.id || ids.value
|
||||
data.mode='edit'
|
||||
getProProjectInfoSubdeptsUsers(_id).then(response => {
|
||||
form.value = JSON.parse(JSON.stringify(response.data));
|
||||
let obj = JSON.parse(JSON.stringify(response.data));
|
||||
obj.info=tryToJson(obj.user?.userInfos||"{}")
|
||||
obj.user=obj.user||{};
|
||||
if(obj.info.birthDay){
|
||||
let birthDay=dayjs(obj.info.birthDay).format("YYYY-MM-DD");
|
||||
obj.info.birthDayStr=birthDay;
|
||||
obj.info.age=dayjs(new Date()).diff(obj.info.birthDay,'year');
|
||||
}
|
||||
form.value=obj;
|
||||
form.value.userId=obj.userId;
|
||||
form.value.userPhone=obj.user.phonenumber
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
form.value.userName=obj.user.userName;
|
||||
form.value.certificateType=obj.user.cardType;
|
||||
form.value.certificateCode=obj.user.cardCode;
|
||||
form.value.faceImage=obj.user.userPicture;
|
||||
form.value.certificatePhoto1=obj.user.cardImgPos;
|
||||
form.value.certificatePhoto2=obj.user.cardImgInv;
|
||||
form.value.nation=obj.info.nation;
|
||||
form.value.sex=obj.user.sex;
|
||||
form.value.educationalType=obj.info.educationalType;
|
||||
form.value.birthDay=obj.info.birthDay;
|
||||
form.value.nativePlace=obj.info.nativePlace;
|
||||
form.value.address=obj.info.address;
|
||||
form.value.emergencyContact=obj.info.emergencyContact;
|
||||
form.value.contactPhone=obj.info.contactPhone;
|
||||
form.value.bankName=obj.info.bankName;
|
||||
form.value.bankCardNo=obj.info.bankCardNo;
|
||||
form.value.bankOffice=obj.info.bankOffice;
|
||||
data.phoneState="edit";
|
||||
open.value = true;
|
||||
title.value = "修改劳务人员信息";
|
||||
doImageUpload();
|
||||
|
@ -552,6 +605,7 @@ function submitForm() {
|
|||
avatar:form.value.faceImage
|
||||
};
|
||||
if (form.value.id != null) {
|
||||
form.value.user.userId=form.value.userId;
|
||||
updateProProjectInfoSubdeptsUsers(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
|
|
Loading…
Reference in New Issue