打卡记录 查看详情

master
382696293@qq.com 2 years ago
parent 321cfdeb1a
commit 4961816bf9

@ -5,6 +5,8 @@ import com.flossom.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.List;
/**
* wx_clock_log
*
@ -52,6 +54,8 @@ public class WxClockLog extends BaseEntity {
// 微信用户实体
private WxUserMember wxUserMember;
private List<WxClockImg> wxClockImgList;
public void setId(Long id) {
this.id = id;
}
@ -108,6 +112,14 @@ public class WxClockLog extends BaseEntity {
this.wxUserMember = wxUserMember;
}
public List<WxClockImg> getWxClockImgList() {
return wxClockImgList;
}
public void setWxClockImgList(List<WxClockImg> wxClockImgList) {
this.wxClockImgList = wxClockImgList;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -67,4 +67,6 @@ public interface WxClockLogMapper {
List<WxClockLogRet> selectWxClockImgRetList(WxClockLog queryClockLog);
List<WxMemberClockLog> selectMemberClockLogList(UserClockLogReq userClockLogReq);
List<WxClockLog> detail(UserClockLogReq userClockLogReq);
}

@ -36,6 +36,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="instrumentName" column="instrument_name" />
</resultMap>
<resultMap type="WxClockLog" id="WxClockImgLogResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="instrumentId" column="instrument_id" />
<result property="instrumentName" column="instrument_name" />
<result property="clockContent" column="clock_content" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<collection property="wxClockImgList" ofType="WxClockImg" >
<result property="id" column="img_id" />
<result property="userClockId" column="user_clock_id" />
<result property="clockImg" column="clock_img" />
</collection>
</resultMap>
<sql id="selectWxClockLogVo">
select id, user_id, instrument_id, instrument_name, clock_content, status, create_by, create_time, update_by, update_time from wx_clock_log
</sql>
@ -66,6 +84,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by create_time desc
</select>
<select id="detail" parameterType="WxClockLog" resultMap="WxClockImgLogResult">
SELECT
log.id, log.user_id, log.instrument_id, log.instrument_name, log.clock_content, log.status,
log.create_by, log.create_time, log.update_by, log.update_time, img.id as img_id,
img.user_clock_id as user_clock_id, img.clock_img as clock_img
FROM
wx_clock_log log
LEFT JOIN wx_clock_img img ON log.id = img.user_clock_id
<where>
<if test="userIdList != null "> and user_id = #{userIdList}</if>
<if test="clockDateRange != null and clockDateRange.size > 0">
and update_time &gt;= #{clockDateRange[0]}
</if>
<if test="clockDateRange != null and clockDateRange.size > 0">
and update_time &lt;= #{clockDateRange[1]}
</if>
</where>
order by update_time desc
</select>
<select id="selectWxClockLogById" parameterType="Long" resultMap="WxClockLogResult">
<include refid="selectWxClockLogVo"/>
where id = #{id}

@ -53,16 +53,14 @@ public class WxClockLogController extends BaseController {
}
/**
*
*
*/
// @RequiresPermissions("system:clockLog:export")
// @Log(title = "用户打卡", businessType = BusinessType.EXPORT)
// @PostMapping("/export")
// public void export(HttpServletResponse response, WxClockLog wxClockLog) {
// List<WxClockLog> list = wxClockLogService.selectWxClockLogList(wxClockLog);
// ExcelUtil<WxClockLog> util = new ExcelUtil<WxClockLog>(WxClockLog.class);
// util.exportExcel(response, list, "用户打卡数据");
// }
@RequiresPermissions("system:clockLog:list")
@GetMapping("/detail")
public TableDataInfo detail(UserClockLogReq userClockLogReq) {
List<WxClockLog> list = wxClockLogService.detail(userClockLogReq);
return getDataTable(list);
}
/**
*

@ -62,4 +62,6 @@ public interface IWxClockLogService {
* @return
*/
public int deleteWxClockLogById(Long id);
List<WxClockLog> detail(UserClockLogReq userClockLogReq);
}

@ -165,5 +165,10 @@ public class WxClockLogServiceImpl implements IWxClockLogService {
return wxClockLogMapper.deleteWxClockLogById(id);
}
@Override
public List<WxClockLog> detail(UserClockLogReq userClockLogReq) {
return wxClockLogMapper.detail(userClockLogReq);
}
}

@ -59,3 +59,12 @@ export function allDelMiniProgramTag(tagIdList, data) {
data: data
})
}
export function detail(query) {
return request({
url: '/system/clockLog/detail',
method: 'get',
params: query
})
}

@ -327,13 +327,45 @@
<el-button type="primary" @click="submitBatchOperate"> </el-button>
</div>
</el-dialog>
<!-- 查看用户积分列表 -->
<el-dialog title="打卡记录" :visible.sync="userClockLogVisible" width="90%" :before-close="cancelUserClockLogDialog">
<template>
<el-table :data="userClockLogQuery.userClockLogList" :stripe="true" style="width: 100%">
<el-table-column type="index" width="50" label="序号" />
<el-table-column prop="instrumentName" label="仪器名称" width="300px" />
<el-table-column prop="wxClockImgList" label="打卡图片" width="100" style="display: flex">
<template slot-scope="scope">
<div v-for="(val, index) in scope.row.wxClockImgList" :key="index">
<el-image :src="val.clockImg" style="width: 60px;height: 80px" :preview-src-list="[val.clockImg]">
<div slot="placeholder" class="image-slot"><span class="dot"></span>
</div>
</el-image>
</div>
</template>
</el-table-column>
<el-table-column prop="clockContent" label="打卡心得" width="300" />
<el-table-column prop="updateTime" label="打卡时间" width="200" />
</el-table>
</template>
<pagination
v-show="userClockLogQuery.total > 0"
:total="userClockLogQuery.total"
:page.sync="userClockLogQuery.pageNum"
:limit.sync="userClockLogQuery.pageSize"
@pagination="getClockLogDetail"
/>
</el-dialog>
</div>
</template>
<script>
import {
listClockLog, getClockLog, delClockLog, addClockLog, updateClockLog,
allAddMiniProgramTag, allDelMiniProgramTag
allAddMiniProgramTag, allDelMiniProgramTag, detail
} from "@/api/system/clockLog";
import {listInstrument} from "@/api/system/instrument";
import {
@ -417,7 +449,16 @@ export default {
memberRegisterDate: null,
instrumentName: null,
},
//
userClockLogVisible: false,
userClockLogQuery: {
total: 0,
pageNum: 1,
pageSize: 10,
userClockLogList: null,
userIdList: null,
clockDateRange: null,
},
//
form: {},
//
@ -559,8 +600,17 @@ export default {
this.queryParams.clockNumEnd = undefined;
},
viewClockDetail(row) {
console.log(row)
console.log(this.queryParams.clockDateRange)
this.userClockLogQuery.userIdList = row.userId;
this.userClockLogQuery.clockDateRange = this.queryParams.clockDateRange
this.getClockLogDetail();
//
this.userClockLogVisible = true;
},
getClockLogDetail() {
detail(this.userClockLogQuery).then(response => {
this.userClockLogQuery.total = response.total;
this.userClockLogQuery.userClockLogList = response.rows;
});
},
/** 批量操作按钮,显示批量操作弹窗 */
batchOperate() {
@ -770,8 +820,16 @@ export default {
this.exportFieldList.memberRegisterDate = null;
this.exportFieldList.instrumentName = null;
}
},
cancelUserClockLogDialog() {
this.userClockLogVisible = false
this.userClockLogQuery = {
total: 0,
pageNum: 1,
pageSize: 10,
userClockLogList: null,
}
},
}
};

Loading…
Cancel
Save