大理 考勤
diff --git a/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java b/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java
index ac936d7..af075db 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java
@@ -13,6 +13,8 @@
import com.supwisdom.dlpay.framework.util.DateUtil;
import com.supwisdom.dlpay.framework.util.PageResult;
import com.supwisdom.dlpay.framework.util.StringUtil;
+import com.supwisdom.dlpay.mainservice.dao.CardDao;
+import com.supwisdom.dlpay.mainservice.domain.TCard;
import com.supwisdom.dlpay.mainservice.domain.TCustomer;
import com.supwisdom.dlpay.mainservice.service.WebInterfaceService;
import com.supwisdom.dlpay.system.domain.TCustType;
@@ -43,6 +45,10 @@
private AtteClassService atteClassService;
@Autowired
private AtteReportService atteReportService;
+ @Autowired
+ private CardDao cardDao;
+
+
/**
* 菜单
* @param
@@ -181,8 +187,10 @@
}else {
searchBean.setDeptcode(cust.getDeptcode());
}
- Pagination page=atteRestService.getRestInfo(searchBean,pageNo,pageSize);
-
+ Pagination page=null;
+ if(atteRestService.isreview(custid)){
+ page=atteRestService.getRestInfo(searchBean,pageNo,pageSize);
+ }
map.put("page",page);
return map;
}
@@ -371,8 +379,10 @@
}else {
searchBean.setDeptcode(cust.getDeptcode());
}
- Pagination page=atteRestService.getClockPage(searchBean,pageNo,pageSize);
- map.put("page",page);
+ if(atteRestService.isreview(custid)){
+ Pagination page=atteRestService.getClockPage(searchBean,pageNo,pageSize);
+ map.put("page",page);
+ }
return map;
}
@@ -433,4 +443,50 @@
return "1";
}
+ /**
+ * 门禁流水
+ * @param model
+ * @return
+ */
+
+ @RequestMapping("/doordtl")
+ public String doordtl(@RequestParam(value = "custid") String custid, Model model){
+ model.addAttribute("custid",custid);
+ return "apph5/doordtl";
+ }
+
+ /**
+ * 门禁流水
+ */
+ @RequestMapping(value = "/getdoordtllist")
+ @ResponseBody
+ public Map reviewclock(
+ @RequestParam("custid") String custid,
+ @RequestParam("pageNo") Integer pageNo,
+ HttpServletRequest request){
+ Map map=new HashMap();
+
+ try {
+ if(custid==null || pageNo==null){
+ map.put("errStr","参数错误");
+ return map;
+ }
+ TCard card=cardDao.findCardByCustid(custid);
+ Pagination page=new Pagination();
+ if(card!=null){
+ page = webInterfaceService.findSystemTDoordtl("","","","",card.getCardno(),"","","","all",pageNo,10,"");
+ }
+ map.put("page",page);
+
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ map.put("errStr",e.getMessage());
+ }
+
+ return map;
+
+ }
+
+
}
diff --git a/src/main/resources/templates/apph5/doordtl.html b/src/main/resources/templates/apph5/doordtl.html
new file mode 100644
index 0000000..c1faf1c
--- /dev/null
+++ b/src/main/resources/templates/apph5/doordtl.html
@@ -0,0 +1,292 @@
+
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
+
+<head>
+ <title>首页</title>
+ <!--<meta name="_csrf_header" th:content="${_csrf.headerName}" />
+ <meta name="_csrf_token" th:content="${_csrf.parameterName}" th:value="${_csrf.token}" />-->
+ <meta charset="utf-8"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <link rel="stylesheet" href="/static/libs/layui/css/layui.css" th:href="@{/static/libs/layui/css/layui.css}"/>
+
+ <link rel="stylesheet" href="/static/res/assets/plugins/element-ui/theme-default/index.css"
+ th:href="@{/static/res/assets/plugins/element-ui/theme-default/index.css}"/>
+ <link rel="stylesheet" href="/static/res/assets/css/wxpage.css"
+ th:href="@{/static/res/assets/css/wxpage.css}"/>
+ <!--<script type="text/javascript" th:src="@{/static/libs/jquery/jquery-3.2.1.min.js}"></script>-->
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.min.js}"></script>
+ <!--<script type="text/javascript" th:src="@{/static/libs/layui/layui.js}"></script>-->
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.form.js}"></script>
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/layer/layer.js}"></script>
+ <script type="text/javascript" th:src="@{/static/res/assets/js/vue.min.js}"></script>
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/element-ui/index.js}"></script>
+
+
+</head>
+
+<body>
+
+<div id="app">
+
+ <div class="row">
+ <div class="col-md-12" style="padding-left: 0px;padding-right: 0px">
+ <div class="box box-primary" style="margin-bottom: 15px">
+ <div class="box-body box-profile">
+ <template>
+ <el-table
+ ref="singleTable"
+ :data="tableData"
+ highlight-current-row
+ @current-change="currRowChange"
+ stripe
+ border>
+ <el-table-column
+ prop="custid"
+ align="center"
+ v-show="false">
+ <template scope="scope">
+ <div class="weui-panel__bd">
+ <div class="weui-media-box weui-media-box_text">
+ <h4 class="weui-media-box__title" style="display: flex">
+ <div style="flex: 1">{{scope.row.devname}}</div>
+ <div>{{scope.row.dtldesc}}</div>
+ </h4>
+ <p class="weui-media-box__desc">
+ <div class="weui-cell__bd">
+ <span style="font-size:14px;color:#999; "></span>
+ </div>
+ <div style="display: flex;">
+
+ <div style="font-size:14px;color:#999;flex: 1">
+
+ {{scope.row.transdate}}
+
+ </div>
+
+
+ </div>
+ </p>
+ </div>
+ </div>
+
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <el-input v-if="dialogFormVisible" id="addmore" type="button" value="加载更多" @click.native="addmore" ></el-input>
+
+ <div class="clearfix"></div>
+
+
+ </template>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</div>
+
+
+</body>
+
+<script>
+
+
+ var app_vue = new Vue({
+ el: '#app',
+ data: {
+ tableData: [],
+ confName: '1234',
+ currPage: 1,
+ pageSize: 20,
+ totSize: 0,
+ currentRow: null,
+ tempform: {
+ custid:''
+ },
+ historyform: {
+ custid: '',
+ custname: '',
+ startdate: '',
+ enddate: '',
+ remark: '',
+ rtype: '',
+ status: '',
+ custtype: '',
+ id: ''
+ },
+ sexlist: [],
+ rtypelist: [],
+ custtypelist: [],
+ statuslist: [],
+ bannerHeight: 1000,
+ screenWidth: 0,
+ userId: '',
+ dialogFormVisible: false,
+ updatetitle: '筛选',
+ updatetitle2: '详情',
+ rules: {
+
+ },
+ },
+
+ methods: {
+
+
+
+ closediv: function () {
+ this.dialogFormVisible = false;
+ },
+ currRowChange: function (val) {
+ this.currentRow = val;
+ },
+ indexChange: function (pre, next) {
+ var _self = this;
+ var devIdListTmp = _self.devIdList;
+ _self.selectDevId = devIdListTmp[pre];
+ // console.log(_self.selectDevId)
+
+ },
+ setSize: function () {
+ // 通过浏览器宽度(图片宽度)计算高度
+ this.bannerHeight = this.screenWidth;
+ }, handleSizeChange: function (val) {
+ this.pageSize = val;
+ commonQuery(this, this.tempform.custid, this.currPage, this.pageSize);
+ //console.log('每页条'+val);
+ }, currPageChange: function (val) {
+ this.currPage = val;
+ commonQuery(this, this.tempform.custid, this.currPage, this.pageSize);
+ //console.log('当前页:'+val);
+ },
+ addmore:function() {
+ this.currPage=this.currPage+1;
+ commonQuery(this, this.tempform.custid, this.currPage, this.pageSize);
+ }
+
+
+ },
+ created: function () {
+ var _self = this;
+ // 首次加载时,需要调用一次
+ _self.screenWidth = window.innerWidth;
+ _self.setSize();
+ var confid = '[[${custid}]]';
+ console.log(confid);
+ _self.tempform.custid = confid;
+
+ this.pagesize = 10;
+ this.currPage = 1;
+ commonQuery(this, this.tempform.custid, this.currPage, this.pageSize);
+
+
+ }
+ })
+
+ // 窗口大小发生改变时,调用一次
+ window.onresize = function () {
+ app_vue.screenWidth = window.innerWidth;
+ app_vue.setSize();
+ }
+
+ function showsearchform() {
+ $("#sear").show();
+ }
+
+ function closesearchform() {
+ $("#sear").hide();
+ }
+
+
+
+ function commonQuery(_self,custid, pageno, pagesize) {
+ $.ajax({
+ type: "get",
+ dataType: "json",
+ url: "[[@{/app/getdoordtllist?}]]" + "custid=" + custid + "&pageNo=" + pageno ,
+ success: function (info) {
+ console.log(info)
+
+ _self.totSize = info.page.totalCount;
+ var list=info.page.list;
+ for(var i=0;i<list.length;i++){
+ var date=list[i].transdate;
+ if (date == undefined||date.startsWith("n")) {
+ return "";
+ }
+ var year =date.substring(0,4);
+ var month=date.substring(4,6);
+ var day=date.substring(6,8);
+ var hour=date.substring(8,10);
+ var min=date.substring(10,12);
+ var sec=date.substring(12,14);
+ list[i].transdate= year+"-"+month+"-"+day+" "+hour+":"+min+":"+sec;
+ _self.tableData.push(list[i]);
+ }
+ if(list.length<10){
+ _self.dialogFormVisible=false;
+ }else {
+ _self.dialogFormVisible=true;
+ }
+ }
+ })
+ }
+
+ function reviewupdate(_self, status, id) {
+ $.ajax({
+ type: "get",
+ dataType: "json",
+ url: "[[@{/app/atte/cancelRest?id=}]]" + id + "&status=" + status,
+ success: function (info) {
+ console.log(info)
+ if (info.errStr != "") {
+ layer.msg(info.errStr, {icon: 2, time: 2000});
+ } else {
+ layer.msg('修改成功!', {icon: 1, time: 1000});
+ }
+ commonQuery(_self, _self.tempform.custid, _self.currPage, _self.pageSize);
+ }
+ })
+ }
+
+ function isCellPhone(val) {
+ if (!/^1(3|4|5|6|7|8)\d{9}$/.test(val)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+
+</script>
+
+<style>
+
+ .el-carousel__item h3 {
+ color: #ff3366;
+ font-size: 14px;
+ opacity: 0.75;
+ line-height: 300px;
+ margin: 0;
+ /*background-color:#66cccc;
+ border: 0px solid #e5e5e5;
+ width: 50%;
+ left: 10%;
+ height: 100%;*/
+ }
+
+ .el-carousel__item:nth-child(2n) {
+ background-color: #ffffff;
+ }
+
+ .el-carousel__item:nth-child(2n+1) {
+ background-color: #ffffff;
+ }
+
+ .el-carousel__item .Carousel {
+ border-bottom: 1px solid #f1f4f8;
+ }
+</style>
\ No newline at end of file