dyy 3 лет назад
Родитель
Сommit
5e9b6c1cec
24 измененных файлов: 2787 добавлений и 312 удалений
  1. +4
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js
  2. +241
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/VisitorInfoController.cs
  3. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.cshtml
  4. +98
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.js
  5. +286
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd.cshtml
  6. +330
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd2.cshtml
  7. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.cshtml
  8. +191
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.js
  9. +354
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/fromAdd.css
  10. +380
    -290
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/fromAdd.css
  11. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/laydate/theme/laydate.css
  12. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/layui/css/code.css
  13. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
  14. +10
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  15. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml
  16. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  17. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/VisitorInfoMap.cs
  18. +25
    -13
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
  19. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs
  20. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  21. +238
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoBLL.cs
  22. +82
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoEntity.cs
  23. +72
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoIBLL.cs
  24. +330
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoService.cs

+ 4
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js Просмотреть файл

@@ -71,7 +71,7 @@ var bootstrap = function ($, learun) {
headData: [
{
label: "开关名称", name: "type", width: 150, align: "left",
formatter: function (val) {
formatter: function(val) {
if (val == 'js') {
return '教师注册开关';
} else if (val == 'fx') {
@@ -80,10 +80,12 @@ var bootstrap = function ($, learun) {
return '网上办事大厅开关';
} else if (val == 'wxloginforpc') {
return '微信快捷登录PC端';
} else if (val == 'fk') {
return '访客注册开关';
}

}
},
},
{
label: "功能开启", name: "status", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 241
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/VisitorInfoController.cs Просмотреть файл

@@ -0,0 +1,241 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System.Web.Mvc;
using System.Collections.Generic;
using Quanjiang.DigitalScholl.SendSms;
using System;
using Learun.Cache.Redis;

namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-17 10:11
/// 描 述:访客管理
/// </summary>
public class VisitorInfoController : MvcControllerBase
{
private VisitorInfoIBLL visitorInfoIBLL = new VisitorInfoBLL();
CacheByRedis _redis = new CacheByRedis();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormAdd()
{
return View();
}

#endregion

#region 获取数据
/// <summary>
/// 生成验证码
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult VerifyCode()
{
return File(new VerifyCode().GetVerifyCode(), @"image/Gif");
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = visitorInfoIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var VisitorInfoData = visitorInfoIBLL.GetVisitorInfoEntity(keyValue);
var jsonData = new
{
VisitorInfo = VisitorInfoData,
};
return Success(jsonData);
}
#endregion

#region 提交数据
/// <summary>
/// 验证图片验证码
/// </summary>
/// <param name="verifycode">验证码</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult CheckVerifycode(string verifycode)
{
verifycode = Md5Helper.Encrypt(verifycode.ToLower(), 16);
if (Session["session_verifycode"].IsEmpty() || verifycode != Session["session_verifycode"].ToString())
{
return Fail("验证码错误");
}
return Success("");
}

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
visitorInfoIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <param name="verifycode">图片验证码</param>
/// <param name="phonecode">手机验证码</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity, string verifycode, string phonecode)
{
VisitorInfoEntity entity = strEntity.ToObject<VisitorInfoEntity>();
var VisitorInfoData = visitorInfoIBLL.GetEntityByPhone(entity.VPhone);
if (string.IsNullOrEmpty(keyValue) && VisitorInfoData != null)
return Fail("手机号已存在!");
else if (!string.IsNullOrEmpty(keyValue) && VisitorInfoData.VID != keyValue)
return Fail("手机号已存在!");

//验证图片验证码
verifycode = Md5Helper.Encrypt(verifycode.ToLower(), 16);
if (Session["session_verifycode"].IsEmpty() || verifycode != Session["session_verifycode"].ToString())
{
return Fail("验证码错误");
}
//验证手机验证码
var type = (SmsType)Enum.Parse(typeof(SmsType), "0");
var smscode = _redis.Read<string>($"checkcode_{type}_{entity.VPhone}");
if (!string.IsNullOrEmpty(smscode))
{
if (smscode != phonecode)
{
return Fail("手机验证码不正确,请核对!");
}
}

entity.VState = 0;
entity.VApplyTime = DateTime.Now;
visitorInfoIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}

/// <summary>
/// 审核
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Check(string keyValue)
{
var keyValueArr = keyValue.Split(',');
var keyValues = "'" + string.Join("','", keyValueArr) + "'";
visitorInfoIBLL.Check(keyValues);

return Success("审核成功!");
}

/// <summary>
/// 取消审核
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UnCheck(string keyValue)
{
var keyValueArr = keyValue.Split(',');
var keyValues = "'" + string.Join("','", keyValueArr) + "'";
visitorInfoIBLL.UnCheck(keyValues);
return Success("取消审核成功!");
}


/// <summary>
/// 全部审核
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult CheckAll()
{
visitorInfoIBLL.CheckAll();
return Success("全部审核成功!");
}

/// <summary>
/// 生成帐号
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Generate()
{
visitorInfoIBLL.GenerateAccout();
return Success("生成成功!");
}
#endregion

}
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.cshtml Просмотреть файл

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "访客管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="VisitorInfo">
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div>
<input id="VName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="VisitorInfo">
<div class="lr-form-item-title">手机号<font face="宋体">*</font></div>
<input id="VPhone" type="text" class="form-control" isvalid="yes" checkexpession="Mobile" />
</div>
<div class="col-xs-12 lr-form-item" data-table="VisitorInfo">
<div class="lr-form-item-title">申请理由</div>
<input id="VReasons" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="VisitorInfo">
<div class="lr-form-item-title">来访目的</div>
<input id="VObjective" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="VisitorInfo">
<div class="lr-form-item-title">备注</div>
<textarea id="VRemarks" class="form-control" style="height:100px;"></textarea>
</div>
<input id="errornum" type="hidden" value="@ViewBag.errornum" />
<div class="col-xs-12 lr-form-item codeInput">
<div class="lr-form-item-title">验证码</div>
<input type="code" placeholder="验证码" id="verifycode" name="code" maxlength="4" class="form-control required" style="width:60%" />
<div class="variCode" style="margin: -25px 300px 0 300px;"><img class="code" id="lr_verifycode_img" src="~/VisitorInfo/VerifyCode" alt="点击切换验证码" title="点击切换验证码" /></div>
@*<img src="~/Content/images/LoginPage/variCode.png" alt="" style="margin: -70px 300px 0 390px;" />~/PersonnelManagement/VisitorInfo/VerifyCode*@
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">手机验证码</div>
<input type="code" placeholder="验证码" id="phonecode" name="phonecode" class="form-control required" style="width:60%" />
<button id="getPhoneCode" style="margin-left: 300px;">获取手机验证码</button>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/VisitorInfo/Form.js")

+ 98
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.js Просмотреть файл

@@ -0,0 +1,98 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-05-17 10:11
* 描 述:访客管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
// 点击切换验证码
$("#lr_verifycode_img").click(function () {
$("#verifycode").val('');
$("#lr_verifycode_img").attr("src", top.$.rootUrl + "/PersonnelManagement/VisitorInfo/VerifyCode?time=" + Math.random());
});
var errornum = $('#errornum').val();
if (errornum >= 3) {

$(".codeInput").show();
$("#lr_verifycode_img").trigger('click');
};

//图片验证码
$("#verifycode").blur(function () {
var postData = {
verifycode: $('#verifycode').val()
};
//失去焦点时判断验证码是否正确
$.lrPostForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/CheckVerifycode', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
});
//获取手机验证码
$("#getPhoneCode").on('click', function () {
$.ajax({
url: $.rootUrl + "/Login/GetCheckCode",
//headers: { __RequestVerificationToken: $.lrToken },
data: { mobile: $('#VPhone').val(), smsType: 0 },
type: "post",
dataType: "json",
success: function (res) {

}
});
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var verifycode = $.trim($("#verifycode").val());
if ($("#verifycode").is(":visible") && verifycode == "") {
learun.alert.warning('请输入验证码!');
$verifycode.focus();
return false;
}

var postData = {
strEntity: JSON.stringify($('body').lrGetFormData()),
verifycode: verifycode,
phonecode: $('#phonecode').val()
};
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 286
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd.cshtml Просмотреть файл

@@ -0,0 +1,286 @@
@{
ViewBag.Title = "FormAdd";
Layout = null;
}

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no" />
<link rel="shortcut icon" href="" />
<title>数字化校园-访客注册</title>
<meta name="keywords" content="数字化校园-访客注册" />
<meta name="description" content="数字化校园-访客注册" />
<link href="~/Content/css/font-awesome.css" rel="stylesheet" />
<link href="~/Content/css/common.css" rel="stylesheet" />
<link href="~/Content/layui/css/layui.css" rel="stylesheet" media="all" />
<link href="~/Content/css/fromAdd.css" rel="stylesheet" />


<link href="~/Content/laydate/theme/laydate.css" rel="stylesheet" />
<link href="~/Content/layui/css/modules/layer/default/layer.css" rel="stylesheet" />
<link href="~/Content/layui/css/code.css" rel="stylesheet" />


</head>
<body>

<div class="header">
<div class="fromSec">
<a href="#">数字化智慧校园</a> <span class="headerLine">|</span> <span>访客信息注册</span>
</div>
</div>
<div class="warpper" id="app">
<!-- / index_sec5 -->
<div class="chickForm_sec">
<div class="fromSec">
<div class="chickT">注册</div>
<form class="layui-form" action="">
<!-- / chickForm_sec1 -->
<div class="chickForm_sec1">
<div class="chickInput">
<span class="chickInputLable"><span>*</span> 姓名</span>
<input type="text" id="VName" name="VName" lay-verify="required" placeholder="请输入姓名" class="layui-input">
</div>

<div class="chickInput">
<span class="chickInputLable"><span>*</span> 手机号</span>
<input id="VPhone" type="text" name="VPhone" lay-verify="required" placeholder="请输入手机号" class="layui-input">

</div>
<div class="chickInput">
<span class="chickInputLable"> 申请理由</span>
<input id="VReasons" type="text" name="VReasons" placeholder="请输入申请理由" class="layui-input">

</div>
<div class="chickInput">
<span class="chickInputLable">来访目的</span>
<input id="VObjective" type="text" name="VObjective" placeholder="请输入来访目的" class="layui-input">

</div>
<div class="chickInput">
<span class="chickInputLable">备注</span>
<textarea id="VRemarks" class="layui-input" style="height:100px;width: 80%"></textarea>
@*<input id="VPhone" type="text" name="VPhone" lay-verify="required" placeholder="请输入姓名" class="layui-input">*@

</div>
<div class="chickInput yz">
<p>
<span class="chickInputLable"><span>*</span> 图形验证</span>
<input id="verifycode" type="text" name="verifycode" style="width: 50%" lay-verify="required" placeholder="请输入验证码" class="layui-input">
</p>

<div class="variCode">
<img id="lr_verifycode_img" src="~/PersonnelManagement/VisitorInfo/VerifyCode" alt="点击切换验证码" title="点击切换验证码" />
</div>
</div>
<div class="chickInput yz">
<p>
<span class="chickInputLable"><span>*</span> 短信验证</span>
<input id="phonecode" type="text" name="phonecode" lay-verify="required" placeholder="请输入短信验证码" class="layui-input" style="width: 50%">
</p>
<div class="variCode">
<input type="button" id="btnCode" value="获取验证码" onclick="GetCode(this)" />
</div>
</div>
@*<div class="chickInput codeInput">
<span class="chickInputLable">图片验证码</span>
<input type="code" placeholder="验证码" id="verifycode" name="code" lay-verify="required" style="width:50%" />
<img class="code" id="lr_verifycode_img" src="~/PersonnelManagement/VisitorInfo/VerifyCode" alt="点击切换验证码" title="点击切换验证码" />
<div class="variCode"></div>
<img src="~/Content/images/LoginPage/variCode.png" alt="" />
</div>
<div class="col-xs-12 lr-form-item">
<span class="chickInputLable">手机验证码</span>
<input type="code" placeholder="验证码" id="phonecode" name="phonecode" class="layui-input" lay-verify="required" style="width:50%" />
<button id="getPhoneCode">获取手机验证码</button>
</div>*@
</div>
<!-- / chickForm_sec1 -->
<div class="chickBtn" lay-submit lay-filter="*">提交</div>
</form>
</div>
</div>
</div>
<img id="fromBg" src="~/Content/images/from1.png" />
<div class="footer"> Copyright © 2019 数字化智慧校园 版权所有</div>
<script src="~/Content/js/jquery.min.js"></script>
<script src="~/Content/layui/layui.all.js"></script>
<script src="~/Content/vue/vue.js"></script>
<script>
var today = formatDateTimesM();

layui.use(['form', 'laydate', 'upload'], function () {
var form = layui.form;
//按钮点击
form.on('submit(*)', function (data) {
$.ajax({
url: "/PersonnelManagement/VisitorInfo/SaveForm?keyValue=",
data: { strEntity: JSON.stringify(data.field), verifycode: $.trim($verifycode.val()), phonecode: $('#phonecode').val() },
type: "POST",
dataType: "json",
async: true,
cache: false,
success: function (data) {
console.log(data);
layer.msg("注册成功");
alert("注册成功");
//location.reload();
location.href = "/home/index";
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
},
beforeSend: function () {
},
complete: function () {
}
});
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。

});

var laydate = layui.laydate;

//时间选择
laydate.render({
elem: '#Birthday',
min: today.y + '-' + today.m + '-' + today.d
});

var upload = layui.upload;

////监听校区
//form.on('select(F_CompanyId)', function (data) {
// //绑定部门
// $.ajax({
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "classdata" + "&where=" + "F_CompanyId='" + data.value + "'",
// async: false,
// success: function (msg) {
// var companys = $.parseJSON(msg).data.data;
// var str = '<option value="">请选择</option>';
// $.each(companys, function (i, item) {
// str += '<option value="' + item.f_departmentid + '">' + item.f_fullname + '</option>'
// })
// $("#F_DepartmentId").html(str);
// },
// });
// form.render();
//});

});
$(window).load(function () {

renderForm();

});
// 点击切换验证码
$("#lr_verifycode_img").click(function () {
$("#verifycode").val('');
//$("#lr_verifycode_img").attr("src", top.$.rootUrl + "/PersonnelManagement/VisitorInfo/VerifyCode?time=" + Math.random());
$("#lr_verifycode_img").attr("src", "/PersonnelManagement/VisitorInfo/VerifyCode?time=" + Math.random());
});
var errornum = $('#errornum').val();
if (errornum >= 3) {

$(".codeInput").show();
$("#lr_verifycode_img").trigger('click');
};

//图片验证码
$("#verifycode").blur(function () {
//失去焦点时判断验证码是否正确
console.log("rootUrl", top.$.rootUrl);
$.ajax({
url: "/PersonnelManagement/VisitorInfo/CheckVerifycode",
//headers: { __RequestVerificationToken: $.lrToken },
data: { verifycode: $('#verifycode').val() },
type: "post",
dataType: "json",
success: function (res) {
if (res.code != 200) {
alert(res.info);
}
}
});
});
////获取手机验证码
//$("#btnCode").on('click', function () {
// condole.log(111);
// $.ajax({
// url: "/Login/GetCheckCode",
// //headers: { __RequestVerificationToken: $.lrToken },
// data: { mobile: $('#VPhone').val(), smsType: 0 },
// type: "post",
// dataType: "json",
// success: function (res) {

// }
// });
//});

//重新渲染表单
function renderForm() {
layui.use('form', function () {
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加()
form.render();
});
}
function formatDateTimesM() {
var date = new Date(1960, 0, 0);
var y = date.getFullYear();
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();

return {
y: y,
m: m,
d: d,
h: h,
min: min
}
};

var countdown = 30;
function GetCode(obj) {
$.ajax({
url: "/Login/GetCheckCode",
//headers: { __RequestVerificationToken: $.lrToken },
data: { mobile: $('#VPhone').val(), smsType: 0 },
type: "post",
dataType: "json",
success: function (res) {
alert(res.info);
if (res.code == 200) {
settime(obj);
}

}
});


}

function settime(obj) {
if (countdown == 0) {
obj.removeAttribute("disabled");
obj.value = "获取验证码";
countdown = 30;
return;
} else {
obj.setAttribute("disabled", true);
obj.value = "重新发送(" + countdown + ")";
countdown--;
}
setTimeout(function () {
settime(obj);
},
1000);
}
</script>
</body>
</html>

+ 330
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd2.cshtml Просмотреть файл

@@ -0,0 +1,330 @@
@{
ViewBag.Title = "FormAdd";
Layout = null;
}



<!-- saved from url=(0075)http://123.57.209.16:8903/EducationalAdministration/EmpInfoEnternal/FormAdd -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<link rel="shortcut icon" href="">
<title>数字化校园-教师注册</title>
<meta name="keywords" content="数字化校园-教师注册">
<meta name="description" content="数字化校园-教师注册">

<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/font-awesome.css" rel="stylesheet" />
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/common.css" rel="stylesheet" />
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/layui.css" rel="stylesheet" />
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/fromAdd.css" rel="stylesheet" />
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/laydate.css" rel="stylesheet" />
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/layer.css" rel="stylesheet" />
<link href="~/Areas/PersonnelManagement/Views/VisitorInfo/css/code.css" rel="stylesheet" />

</head>
<body>

<div class="header">
<div class="fromSec">
<a href="">数字化智慧校园</a> <span class="headerLine">|</span> <span>教职工信息注册</span>
</div>
</div>
<div class="warpper" id="app">
<!-- / index_sec5 -->
<div class="chickForm_sec">
<div class="fromSec">
<div class="chickT">注册</div>
<form class="layui-form" action="">
<!-- / chickForm_sec1 -->
<div class="chickForm_sec1">
<div class="chickInput">
<span class="chickInputLable"><span>*</span> 姓名</span>
<input type="text" id="EmpNo" name="EmpNo" lay-verify="required" placeholder="请输入职工编号" class="layui-input">
</div>
<div class="chickInput">
<span class="chickInputLable"><span>*</span> 电话</span>
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入姓名" class="layui-input">
</div>
</div>
<div class="chickInput yz">
<p>
<span class="chickInputLable"><span>*</span> 图形验证</span>
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入内容" class="layui-input">
</p>

<div class="variCode">
<img src="~/image/verCode.png" />
</div>
</div>
<div class="chickInput yz">
<p>
<span class="chickInputLable"><span>*</span> 短信验证</span>
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入内容" class="layui-input">
</p>
<div class="variCode">
<input type="button" id="btn" value="获取验证码" onclick="settime(this)" />
</div>
</div>
<div class="chickInput">
<span class="chickInputLable"><span>*</span> 来访原因</span>
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入原因" class="layui-input">
</div>

<div class="chickInput">
<span class="chickInputLable"><span>*</span> 备注</span>
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入内容" class="layui-input">
</div>
<!-- / chickForm_sec1 -->
<div class="chickBtn" lay-submit="" lay-filter="*">提交</div>
</form>
</div>
</div>
</div>
<img id="fromBg" src="~/Areas/PersonnelManagement/Views/VisitorInfo/image/from1.png" />
<div class="footer"> Copyright © 2019 数字化智慧校园 版权所有</div>
@*<script src="~/Content/js/jquery.min.js"></script>
<script src="~/Content/layui/layui.all.js"></script>
<script src="~/Content/vue/vue.js"></script>*@
<script src="~/Areas/PersonnelManagement/Views/VisitorInfo/js/jquery.min.js"></script>
<script src="~/Areas/PersonnelManagement/Views/VisitorInfo/js/layui.all.js"></script>
<script src="~/Areas/PersonnelManagement/Views/VisitorInfo/js/vue.js"></script>
<script>
var today = formatDateTimesM();

layui.use(['form', 'laydate', 'upload'], function () {
var form = layui.form;
//登录按钮点击
form.on('submit(*)', function (data) {
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/SaveForm?keyValue=",
data: { strEntity: JSON.stringify(data.field) },
type: "POST",
dataType: "json",
async: true,
cache: false,
success: function (data) {
console.log(data);
layer.msg("注册成功");
alert("注册成功");
//location.reload();
location.href = "/home/index";
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
},
beforeSend: function () {
},
complete: function () {
}
});
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。

});

var laydate = layui.laydate;

//时间选择
laydate.render({
elem: '#Birthday',
min: today.y + '-' + today.m + '-' + today.d
});

var upload = layui.upload;

//上传图片
var uploadInst = upload.render({
elem: '#chickUpload',
url: '/EducationalAdministration/EmpInfoEnternal/UploadImg',
before: function (obj) {
//预读本地文件示例,不支持ie8
obj.preview(function (index, file, result) {
$('#chickUpload').html('<img src="' + result + '" alt="">') //图片链接(base64)
});
},
done: function (res) {
//如果上传失败
if (res.code != 200) {
return layer.msg('上传失败');
} else {
$("#Photo").val(res.data.folderId)
}
//上传成功
},
error: function () {
//演示失败状态,并实现重传
var demoText = $('#demoText');
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
demoText.find('.demo-reload').on('click', function () {
uploadInst.upload();
});
}
});

//监听校区
form.on('select(F_CompanyId)', function (data) {
//绑定部门
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "classdata" + "&where=" + "F_CompanyId='" + data.value + "'",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys, function (i, item) {
str += '<option value="' + item.f_departmentid + '">' + item.f_fullname + '</option>'
})
$("#F_DepartmentId").html(str);
},
});
form.render();
});

});
$(window).load(function () {
$('.chickInputBoxs input').attr('lay-verify', 'required');
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "company",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys, function (i, item) {
str += '<option value="' + item.f_companyid + '">' + item.f_fullname + '</option>'
})
$("#F_CompanyId").html(str);
},
});

$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdDeptInfo",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys, function (i, item) {
str += '<option value="' + item.deptno + '">' + item.deptname + '</option>'
})
$("#DeptNo").html(str);
},
});

$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "classdata",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys, function (i, item) {
str += '<option value="' + item.id + '">' + item.name + '</option>'
})
$("#F_DepartmentId").html(str);
},

});

$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdNationality",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys, function (i, item) {
str += '<option value="' + item.nationalityno + '">' + item.nationality + '</option>'
})
$("#NationalityNo").html(str);
},
});
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdPartyFace",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys,
function (i, item) {
str += '<option value="' + item.partyfaceno + '">' + item.partyface + '</option>'
});
$("#PartyFaceNo").html(str);
},
});
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdCultureDegree",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys, function (i, item) {
str += '<option value="' + item.culturedegreeno + '">' + item.culturedegree + '</option>'
})
$("#CultureDegreeNo").html(str);
},
});
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdDegree",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys, function (i, item) {
str += '<option value="' + item.degreeno + '">' + item.degreename + '</option>'
})
$("#DegreeNo").html(str);
},
});

renderForm()

})


//重新渲染表单
function renderForm() {
layui.use('form', function () {
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加()
form.render();
});
}
function formatDateTimesM() {
var date = new Date(1960, 0, 0);
var y = date.getFullYear();
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();

return {
y: y,
m: m,
d: d,
h: h,
min: min
}
};
</script>
<script type="text/javascript">
var countdown = 30;
function settime(obj) {
console.log(obj)
if (countdown == 0) {
obj.removeAttribute("disabled");
obj.value = "获取验证码";
countdown = 30;
return;
} else {
obj.setAttribute("disabled", true);
obj.value = "重新发送(" + countdown + ")";
countdown--;
}
setTimeout(function () {
settime(obj)
}
, 1000)
}
</script>

</body>
</html>

+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.cshtml Просмотреть файл

@@ -0,0 +1,50 @@
@{
ViewBag.Title = "访客管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="VName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">手机号</div>
<input id="VPhone" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>*@
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_lock" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 审核</a>
<a id="lr-uncheck" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;去审</a>
<a id="lr-checkall" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 审核全部</a>
<a id="lr_generate" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 生成账号</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/VisitorInfo/Index.js")

+ 191
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.js Просмотреть файл

@@ -0,0 +1,191 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-05-17 10:11
* 描 述:访客管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Form',
width: 600,
height: 450,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Form?keyValue=' + keyValue,
width: 600,
height: 450,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
//审核
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var VState = $('#gridtable').jfGridValue('VState');
if (VState.indexOf('1') != -1) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否确认审核该项?', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Check', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//去审
$('#lr-uncheck').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var VState = $('#gridtable').jfGridValue('VState');
var VStateArr = VState.split(',');
console.log("VStateArr", VStateArr);
if ($.inArray('0', VStateArr) != -1 || $.inArray('', VStateArr) != -1) {
learun.alert.warning("选中记录中包含未审核项目!");
return;
}
learun.layerConfirm('是否确认取消审核该项?', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/UnCheck', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//审核全部
$('#lr-checkall').on('click', function () {
learun.layerConfirm('是否确认全部审核?', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/CheckAll', {}, function () {
refreshGirdData();
});
}
});
});
//生成帐号
$('#lr_generate').on('click', function () {
learun.layerConfirm('是否确认生成帐号?', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Generate', {}, function () {
refreshGirdData();
});
}
});
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/VisitorInfo/GetPageList',
headData: [
{ label: "姓名", name: "VName", width: 100, align: "left"},
{ label: "手机号", name: "VPhone", width: 100, align: "left"},
{ label: "申请理由", name: "VReasons", width: 100, align: "left"},
{ label: "来访目的", name: "VObjective", width: 100, align: "left"},
{ label: "备注", name: "VRemarks", width: 100, align: "left" },
{
label: "审核标志", name: "VState", width: 80, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";

}
}
],
mainId:'VID',
isPage: true,
isMultiselect: true,
});
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 354
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/fromAdd.css Просмотреть файл

@@ -0,0 +1,354 @@
*{
box-sizing:border-box;
}
html{
background: #EEF6F8;
}
body{
position: relative;
}
#fromBg{
position: absolute;
bottom: 0;
left: 0;
width: 100%
}
.fromSec{
width: 1100px;
margin: 0 auto;
}
.header{
background: #282E3B;
padding: 20px 0;
height: 80px;
line-height: 40px;
font-size: 30px;
color: #fff
}
.header a{
color: #59A7FF;
}
.headerLine{
margin: 0 20px;
}
.chickT{
color: #3E3F3F;
font-size: 24px;
font-weight: bold;
text-align: center;
margin-bottom: 40px
}
.chickForm_sec{
margin:80px 0 70px;
position: relative;
z-index: 9;
}

.chickForm_sec .fromSec{
background: #fff;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .1);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, .1);
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
border-radius: 4px;
padding: 40px 35px 60px;
}
.chickRemind{
margin: 0 20px;
height: 40px;
line-height: 38px;
font-size: 12px;
color: #E62D31;
padding: 0 10px;
border: 1px dashed #E62D31;
margin-bottom: 30px;
}
.chickRemind img{
margin-right: 6px;
width: 20px;
position: relative;
top: -1px;
}
.chickInput{
margin: 20px auto 0;
width: 720px;
font-size: 14px;
color: #222222;
}
.yz{
/* width: 60%; */
position: relative;
}
.chickInput p input{
width: 50%;
}
.variCode {
position: absolute;
right: 0;
top: 2%;
height: 100%;
width: 110px;
line-height: 0;
}
.variCode img {
width: 100%;
height: 100%;
}
.variCode #btn{
background: #0094DE;
padding: 7px 17px;
}
.variCode input{
padding: 0;
color: #fff;
}
.chickInputLable{
float: left;
width: 20%;
padding-right: 10px;
text-align: right;
line-height: 40px;
color: #6A6A6A
}
.chickInputLable span{
color: #E62D31;
}
.chickInput > input{
height: 40px;
width: 80%;
margin-left: 20%;
display: block;
border: 1px solid #DDDDDD;
padding: 7px 12px;
line-height: 24px;
}
.chickInput2 > input{
width: 530px;
}
.layui-input-inline{
width: 100%;
}
.chickInputBox .layui-input-inline > img{
position: absolute;
height: 24px;
right: 5px;
top: 0;
bottom: 0;
margin: auto;
z-index: 0
}
.chickInputBox{
line-height: 40px;
color: #666666;
margin-left: 20%;
}
.chickInputTxt{
font-size: 12px;
color: #E62D31
}
#chickUpload{
width: 107px;
height: 107px;
border: 1px solid #E9E9E9;
overflow: hidden;
margin: 0;
cursor: pointer;
text-align: center;
}
#chickUpload img{
width: 100%;
height: 100%;
}
#chickUpload .layui-upload-img{
width: 50%;
height: auto;
margin-top: 8px;
}
#chickUpload div{
font-size: 14px;
color: #DCDBDB;
}
.chickUploadTxt{
height: 36px;
width: 255px;
line-height: 34px;
text-align: center;
font-size: 12px;
color: #E62D31;
border: 1px solid #E9E9E9;
}
.chickFormSec1Img{
position: absolute;
top: 12px;
right: 30px;
width: 311px;
max-height: 432px;
border: 1px solid #CCCCCC;
overflow: hidden;
font-size: 0;
display: none;
}
.chickFormSec1Img img{
width: 100%;
}
.chickLine{
position: relative;
height: 28px;
line-height: 28px;
overflow: hidden;
margin: 40px 0;
}
.chickLine:after{
content: '';
position: absolute;
border-top: 1px #E1E1E1 dashed;
width: 100%;
height: 1px;
left: 0;
top: 0;
bottom: 0;
margin: auto;
}

.chickLine > *{
background: #fff;
position: relative;
z-index: 3
}
.chickLine span{
color: #E62D31;
font-size: 12px;
}
.chickLine span:first-child{
padding-right: 15px;
float: left;
}
.chickLineR{
padding-left: 15px;
float: right;
cursor: pointer;
}
.chickLineR img{
width: 10px;
margin-right: 5px;
position: relative;
top: -1px;
transition:all .5s;
-moz-transition:all .5s;
-ms-transition:all .5s;
-o-transition:all .5s;
-webkit-transition:all .5s;
}
.chickInputBox .layui-form-select{
height: 40px;
width: 100%;
}
.chickInputBox > input{
width: 255px;
float: left;
margin-left: 20px;
}
.chickInputBox > a{
color: #E62D31;
}
.chickSec2Box .chickInput:first-child{
margin: 0;
}

.chickForm_sec2.active .chickLineR img{
transform:rotate(180deg);
-moz-transform:rotate(180deg);
-ms-transform:rotate(180deg);
-o-transform:rotate(180deg);
-webkit-transform:rotate(180deg);
}
.chickBtn{
width: 465px;
height: 40px;
border-radius: 8px;
background: #F9A810;
font-size: 16px;
color: #fff;
text-align: center;
line-height: 40px;
margin: 40px auto 0;
cursor: pointer;
}
.footer{
font-size: 13px;
color: #fff;
padding-bottom: 50px;
position: relative;
z-index: 9;
text-align: center;
}
@media(max-width:1100px) {
.fromSec{
width: 84%
}
.chickInput{
width: 80%
}
}
@media(max-width:768px) {
.variCode{
position: absolute;
right: 0;
top: 12%;
height: 100%;
width: 110px;
line-height: 0;
}
.variCode img {
width: 100%;
height: 100%;
margin-top: 15%;
}
.variCode #btn{
background: #0094DE;
padding: 7px 17px;
margin-top: 30%;
}
.chickBtn{
width: 80%;
}
.chickInputLable{
width: 100%;
float: initial;
}
.chickInput > input,.chickInputBox{
width: 100%;
margin-left: 0;
}
.header{
font-size: 18px;
line-height: 24px;
padding: 10px;
height: 44px;
}
.headerLine {
margin: 0 8px;
}
.fromSec {
width: 94%;
}
.chickForm_sec {
margin: 50px 0 30px;
position: relative;
z-index: 9;
}
.chickForm_sec .fromSec {
padding: 30px 0;
}
.chickT {
font-size: 16px;
margin-bottom: 30px;
}
.chickInput {
margin: 15px auto 0;
width: 94%;
font-size: 13px;
}
.footer{
padding-bottom: 10px;
}
}

+ 380
- 290
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/fromAdd.css Просмотреть файл

@@ -1,309 +1,399 @@
*{
box-sizing:border-box;
}
html{
background: #EEF6F8;
}
body{
position: relative;
}
#fromBg{
position: absolute;
bottom: 0;
left: 0;
width: 100%
}
.fromSec{
width: 1100px;
margin: 0 auto;
}
.header{
background: #282E3B;
padding: 20px 0;
height: 80px;
line-height: 40px;
font-size: 30px;
color: #fff
}
.header a{
color: #59A7FF;
}
.headerLine{
margin: 0 20px;
}
.chickT{
color: #3E3F3F;
font-size: 24px;
font-weight: bold;
text-align: center;
margin-bottom: 40px
}
.chickForm_sec{
margin:80px 0 70px;
position: relative;
z-index: 9;
}

.chickForm_sec .fromSec{
background: #fff;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .1);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, .1);
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
border-radius: 4px;
padding: 40px 35px 60px;
}
.chickRemind{
margin: 0 20px;
height: 40px;
line-height: 38px;
font-size: 12px;
color: #E62D31;
padding: 0 10px;
border: 1px dashed #E62D31;
margin-bottom: 30px;
}
.chickRemind img{
margin-right: 6px;
width: 20px;
position: relative;
top: -1px;
}
.chickInput{
margin: 20px auto 0;
width: 720px;
font-size: 14px;
color: #222222;
}
.chickInputLable{
float: left;
width: 20%;
padding-right: 10px;
text-align: right;
line-height: 40px;
color: #6A6A6A
}
.chickInputLable span{
color: #E62D31;
}
.chickInput > input{
height: 40px;
width: 80%;
margin-left: 20%;
display: block;
border: 1px solid #DDDDDD;
padding: 7px 12px;
line-height: 24px;
}
.chickInput2 > input{
width: 530px;
}
.layui-input-inline{
width: 100%;
}
.chickInputBox .layui-input-inline > img{
position: absolute;
height: 24px;
right: 5px;
top: 0;
bottom: 0;
margin: auto;
z-index: 0
}
.chickInputBox{
line-height: 40px;
color: #666666;
margin-left: 20%;
}
.chickInputTxt{
font-size: 12px;
color: #E62D31
}
#chickUpload{
width: 107px;
height: 107px;
border: 1px solid #E9E9E9;
overflow: hidden;
margin: 0;
cursor: pointer;
text-align: center;
}
#chickUpload img{
width: 100%;
height: 100%;
}
#chickUpload .layui-upload-img{
width: 50%;
height: auto;
margin-top: 8px;
}
#chickUpload div{
font-size: 14px;
color: #DCDBDB;
}
.chickUploadTxt{
height: 36px;
width: 255px;
line-height: 34px;
text-align: center;
font-size: 12px;
color: #E62D31;
border: 1px solid #E9E9E9;
}
.chickFormSec1Img{
position: absolute;
top: 12px;
right: 30px;
width: 311px;
max-height: 432px;
border: 1px solid #CCCCCC;
overflow: hidden;
font-size: 0;
display: none;
}
.chickFormSec1Img img{
width: 100%;
}
.chickLine{
position: relative;
height: 28px;
line-height: 28px;
overflow: hidden;
margin: 40px 0;
}
.chickLine:after{
content: '';
position: absolute;
border-top: 1px #E1E1E1 dashed;
width: 100%;
height: 1px;
left: 0;
top: 0;
bottom: 0;
margin: auto;
}

.chickLine > *{
background: #fff;
position: relative;
z-index: 3
}
.chickLine span{
color: #E62D31;
font-size: 12px;
}
.chickLine span:first-child{
padding-right: 15px;
float: left;
}
.chickLineR{
padding-left: 15px;
float: right;
cursor: pointer;
}
.chickLineR img{
width: 10px;
margin-right: 5px;
position: relative;
top: -1px;
transition:all .5s;
-moz-transition:all .5s;
-ms-transition:all .5s;
-o-transition:all .5s;
-webkit-transition:all .5s;
}
.chickInputBox .layui-form-select{
height: 40px;
width: 100%;
}
.chickInputBox > input{
width: 255px;
float: left;
margin-left: 20px;
}
.chickInputBox > a{
color: #E62D31;
}
.chickSec2Box .chickInput:first-child{
margin: 0;
}

.chickForm_sec2.active .chickLineR img{
transform:rotate(180deg);
-moz-transform:rotate(180deg);
-ms-transform:rotate(180deg);
-o-transform:rotate(180deg);
-webkit-transform:rotate(180deg);
}
.chickBtn{
width: 465px;
height: 40px;
border-radius: 8px;
background: #F9A810;
font-size: 16px;
color: #fff;
text-align: center;
line-height: 40px;
margin: 40px auto 0;
cursor: pointer;
}
.footer{
font-size: 13px;
color: #fff;
padding-bottom: 50px;
position: relative;
z-index: 9;
text-align: center;
}
@media(max-width:1100px) {
.fromSec{
width: 84%
}
.chickInput{
width: 80%
* {
box-sizing: border-box;
}

html {
background: #EEF6F8;
}
@media(max-width:768px) {
.chickBtn{
width: 80%;

body {
position: relative;
}
.chickInputLable{
width: 100%;
float: initial;

#fromBg {
position: absolute;
bottom: 0;
left: 0;
width: 100%
}
.chickInput > input,.chickInputBox{
width: 100%;
margin-left: 0;

.fromSec {
width: 1100px;
margin: 0 auto;
}
.header{
font-size: 18px;
line-height: 24px;
padding: 10px;
height: 44px;

.header {
background: #282E3B;
padding: 20px 0;
height: 80px;
line-height: 40px;
font-size: 30px;
color: #fff
}

.header a {
color: #59A7FF;
}

.headerLine {
margin: 0 8px;
margin: 0 20px;
}
.fromSec {
width: 94%;

.chickT {
color: #3E3F3F;
font-size: 24px;
font-weight: bold;
text-align: center;
margin-bottom: 40px
}

.chickForm_sec {
margin: 50px 0 30px;
margin: 80px 0 70px;
position: relative;
z-index: 9;
}
.chickForm_sec .fromSec {
padding: 30px 0;
}
.chickT {
font-size: 16px;

.chickForm_sec .fromSec {
background: #fff;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .1);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, .1);
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
border-radius: 4px;
padding: 40px 35px 60px;
}

.chickRemind {
margin: 0 20px;
height: 40px;
line-height: 38px;
font-size: 12px;
color: #E62D31;
padding: 0 10px;
border: 1px dashed #E62D31;
margin-bottom: 30px;
}

.chickRemind img {
margin-right: 6px;
width: 20px;
position: relative;
top: -1px;
}

.chickInput {
margin: 15px auto 0;
width: 94%;
margin: 20px auto 0;
width: 720px;
font-size: 14px;
color: #222222;
}

.yz {
/* width: 60%; */
position: relative;
}
.chickInput p input {
width: 50%;
}

.variCode {
position: absolute;
right: 0;
top: 2%;
height: 100%;
width: 110px;
line-height: 0;
}

.variCode img {
width: 100%;
height: 100%;
}

.variCode #btn {
background: #0094DE;
padding: 7px 17px;
}

.variCode #btnCode {
background: #0094DE;
padding: 7px 17px;
margin-top: 30%;
}

.variCode input {
padding: 0;
color: #fff;
}

.chickInputLable {
float: left;
width: 20%;
padding-right: 10px;
text-align: right;
line-height: 40px;
color: #6A6A6A
}

.chickInputLable span {
color: #E62D31;
}

.chickInput > input {
height: 40px;
width: 80%;
margin-left: 20%;
display: block;
border: 1px solid #DDDDDD;
padding: 7px 12px;
line-height: 24px;
}

.chickInput2 > input {
width: 530px;
}

.layui-input-inline {
width: 100%;
}

.chickInputBox .layui-input-inline > img {
position: absolute;
height: 24px;
right: 5px;
top: 0;
bottom: 0;
margin: auto;
z-index: 0
}

.chickInputBox {
line-height: 40px;
color: #666666;
margin-left: 20%;
}

.chickInputTxt {
font-size: 12px;
color: #E62D31
}

#chickUpload {
width: 107px;
height: 107px;
border: 1px solid #E9E9E9;
overflow: hidden;
margin: 0;
cursor: pointer;
text-align: center;
}

#chickUpload img {
width: 100%;
height: 100%;
}

#chickUpload .layui-upload-img {
width: 50%;
height: auto;
margin-top: 8px;
}

#chickUpload div {
font-size: 14px;
color: #DCDBDB;
}

.chickUploadTxt {
height: 36px;
width: 255px;
line-height: 34px;
text-align: center;
font-size: 12px;
color: #E62D31;
border: 1px solid #E9E9E9;
}

.chickFormSec1Img {
position: absolute;
top: 12px;
right: 30px;
width: 311px;
max-height: 432px;
border: 1px solid #CCCCCC;
overflow: hidden;
font-size: 0;
display: none;
}

.chickFormSec1Img img {
width: 100%;
}

.chickLine {
position: relative;
height: 28px;
line-height: 28px;
overflow: hidden;
margin: 40px 0;
}

.chickLine:after {
content: '';
position: absolute;
border-top: 1px #E1E1E1 dashed;
width: 100%;
height: 1px;
left: 0;
top: 0;
bottom: 0;
margin: auto;
}

.chickLine > * {
background: #fff;
position: relative;
z-index: 3
}

.chickLine span {
color: #E62D31;
font-size: 12px;
}

.chickLine span:first-child {
padding-right: 15px;
float: left;
}

.chickLineR {
padding-left: 15px;
float: right;
cursor: pointer;
}

.chickLineR img {
width: 10px;
margin-right: 5px;
position: relative;
top: -1px;
transition: all .5s;
-moz-transition: all .5s;
-ms-transition: all .5s;
-o-transition: all .5s;
-webkit-transition: all .5s;
}

.chickInputBox .layui-form-select {
height: 40px;
width: 100%;
}

.chickInputBox > input {
width: 255px;
float: left;
margin-left: 20px;
}

.chickInputBox > a {
color: #E62D31;
}

.chickSec2Box .chickInput:first-child {
margin: 0;
}

.chickForm_sec2.active .chickLineR img {
transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
}

.chickBtn {
width: 465px;
height: 40px;
border-radius: 8px;
background: #F9A810;
font-size: 16px;
color: #fff;
text-align: center;
line-height: 40px;
margin: 40px auto 0;
cursor: pointer;
}

.footer {
font-size: 13px;
color: #fff;
padding-bottom: 50px;
position: relative;
z-index: 9;
text-align: center;
}

@media(max-width:1100px) {
.fromSec {
width: 84%
}

.chickInput {
width: 80%
}
}
.footer{
padding-bottom: 10px;

@media(max-width:768px) {
.chickBtn {
width: 80%;
}

.chickInputLable {
width: 100%;
float: initial;
}

.chickInput > input, .chickInputBox {
width: 100%;
margin-left: 0;
}

.header {
font-size: 18px;
line-height: 24px;
padding: 10px;
height: 44px;
}

.headerLine {
margin: 0 8px;
}

.fromSec {
width: 94%;
}

.chickForm_sec {
margin: 50px 0 30px;
position: relative;
z-index: 9;
}

.chickForm_sec .fromSec {
padding: 30px 0;
}

.chickT {
font-size: 16px;
margin-bottom: 30px;
}

.chickInput {
margin: 15px auto 0;
width: 94%;
font-size: 13px;
}

.footer {
padding-bottom: 10px;
}
}
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/laydate/theme/laydate.css
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/layui/css/code.css Просмотреть файл

@@ -0,0 +1,2 @@
/** layui-v2.2.6 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs Просмотреть файл

@@ -235,6 +235,9 @@ namespace Learun.Application.Web.Controllers
//微信快捷登录
var result4 = teachSwitchIBLL.FindFirst("wxloginforpc");
ViewBag.WeixinLoginSwitch = result4;
//访客注册
var result5 = teachSwitchIBLL.FindFirst("fk");
ViewBag.VisitorSwitch = result5;
//获取在线用户人数
ViewBag.OnlineUserNum = 0;
var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum();
@@ -1048,6 +1051,7 @@ namespace Learun.Application.Web.Controllers
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public async Task<ActionResult> GetCheckCode(string mobile, string smsType)
{
ActionResult actionResult;


+ 10
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Просмотреть файл

@@ -471,7 +471,6 @@
<Compile Include="Areas\LR_WorkFlowModule\Controllers\WfSystemDemoController.cs" />
<Compile Include="Areas\LR_WorkFlowModule\LR_WorkFlowModuleAreaRegistration.cs" />
<Compile Include="Areas\Permission\PermissionAreaRegistration.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\Emp_PayrollOnceController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\EpidemicReportController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\EpidemicSituationCopyController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\MeetingNoticeController.cs" />
@@ -804,6 +803,7 @@
<Compile Include="Areas\LR_Desktop\Controllers\SSO_Drag_DesktopManageController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\SSO_Drag_CardSortManageController.cs" />
<Compile Include="Areas\AssetManagementSystem\Controllers\AssStorageRoomController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\VisitorInfoController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -1377,9 +1377,6 @@
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRemove.js" />
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormTerminate.js" />
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRenew.js" />
<Content Include="Areas\PersonnelManagement\Views\Emp_PayrollOnce\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\Emp_PayrollOnce\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\Emp_PayrollOnce\StatisticIndex.js" />
<Content Include="Areas\PersonnelManagement\Views\Emp_Payroll\StatisticIndex.js" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\FormView.js" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.js" />
@@ -1390,6 +1387,7 @@
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" />
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" />
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" />
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\fromAdd.css" />
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerIndex.js" />
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerQuery.js" />
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\Form.js" />
@@ -3087,10 +3085,12 @@
<Content Include="Content\laydate\src\theme\default\laydate.css" />
<Content Include="Content\laydate\theme\default\font\iconfont.svg" />
<Content Include="Content\laydate\theme\default\laydate.css" />
<Content Include="Content\laydate\theme\laydate.css" />
<Content Include="Content\laypage\laypage.js" />
<Content Include="Content\laypage\laypage.min.js" />
<Content Include="Content\laypage\skin\laypage.css" />
<Content Include="Content\laypage\skin\laypage.min.css" />
<Content Include="Content\layui\css\code.css" />
<Content Include="Content\layui\css\layui.css" />
<Content Include="Content\layui\css\layui.mobile.css" />
<Content Include="Content\layui\css\modules\code.css" />
@@ -6369,6 +6369,10 @@
<Content Include="Areas\AssetManagementSystem\Views\AssStorageRoom\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\AssStorageRoom\Form.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\AssStorageRoom\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />
@@ -7170,9 +7174,8 @@
<Content Include="Areas\LR_OAModule\Views\Notice\FormLostArticle.cshtml" />
<Content Include="Areas\LR_OAModule\Views\Notice\FormLostArticleView.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\Emp_Payroll\StatisticIndex.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\Emp_PayrollOnce\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\Emp_PayrollOnce\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\Emp_PayrollOnce\StatisticIndex.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\FormAdd.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\FormAdd2.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml Просмотреть файл

@@ -69,6 +69,10 @@
{
<a href="#" onclick="javascript:location.href = '/EducationalAdministration/EmpInfoEnternal/FormAdd'"><img src="~/Content/images/Login/login8-3.png" alt="" /><span class="bbh_span1">教师注册</span></a>
}
@if (ViewBag.VisitorSwitch)
{
<a href="#" onclick="javascript:location.href = '/PersonnelManagement/VisitorInfo/FormAdd'"><img src="~/Content/images/Login/login8-3.png" alt="" /><span class="bbh_span1">访客注册</span></a>
}
@if (ViewBag.SSOSystemSwitch)
{
<a href="/SSOSystem/Index"><img src="~/Content/images/Login/login8-4.png" alt="" /><span class="bbh_span2">网上办事大厅</span></a>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Просмотреть файл

@@ -557,6 +557,7 @@
<Compile Include="PersonnelManagement\EMP_PayrollMap.cs" />
<Compile Include="LR_Desktop\MessageRemindMap.cs" />
<Compile Include="AssetManagementSystem\Ass_Storage_RoomMap.cs" />
<Compile Include="PersonnelManagement\VisitorInfoMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/VisitorInfoMap.cs Просмотреть файл

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-17 10:11
/// 描 述:访客管理
/// </summary>
public class VisitorInfoMap : EntityTypeConfiguration<VisitorInfoEntity>
{
public VisitorInfoMap()
{
#region 表、主键
//表
this.ToTable("VISITORINFO");
//主键
this.HasKey(t => t.VID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 25
- 13
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM Просмотреть файл

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1621215037" Name="Physical Data Model 1" Objects="3447" Symbols="391" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1621224269" Name="Physical Data Model 1" Objects="3463" Symbols="391" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->

<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@@ -50645,7 +50645,7 @@ B9AF
<a:Code>VisitorInfo</a:Code>
<a:CreationDate>1585292417</a:CreationDate>
<a:Creator>edy</a:Creator>
<a:ModificationDate>1621215037</a:ModificationDate>
<a:ModificationDate>1621222930</a:ModificationDate>
<a:Modifier>edy</a:Modifier>
<a:TotalSavingCurrency/>
<c:Columns>
@@ -50732,9 +50732,21 @@ B9AF
<a:Comment>申请时间</a:Comment>
<a:DataType>datetime</a:DataType>
</o:Column>
<o:Column Id="o3394">
<a:ObjectID>214DE117-8F73-42BF-91D4-7B840E9CF285</a:ObjectID>
<a:Name>审核状态</a:Name>
<a:Code>VState</a:Code>
<a:CreationDate>1621215394</a:CreationDate>
<a:Creator>edy</a:Creator>
<a:ModificationDate>1621224269</a:ModificationDate>
<a:Modifier>edy</a:Modifier>
<a:Comment>审核状态</a:Comment>
<a:DataType>int(11)</a:DataType>
<a:Length>11</a:Length>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o3394">
<o:Key Id="o3395">
<a:ObjectID>1037A1F7-DDFF-475A-99C8-8E7922DF5B86</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
@@ -50748,10 +50760,10 @@ B9AF
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o3394"/>
<o:Key Ref="o3395"/>
</c:PrimaryKey>
<c:ClusterObject>
<o:Key Ref="o3394"/>
<o:Key Ref="o3395"/>
</c:ClusterObject>
</o:Table>
</c:Tables>
@@ -50776,7 +50788,7 @@ B9AF
<o:Key Ref="o813"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o3395">
<o:ReferenceJoin Id="o3396">
<a:ObjectID>81527A47-E565-49C2-AAA7-F0555E81CE72</a:ObjectID>
<a:CreationDate>1553245426</a:CreationDate>
<a:Creator>l</a:Creator>
@@ -50811,7 +50823,7 @@ B9AF
<o:Key Ref="o824"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o3396">
<o:ReferenceJoin Id="o3397">
<a:ObjectID>A3225D9D-069C-4A67-ABF0-43DC2FA55CF0</a:ObjectID>
<a:CreationDate>1553247802</a:CreationDate>
<a:Creator>l</a:Creator>
@@ -50845,7 +50857,7 @@ B9AF
<o:Key Ref="o723"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o3397">
<o:ReferenceJoin Id="o3398">
<a:ObjectID>B458081F-CEE1-4251-9E7A-5E9CC93519D5</a:ObjectID>
<a:CreationDate>1553248376</a:CreationDate>
<a:Creator>l</a:Creator>
@@ -50880,7 +50892,7 @@ B9AF
<o:Key Ref="o802"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o3398">
<o:ReferenceJoin Id="o3399">
<a:ObjectID>8397C4F6-A728-4D3F-B2F8-FAC56886462B</a:ObjectID>
<a:CreationDate>1553248622</a:CreationDate>
<a:Creator>l</a:Creator>
@@ -50914,7 +50926,7 @@ B9AF
<o:Key Ref="o862"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o3399">
<o:ReferenceJoin Id="o3400">
<a:ObjectID>2F8BC700-F31E-41CC-9DA8-9505EAC5DA85</a:ObjectID>
<a:CreationDate>1553483161</a:CreationDate>
<a:Creator>l</a:Creator>
@@ -50948,7 +50960,7 @@ B9AF
<o:Key Ref="o907"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o3400">
<o:ReferenceJoin Id="o3401">
<a:ObjectID>0E2D2049-564F-4247-9F5B-B0AA82F9BE96</a:ObjectID>
<a:CreationDate>1555404296</a:CreationDate>
<a:Creator>admin</a:Creator>
@@ -50965,7 +50977,7 @@ B9AF
</o:Reference>
</c:References>
<c:DefaultGroups>
<o:Group Id="o3401">
<o:Group Id="o3402">
<a:ObjectID>46EC3E2A-6CBF-421A-9DA8-6BCCEDEC7DF5</a:ObjectID>
<a:Name>PUBLIC</a:Name>
<a:Code>PUBLIC</a:Code>
@@ -51228,7 +51240,7 @@ B9AF
</o:ExtendedDependency>
</c:ChildTraceabilityLinks>
<c:TargetModels>
<o:TargetModel Id="o3402">
<o:TargetModel Id="o3403">
<a:ObjectID>B1BAD530-6C69-4A9D-BD41-F62F564CA348</a:ObjectID>
<a:Name>Microsoft SQL Server 2008</a:Name>
<a:Code>MSSQLSRV2008</a:Code>


+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs Просмотреть файл

@@ -50,6 +50,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
fxEntity.Create();
this.BaseRepository().Insert(fxEntity);
}
//访客注册
if (!data.Any(a => a.type == "fk"))
{
var fxEntity = new TeachSwitchEntity()
{
status = "0",
type = "fk"
};
fxEntity.Create();
this.BaseRepository().Insert(fxEntity);
}
//网上办事大厅
if (!data.Any(a => a.type == "ssosystem"))
{


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Просмотреть файл

@@ -1649,6 +1649,10 @@
<Compile Include="AssetManagementSystem\Ass_Storage_Room\AssStorageRoomService.cs" />
<Compile Include="AssetManagementSystem\Ass_Storage_Room\AssStorageRoomBLL.cs" />
<Compile Include="AssetManagementSystem\Ass_Storage_Room\AssStorageRoomIBLL.cs" />
<Compile Include="PersonnelManagement\VisitorInfo\VisitorInfoEntity.cs" />
<Compile Include="PersonnelManagement\VisitorInfo\VisitorInfoService.cs" />
<Compile Include="PersonnelManagement\VisitorInfo\VisitorInfoBLL.cs" />
<Compile Include="PersonnelManagement\VisitorInfo\VisitorInfoIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 238
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoBLL.cs Просмотреть файл

@@ -0,0 +1,238 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-17 10:11
/// 描 述:访客管理
/// </summary>
public class VisitorInfoBLL : VisitorInfoIBLL
{
private VisitorInfoService visitorInfoService = new VisitorInfoService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<VisitorInfoEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return visitorInfoService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取VisitorInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public VisitorInfoEntity GetVisitorInfoEntity(string keyValue)
{
try
{
return visitorInfoService.GetVisitorInfoEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取VisitorInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public VisitorInfoEntity GetEntityByPhone(string keyValue)
{
try
{
return visitorInfoService.GetEntityByPhone(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
visitorInfoService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, VisitorInfoEntity entity)
{
try
{
visitorInfoService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 审核全部
/// </summary>
/// <returns></returns>
public void CheckAll()
{
try
{
visitorInfoService.CheckAll();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 去审
/// </summary>
/// <returns></returns>
public void UnCheck(string keyValues)
{
try
{
visitorInfoService.UnCheck(keyValues);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 去审
/// </summary>
/// <returns></returns>
public void Check(string keyValues)
{
try
{
visitorInfoService.Check(keyValues);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 生成账号
/// </summary>
/// <returns></returns>
public void GenerateAccout()
{
try
{
visitorInfoService.GenerateAccout();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 82
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoEntity.cs Просмотреть файл

@@ -0,0 +1,82 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-17 10:11
/// 描 述:访客管理
/// </summary>
public class VisitorInfoEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("VID")]
public string VID { get; set; }
/// <summary>
/// 姓名
/// </summary>
[Column("VNAME")]
public string VName { get; set; }
/// <summary>
/// 手机号
/// </summary>
[Column("VPHONE")]
public string VPhone { get; set; }
/// <summary>
/// 申请理由
/// </summary>
[Column("VREASONS")]
public string VReasons { get; set; }
/// <summary>
/// 来访目的
/// </summary>
[Column("VOBJECTIVE")]
public string VObjective { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("VREMARKS")]
public string VRemarks { get; set; }
/// <summary>
/// 申请时间
/// </summary>
[Column("VAPPLYTIME")]
public DateTime? VApplyTime { get; set; }

/// <summary>
/// 状态
/// </summary>
[Column("VSTATE")]
public int VState { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.VID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.VID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 72
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoIBLL.cs Просмотреть файл

@@ -0,0 +1,72 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-17 10:11
/// 描 述:访客管理
/// </summary>
public interface VisitorInfoIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<VisitorInfoEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取VisitorInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
VisitorInfoEntity GetVisitorInfoEntity(string keyValue);
/// <summary>
/// 根据手机号获取实体数据
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
VisitorInfoEntity GetEntityByPhone(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, VisitorInfoEntity entity);
/// <summary>
/// 审核全部
/// </summary>
void CheckAll();
/// <summary>
/// 去审
/// </summary>
void UnCheck(string keyValues);
/// <summary>
/// 审核
/// </summary>
/// <param name="keyValues"></param>
void Check(string keyValues);

/// <summary>
/// 生成账号
/// </summary>
void GenerateAccout();
#endregion

}
}

+ 330
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoService.cs Просмотреть файл

@@ -0,0 +1,330 @@
using Dapper;
using Learun.Application.Base.AuthorizeModule;
using Learun.Application.Organization;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Learun.Application.Base.SystemModule;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-05-17 10:11
/// 描 述:访客管理
/// </summary>
public class VisitorInfoService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<VisitorInfoEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.*
");
strSql.Append(" FROM VisitorInfo t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.VApplyTime >= @startTime AND t.VApplyTime <= @endTime ) ");
}
if (!queryParam["VName"].IsEmpty())
{
dp.Add("VName", "%" + queryParam["VName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.VName Like @VName ");
}
if (!queryParam["VPhone"].IsEmpty())
{
dp.Add("VPhone", "%" + queryParam["VPhone"].ToString() + "%", DbType.String);
strSql.Append(" AND t.VPhone Like @VPhone ");
}
return this.BaseRepository("CollegeMIS").FindList<VisitorInfoEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取VisitorInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public VisitorInfoEntity GetVisitorInfoEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<VisitorInfoEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取VisitorInfo表实体数据根据手机号
/// </summary>
/// <param name="keyValue">手机号</param>
/// <returns></returns>
public VisitorInfoEntity GetEntityByPhone(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<VisitorInfoEntity>(x => x.VPhone == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
//删除账号
var entity = this.BaseRepository("CollegeMIS").FindEntity<VisitorInfoEntity>(keyValue);
this.BaseRepository("BaseDb").ExecuteBySql($"delete LR_Base_User where f_description='访客' and f_account='{entity.VPhone}'");

this.BaseRepository("CollegeMIS").Delete<VisitorInfoEntity>(t => t.VID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, VisitorInfoEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 审核全部
/// </summary>
public void CheckAll()
{
try
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update VisitorInfo set VState=1 where VState<>1");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 去审
/// </summary>
public void UnCheck(string keyValues)
{
try
{
string sql = $"update VisitorInfo set VState=0 where VID in ({keyValues})";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 审核
/// </summary>
public void Check(string keyValues)
{
try
{
string sql = $"update VisitorInfo set VState=1 where VID in ({keyValues})";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 生成账号
/// </summary>
public void GenerateAccout()
{
//UserRelationIBLL userRelationIBLL = new UserRelationBLL();
UserIBLL userIBLL = new UserBLL();
try
{
var infos = BaseRepository("CollegeMIS").FindList<VisitorInfoEntity>(m => m.VState != 0);
var alluserlist = userIBLL.GetAllList().Where(m => m.F_Description == "访客");

var defaultpwd = Config.GetValue("defaultpwd");
//读取默认密码配置中已启用的密码
var Sys_DefaultPwdConfigEntity = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true);
if (Sys_DefaultPwdConfigEntity != null)
{
defaultpwd = Sys_DefaultPwdConfigEntity.Pwd;
}
// var studentList = new List<UserEntity>();
foreach (var tEntity in infos)
{
if (string.IsNullOrEmpty(tEntity.VPhone) || alluserlist.Count(m => m.F_Account == tEntity.VPhone) > 0)
{
continue;
}

//var annexesFileEntity = this.BaseRepository().FindEntity<AnnexesFileEntity>(a => a.F_FolderId == tEntity.Photo);
var url = "";
//if (annexesFileEntity != null)
//{
// url = annexesFileEntity.F_FilePath;
// url = "/" + url.Substring(url.IndexOf("Resource"));

//}

UserEntity userbase = new UserEntity();
userbase.F_Account = tEntity.VPhone;
userbase.F_RealName = tEntity.VName;
userbase.F_EnCode = tEntity.VPhone;
userbase.F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower();
userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url;
userbase.F_Gender = 1;
userbase.F_DeleteMark = 0;
userbase.F_EnabledMark = 1;
userbase.F_Mobile = tEntity.VPhone;
userbase.F_Description = "访客";
//userbase.F_CompanyId = tEntity.F_SchoolId;
//userbase.F_DepartmentId = tEntity.DeptNo;
//userbase.F_IdentityCardNo = tEntity.IdentityCardNo;
userIBLL.SaveEntity(null, userbase);
//studentList.Add(userbase);
}
//if (studentList.Any())
//{
// string s = studentList.Select(m => m.F_UserId).Aggregate((current, userEntity) => current + "," + userEntity);
// userRelationIBLL.SaveEntityList2(roleId, 1, s);
//}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

Загрузка…
Отмена
Сохранить