@@ -1,15 +1,15 @@ | |||
var config = { | |||
webapi: 'http://localhost:8088/', | |||
web: "http://localhost:8087/"//web地址,用于配置logo | |||
}; | |||
//var config = { | |||
// webapi: 'http://localhost:8088/', | |||
// web: "http://localhost:8087/"//web地址,用于配置logo | |||
//}; | |||
//var config = { | |||
// webapi: 'http://112.230.201.53:31173/', | |||
// web:"http://112.230.201.53/:8081/"//web地址,用于配置logo | |||
//}; | |||
//var config = { | |||
// webapi: 'http://localhost:31173/', | |||
// web: "http://localhost:20472/"//web地址,用于配置logo | |||
//}; | |||
var config = { | |||
webapi: 'http://localhost:31173/', | |||
web: "http://localhost:20472/"//web地址,用于配置logo | |||
}; | |||
//var config = { | |||
@@ -46,6 +46,7 @@ | |||
$desktop.append(_html); | |||
learun.httpget(config.webapi + "learun/adms/desktop/data", { type: 'list', id: _item.F_Id }, function (data) { | |||
console.log(data); | |||
if (data) { | |||
var $list = $('[data-desktop="' + data.Id + '"]'); | |||
//待办 | |||
@@ -1,9 +1,13 @@ | |||
using Learun.Util; | |||
using System; | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using Learun.Application.Base.SystemModule; | |||
using System.Collections.Generic; | |||
using System.IO; | |||
using CrystalDecisions.CrystalReports.Engine; | |||
using CrystalDecisions.Shared; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
@@ -38,6 +42,18 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult AttendanceReportByWeek() | |||
{ | |||
ReportClass rptH = new ReportClass(); | |||
rptH.FileName = Server.MapPath("~/Areas/LogisticsManagement/Views/ADR_Record/AttendanceReportByWeek.rpt"); | |||
rptH.Load(); | |||
var recrodlist = aDR_RecordIBLL.GetList("{}"); | |||
rptH.SetDataSource(Util.DataBase.DataConvert.ToDataTable(recrodlist)); | |||
Stream stream = rptH.ExportToStream(ExportFormatType.PortableDocFormat); | |||
return File(stream, "application/pdf"); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -121,6 +137,6 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,9 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<!--<autogenerated> | |||
This code was generated by a tool. | |||
Changes to this file may cause incorrect behavior and will be lost if | |||
the code is regenerated. | |||
</autogenerated>--> | |||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> | |||
<TableUISettings /> | |||
</DataSetUISetting> |
@@ -0,0 +1,37 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<xs:schema id="ADR_Record" targetNamespace="http://tempuri.org/ADR_Record.xsd" xmlns:mstns="http://tempuri.org/ADR_Record.xsd" xmlns="http://tempuri.org/ADR_Record.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified"> | |||
<xs:annotation> | |||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource"> | |||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> | |||
<Connections /> | |||
<Tables /> | |||
<Sources /> | |||
</DataSource> | |||
</xs:appinfo> | |||
</xs:annotation> | |||
<xs:element name="ADR_Record" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="ADR_Record" msprop:Generator_UserDSName="ADR_Record"> | |||
<xs:complexType> | |||
<xs:choice minOccurs="0" maxOccurs="unbounded"> | |||
<xs:element name="ADR_Record" msprop:Generator_TableClassName="ADR_RecordDataTable" msprop:Generator_TableVarName="tableADR_Record" msprop:Generator_RowChangedName="ADR_RecordRowChanged" msprop:Generator_TablePropName="_ADR_Record" msprop:Generator_RowDeletingName="ADR_RecordRowDeleting" msprop:Generator_RowChangingName="ADR_RecordRowChanging" msprop:Generator_RowEvHandlerName="ADR_RecordRowChangeEventHandler" msprop:Generator_RowDeletedName="ADR_RecordRowDeleted" msprop:Generator_RowClassName="ADR_RecordRow" msprop:Generator_UserTableName="ADR_Record" msprop:Generator_RowEvArgName="ADR_RecordRowChangeEvent"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="ID" msprop:Generator_ColumnVarNameInTable="columnID" msprop:Generator_ColumnPropNameInRow="ID" msprop:Generator_ColumnPropNameInTable="IDColumn" msprop:Generator_UserColumnName="ID" type="xs:string" minOccurs="0" /> | |||
<xs:element name="UserName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="UserName" msprop:Generator_ColumnVarNameInTable="columnUserName" msprop:Generator_ColumnPropNameInTable="UserNameColumn" msprop:Generator_UserColumnName="UserName" type="xs:string" minOccurs="0" /> | |||
<xs:element name="UserNo" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="UserNo" msprop:Generator_ColumnVarNameInTable="columnUserNo" msprop:Generator_ColumnPropNameInTable="UserNoColumn" msprop:Generator_UserColumnName="UserNo" type="xs:string" minOccurs="0" /> | |||
<xs:element name="Department" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Department" msprop:Generator_ColumnVarNameInTable="columnDepartment" msprop:Generator_ColumnPropNameInTable="DepartmentColumn" msprop:Generator_UserColumnName="Department" type="xs:string" minOccurs="0" /> | |||
<xs:element name="ADType" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ADType" msprop:Generator_ColumnVarNameInTable="columnADType" msprop:Generator_ColumnPropNameInTable="ADTypeColumn" msprop:Generator_UserColumnName="ADType" type="xs:string" minOccurs="0" /> | |||
<xs:element name="ADTime" msprop:Generator_ColumnVarNameInTable="columnADTime" msprop:Generator_ColumnPropNameInRow="ADTime" msprop:Generator_ColumnPropNameInTable="ADTimeColumn" msprop:Generator_UserColumnName="ADTime" type="xs:dateTime" minOccurs="0" /> | |||
<xs:element name="ClockTime" msprop:Generator_ColumnVarNameInTable="columnClockTime" msprop:Generator_ColumnPropNameInRow="ClockTime" msprop:Generator_ColumnPropNameInTable="ClockTimeColumn" msprop:Generator_UserColumnName="ClockTime" type="xs:dateTime" minOccurs="0" /> | |||
<xs:element name="ClockStatus" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ClockStatus" msprop:Generator_ColumnVarNameInTable="columnClockStatus" msprop:Generator_ColumnPropNameInTable="ClockStatusColumn" msprop:Generator_UserColumnName="ClockStatus" type="xs:string" minOccurs="0" /> | |||
<xs:element name="ClockPlace" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ClockPlace" msprop:Generator_ColumnVarNameInTable="columnClockPlace" msprop:Generator_ColumnPropNameInTable="ClockPlaceColumn" msprop:Generator_UserColumnName="ClockPlace" type="xs:string" minOccurs="0" /> | |||
<xs:element name="ADYear" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ADYear" msprop:Generator_ColumnVarNameInTable="columnADYear" msprop:Generator_ColumnPropNameInTable="ADYearColumn" msprop:Generator_UserColumnName="ADYear" type="xs:string" minOccurs="0" /> | |||
<xs:element name="ADMonth" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ADMonth" msprop:Generator_ColumnVarNameInTable="columnADMonth" msprop:Generator_ColumnPropNameInTable="ADMonthColumn" msprop:Generator_UserColumnName="ADMonth" type="xs:string" minOccurs="0" /> | |||
<xs:element name="ADDay" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ADDay" msprop:Generator_ColumnVarNameInTable="columnADDay" msprop:Generator_ColumnPropNameInTable="ADDayColumn" msprop:Generator_UserColumnName="ADDay" type="xs:string" minOccurs="0" /> | |||
<xs:element name="ADPhoto" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ADPhoto" msprop:Generator_ColumnVarNameInTable="columnADPhoto" msprop:Generator_ColumnPropNameInTable="ADPhotoColumn" msprop:Generator_UserColumnName="ADPhoto" type="xs:string" minOccurs="0" /> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:choice> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:schema> |
@@ -0,0 +1,12 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<!--<autogenerated> | |||
This code was generated by a tool to store the dataset designer's layout information. | |||
Changes to this file may cause incorrect behavior and will be lost if | |||
the code is regenerated. | |||
</autogenerated>--> | |||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> | |||
<Shapes> | |||
<Shape ID="DesignTable:ADR_Record" ZOrder="1" X="555" Y="185" Height="257" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="24" SplitterPosition="253" /> | |||
</Shapes> | |||
<Connectors /> | |||
</DiagramLayout> |
@@ -0,0 +1,154 @@ | |||
//------------------------------------------------------------------------------ | |||
// <auto-generated> | |||
// 此代码由工具生成。 | |||
// 运行时版本:4.0.30319.42000 | |||
// | |||
// 对此文件的更改可能会导致不正确的行为,并且如果 | |||
// 重新生成代码,这些更改将会丢失。 | |||
// </auto-generated> | |||
//------------------------------------------------------------------------------ | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Views.ADR_Record { | |||
using System; | |||
using System.ComponentModel; | |||
using CrystalDecisions.Shared; | |||
using CrystalDecisions.ReportSource; | |||
using CrystalDecisions.CrystalReports.Engine; | |||
public class AttendanceReportByWeek : ReportClass { | |||
public AttendanceReportByWeek() { | |||
} | |||
public override string ResourceName { | |||
get { | |||
return "AttendanceReportByWeek.rpt"; | |||
} | |||
set { | |||
// Do nothing | |||
} | |||
} | |||
public override bool NewGenerator { | |||
get { | |||
return true; | |||
} | |||
set { | |||
// Do nothing | |||
} | |||
} | |||
public override string FullResourceName { | |||
get { | |||
return "Learun.Application.Web.Areas.LogisticsManagement.Views.ADR_Record.AttendanceRepor" + | |||
"tByWeek.rpt"; | |||
} | |||
set { | |||
// Do nothing | |||
} | |||
} | |||
[Browsable(false)] | |||
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] | |||
public CrystalDecisions.CrystalReports.Engine.Section Section1 { | |||
get { | |||
return this.ReportDefinition.Sections[0]; | |||
} | |||
} | |||
[Browsable(false)] | |||
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] | |||
public CrystalDecisions.CrystalReports.Engine.Section Section2 { | |||
get { | |||
return this.ReportDefinition.Sections[1]; | |||
} | |||
} | |||
[Browsable(false)] | |||
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] | |||
public CrystalDecisions.CrystalReports.Engine.Section Section3 { | |||
get { | |||
return this.ReportDefinition.Sections[2]; | |||
} | |||
} | |||
[Browsable(false)] | |||
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] | |||
public CrystalDecisions.CrystalReports.Engine.Section Section4 { | |||
get { | |||
return this.ReportDefinition.Sections[3]; | |||
} | |||
} | |||
[Browsable(false)] | |||
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] | |||
public CrystalDecisions.CrystalReports.Engine.Section Section5 { | |||
get { | |||
return this.ReportDefinition.Sections[4]; | |||
} | |||
} | |||
} | |||
[System.Drawing.ToolboxBitmapAttribute(typeof(CrystalDecisions.Shared.ExportOptions), "report.bmp")] | |||
public class CachedAttendanceReportByWeek : Component, ICachedReport { | |||
public CachedAttendanceReportByWeek() { | |||
} | |||
[Browsable(false)] | |||
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] | |||
public virtual bool IsCacheable { | |||
get { | |||
return true; | |||
} | |||
set { | |||
// | |||
} | |||
} | |||
[Browsable(false)] | |||
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] | |||
public virtual bool ShareDBLogonInfo { | |||
get { | |||
return false; | |||
} | |||
set { | |||
// | |||
} | |||
} | |||
[Browsable(false)] | |||
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] | |||
public virtual System.TimeSpan CacheTimeOut { | |||
get { | |||
return CachedReportConstants.DEFAULT_TIMEOUT; | |||
} | |||
set { | |||
// | |||
} | |||
} | |||
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { | |||
AttendanceReportByWeek rpt = new AttendanceReportByWeek(); | |||
rpt.Site = this.Site; | |||
return rpt; | |||
} | |||
public virtual string GetCustomizedCacheKey(RequestContext request) { | |||
String key = null; | |||
// // The following is the code used to generate the default | |||
// // cache key for caching report jobs in the ASP.NET Cache. | |||
// // Feel free to modify this code to suit your needs. | |||
// // Returning key == null causes the default cache key to | |||
// // be generated. | |||
// | |||
// key = RequestContext.BuildCompleteCacheKey( | |||
// request, | |||
// null, // sReportFilename | |||
// this.GetType(), | |||
// this.ShareDBLogonInfo ); | |||
return key; | |||
} | |||
} | |||
} |
@@ -0,0 +1,42 @@ | |||
@{ | |||
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> | |||
<div id="Department"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">打卡地点</div> | |||
<div id="ADR_Device"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">打卡结果</div> | |||
<div id="ADStatus"></div> | |||
</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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ADR_Record/AttendanceReportByWeek.js") |
@@ -0,0 +1,72 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-08-28 18:09 | |||
* 描 述:考勤记录 | |||
*/ | |||
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); | |||
$('#Department').lrDepartmentSelect(); | |||
$('#ADR_Device').lrDataSourceSelect({ code: 'ADR_Device', value: 'dname', text: 'dname' }); | |||
$('#ADStatus').lrDataItemSelect({ code: 'ADStatus'}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
}; | |||
page.init(); | |||
} |
@@ -57,6 +57,10 @@ | |||
<Reference Include="ClosedXML, Version=0.93.0.0, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\ClosedXML.0.93.0\lib\net40\ClosedXML.dll</HintPath> | |||
</Reference> | |||
<Reference Include="CrystalDecisions.CrystalReports.Engine, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" /> | |||
<Reference Include="CrystalDecisions.ReportSource, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" /> | |||
<Reference Include="CrystalDecisions.Shared, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" /> | |||
<Reference Include="CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" /> | |||
<Reference Include="DocumentFormat.OpenXml, Version=2.8.1.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\DocumentFormat.OpenXml.2.8.1\lib\net46\DocumentFormat.OpenXml.dll</HintPath> | |||
</Reference> | |||
@@ -72,24 +76,6 @@ | |||
<Reference Include="FastMember.Signed, Version=1.3.0.0, Culture=neutral, PublicKeyToken=9e8f22703bef9a29, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\FastMember.Signed.1.3.0\lib\net45\FastMember.Signed.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Gcef.Data.ExpressionInfo"> | |||
<HintPath>..\packages\Gcef.Data.ExpressionInfo.2.0.184\lib\net40\Gcef.Data.ExpressionInfo.dll</HintPath> | |||
</Reference> | |||
<Reference Include="GrapeCity.ActiveReports"> | |||
<HintPath>..\packages\GrapeCity.ActiveReports.14.0.19484\lib\net462\GrapeCity.ActiveReports.dll</HintPath> | |||
</Reference> | |||
<Reference Include="GrapeCity.ActiveReports.Aspnet.Viewer"> | |||
<HintPath>..\packages\GrapeCity.ActiveReports.Aspnet.Viewer.14.0.1778\lib\net462\GrapeCity.ActiveReports.Aspnet.Viewer.dll</HintPath> | |||
</Reference> | |||
<Reference Include="GrapeCity.ActiveReports.Core.Rdl"> | |||
<HintPath>..\packages\GrapeCity.ActiveReports.Core.Rdl.1.5.3300\lib\net462\GrapeCity.ActiveReports.Core.Rdl.dll</HintPath> | |||
</Reference> | |||
<Reference Include="GrapeCity.ActiveReports.Core.Rendering"> | |||
<HintPath>..\packages\GrapeCity.ActiveReports.Core.Rendering.1.5.3300\lib\net462\GrapeCity.ActiveReports.Core.Rendering.dll</HintPath> | |||
</Reference> | |||
<Reference Include="GrapeCity.ActiveReports.Web.Viewer"> | |||
<HintPath>..\packages\GrapeCity.ActiveReports.Web.Viewer.14.0.1778\lib\net462\GrapeCity.ActiveReports.Web.Viewer.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Hangfire.Core, Version=1.7.3.0, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\Hangfire.Core.1.7.3\lib\net45\Hangfire.Core.dll</HintPath> | |||
</Reference> | |||
@@ -229,6 +215,7 @@ | |||
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.Serialization" /> | |||
<Reference Include="System.Security" /> | |||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath> | |||
</Reference> | |||
@@ -374,6 +361,17 @@ | |||
<Compile Include="Areas\LogisticsManagement\Controllers\APAppointmentPsychologistController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\CompanyNewsController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\LogisticsManagementAreaRegistration.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Views\ADR_Record\ADR_Record.Designer.cs"> | |||
<AutoGen>True</AutoGen> | |||
<DesignTime>True</DesignTime> | |||
<DependentUpon>ADR_Record.xsd</DependentUpon> | |||
</Compile> | |||
<Compile Include="Areas\LogisticsManagement\Views\ADR_Record\AttendanceReportByWeek.cs"> | |||
<AutoGen>True</AutoGen> | |||
<DesignTime>True</DesignTime> | |||
<DependentUpon>AttendanceReportByWeek.rpt</DependentUpon> | |||
<SubType>Component</SubType> | |||
</Compile> | |||
<Compile Include="Areas\LR_AuthorizeModule\Controllers\AuthorizeController.cs" /> | |||
<Compile Include="Areas\LR_AuthorizeModule\Controllers\FilterIPController.cs" /> | |||
<Compile Include="Areas\LR_AuthorizeModule\Controllers\FilterTimeController.cs" /> | |||
@@ -1132,6 +1130,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\TeachSwitch\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\Allocation.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\DormitoryAdd.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\AttendanceReportByWeek.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\APAppointmentPsychologist\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\APAppointmentPsychologist\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\CompanyNews\Form.js" /> | |||
@@ -6801,6 +6800,18 @@ | |||
<Content Include="Areas\LR_SystemModule\Views\Files\FolderIndex.cshtml" /> | |||
<Content Include="Areas\LR_SystemModule\Views\Files\Form.cshtml" /> | |||
<Content Include="Areas\LR_SystemModule\Views\Files\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\AttendanceReportByWeek.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\ADR_Record.xsc"> | |||
<DependentUpon>ADR_Record.xsd</DependentUpon> | |||
</Content> | |||
<None Include="Areas\LogisticsManagement\Views\ADR_Record\ADR_Record.xsd"> | |||
<SubType>Designer</SubType> | |||
<Generator>MSDataSetGenerator</Generator> | |||
<LastGenOutput>ADR_Record.Designer.cs</LastGenOutput> | |||
</None> | |||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\ADR_Record.xss"> | |||
<DependentUpon>ADR_Record.xsd</DependentUpon> | |||
</Content> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -6868,6 +6879,16 @@ | |||
<Analyzer Include="..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\cs\Microsoft.DependencyValidation.Analyzers.resources.dll" /> | |||
<Analyzer Include="..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\Microsoft.DependencyValidation.Analyzers.dll" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<EmbeddedResource Include="Areas\LogisticsManagement\Views\ADR_Record\AttendanceReportByWeek.rpt"> | |||
<Generator>CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator</Generator> | |||
<LastGenOutput>AttendanceReportByWeek.cs</LastGenOutput> | |||
</EmbeddedResource> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> | |||
<Service Include="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}" /> | |||
</ItemGroup> | |||
<PropertyGroup> | |||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | |||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | |||
@@ -1,8 +1,4 @@ | |||
using GrapeCity.ActiveReports; | |||
using GrapeCity.ActiveReports.Aspnet.Viewer; | |||
using GrapeCity.ActiveReports.PageReportModel; | |||
using GrapeCity.ActiveReports.Rendering; | |||
using Microsoft.Owin; | |||
using Microsoft.Owin; | |||
using Owin; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
@@ -20,103 +16,8 @@ namespace Learun.Application.Web | |||
public void Configuration(IAppBuilder app) | |||
{ | |||
app.UseReporting(settings => | |||
{ | |||
settings.UseCompression = true; | |||
settings.UseCustomStore(GetReport);//使用UseCustomStore来自定义一些需要的值 | |||
//settings.UseFileStore(new DirectoryInfo(String.Format(@"{0}.\Reports\", HttpRuntime.AppDomainAppPath))); | |||
//settings.LocateDataSource = GetData; | |||
}); | |||
} | |||
public object GetReport(string P)//获取报表名称和报表参数,进行一个对应的报表名称和参数的分割 | |||
{ | |||
var plist = P.Split('|'); | |||
string reportName = plist[0];//报表名称; | |||
PageReport rep = new PageReport(); | |||
string path = Assembly.GetExecutingAssembly().CodeBase.Replace("bin/Learun.Application.Web.DLL", "Reports/").Replace("file:///", ""); | |||
//string path = System.Web.Hosting.HostingEnvironment.MapPath("~/"); | |||
rep.Load(new FileInfo(path + reportName)); | |||
int num = 0; | |||
foreach (var item in plist) | |||
{ | |||
if (num > 0) | |||
{ | |||
AddReportPara("param" + num, item, rep); | |||
} | |||
num++; | |||
} | |||
return rep.Report; | |||
} | |||
/// <summary> | |||
/// 报表参数添加 | |||
/// </summary> | |||
/// <param name="name">参数名</param> | |||
/// <param name="value">参数值</param> | |||
/// <param name="rp">报表体</param> | |||
private void AddReportPara(string name, string value, PageReport rep) | |||
{ | |||
//如果没有值,报表不会自动运行,所以不能加 | |||
if (string.IsNullOrEmpty(value.Trim())) | |||
{ | |||
return; | |||
} | |||
Dictionary<string, string> dicParas = new Dictionary<string, string>(); | |||
foreach (var item in rep.Report.ReportParameters) | |||
{ | |||
if (!dicParas.ContainsKey(item.Name)) | |||
{ | |||
dicParas.Add(item.Name, item.DefaultValue.Values[0].Expression); | |||
} | |||
} | |||
if (!dicParas.ContainsKey(name)) | |||
{ | |||
ReportParameter para = new ReportParameter(); | |||
para.Name = name; | |||
para.Prompt = name; | |||
para.UsedInQuery = ReportParameterUsedInQuery.True; | |||
para.DataType = ReportParameterDataType.String; | |||
para.DefaultValue.Values.Add(value.Trim()); | |||
rep.Report.ReportParameters.Add(para); | |||
} | |||
} | |||
/// <summary> | |||
/// 自定义数据源 | |||
/// </summary> | |||
/// <param name="args">报表数据参数</param> | |||
/// <returns></returns> | |||
//public object GetData(LocateDataSourceArgs args) | |||
//{ | |||
// Dictionary<string, string> dcFilter = new Dictionary<string, string>(); | |||
// DataTable dtData = new DataTable(); | |||
// string name = args.Report.Name.ToString(); | |||
// string dataSource = args.DataSet.Query.DataSourceName; | |||
// string dataSet = args.DataSet.Name; | |||
// switch (name) | |||
// { | |||
// case "制程工单.rdlx": | |||
// if (args.Report.ReportParameters.Count > 0) | |||
// { | |||
// var id = args.Report.ReportParameters[0].DefaultValue.Values[0].Expression; | |||
// WorkOrderIBLL workOrderIBLL = new WorkOrderBLL(); | |||
// dtData = workOrderIBLL.GetPrintItem(id); | |||
// } | |||
// break; | |||
// } | |||
// return dtData; | |||
//} | |||
} | |||
} |
@@ -11,9 +11,19 @@ | |||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> | |||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> | |||
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> | |||
<!--水晶报表配置 start--> | |||
<sectionGroup name="businessObjects"> | |||
<sectionGroup name="crystalReports"> | |||
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null" /> | |||
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler" /> | |||
<section name="printControl" type="System.Configuration.NameValueSectionHandler" /> | |||
</sectionGroup> | |||
</sectionGroup> | |||
<!--水晶报表配置 end--> | |||
</configSections> | |||
<unity configSource="XmlConfig\ioc.config" /> | |||
<connectionStrings configSource="XmlConfig\database.config" /> | |||
<connectionStrings configSource="XmlConfig\database.config"> | |||
</connectionStrings> | |||
<appSettings configSource="XmlConfig\system.config" /> | |||
<log4net configSource="XmlConfig\log4net.config" /> | |||
<!-- | |||
@@ -29,6 +39,15 @@ | |||
<compilation debug="true" targetFramework="4.6.2"> | |||
<assemblies> | |||
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |||
<!--水晶报表配置 start--> | |||
<add assembly="CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> | |||
<add assembly="CrystalDecisions.Shared, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> | |||
<!--<add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>--> | |||
<add assembly="CrystalDecisions.ReportSource, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> | |||
<!--<add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> | |||
<add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>--> | |||
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> | |||
<!--水晶报表配置 end--> | |||
</assemblies> | |||
</compilation> | |||
<customErrors mode="Off" defaultRedirect="\Error\ErrorPath404" /> | |||
@@ -43,6 +62,16 @@ | |||
</namespaces> | |||
</pages> | |||
</system.web> | |||
<!--水晶报表配置 start--> | |||
<businessObjects> | |||
<crystalReports> | |||
<rptBuildProvider> | |||
<add embedRptInResource="true" /> | |||
<add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/> | |||
</rptBuildProvider> | |||
</crystalReports> | |||
</businessObjects> | |||
<!--水晶报表配置 end--> | |||
<system.webServer> | |||
<security> | |||
<requestFiltering allowDoubleEscaping="true" /> | |||
@@ -19,6 +19,7 @@ | |||
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
<!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />--> | |||
@@ -4,6 +4,7 @@ | |||
<package id="CommonServiceLocator" version="1.3" targetFramework="net45" /> | |||
<package id="DocumentFormat.OpenXml" version="2.8.1" targetFramework="net462" /> | |||
<package id="EntityFramework" version="6.1.3" targetFramework="net45" /> | |||
<package id="EntityFramework.zh-Hans" version="6.2.0" targetFramework="net462" /> | |||
<package id="ExcelNumberFormat" version="1.0.3" targetFramework="net45" /> | |||
<package id="FastMember.Signed" version="1.3.0" targetFramework="net45" /> | |||
<package id="Hangfire" version="1.7.3" targetFramework="net45" /> | |||
@@ -161,7 +161,6 @@ namespace Learun.Application.WebApi.Modules | |||
{ | |||
Id = param.id, | |||
value = dtnew | |||
}; | |||
} | |||
else | |||
@@ -0,0 +1,92 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Reflection; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace Learun.Util.DataBase | |||
{ | |||
public static class DataConvert | |||
{ | |||
public static DataTable ToDataTable<T>(this IEnumerable<T> varlist) | |||
{ | |||
DataTable dtReturn = new DataTable(); | |||
// column names | |||
PropertyInfo[] oProps = null; | |||
// Could add a check to verify that there is an element 0 | |||
foreach (T rec in varlist) | |||
{ | |||
if (oProps == null) | |||
{ | |||
oProps = ((Type)rec.GetType()).GetProperties(); | |||
foreach (PropertyInfo pi in oProps) | |||
{ | |||
Type colType = pi.PropertyType; if ((colType.IsGenericType) && (colType.GetGenericTypeDefinition() == typeof(Nullable<>))) | |||
{ | |||
colType = colType.GetGenericArguments()[0]; | |||
} | |||
dtReturn.Columns.Add(new DataColumn(pi.Name, colType)); | |||
} | |||
} | |||
DataRow dr = dtReturn.NewRow(); foreach (PropertyInfo pi in oProps) | |||
{ | |||
dr[pi.Name] = pi.GetValue(rec, null) == null ? DBNull.Value : pi.GetValue(rec, null); | |||
} | |||
dtReturn.Rows.Add(dr); | |||
} | |||
return (dtReturn); | |||
} | |||
public static DataSet ConvertToDataSet<T>(IList<T> list) | |||
{ | |||
if (list == null || list.Count <= 0) | |||
return null; | |||
DataSet ds = new DataSet(); | |||
DataTable dt = new DataTable(typeof(T).Name); | |||
DataColumn column; | |||
DataRow row; | |||
System.Reflection.PropertyInfo[] myPropertyInfo = | |||
typeof(T).GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance); | |||
foreach (T t in list) | |||
{ | |||
if (t == null) continue; | |||
row = dt.NewRow(); | |||
for (int i = 0, j = myPropertyInfo.Length; i < j; i++) | |||
{ | |||
System.Reflection.PropertyInfo pi = myPropertyInfo[i]; | |||
String name = pi.Name; | |||
if (dt.Columns[name] == null) | |||
{ | |||
if (pi.PropertyType.UnderlyingSystemType.ToString() == "System.Nullable`1[System.Int32]") | |||
{ | |||
column = new DataColumn(name, typeof(Int32)); | |||
dt.Columns.Add(column); | |||
//row[name] = pi.GetValue(t, new object[] {i});//PropertyInfo.GetValue(object,object[]) | |||
if (pi.GetValue(t, null) != null) | |||
row[name] = pi.GetValue(t, null); | |||
else | |||
row[name] = System.DBNull.Value; | |||
} | |||
else | |||
{ | |||
column = new DataColumn(name, pi.PropertyType); | |||
dt.Columns.Add(column); | |||
row[name] = pi.GetValue(t, null); | |||
} | |||
} | |||
} | |||
dt.Rows.Add(row); | |||
} | |||
ds.Tables.Add(dt); | |||
return ds; | |||
} | |||
} | |||
} |
@@ -89,6 +89,7 @@ | |||
<Compile Include="Attributes\EnumAttribute.cs" /> | |||
<Compile Include="Common\CommonHelper.cs" /> | |||
<Compile Include="Config\Config.cs" /> | |||
<Compile Include="DataBase\DataConvert.cs" /> | |||
<Compile Include="DataBase\FieldTypeHepler.cs" /> | |||
<Compile Include="DataBase\FieldValueParam.cs" /> | |||
<Compile Include="DataBase\DbWhere.cs" /> | |||
@@ -1,4 +1,5 @@ | |||
using System.ServiceProcess; | |||
using System; | |||
using System.ServiceProcess; | |||
using Hangfire; | |||
namespace Quanjiang.DigitalScholl.JobService | |||