From 697064834eef50e7e9741969475bf94563af8367 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 2 Mar 2023 11:49:48 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=8A=9E=E4=BA=8B=E5=A4=A7=E5=8E=85=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Content/images/wsbsdt.png | Bin 0 -> 2028 bytes .../Learun.Application.Web.csproj | 1 + .../Views/Home/AdminDefault.cshtml | 17 +++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/wsbsdt.png diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/wsbsdt.png b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/wsbsdt.png new file mode 100644 index 0000000000000000000000000000000000000000..9bcf6dce2d02d0680a0312e38cc20a3f8220c714 GIT binary patch literal 2028 zcmcIlZA=qq9IwkH4CdwwIyKuk&WWI0@0DwNS{Sq_9ab4sg^9-Nb5H3>+dJoRBr4Idmt@JZ7e6?sS#<6NH+3`Pi<&)0OJ^2!d|A`WJukoK z_y7H0p8vI$uUIxEZEl*yVwvJ8byuMGbn{6~u~;T$eRgaJO&(B7t96SdeTMl=vb?cx zw#71eMD|q~Ro>+SP{LMGQvA>w3#$liu`DT!sUoO@2Ihyga>R*W89a_-vgE|qViSJv`K@NO)Gq$sSY?Kys!XU5)%+X7#boL3x^`Q5Od;VyaF1V%OsACL5w;lUSt}? zs=VcxOVJ>fZ{-O}$meT^z4E1<5_ zYXFusz=$z#+?WKCXVrQwH0G%UNEm`)1k;f)I%!G`Du$v5mAm+n+)jF<3N8(bhNAft zB{ZI>@^Kc-<-&5-$Pr12>ba(#1RT0W13GbrVrYUw31fUTCvfP`E~4xLMa7|BR0Wb~ zh!X=Vk{oE92-NEpJQ3XxBLI5bP8^A{%CaO#Ebr%RfFc0Ju>?bLfUxIt65*E^PGVTQ zot5C2E_B|lfO<1{=J|NhN(w+6$@mBX8bTmCAQ8w1JQ1*QJRt%I36^3Q*3VFYa>Ttv zY%4Vx-5W7=F+M*2V!E1bCao(>NvpA)shs5mkvC z7Hc7?Mrv{FA2lu|q-b76LNRA=U-!6N<(d+ZLuf;k8AxEM ztfLG!CazH>+>{uFWNfT91reB6!ifX37NCSDmgPHyd14O5X`?}iNbgZ4ahR?IjHsx= zqFR)a|ENLoZqjwJ;oib0Rv-VH@I**KP>j?<)LTj1bcHm#P&^^zzjHOVcU#9Ahod%V z4wL;CO_CiPMi8}z`t#bgu@})N;T?~=$Y*bF|9Y@)S5d~~tLI1iyxku!>^{_*`trlm z(--YHcxq|$)DQZ%rOoosPwAV!_~fiZ9jU**utA*W9$J=#=Qd;0d|X>mR$I&FlGFZx z+Sxnu`0P%He(Bue(Wj>zy;Snx=}rBUGUr~Sw%S&`{_VhSerwm~c_(J}_OSj(X3^^x z{@8P&v+Pt3-*seU=kEPy_r$h*QD1cU#Gc>}d`H)j;nXwqxs~?z1NN5Zs(P-a&RqRg ztE+SPnSDRc&mLGaybIjlKl`^Qdalj^F-v$A&F?j2lET{AMHI;G&T$)kN!zqh8}SekLUI=ne!`E`GAb + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml index 15744a4a8..bdd225e8e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml @@ -3,6 +3,20 @@ Layout = "~/Views/Shared/_Admin.cshtml"; } @Html.AppendCssFile("/Views/Home/AdminDefault/index.css") + @@ -47,6 +61,9 @@
  • 备课任务 0 条
  • *@
  •           共 @ViewBag.UnreadNum 条
  • +
    + +
    @* 即时通讯窗体 *@ From 66fbc19ccc2d9015ddcb9fbc475916486762d18d Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 2 Mar 2023 12:08:00 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=80=E5=8D=A1=E9=80=9A=E6=8C=89?= =?UTF-8?q?=E6=9C=88=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/YKTStateMentController.cs | 22 ++++ .../AnalysisByMonthForStudent.cshtml | 46 +++++++ .../YKTStateMent/AnalysisByMonthForStudent.js | 115 ++++++++++++++++++ .../Learun.Application.Web.csproj | 2 + .../YKTStateMent/YKTStateMentBLL.cs | 19 +++ .../YKTStateMent/YKTStateMentEntity.cs | 3 + .../YKTStateMent/YKTStateMentIBLL.cs | 4 +- .../YKTStateMent/YKTStateMentService.cs | 101 +++++++++++++++ 8 files changed, 310 insertions(+), 2 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs index 490abd3a2..68bbfb88f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs @@ -51,6 +51,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } + [HttpGet] + public ActionResult AnalysisByMonthForStudent() + { + return View(); + } + #endregion #region 获取数据 @@ -77,6 +83,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success(jsonData); } + [HttpGet] + [AjaxOnly] + public ActionResult GetAnalysisByMonthForStudentPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = yktStateMentIbll.GetAnalysisByMonthForStudentPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + [HttpGet] [AjaxOnly] public ActionResult GetTeacherPageList(string pagination, string queryJson) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.cshtml new file mode 100644 index 000000000..a2dd45d77 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.cshtml @@ -0,0 +1,46 @@ +@{ + ViewBag.Title = "宿舍调换申请"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    系部
    +
    +
    +
    +
    专业
    +
    +
    +
    +
    班级
    +
    +
    +
    +
    月份
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js new file mode 100644 index 000000000..b31281e78 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js @@ -0,0 +1,115 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-07-11 14:34 + * 描 述:宿舍调换申请 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 250, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#DeptNo').lrselect({ + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } + }); + } + else { + $('#MajorNo').lrselectRefresh({ + url: "", + data: [] + }); + } + $('#ClassNo').lrselectRefresh({ + url: "", + data: [] + }); + } + }); + $('#MajorNo').lrselect({ + value: "majorno", + text: "majorname", + select: function (item) { + if (item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } + }); + } + + } + }); + + + $('#MajorNo').on("click", + function () { + var data = $('#DeptNo').lrselectGet(); + if (!data) { + learun.alert.error('请先选择系'); + } + }); + $('#ClassNo').on("click", + function () { + var data1 = $('#DeptNo').lrselectGet(); + var data2 = $('#MajorNo').lrselectGet(); + if (!data1 || !data2) { + learun.alert.error('请先选择系和专业'); + } + }); + + $('#ClassNo').lrselect({ + value: "classno", + text: "classname" + }); + $('#Months').lrDataItemSelect({ code: "MonthInt", type:"multiple"}); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/YKTStateMent/GetAnalysisByMonthForStudentPageList', + headData: [ + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { label: "姓名", name: "StuName", width: 100, align: "left" }, + { label: "系部", name: "DeptName", width: 100, align: "left" }, + { label: "专业", name: "MajorName", width: 100, align: "left" }, + { label: "班级", name: "ClassName", width: 100, align: "left" }, + { label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, + { label: "消费金额", name: "MONEY", width: 100, align: "left", statistics: true }, + { label: "消费次数", name: "PayTimes", width: 100, align: "left", statistics: true }, + { label: "平均消费金额", name: "PerMoney", width: 100, align: "left", statistics: true } + ], + isPage: true + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + param.StartDate = startTime; + param.EndDate = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + 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 4e60fe634..96feb9310 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 @@ -990,6 +990,7 @@ + @@ -8058,6 +8059,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentBLL.cs index 2c8562094..3589281cc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentBLL.cs @@ -62,6 +62,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetAnalysisByMonthForStudentPageList(Pagination paginationobj, string queryJson) + { + try + { + return yKTStateMentService.GetAnalysisByMonthForStudentPageList(paginationobj, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs index 7975449fc..d1420bcf5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs @@ -56,6 +56,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public string EmpName { get; set; } public string DepartmentName { get; set; } + public string PayTimes { get; set; } + public string PerMoney { get; set; } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentIBLL.cs index 234331c75..74e1df773 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentIBLL.cs @@ -26,7 +26,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration IEnumerable GetTeacherPageList(Pagination pagination, string queryJson); #endregion - - + + IEnumerable GetAnalysisByMonthForStudentPageList(Pagination paginationobj, string queryJson); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs index a7403e2cd..fd7ebebc0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs @@ -78,6 +78,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 一卡通学生月统计 + /// + /// + /// + /// + public IEnumerable GetAnalysisByMonthForStudentPageList(Pagination pagination, string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + var strSql = new StringBuilder(); + strSql.Append( + @"SELECT C.StuNo,C.StuName,d.DeptName,f.MajorName,e.ClassName,c.identityno as IdentityCardNo, sum(round(A.OPFARE/100,2)) AS MONEY,count(stuno) as PayTimes,round(sum(round(A.OPFARE/100,2))/count(stuno),2) as PerMoney + FROM M_REC_CONSUME@ykt A LEFT JOIN M_BASE_TERM@ykt B ON A.TERMID = B.TERMID + left join ds_stuinfo C on A.OUTID = C.mobile + left join ds_dept d on c.deptno = d.deptno + left join ds_classinfo e on c.classno = e.classno + left join ds_major f on c.majorno=f.majorno + where 1=1 and stuno is not null "); + if (!queryParam["DeptNo"].IsEmpty()) + { + strSql.Append($" AND C.DeptNo='{queryParam["DeptNo"].ToString()}' "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + strSql.Append($" AND C.MajorNo='{queryParam["MajorNo"].ToString()}' "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append($" AND C.ClassNo ='{queryParam["ClassNo"].ToString()}' "); + } + if (!queryParam["Months"].IsEmpty()) + { + strSql.Append(" and extract(month from A.OPDT) in("+ queryParam["Months"].ToString() + ")"); + } + strSql.Append("group by C.StuNo, C.StuName,d.DeptNo, d.DeptName, f.MajorName,f.MajorNo, e.ClassNo,e.ClassName, c.identityno"); + return BaseRepository("TLMZYMIDDLEString").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } public IEnumerable GetTeacherPageList(Pagination pagination, string queryJson) { @@ -127,6 +178,56 @@ B.TERMNAME,c.EmpNo,c.EmpName,d.Name as DepartmentName,c.identityno as IdentityCa } } + /// + /// 一卡通教师月统计 + /// + /// + /// + /// + public IEnumerable GetAnalysisByMonthForTeacherPageList(Pagination pagination, string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + var strSql = new StringBuilder(); + strSql.Append( + @"SELECT c.EmpNo,c.EmpName,d.Name as DepartmentName,c.identityno as IdentityCardNo, sum(round(A.OPFARE/100,2)) AS MONEY,count(EmpNo) as PayTimes,round(sum(round(A.OPFARE/100,2))/count(EmpNo),2) as PerMoney + FROM M_REC_CONSUME@ykt A LEFT JOIN M_BASE_TERM@ykt B ON A.TERMID = B.TERMID + left join ds_empinfo C on A.OUTID = C.mobile + left join ds_department d on c.departmentid=d.id + where 1=1 and EmpNo is not null "); + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append($" AND C.EmpNo like '%{queryParam["EmpNo"].ToString()}%' "); + } + if (!queryParam["EmpName"].IsEmpty()) + { + strSql.Append($" AND C.EmpName like '%{queryParam["EmpName"].ToString()}%' "); + } + if (!queryParam["DepartmentId"].IsEmpty()) + { + strSql.Append($" AND C.DepartmentId='{queryParam["DepartmentId"].ToString()}' "); + } + if (!queryParam["Months"].IsEmpty()) + { + strSql.Append(" and extract(month from A.OPDT) in(" + queryParam["Months"].ToString() + ")"); + } + strSql.Append("group by c.EmpNo,c.EmpName,d.DepartmentId,d.Name,c.identityno"); + return BaseRepository("TLMZYMIDDLEString").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion From e59495a19ddcb5187eac7f253946d69a0a14c5f0 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 2 Mar 2023 15:30:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E8=AF=84=E6=95=99=E7=AE=A1=E7=90=86=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E2=80=9C=E6=95=B4=E4=BD=93=E5=A4=8D=E5=88=B6=E2=80=9D=EF=BC=8C?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E9=97=AE=E5=8D=B7=E3=80=81=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=81=E7=AD=94=E6=A1=88=E7=9A=84=E6=95=B4=E4=BD=93=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Eval_MainController.cs | 12 ++ .../Views/Eval_Main/Index.cshtml | 5 +- .../EvaluationTeach/Views/Eval_Main/Index.js | 16 ++- .../EvaluationTeach/Eval_Main/Eval_MainBLL.cs | 23 ++++ .../Eval_Main/Eval_MainIBLL.cs | 7 ++ .../Eval_Main/Eval_MainService.cs | 110 +++++++++++++++++- 6 files changed, 165 insertions(+), 8 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Controllers/Eval_MainController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Controllers/Eval_MainController.cs index 20cfc439a..5108fcb7e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Controllers/Eval_MainController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Controllers/Eval_MainController.cs @@ -311,6 +311,18 @@ namespace Learun.Application.Web.Areas.EvaluationTeach.Controllers return Success("保存成功!"); } + /// + /// 整体复制 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoAllCopy(string keyValue) + { + ask_MainIBLL.DoAllCopy(keyValue); + return Success("操作成功!"); + } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Views/Eval_Main/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Views/Eval_Main/Index.cshtml index 843e01bb6..e024bbef1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Views/Eval_Main/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Views/Eval_Main/Index.cshtml @@ -30,7 +30,7 @@  录入  修改  删除 -  快速复制 + @* 快速复制*@  管理问题  学生评教情况  教师被评情况 @@ -41,6 +41,9 @@   审核   去审核 +
    diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Views/Eval_Main/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Views/Eval_Main/Index.js index 0c62d475c..d61663663 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Views/Eval_Main/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Views/Eval_Main/Index.js @@ -193,6 +193,17 @@ var bootstrap = function ($, learun) { }); } }); + + //整体复制 + $('#lr_allcopy').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('VID'); + if (learun.checkrow(keyValue)) { + learun.postForm(top.$.rootUrl + '/EvaluationTeach/Eval_Main/DoAllCopy', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + }, // 初始化列表 initGird: function () { @@ -201,11 +212,12 @@ var bootstrap = function ($, learun) { headData: [ { label: "评教编号", name: "VSerial", width: 250, align: "left" }, { label: "标题", name: "VTitle", width: 200, align: "left" }, - { label: "开始时间", name: "VStartTime", width: 100, align: "left" }, - { label: "结束时间", name: "VStopTime", width: 100, align: "left" }, + { label: "开始时间", name: "VStartTime", width: 130, align: "left" }, + { label: "结束时间", name: "VStopTime", width: 130, align: "left" }, { label: "评教学年", name: "AcademicYearNo", width: 80, align: "left" }, { label: "评教学期", name: "Semester", width: 80, align: "left" }, { label: "排序", name: "VOrder", width: 80, align: "left" }, + { label: "创建时间", name: "VCreateTime", width: 130, align: "left" }, { label: "审核标志", name: "Status", width: 100, align: "left", formatter: function (cellvalue) { return cellvalue == true ? "" : ""; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainBLL.cs index 1eeb3c705..0c9d8eefe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainBLL.cs @@ -397,6 +397,29 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach } } + /// + /// 整体复制 + /// 主键 + /// + /// + public void DoAllCopy(string keyValue) + { + try + { + ask_MainService.DoAllCopy(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainIBLL.cs index e92005214..cab91b210 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainIBLL.cs @@ -81,5 +81,12 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach List GetMuiltyResults(string vid, string LessonNo, string EmpNo, string StuNo,string QID); void DeleteQestionResult(string RID); bool HasEnabled(string keyValue); + + /// + /// 整体复制 + /// 主键 + /// + /// + void DoAllCopy(string keyValue); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs index f5ab9e4e1..1e6a95b2e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs @@ -562,7 +562,7 @@ where 1=1 "); strSql.Append(" and cc.EmpName like '%" + queryParam["keyword"] + "%' "); } strSql.Append(" order by ss.EmpNo,ss.LessonNo"); - + return this.BaseRepository().FindList(strSql.ToString()); } catch (Exception ex) @@ -592,7 +592,7 @@ where 1=1 "); { string sql = @"select c.* from [dbo].[Eval_Main] a left join [dbo].[Eval_Question] b on a.vid=b.vid left join[dbo].[Eval_QuestionResult] c on b.qid=c.qid - where a.vid='"+keyValue+"' and c.empno='"+EmpNo+"' and c.lessonno= '"+LessonNo+"' and c.uid= '"+stuno+"'"; + where a.vid='" + keyValue + "' and c.empno='" + EmpNo + "' and c.lessonno= '" + LessonNo + "' and c.uid= '" + stuno + "'"; return BaseRepository().FindList(sql); } catch (Exception ex) @@ -661,11 +661,11 @@ where 1=1 and iscore>100 order by IScore desc"; } } - public List GetMuiltyResults(string vid,string LessonNo,string EmpNo,string StuNo,string QID) + public List GetMuiltyResults(string vid, string LessonNo, string EmpNo, string StuNo, string QID) { try { - string sql = "select b.* from Eval_Question a left join Eval_QuestionResult b on a.QID=b.QID where a.vid = '" + vid + "' and b.LessonNo='"+ LessonNo + "' and b.EmpNo='"+EmpNo+"' and b.uid='"+ StuNo + "' and b.QID='"+QID+"'"; + string sql = "select b.* from Eval_Question a left join Eval_QuestionResult b on a.QID=b.QID where a.vid = '" + vid + "' and b.LessonNo='" + LessonNo + "' and b.EmpNo='" + EmpNo + "' and b.uid='" + StuNo + "' and b.QID='" + QID + "'"; return BaseRepository().FindList(sql).ToList(); } catch (Exception e) @@ -688,7 +688,7 @@ where 1=1 and iscore>100 order by IScore desc"; } } - + public bool HasEnabled(string keyValue) { try @@ -713,5 +713,105 @@ where 1=1 and iscore>100 order by IScore desc"; } } } + + /// + /// 整体复制 + /// 主键 + /// + /// + public void DoAllCopy(string keyValue) + { + var db = BaseRepository().BeginTrans(); + try + { + var loginUserInfo = LoginUserInfo.Get(); + //Eval_Main表 + var entity = this.BaseRepository().FindEntity(x => x.VID == keyValue); + if (entity != null) + { + //Eval_Main表副本 + var insertEval_MainEntity = new Eval_MainEntity() + { + VID = Guid.NewGuid().ToString(), + UID = loginUserInfo.userId, + UName = loginUserInfo.realName, + VTitle = entity.VTitle, + VContent = entity.VContent, + VCreateTime = DateTime.Now, + VStartTime = entity.VStartTime, + VStopTime = entity.VStopTime, + AcademicYearNo = entity.AcademicYearNo, + Semester = entity.Semester, + Status = false, + VOrder = entity.VOrder, + VSerial = "EvaluationTeach_" + CommonHelper.CreateNo() + }; + db.Insert(insertEval_MainEntity); + //Eval_Question表 + var questionList = this.BaseRepository().FindList(x => x.VID == entity.VID); + if (questionList.Any()) + { + var insertEval_QuestionList = new List(); + var insertEval_QuestionItemsList = new List(); + foreach (var questionItem in questionList) + { + //Eval_Question表副本 + var insertEval_QuestionEntity = new Eval_QuestionEntity() + { + QID = Guid.NewGuid().ToString(), + VID = insertEval_MainEntity.VID, + QTitle = questionItem.QTitle, + QContent = questionItem.QContent, + QType = questionItem.QType, + QMust = questionItem.QMust, + QMin = questionItem.QMin, + QMax = questionItem.QMax, + QOrder = questionItem.QOrder, + QSerial = "Question_" + CommonHelper.CreateNo() + }; + insertEval_QuestionList.Add(insertEval_QuestionEntity); + //Eval_QuestionItems表 + var questionItemsList = this.BaseRepository().FindList(x => x.QID == questionItem.QID); + if (questionItemsList.Any()) + { + foreach (var qiItem in questionItemsList) + { + //Eval_QuestionItems表副本 + var insertEval_QuestionItemsEntity = new Eval_QuestionItemsEntity() + { + IID = Guid.NewGuid().ToString(), + QID = insertEval_QuestionEntity.QID, + ITitle = qiItem.ITitle, + IContent = qiItem.IContent, + QShowText = qiItem.QShowText, + IScore = qiItem.IScore, + IOrder = qiItem.IOrder + }; + insertEval_QuestionItemsList.Add(insertEval_QuestionItemsEntity); + } + } + + } + db.Insert(insertEval_QuestionList); + db.Insert(insertEval_QuestionItemsList); + } + } + + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + } } From dc169e42c88d7e760634345cef6a0f62819b039c Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 3 Mar 2023 09:13:48 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E4=B8=80=E5=8D=A1?= =?UTF-8?q?=E9=80=9A=E6=9C=88=E7=BB=9F=E8=AE=A1=E5=A2=9E=E5=8A=A0=E5=B9=B4?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/YKTStateMentController.cs | 5 +++++ .../Views/YKTStateMent/AnalysisByMonthForStudent.cshtml | 4 ++++ .../Views/YKTStateMent/AnalysisByMonthForStudent.js | 9 +++++++-- .../YKTStateMent/YKTStateMentService.cs | 4 ++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs index 68bbfb88f..bca4feec6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/YKTStateMentController.cs @@ -30,6 +30,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + [HttpGet] + public ActionResult GenerateNearByYear() + { + return Success(Learun.Util.WebHelper.GenerateNearByYear()); + } [HttpGet] public ActionResult ManageIndexTeacher() diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.cshtml index a2dd45d77..3b296cdce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.cshtml @@ -25,6 +25,10 @@
    班级
    +
    +
    年份
    +
    +
    月份
    diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js index b31281e78..28de74170 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/YKTStateMent/AnalysisByMonthForStudent.js @@ -17,7 +17,7 @@ var bootstrap = function ($, learun) { bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); - }, 250, 400); + }, 300, 400); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -80,7 +80,12 @@ var bootstrap = function ($, learun) { value: "classno", text: "classname" }); - $('#Months').lrDataItemSelect({ code: "MonthInt", type:"multiple"}); + $('#Months').lrDataItemSelect({ code: "MonthInt", type: "multiple" }); + $('#Year').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/YKTStateMent/GenerateNearByYear', + value: 'value', + text: 'text' + }); }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs index fd7ebebc0..363a4ce84 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentService.cs @@ -114,6 +114,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append(" and extract(month from A.OPDT) in("+ queryParam["Months"].ToString() + ")"); } + if (!queryParam["Year"].IsEmpty()) + { + strSql.Append(" and extract(year from A.OPDT) in(" + queryParam["Year"].ToString() + ")"); + } strSql.Append("group by C.StuNo, C.StuName,d.DeptNo, d.DeptName, f.MajorName,f.MajorNo, e.ClassNo,e.ClassName, c.identityno"); return BaseRepository("TLMZYMIDDLEString").FindList(strSql.ToString(), pagination); }