14 changed files with 3233 additions and 0 deletions
-
1.gitignore
-
31NFine.Application/01 Infrastructure/DbLogType.cs
-
BINNFine.Application/01 Infrastructure/vssver2.scc
-
36NFine.Application/Properties/AssemblyInfo.cs
-
BINNFine.Application/Properties/vssver2.scc
-
34NFine.Application/SRM/UserWorkPointApp.cs
-
1295NFine.Application/SRM/WatchPanelApp.cs
-
BINNFine.Application/SRM/vssver2.scc
-
50NFine.Application/SystemManage/AreaApp.cs
-
1543NFine.Application/SystemManage/CommonReportApp.cs
-
66NFine.Application/SystemManage/CustomerApp.cs
-
51NFine.Application/SystemManage/DutyApp.cs
-
58NFine.Application/SystemManage/ItemsApp.cs
-
68NFine.Application/SystemManage/ItemsDetailApp.cs
@ -0,0 +1,31 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace NFine.Application |
|||
{ |
|||
public enum DbLogType |
|||
{ |
|||
[Description("其他")] |
|||
Other = 0, |
|||
[Description("登录")] |
|||
Login = 1, |
|||
[Description("退出")] |
|||
Exit = 2, |
|||
[Description("访问")] |
|||
Visit = 3, |
|||
[Description("新增")] |
|||
Create = 4, |
|||
[Description("删除")] |
|||
Delete = 5, |
|||
[Description("修改")] |
|||
Update = 6, |
|||
[Description("提交")] |
|||
Submit = 7, |
|||
[Description("异常")] |
|||
Exception = 8, |
|||
} |
|||
} |
|||
Binary file not shown.
@ -0,0 +1,36 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 有关程序集的常规信息通过以下
|
|||
// 特性集控制。更改这些特性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("NFine快速开发平台")] |
|||
[assembly: AssemblyDescription("NFine快速开发平台")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("NFine团队")] |
|||
[assembly: AssemblyProduct("NFine快速开发平台(www.nfine.cn)")] |
|||
[assembly: AssemblyCopyright("Copyright © NFine 2016")] |
|||
[assembly: AssemblyTrademark("NFine.Framework")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 使此程序集中的类型
|
|||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
|
|||
// 则将该类型上的 ComVisible 特性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|||
[assembly: Guid("a2dde122-5712-466b-8039-a700af1ef8bc")] |
|||
|
|||
// 程序集的版本信息由下面四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 生成号
|
|||
// 修订号
|
|||
//
|
|||
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
|||
// 方法是按如下所示使用“*”:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
Binary file not shown.
@ -0,0 +1,34 @@ |
|||
using NFine.Code; |
|||
using NFine.Data.Extensions; |
|||
using NFine.Domain.Entity.SystemManage; |
|||
using NFine.Repository; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data; |
|||
using System.Data.Common; |
|||
using System.Linq; |
|||
using System.Text; |
|||
|
|||
namespace NFine.Application |
|||
{ |
|||
public class UserWorkPointApp : RepositoryFactory<UserEntity> |
|||
{ |
|||
|
|||
public DataTable GetWorkPoint(string queryJson) |
|||
{ |
|||
DataTable dt = new DataTable(); |
|||
var queryParam = queryJson.ToJObject(); |
|||
List<DbParameter> parameter = new List<DbParameter>(); |
|||
string sql = @"SELECT WorkPointCode,WorkPointName FROM dbo.Sys_WorkPoint where 1=1 "; |
|||
if (!string.IsNullOrWhiteSpace(queryJson)) |
|||
{ |
|||
if (!string.IsNullOrWhiteSpace(queryParam["WorkPointCode"].ToString())) |
|||
{ |
|||
sql += " and WorkPointCode = '%" + queryParam["WorkPointCode"].ToString() + "%' "; |
|||
} |
|||
} |
|||
return Repository().FindTableBySql(sql.ToString()); |
|||
} |
|||
|
|||
} |
|||
} |
|||
1295
NFine.Application/SRM/WatchPanelApp.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Binary file not shown.
@ -0,0 +1,50 @@ |
|||
using NFine.Domain.Entity.SystemManage; |
|||
using NFine.Domain.IRepository.SystemManage; |
|||
using NFine.Repository.SystemManage; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
|
|||
namespace NFine.Application.SystemManage |
|||
{ |
|||
public class AreaApp |
|||
{ |
|||
private IAreaRepository service = new AreaRepository(); |
|||
|
|||
public List<AreaEntity> GetList() |
|||
{ |
|||
return service.IQueryable().ToList(); |
|||
} |
|||
|
|||
public AreaEntity GetForm(string keyValue) |
|||
{ |
|||
return service.FindEntity(keyValue); |
|||
} |
|||
|
|||
public void DeleteForm(string keyValue) |
|||
{ |
|||
if (service.IQueryable().Count(t => t.F_ParentId.Equals(keyValue)) > 0) |
|||
{ |
|||
throw new Exception("删除失败!操作的对象包含了下级数据。"); |
|||
} |
|||
else |
|||
{ |
|||
service.Delete(t => t.F_Id == keyValue); |
|||
} |
|||
} |
|||
|
|||
public void SubmitForm(AreaEntity areaEntity, string keyValue) |
|||
{ |
|||
if (!string.IsNullOrEmpty(keyValue)) |
|||
{ |
|||
areaEntity.Modify(keyValue); |
|||
service.Update(areaEntity); |
|||
} |
|||
else |
|||
{ |
|||
areaEntity.Create(); |
|||
service.Insert(areaEntity); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
1543
NFine.Application/SystemManage/CommonReportApp.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,66 @@ |
|||
using NFine.Code; |
|||
using NFine.Domain.Entity.SystemManage; |
|||
using NFine.Domain.IRepository.SystemManage; |
|||
using NFine.Repository.SystemManage; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
|
|||
namespace NFine.Application.SystemManage |
|||
{ |
|||
public class CustomerApp |
|||
{ |
|||
private ICustomerRepository service = new CustomerRepository(); |
|||
|
|||
public List<CustomerEntity> GetList() |
|||
{ |
|||
return service.IQueryable().OrderBy(t => t.F_CreatorTime).ToList(); |
|||
} |
|||
|
|||
public List<CustomerEntity> GetList(Pagination pagination, string keyword) |
|||
{ |
|||
var expression = ExtLinq.True<CustomerEntity>(); |
|||
if (!string.IsNullOrEmpty(keyword)) |
|||
{ |
|||
expression = expression.And(t => t.F_CusCode.Contains(keyword)); |
|||
expression = expression.Or(t => t.F_CusName.Contains(keyword)); |
|||
} |
|||
expression = expression.And(t => t.F_CusCode != "admin"); |
|||
return service.FindList(expression, pagination); |
|||
} |
|||
|
|||
public List<CustomerEntity> GetListCus() |
|||
{ |
|||
var expression = ExtLinq.True<CustomerEntity>(); |
|||
return service.IQueryable(expression).OrderBy(t => t.F_CusCode).ToList(); |
|||
} |
|||
|
|||
public CustomerEntity GetForm(string keyValue) |
|||
{ |
|||
return service.FindEntity(keyValue); |
|||
} |
|||
|
|||
public void DeleteForm(string keyValue) |
|||
{ |
|||
service.DeleteForm(keyValue); |
|||
} |
|||
|
|||
public void SubmitForm(CustomerEntity cusEntity, string keyValue) |
|||
{ |
|||
if (!string.IsNullOrEmpty(keyValue)) |
|||
{ |
|||
cusEntity.Modify(keyValue); |
|||
} |
|||
else |
|||
{ |
|||
cusEntity.Create(); |
|||
} |
|||
service.SubmitForm(cusEntity, keyValue); |
|||
} |
|||
|
|||
public void UpdateForm(CustomerEntity cusEntity) |
|||
{ |
|||
service.Update(cusEntity); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
using NFine.Code; |
|||
using NFine.Domain.Entity.SystemManage; |
|||
using NFine.Domain.IRepository.SystemManage; |
|||
using NFine.Repository.SystemManage; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
|
|||
namespace NFine.Application.SystemManage |
|||
{ |
|||
public class DutyApp |
|||
{ |
|||
private IRoleRepository service = new RoleRepository(); |
|||
|
|||
public List<RoleEntity> GetList(string keyword = "") |
|||
{ |
|||
var expression = ExtLinq.True<RoleEntity>(); |
|||
if (!string.IsNullOrEmpty(keyword)) |
|||
{ |
|||
expression = expression.And(t => t.F_FullName.Contains(keyword)); |
|||
expression = expression.Or(t => t.F_EnCode.Contains(keyword)); |
|||
} |
|||
expression = expression.And(t => t.F_Category == 2); |
|||
return service.IQueryable(expression).OrderBy(t => t.F_SortCode).ToList(); |
|||
} |
|||
|
|||
public RoleEntity GetForm(string keyValue) |
|||
{ |
|||
return service.FindEntity(keyValue); |
|||
} |
|||
|
|||
public void DeleteForm(string keyValue) |
|||
{ |
|||
service.Delete(t => t.F_Id == keyValue); |
|||
} |
|||
|
|||
public void SubmitForm(RoleEntity roleEntity, string keyValue) |
|||
{ |
|||
if (!string.IsNullOrEmpty(keyValue)) |
|||
{ |
|||
roleEntity.Modify(keyValue); |
|||
service.Update(roleEntity); |
|||
} |
|||
else |
|||
{ |
|||
roleEntity.Create(); |
|||
roleEntity.F_Category = 2; |
|||
service.Insert(roleEntity); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
using NFine.Domain.Entity.SystemManage; |
|||
using NFine.Domain.IRepository.SystemManage; |
|||
using NFine.Repository.SystemManage; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Linq.Expressions; |
|||
|
|||
namespace NFine.Application.SystemManage |
|||
{ |
|||
public class ItemsApp |
|||
{ |
|||
private IItemsRepository service = new ItemsRepository(); |
|||
|
|||
public List<ItemsEntity> GetList() |
|||
{ |
|||
return service.IQueryable().ToList(); |
|||
} |
|||
|
|||
public ItemsEntity GetForm(string keyValue) |
|||
{ |
|||
return service.FindEntity(keyValue); |
|||
} |
|||
|
|||
public ItemsEntity GetForm2(string keyValue) |
|||
{ |
|||
Expression<Func<ItemsEntity, bool>> predicate = null; |
|||
predicate = t => t.F_FullName == keyValue; |
|||
return service.FindEntity(predicate); |
|||
} |
|||
|
|||
public void DeleteForm(string keyValue) |
|||
{ |
|||
if (service.IQueryable().Count(t => t.F_ParentId.Equals(keyValue)) > 0) |
|||
{ |
|||
throw new Exception("删除失败!操作的对象包含了下级数据。"); |
|||
} |
|||
else |
|||
{ |
|||
service.Delete(t => t.F_Id == keyValue); |
|||
} |
|||
} |
|||
|
|||
public void SubmitForm(ItemsEntity itemsEntity, string keyValue) |
|||
{ |
|||
if (!string.IsNullOrEmpty(keyValue)) |
|||
{ |
|||
itemsEntity.Modify(keyValue); |
|||
service.Update(itemsEntity); |
|||
} |
|||
else |
|||
{ |
|||
itemsEntity.Create(); |
|||
service.Insert(itemsEntity); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
using NFine.Code; |
|||
using NFine.Domain.Entity.SystemManage; |
|||
using NFine.Domain.IRepository.SystemManage; |
|||
using NFine.Repository.SystemManage; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
|
|||
namespace NFine.Application.SystemManage |
|||
{ |
|||
public class ItemsDetailApp |
|||
{ |
|||
private IItemsDetailRepository service = new ItemsDetailRepository(); |
|||
|
|||
public List<ItemsDetailEntity> GetList(string itemId = "", string keyword = "") |
|||
{ |
|||
var expression = ExtLinq.True<ItemsDetailEntity>(); |
|||
if (!string.IsNullOrEmpty(itemId)) |
|||
{ |
|||
expression = expression.And(t => t.F_ItemId == itemId); |
|||
} |
|||
if (!string.IsNullOrEmpty(keyword)) |
|||
{ |
|||
expression = expression.And(t => t.F_ItemName.Contains(keyword)); |
|||
expression = expression.Or(t => t.F_ItemCode.Contains(keyword)); |
|||
} |
|||
return service.IQueryable(expression).OrderBy(t => t.F_SortCode).ToList(); |
|||
} |
|||
|
|||
public List<ItemsDetailEntity> GetItemList(string enCode) |
|||
{ |
|||
return service.GetItemList(enCode); |
|||
} |
|||
|
|||
public List<ItemsDetailEntity> GetItemListWH(string itemID) |
|||
{ |
|||
var expression = ExtLinq.True<ItemsDetailEntity>(); |
|||
if (!string.IsNullOrEmpty(itemID)) |
|||
{ |
|||
expression = expression.And(t => t.F_ItemId == itemID); |
|||
} |
|||
return service.IQueryable(expression).OrderBy(t => t.F_SortCode).ToList(); |
|||
} |
|||
|
|||
public ItemsDetailEntity GetForm(string keyValue) |
|||
{ |
|||
return service.FindEntity(keyValue); |
|||
} |
|||
|
|||
public void DeleteForm(string keyValue) |
|||
{ |
|||
service.Delete(t => t.F_Id == keyValue); |
|||
} |
|||
|
|||
public void SubmitForm(ItemsDetailEntity itemsDetailEntity, string keyValue) |
|||
{ |
|||
if (!string.IsNullOrEmpty(keyValue)) |
|||
{ |
|||
itemsDetailEntity.Modify(keyValue); |
|||
service.Update(itemsDetailEntity); |
|||
} |
|||
else |
|||
{ |
|||
itemsDetailEntity.Create(); |
|||
service.Insert(itemsDetailEntity); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue