diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuTransferInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuTransferInfoController.cs index 02dc205d3..a0baff54b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuTransferInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuTransferInfoController.cs @@ -103,6 +103,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 综合查询 + /// + /// + [HttpGet] + public ActionResult IndexQuery() + { + return View(); + } + #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IndexQuery.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IndexQuery.cshtml new file mode 100644 index 000000000..76125b66e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IndexQuery.cshtml @@ -0,0 +1,54 @@ +@{ + ViewBag.Title = "学籍异动列表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
异动类型
+
+
+
+
姓名
+ +
+
+
班级
+
+
+
+
申请人
+
+
+
+
审核人
+
+
+
+
保留学籍
+
+
+
+
+
+
+
+
+ +
+
+  查看 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuTransferInfo/IndexQuery.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IndexQuery.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IndexQuery.js new file mode 100644 index 000000000..1a55138bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IndexQuery.js @@ -0,0 +1,323 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-01-04 15:03 + * 描 述:学籍异动列表 + */ +var selectedRow; +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 查询 + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 290, 400); + $('#AnomalousType').lrDataItemSelect({ code: 'StuChangeType' }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }, + value: "classno", + text: "classname" + }); + $('#CheckUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); + $('#CreateUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); + $('#StuStatus').lrDataItemSelect({ code: 'YesOrNoInt' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_views').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行查看!"); + return; + } + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/FormView?keyValue=' + keyValue, + width: 1000, + height: 600, + btn: null + }); + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/GetPageList', + headData: [ + { label: '姓名', name: 'StuName', width: 100, align: "left" }, + { label: '学号', name: 'StuNo', width: 160, align: "left" }, + { + label: "性别", name: "GenderNo", width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { label: '身份证号', name: 'IdentityCardNo', width: 200, align: "left" }, + { + label: '原班级', name: 'ClassNo', width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { + label: '原专业', name: 'MajorNo', width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + //{ + // label: '原系部', name: 'DeptNo', width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + // key: value, + // keyId: 'deptno', + // callback: function (_data) { + // callback(_data['deptname']); + // } + // }); + // } + //}, + { label: '年级', name: 'Grade', width: 100, align: "left" }, + { + label: '学制', name: 'EduSystem', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'EduSystem', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + //{ + // label: '入班日期', name: 'LeaveDate', width: 100, align: "left", + // formatter: function (cellvalue) { + // return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + // } + //}, + //{ + // label: '离班日期', name: 'EnteDate', width: 100, align: "left", + // formatter: function (cellvalue) { + // return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + // } + //}, + //{ + // label: '现班级', name: 'NewClassNo', width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + // key: value, + // keyId: 'classno', + // callback: function (_data) { + // callback(_data['classname']); + // } + // }); + // } + //}, + //{ + // label: '现专业', name: 'NewMajorNo', width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + // key: value, + // keyId: 'majorno', + // callback: function (_data) { + // callback(_data['majorname']); + // } + // }); + // } + //}, + //{ + // label: '现系部', name: 'NewDeptNo', width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + // key: value, + // keyId: 'deptno', + // callback: function (_data) { + // callback(_data['deptname']); + // } + // }); + // } + //}, + //{ label: '现年级', name: 'NewGrade', width: 60, align: "left" }, + //{ + // label: '创建时间', name: 'CreateTime', width: 100, align: "left", + // formatter: function (cellvalue) { + // return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + // } + //}, + //{ + // label: '创建用户', name: 'CreateUserId', width: 200, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + // key: value, + // keyId: 'f_userid', + // callback: function (_data) { + // callback(_data['f_realname']); + // } + // }); + // } + //}, + //{ + // label: '审核时间', name: 'CheckTime', width: 200, align: "left", + // formatter: function (cellvalue) { + // return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + // } + //}, + //{ + // label: '审核用户', name: 'CheckUserId', width: 200, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + // key: value, + // keyId: 'f_userid', + // callback: function (_data) { + // callback(_data['f_realname']); + // } + // }); + // } + //}, + { + label: '审核状态', name: 'F_EnabledMark', width: 200, align: "left", + formatter: function (cellvalue) { + return cellvalue == "1" ? "已生效" : "未生效"; + } + }, + { + label: '异动类型', name: 'AnomalousType', width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'StuChangeType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + //{ label: '异动原因', name: 'ChangeReason', width: 300, align: "left" }, + //{ + // label: '是否保留学籍', name: 'StuStatus', width: 80, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'YesOrNoInt', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, + //{ + // label: '是否注销账号', name: 'F_WriteMark', width: 80, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'YesOrNoInt', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, + //{ + // label: '是否恢复学籍', name: 'RecoverStuStatus', width: 80, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'YesOrNoInt', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, + //{ + // label: '是否恢复账号', name: 'RecoverWriteMark', width: 80, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'YesOrNoInt', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, + //{ label: '修学年限', name: 'SuspensionPeriod', width: 200, align: "left" }, + //{ + // label: '休学开始时间', name: 'SuspensionBeginTime', width: 100, align: "left", + // formatter: function (cellvalue) { + // return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + // } + //}, + //{ + // label: '休学结束时间', name: 'SuspensionEndTime', width: 100, align: "left", + // formatter: function (cellvalue) { + // return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + // } + //}, + //{ label: '转学前学校', name: 'TransferSchool', width: 150, align: "left" }, + //{ label: '转学前学号', name: 'TransferStuNo', width: 100, align: "left" }, + //{ + // label: '出身日期', name: 'Birthday', width: 100, align: "left", + // formatter: function (cellvalue) { + // return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + // } + //}, + //{ label: '民族', name: 'NationalityNo', width: 80, align: "left" }, + //{ label: '省', name: 'Province', width: 100, align: "left" }, + //{ label: '市', name: 'City', width: 100, align: "left" }, + //{ label: '县/区', name: 'County', width: 100, align: "left" }, + //{ label: '联系电话', name: 'Mobile', width: 100, align: "left" }, + //{ label: '家庭地址', name: 'MailAddress', width: 200, align: "left" }, + //{ label: '转出学校', name: 'OutSchool', width: 100, align: "left" }, + //{ label: '备注', name: 'Remark', width: 500, align: "left" }, + ], + mainId: 'ID', + isPage: true, + rows: 100, + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParameter = ' and F_EnabledMark = 1 '; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index de761e40d..2f8b8552b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1366,6 +1366,7 @@ + @@ -8074,6 +8075,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTran/StuScoreNotPassTranService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTran/StuScoreNotPassTranService.cs index 1c69e289f..75ffc4d18 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTran/StuScoreNotPassTranService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTran/StuScoreNotPassTranService.cs @@ -128,6 +128,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append("SELECT "); strSql.Append(fieldSql); strSql.Append(" FROM StuScoreNotPassTran t "); + var userlogin = LoginUserInfo.Get(); + if (userlogin.Description == "学生") + { + strSql.Append(" where 1= 1 and Stuno = '" + userlogin.account + "'"); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwoTran/StuScoreNotPassTwoTranService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwoTran/StuScoreNotPassTwoTranService.cs index 49bb84b9d..3ac5f59a7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwoTran/StuScoreNotPassTwoTranService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwoTran/StuScoreNotPassTwoTranService.cs @@ -128,6 +128,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append("SELECT "); strSql.Append(fieldSql); strSql.Append(" FROM StuScoreNotPassTwoTran t "); + var userlogin = LoginUserInfo.Get(); + if (userlogin.Description == "学生") + { + strSql.Append(" where 1= 1 and Stuno = '" + userlogin.account + "'"); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreTran/StuScoreTranService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreTran/StuScoreTranService.cs index 32d9d089d..979e92b08 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreTran/StuScoreTranService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreTran/StuScoreTranService.cs @@ -130,6 +130,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append("SELECT "); strSql.Append(fieldSql); strSql.Append(" FROM StuScoreTran t "); + var userlogin = LoginUserInfo.Get(); + if (userlogin.Description == "学生") + { + strSql.Append(" where 1= 1 and Stuno = '" + userlogin.account + "'"); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs index 95140b893..0122ad011 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs @@ -90,10 +90,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); strSql.Append(" AND t.ClassNo = @ClassNo "); } - if (!queryParam["ClassNo"].IsEmpty()) + if (!queryParam["CreateUserId"].IsEmpty()) { - dp.Add("CheckUserId", queryParam["CheckUserId"].ToString(), DbType.String); - strSql.Append(" AND t.CheckUserId = @CheckUserId "); + dp.Add("CreateUserId", queryParam["CreateUserId"].ToString(), DbType.String); + strSql.Append(" AND t.CreateUserId = @CreateUserId "); } if (!queryParam["CheckUserId"].IsEmpty()) { diff --git a/Learun.Framework.Ultimate V7/VisitService/App.config b/Learun.Framework.Ultimate V7/VisitService/App.config new file mode 100644 index 000000000..b56e2c4f5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/VisitService/App.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/VisitService/Program.cs b/Learun.Framework.Ultimate V7/VisitService/Program.cs new file mode 100644 index 000000000..602b5cf38 --- /dev/null +++ b/Learun.Framework.Ultimate V7/VisitService/Program.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.ServiceProcess; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace VisitService +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + static void Main() + { + ServiceBase[] ServicesToRun; + ServicesToRun = new ServiceBase[] + { + new QuanjiangDigitalSchollVisitService() + }; + ServiceBase.Run(ServicesToRun); + } + + } +} diff --git a/Learun.Framework.Ultimate V7/VisitService/ProjectInstaller.Designer.cs b/Learun.Framework.Ultimate V7/VisitService/ProjectInstaller.Designer.cs new file mode 100644 index 000000000..25508f290 --- /dev/null +++ b/Learun.Framework.Ultimate V7/VisitService/ProjectInstaller.Designer.cs @@ -0,0 +1,60 @@ +namespace VisitService +{ + partial class ProjectInstaller + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller(); + this.QuanjiangDigitalSchollVisitService = new System.ServiceProcess.ServiceInstaller(); + // + // serviceProcessInstaller1 + // + this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem; + this.serviceProcessInstaller1.Password = null; + this.serviceProcessInstaller1.Username = null; + // + // QuanjiangDigitalSchollVisitService + // + this.QuanjiangDigitalSchollVisitService.Description = "定时访问api"; + this.QuanjiangDigitalSchollVisitService.DisplayName = "QuanjiangDigitalSchollVisitService"; + this.QuanjiangDigitalSchollVisitService.ServiceName = "QuanjiangDigitalSchollVisitService"; + this.QuanjiangDigitalSchollVisitService.StartType = System.ServiceProcess.ServiceStartMode.Automatic; + // + // ProjectInstaller + // + this.Installers.AddRange(new System.Configuration.Install.Installer[] { + this.serviceProcessInstaller1, + this.QuanjiangDigitalSchollVisitService}); + + } + + #endregion + + private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; + private System.ServiceProcess.ServiceInstaller QuanjiangDigitalSchollVisitService; + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/VisitService/ProjectInstaller.cs b/Learun.Framework.Ultimate V7/VisitService/ProjectInstaller.cs new file mode 100644 index 000000000..5646f79a4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/VisitService/ProjectInstaller.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Configuration.Install; +using System.Linq; +using System.Threading.Tasks; + +namespace VisitService +{ + [RunInstaller(true)] + public partial class ProjectInstaller : System.Configuration.Install.Installer + { + public ProjectInstaller() + { + InitializeComponent(); + } + } +} diff --git a/Learun.Framework.Ultimate V7/VisitService/ProjectInstaller.resx b/Learun.Framework.Ultimate V7/VisitService/ProjectInstaller.resx new file mode 100644 index 000000000..0ca207778 --- /dev/null +++ b/Learun.Framework.Ultimate V7/VisitService/ProjectInstaller.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 55 + + + 208, 17 + + + False + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/VisitService/Properties/AssemblyInfo.cs b/Learun.Framework.Ultimate V7/VisitService/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..1f9b4efc5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/VisitService/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("VisitService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("HP Inc.")] +[assembly: AssemblyProduct("VisitService")] +[assembly: AssemblyCopyright("Copyright © HP Inc. 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("1d482884-8749-41e7-b1e3-362612799615")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Learun.Framework.Ultimate V7/VisitService/Quanjiang.DigitalScholl.VisitService.csproj b/Learun.Framework.Ultimate V7/VisitService/Quanjiang.DigitalScholl.VisitService.csproj new file mode 100644 index 000000000..0de2af6e7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/VisitService/Quanjiang.DigitalScholl.VisitService.csproj @@ -0,0 +1,74 @@ + + + + + Debug + AnyCPU + {1D482884-8749-41E7-B1E3-362612799615} + WinExe + Quanjiang.DigitalScholl.VisitService + Quanjiang.DigitalScholl.VisitService + v4.5.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Component + + + ProjectInstaller.cs + + + Component + + + Service1.cs + + + + + + + + + + ProjectInstaller.cs + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/VisitService/Service1.Designer.cs b/Learun.Framework.Ultimate V7/VisitService/Service1.Designer.cs new file mode 100644 index 000000000..31f81b5a1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/VisitService/Service1.Designer.cs @@ -0,0 +1,37 @@ +namespace VisitService +{ + partial class QuanjiangDigitalSchollVisitService + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.ServiceName = "QuanjiangDigitalSchollVisitService"; + } + + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/VisitService/Service1.cs b/Learun.Framework.Ultimate V7/VisitService/Service1.cs new file mode 100644 index 000000000..3998ec890 --- /dev/null +++ b/Learun.Framework.Ultimate V7/VisitService/Service1.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net; +using System.ServiceProcess; +using System.Text; +using System.Threading.Tasks; + +namespace VisitService +{ + public partial class QuanjiangDigitalSchollVisitService : ServiceBase + { + public QuanjiangDigitalSchollVisitService() + { + InitializeComponent(); + } + + private System.Timers.Timer timer1 = new System.Timers.Timer(60000); + private static string pathbase = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; + //private static string logPath = pathbase + @"\" + DateTime.Now.ToString("yyyyMMdd") + @"\log_start.txt"; + protected override void OnStart(string[] args) + { + timer1.Elapsed += new System.Timers.ElapsedEventHandler(timer1_Elapsed); + timer1.AutoReset = true; + timer1.Enabled = true; + timer1.Start(); + } + + protected override void OnStop() + { + this.timer1.Enabled = false; + } + + private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + { + var logPath_timer = pathbase + @"\" + DateTime.Now.ToString("yyyyMMdd") + @"\log.txt"; + try + { + //记录日志 + if (!Directory.Exists(pathbase + @"\" + DateTime.Now.ToString("yyyyMMdd"))) + { + //不存在文件夹则创建 + DirectoryInfo directoryInfo = new DirectoryInfo(pathbase + @"\" + DateTime.Now.ToString("yyyyMMdd")); + directoryInfo.Create(); + } + if (!File.Exists(logPath_timer)) + { + FileStream fs = File.Create(logPath_timer);//创建文件 + fs.Close(); + } + + var url = System.Configuration.ConfigurationManager.AppSettings["cyapi"].ToString(); + var arr = url.Split(';'); + foreach (var item in arr) + { + try + { + System.IO.File.AppendAllText(logPath_timer, + "\r\n" + DateTime.Now + "\r\n开始访问:" + item); + + HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url); + myRequest.KeepAlive = false; + myRequest.Method = "HEAD"; //设置提交方式可以为"get","head"等 + //myRequest.Timeout = 60000; //设置网页响应时间长度 + myRequest.AllowAutoRedirect = false; //是否允许自动重定向 + HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse(); + // return (myResponse.StatusCode == HttpStatusCode.OK);//返回响应的状态 + System.IO.File.AppendAllText(logPath_timer, + "\r\n" + DateTime.Now + "\r\n访问结果:" + myResponse.StatusCode); + myResponse.Dispose(); + } + catch (Exception ex) + { + System.IO.File.AppendAllText(logPath_timer, + "\r\n" + DateTime.Now + "\r\n访问结果异常,异常信息:" + ex.Message + ",访问地址:" + item); + } + } + + } + catch (Exception ex) + { + System.IO.File.AppendAllText(logPath_timer, + "\r\n" + DateTime.Now + "\r\n访问结果异常,异常信息:" + ex.Message); + } + } + } +} diff --git a/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln b/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln index 926013aee..7d51a2054 100644 --- a/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln +++ b/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln @@ -128,6 +128,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Quanjiang.DigitalSchool.Asp EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Quanjiang.DigitalScholl.SendSms", "Quanjiang.DigitalScholl.SendSms\Quanjiang.DigitalScholl.SendSms.csproj", "{65CC5CDC-9638-4DD0-B2D6-3182CC16D2DA}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Quanjiang.DigitalScholl.VisitService", "VisitService\Quanjiang.DigitalScholl.VisitService.csproj", "{1D482884-8749-41E7-B1E3-362612799615}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Android = Debug|Android @@ -1662,6 +1664,42 @@ Global {65CC5CDC-9638-4DD0-B2D6-3182CC16D2DA}.Release|Windows-x64.Build.0 = Release|Any CPU {65CC5CDC-9638-4DD0-B2D6-3182CC16D2DA}.Release|Windows-x86.ActiveCfg = Release|Any CPU {65CC5CDC-9638-4DD0-B2D6-3182CC16D2DA}.Release|Windows-x86.Build.0 = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Android.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Android.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|iOS.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|iOS.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Windows-ARM.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Windows-ARM.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Windows-x64.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Windows-x64.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Windows-x86.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Debug|Windows-x86.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Android.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Android.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Any CPU.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Any CPU.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|iOS.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|iOS.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Windows-ARM.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Windows-ARM.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Windows-x64.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Windows-x64.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Windows-x86.ActiveCfg = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Development|Windows-x86.Build.0 = Debug|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Android.ActiveCfg = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Android.Build.0 = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Any CPU.Build.0 = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|iOS.ActiveCfg = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|iOS.Build.0 = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Windows-ARM.ActiveCfg = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Windows-ARM.Build.0 = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Windows-x64.ActiveCfg = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Windows-x64.Build.0 = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Windows-x86.ActiveCfg = Release|Any CPU + {1D482884-8749-41E7-B1E3-362612799615}.Release|Windows-x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1713,7 +1751,7 @@ Global {E05A2B9A-A939-450F-9A44-A8B3201D055A} = {ED258CD0-0A0C-490B-9D8F-B4CEC4467251} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35 SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451} + EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35 EndGlobalSection EndGlobal