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

考勤打卡

parent 914db3ef
......@@ -30,6 +30,10 @@ public class TClockIn extends BaseEntity
@Excel(name = "打卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date clockTime;
/** 打卡类型 */
@Excel(name = "打卡类型",dictType = "t_clock_type")
private String type;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
......@@ -147,6 +151,14 @@ public class TClockIn extends BaseEntity
this.post = post;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="address" column="address" />
<result property="type" column="type" />
</resultMap>
<sql id="selectTClockInVo">
......@@ -18,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t.id,
t.user_id,
t.clock_time,
t.type,
t.longitude,
t.latitude,
t.address,
......@@ -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="begindata != null and begindata != ''"> and clock_time &gt; #{begindata} </if>
<if test="enddata != null and enddata != ''"> and clock_time &lt; #{enddata} </if>
<if test="type != null and type != ''"> and type = #{type}</if>
</where>
order by t.clock_time desc
</select>
......@@ -68,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="address != null">address,</if>
<if test="type != null">type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
......@@ -75,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="address != null">#{address},</if>
<if test="type != null">#{type},</if>
</trim>
</insert>
......@@ -86,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="address != null">address = #{address},</if>
<if test="type != null">type = #{type},</if>
</trim>
where id = #{id}
</update>
......
......@@ -33,6 +33,16 @@
<!--placeholder="选择打卡时间">-->
<!--</el-date-picker>-->
</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-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>
......@@ -92,6 +102,7 @@
<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="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>
......@@ -169,18 +180,23 @@ export default {
userId: null,
soudata: null,
begindata:'',
enddata:''
enddata:'',
type: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
},
typeOptions: []
};
},
created() {
this.getList();
this.getuserlist();
this.getDicts("t_clock_type").then(response => {
this.typeOptions = response.data;
});
},
computed: {
...mapGetters(["systemSetting"])
......@@ -193,6 +209,11 @@ export default {
})
},
// 打卡类型字典翻译
typeFormat(row, column) {
return this.selectDictLabel(this.typeOptions, row.type);
},
/** 查询考勤打卡列表 */
getList() {
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