Commit a7d9c8fd authored by 耿迪迪's avatar 耿迪迪

考勤打卡

parent 914db3ef
...@@ -30,6 +30,10 @@ public class TClockIn extends BaseEntity ...@@ -30,6 +30,10 @@ public class TClockIn extends BaseEntity
@Excel(name = "打卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "打卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date clockTime; private Date clockTime;
/** 打卡类型 */
@Excel(name = "打卡类型",dictType = "t_clock_type")
private String type;
/** 经度 */ /** 经度 */
@Excel(name = "经度") @Excel(name = "经度")
private BigDecimal longitude; private BigDecimal longitude;
...@@ -147,6 +151,14 @@ public class TClockIn extends BaseEntity ...@@ -147,6 +151,14 @@ public class TClockIn extends BaseEntity
this.post = post; this.post = post;
} }
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="longitude" column="longitude" /> <result property="longitude" column="longitude" />
<result property="latitude" column="latitude" /> <result property="latitude" column="latitude" />
<result property="address" column="address" /> <result property="address" column="address" />
<result property="type" column="type" />
</resultMap> </resultMap>
<sql id="selectTClockInVo"> <sql id="selectTClockInVo">
...@@ -18,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -18,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t.id, t.id,
t.user_id, t.user_id,
t.clock_time, t.clock_time,
t.type,
t.longitude, t.longitude,
t.latitude, t.latitude,
t.address, t.address,
...@@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nickname != null and nickname != ''"> and u.nick_name like concat('%',#{nickname},'%')</if> <if test="nickname != null and nickname != ''"> and u.nick_name like concat('%',#{nickname},'%')</if>
<if test="begindata != null and begindata != ''"> and clock_time &gt; #{begindata} </if> <if test="begindata != null and begindata != ''"> and clock_time &gt; #{begindata} </if>
<if test="enddata != null and enddata != ''"> and clock_time &lt; #{enddata} </if> <if test="enddata != null and enddata != ''"> and clock_time &lt; #{enddata} </if>
<if test="type != null and type != ''"> and type = #{type}</if>
</where> </where>
order by t.clock_time desc order by t.clock_time desc
</select> </select>
...@@ -68,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -68,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="longitude != null">longitude,</if> <if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if> <if test="latitude != null">latitude,</if>
<if test="address != null">address,</if> <if test="address != null">address,</if>
<if test="type != null">type,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if> <if test="userId != null">#{userId},</if>
...@@ -75,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -75,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="longitude != null">#{longitude},</if> <if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if> <if test="latitude != null">#{latitude},</if>
<if test="address != null">#{address},</if> <if test="address != null">#{address},</if>
<if test="type != null">#{type},</if>
</trim> </trim>
</insert> </insert>
...@@ -86,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -86,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="longitude != null">longitude = #{longitude},</if> <if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if> <if test="latitude != null">latitude = #{latitude},</if>
<if test="address != null">address = #{address},</if> <if test="address != null">address = #{address},</if>
<if test="type != null">type = #{type},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
...@@ -33,6 +33,16 @@ ...@@ -33,6 +33,16 @@
<!--placeholder="选择打卡时间">--> <!--placeholder="选择打卡时间">-->
<!--</el-date-picker>--> <!--</el-date-picker>-->
</el-form-item> </el-form-item>
<el-form-item label="打卡类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择打卡类型" clearable>
<el-option
v-for="dict in typeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -92,6 +102,7 @@ ...@@ -92,6 +102,7 @@
<el-table-column label="打卡人" align="center" width="200" prop="nickname" /> <el-table-column label="打卡人" align="center" width="200" prop="nickname" />
<el-table-column label="部门" align="center" prop="deptName" :show-overflow-tooltip="true"/> <el-table-column label="部门" align="center" prop="deptName" :show-overflow-tooltip="true"/>
<el-table-column label="岗位" align="center" prop="post" :show-overflow-tooltip="true"/> <el-table-column label="岗位" align="center" prop="post" :show-overflow-tooltip="true"/>
<el-table-column label="打卡类型" align="center" prop="type" :formatter="typeFormat" />
<el-table-column label="打卡时间" align="center" prop="clockTime" width="180"> <el-table-column label="打卡时间" align="center" prop="clockTime" width="180">
</el-table-column> </el-table-column>
...@@ -169,18 +180,23 @@ export default { ...@@ -169,18 +180,23 @@ export default {
userId: null, userId: null,
soudata: null, soudata: null,
begindata:'', begindata:'',
enddata:'' enddata:'',
type: null
}, },
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
} },
typeOptions: []
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getuserlist(); this.getuserlist();
this.getDicts("t_clock_type").then(response => {
this.typeOptions = response.data;
});
}, },
computed: { computed: {
...mapGetters(["systemSetting"]) ...mapGetters(["systemSetting"])
...@@ -193,6 +209,11 @@ export default { ...@@ -193,6 +209,11 @@ export default {
}) })
}, },
// 打卡类型字典翻译
typeFormat(row, column) {
return this.selectDictLabel(this.typeOptions, row.type);
},
/** 查询考勤打卡列表 */ /** 查询考勤打卡列表 */
getList() { getList() {
if(this.queryParams.soudata!=null){ if(this.queryParams.soudata!=null){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment