临时提交,修复添加人员bug
diff --git a/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java b/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java
index e8bae7a..dc52c3b 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java
@@ -300,8 +300,8 @@
             } else {
                 return JsonResult.error("添加失败");
             }
-        } catch (WebCheckException ex) {
-            return JsonResult.error(ex.getMessage());
+        } catch (WebCheckException e) {
+            return JsonResult.ok(599, e.getMessage());
         } catch (Exception e) {
             e.printStackTrace();
             return JsonResult.error("系统处理异常").put("exception", e);
diff --git a/src/main/java/com/supwisdom/dlpay/conference/service/impl/ConferenceServiceImpl.java b/src/main/java/com/supwisdom/dlpay/conference/service/impl/ConferenceServiceImpl.java
index 6cf7e52..a2ce07f 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/service/impl/ConferenceServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/service/impl/ConferenceServiceImpl.java
@@ -363,18 +363,49 @@
 
     @Override
     public boolean saveConferencePeople(Integer confid, List<String> cardnos) throws Exception {
+        List<String> successCardnos = new ArrayList<>(0);
+        List<String> errmsgList = new ArrayList<>(0);
+
         for (String card :cardnos) {
+            String msg = "";
             TCustomerInfo customer=new TCustomerInfo();
             List<TCustomerInfo> customerlist = webInterfaceService.getAllTCustomerList(null,card,null);
+
             if(customerlist.size()>0){
                 customer=customerlist.get(0);
             }else{
-                throw new WebCheckException("客户[" + card + "]不存在");
+                msg+=",对应用户不存在";
             }
-            String atttype=ConferenceConstant.ATTTYPE_SELF;
-            String custid=customer.getCustid();
-            saveNewConfPeople(confid,customer.getCardno(),customer.getCustname(),atttype,custid);
+            TConference conference=conferenceDao.findByConfid(confid);
+            if(null==conference){
+                msg+=",会议不存在";
+            }
+
+            String errconfname=checkConfTimeError(conference.getAttendtime(),conference.getEndtime(),conference.getConfdate(),card);
+            if(!StringUtil.isEmpty(errconfname)){
+                msg += ",市民卡号[" + card + "]在会议:"+errconfname+"中已存在!";
+            }
+            if (!StringUtil.isEmpty(msg)) {
+                errmsgList.add(",市民卡号[" + card + "]错误" + msg);
+            } else{
+                String atttype=ConferenceConstant.ATTTYPE_SELF;
+                String custid=customer.getCustid();
+                saveNewConfPeople(confid,customer.getCardno(),customer.getCustname(),atttype,custid);
+            }
+
+
         }
+        if (!StringUtil.isEmpty(errmsgList)) {
+            StringBuffer errmsg = new StringBuffer("添加失败,名单存在错误!");
+            for (int j = 0; j < errmsgList.size(); j++) {
+                errmsg.append("<br/>" + errmsgList.get(j));
+                if (j > 10) {
+                    errmsg.append("<br/>错误太多,请重新上传!");
+                }
+            }
+            throw new WebCheckException(errmsg.toString());
+        }
+
         return true;
     }
 
diff --git a/src/main/resources/templates/apph5/tempattend.html b/src/main/resources/templates/apph5/tempattend.html
index 7ec81d9..52f1fbd 100644
--- a/src/main/resources/templates/apph5/tempattend.html
+++ b/src/main/resources/templates/apph5/tempattend.html
@@ -1,171 +1,193 @@
-<div id="confpeoplebind-form" lay-filter="confpeoplebind-filter" class="layui-form model-form"
-     style="padding: 30px 25px 10px 25px;">
-    <input type="hidden" id="confpeoplebind-confid" th:value="${detailConfid}" />
-    <div class="layui-form-item">
-        <div class="layui-input-inline" style="width: 450px;">
-            <label class="layui-form-label">会议:</label>
-            <div class="layui-input-block">
-                <label class="layui-form-label" th:text="${confName}"></label>
-            </div>
-        </div>
-    </div>
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
 
-    <div class="layui-form-item">
-        <label class="layui-form-label">人员:</label>
-        <div class="layui-input-block" style="border: 1px solid #ddd;border-radius: 4px;padding: 10px;">
-            <div class="layui-card-body">
-                <div class="layui-form toolbar">
-                    <div class="layui-input-inline">
-                        <input id="search-confpeoplebind-form-deptcode" type="text"
-                               lay-filter="search-confpeoplebind-form-deptcode-filter" autocomplete="off"
-                               class="layui-input"  />
+<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}"/>
+
+    <!--<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">
+    <el-dialog :title="confName"  center="true" top="10%" size="tiny" :modal-append-to-body='false' >
+        <el-form ref="tempform" :model="tempform" :rules="rules" size="mini" label-width="36%">
+            <el-form-item label="客户名称:" prop="custname">
+                <div class="el-col el-col-18">
+                    <div class="el-input" style="width: 187px;">
+                        <el-input v-model="d.custname">
+                        </el-input>
                     </div>
-                    姓名:
-                    <input id="search-confpeoplebind-form-searchkey" type="text" class="layui-input search-input"
-                           maxlength="20" style="width: 200px;" placeholder="输入人员姓名"/>&emsp;
-                    <button id="btn-search-confpeoplebind-form" class="layui-btn icon-btn"><i
-                            class="layui-icon">&#xe615;</i>搜索
-                    </button>
-                    <button id="btn-reset-confpeoplebind-form" class="layui-btn layui-btn-primary"><i
-                            class="layui-icon"></i>清空
-                    </button>
-
-                    <table class="layui-table" id="confpeoplebind-form-table"
-                           lay-filter="confpeoplebind-form-table-filter"></table>
                 </div>
-            </div>
-        </div>
-    </div>
+            </el-form-item>
+            <el-form-item label="所属部门:" prop="deptname">
+                <div class="el-col el-col-18">
+                    <div class="el-input" style="width: 187px;">
+                        <el-input v-model="d.deptname">
+                        </el-input>
+                    </div>
+                </div>
+            </el-form-item>
+            <el-form-item label="客户名称:" prop="custname">
+                <div class="el-col el-col-18">
+                    <div class="el-input" style="width: 187px;">
+                        <el-input v-model="d.custname">
+                        </el-input>
+                    </div>
+                </div>
+            </el-form-item>
 
-    <div class="layui-form-item model-form-footer">
-        <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
-        <button class="layui-btn" lay-filter="confpeoplebind-form-submit" lay-submit id="submitbtn">保存</button>
-    </div>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="saveDev('devUpform')">登 记</el-button>
+        </div>
+    </el-dialog>
+
+
 </div>
 
-<style type="text/css" id="confpeoplebind-form-css">
-    .layui-form-item .layui-form-checkbox[lay-skin=primary] {
-        margin-top: 0;
-    }
-</style>
+</body>
 
 <script>
-    layui.use(['layer', 'table', 'admin', 'form', 'treeSelect'], function () {
-        var layer = layui.layer;
-        var admin = layui.admin;
-        var form = layui.form;
-        var table = layui.table;
-        var treeSelect = layui.treeSelect;
-        var $ = layui.$
+    var app_vue = new Vue({
+        el: '#app',
+        data: {
+            devNameList: [],
+            devIdList: [],
+            selectDevName: '',
+            selectDevId: '',
+            // 图片父容器高度
+            bannerHeight: 1000,
+            // 浏览器宽度
+            screenWidth: 0,
+            userId: ''
+        },
 
-        form.render("select");
-        treeSelect.render({
-            elem: '#search-confpeoplebind-form-deptcode',
-            data: '[[@{/customer/depttree}]]',
-            type: 'get',
-            placeholder: '选择部门',
-            search: false,
-            style: {
-                folder: {
-                    enable: false
-                },
-                line: {
-                    enable: true
-                },
+        methods: {
+            indexChange: function (pre, next) {
+                var _self = this;
+                var devIdListTmp = _self.devIdList;
+                _self.selectDevId = devIdListTmp[pre];
+                // console.log(_self.selectDevId)
 
             },
-            // 点击回调
-            click: function (d) {
-                var treeNode = d.current;
-                console.log(treeNode);
-                return true;
+            openDoor: function () {
+                var devId = app_vue.selectDevId;
+                app_openDoor(devId);
             },
-            success: function (d) {
-                console.log(d); // 加载完成后的回调函数
-            }
-        });
+            setSize: function () {
+                // 通过浏览器宽度(图片宽度)计算高度
+                this.bannerHeight = this.screenWidth;
+            },
+        },
+        created: function () {
+            var _self = this;
+            // 首次加载时,需要调用一次
+            _self.screenWidth = window.innerWidth;
+            _self.setSize();
 
-        // 渲染表格
-        table.render({
-            elem: '#confpeoplebind-form-table',
-            url: '[[@{/conference/listpeopleforimport}]]',
-            size: 'sm',
-            height: 350,
-            page: false,
-            cols: [
-                [
-                    {type: 'checkbox', style: "#confpeoplebind-form-css", fixed: 'left'},
-                    {field: 'custname', title: '姓名', align: 'center'},
-                    {field: 'cardno', title: '卡号', align: 'center'},
-                    {field: 'deptname', title: '部门', align: 'center'}
-                ]
-            ]
-        });
+            var userId = '[[${userId}]]';
+            _self.userId = userId;
 
-        // 搜索按钮点击事件
-        $('#btn-search-confpeoplebind-form').click(function () {
-            var deptcode = $("#search-confpeoplebind-form-deptcode").val();
-            var custname = $("#search-confpeoplebind-form-searchkey").val();
-            table.reload('confpeoplebind-form-table', {
-                where: {
-                    deptcode: deptcode,
-                    custname: custname
-                }
-            });
-        });
-
-        $("#btn-reset-confpeoplebind-form").click(function () {
-            $("#search-confpeoplebind-form-deptcode").val("");
-            $("#search-confpeoplebind-form-searchkey").val("");
-            treeSelect.revokeNode('search-confpeoplebind-form-deptcode-filter');
-        });
-
-        form.on('submit(confpeoplebind-form-submit)', function (el) {
-            var confid = $("#confpeoplebind-confid").val();
-            var checkStatus = table.checkStatus('confpeoplebind-form-table');
-            var data = checkStatus.data;
-            var cardnos = [];
-
-            for (var i = 0; i < data.length; i++) {
-                cardnos.push(data[i].cardno);
-            }
-            if (cardnos.length < 1) {
-                layer.msg("请选择用户", {icon: 2, time: 1500});
-                return;
-            }
-            debugger
-            console.log(confid, cardnos);
-            layer.load(2);
-            var token = $("meta[name='_csrf_token']").attr("value");
             $.ajax({
-                type: "POST",
+                type: "get",
                 dataType: "json",
-                url: '[[@{/conference/addconfpeople}]]',
-                data: {
-                    "confid": confid,
-                    "cardnos[]": cardnos,
-                    "_csrf": token
-                },
-                success: function (result) {
-                    layer.closeAll('loading');
-                    if (result.code == 200) {
-                        layer.msg(result.msg, {icon: 1});
-                        table.reload('confpeoplebind-form-table'); //刷新表格
-                        admin.finishPopupCenter();
-                    } else if (result.code == 401) {
-                        layer.msg(result.msg, {icon: 2, time: 1500}, function () {
-                            location.replace('[[@{/login}]]');
-                        }, 1000);
-                        return;
-                    } else {
-                        console.log('err:' + result.code);
-                        layer.msg(result.msg, {icon: 2});
+                url: "[[@{/app/loadAppDevList?userId=}]]" + userId,
+                success: function (ret) {
+                    var ut = ret.devList;
+                    if (ut == null) {
+                        confirm("不具有开门权限");
                     }
-                },
-                error: function (err) {
-                    admin.errorBack(err);
+                    var names = [];
+                    var ids = [];
+                    for (var i = 0; i < ut.length; i++) {
+                        names.push(ut[i].devname);
+                        ids.push(ut[i].deviceid);
+                    }
+                    _self.devNameList = names;
+                    _self.devIdList = ids;
+
                 }
-            });
+            })
+        }
+
+    })
+
+    function app_openDoor(devId) {
+        var userId = app_vue.userId;
+        console.log(userId);
+        layer.confirm('你确定要开启此门吗?', {icon: 3, title: '请确认', offset: '30%'}, function (index) {
+            $.ajax({
+                type: "get",
+                dataType: "json",
+                url: encodeURI("[[@{/app/openDoorById?devId=}]]" + devId + "&userId=" + userId),
+                success: function (ret) {
+                    if (ret.message == undefined) {
+                        layer.msg('用户认证已过期,请重新登录', {icon: 2, time: 1000});
+                        window.location = "[[@{/login}]]";
+                        return;
+                    }
+                    if (ret.message != "") {
+                        layer.msg(ret.message, {icon: 2, time: 2000});
+                    } else {
+                        layer.msg('开门成功', {icon: 1, time: 2000});
+                    }
+                }
+            })
         });
-    });
-</script>
\ No newline at end of file
+
+    }
+
+    // 窗口大小发生改变时,调用一次
+    window.onresize = function () {
+        app_vue.screenWidth = window.innerWidth;
+        app_vue.setSize();
+    }
+
+
+</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
diff --git a/src/main/resources/templates/conference/conflist.html b/src/main/resources/templates/conference/conflist.html
index 877af44..202e880 100644
--- a/src/main/resources/templates/conference/conflist.html
+++ b/src/main/resources/templates/conference/conflist.html
@@ -36,8 +36,6 @@
    <!-- <a class="layui-btn layui-btn layui-btn-xs" lay-event="detail">查看明细</a>-->
     {{# } else if(d.status=='unstart'&&d.conftype=='nolist'){ }}
     <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
-    {{# } else if(d.status!='unstart'&&d.conftype=='list'){ }}
-    <a class="layui-btn layui-btn layui-btn-xs" lay-event="people">分配人员</a>
    <!-- <a class="layui-btn layui-btn layui-btn-xs" lay-event="detail">查看明细</a>-->
     {{# } }}
 
diff --git a/src/main/resources/templates/conference/confpeoplebind.html b/src/main/resources/templates/conference/confpeoplebind.html
index 5d04bca..e557fb8 100644
--- a/src/main/resources/templates/conference/confpeoplebind.html
+++ b/src/main/resources/templates/conference/confpeoplebind.html
@@ -157,7 +157,17 @@
                             location.replace('[[@{/login}]]');
                         }, 1000);
                         return;
-                    } else {
+                    } else if (result.code == 599) {
+                        //自定义错误
+                        layer.open({
+                            type: 0,
+                            title: "错误信息",
+                            icon: 2,
+                            area: ['600px', '400px'],
+                            content: result.msg
+                        });
+
+                    }else {
                         console.log('err:' + result.code);
                         layer.msg(result.msg, {icon: 2});
                     }