Commit ccd0ff30 authored by liudong1993's avatar liudong1993

代码优化+

parent 031242bf
using System;
using REBORN.Common.AOP;
using REBORN.Common.Plugin;
namespace Property.Model.Entity
{
/// <summary>
/// 耗材申请时间实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_Applyfor
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 公司别id -1表示通用
/// </summary>
public int? BranchId
{
get;
set;
}
/// <summary>
/// 状态 0正常 1删除
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// 公司
/// </summary>
public int? RB_Branch_Id
{
get;
set;
}
/// <summary>
/// 集团
/// </summary>
public int? RB_Group_Id
{
get;
set;
}
/// <summary>
/// CreateBy
/// </summary>
public int? CreateBy
{
get;
set;
}
/// <summary>
/// CreateDate
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
/// <summary>
/// UpdateBy
/// </summary>
public int? UpdateBy
{
get;
set;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
\ No newline at end of file
using System;
using REBORN.Common.AOP;
using REBORN.Common.Plugin;
namespace Property.Model.Entity
{
/// <summary>
/// 耗材申请特殊日期实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_ApplyforSpecial
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 申请id
/// </summary>
public int? ApplyforId
{
get;
set;
}
/// <summary>
/// 特殊日期
/// </summary>
public DateTime? Date
{
get;
set;
}
/// <summary>
/// 开始时间
/// </summary>
public string StartTime
{
get;
set;
}
/// <summary>
/// 结束时间 05:44
/// </summary>
public string EndTime
{
get;
set;
}
/// <summary>
/// 状态 0正常 1删除
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// CreateBy
/// </summary>
public int? CreateBy
{
get;
set;
}
/// <summary>
/// CreateDate
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
/// <summary>
/// UpdateBy
/// </summary>
public int? UpdateBy
{
get;
set;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
\ No newline at end of file
using System;
using REBORN.Common.AOP;
using REBORN.Common.Plugin;
namespace Property.Model.Entity
{
/// <summary>
/// 耗材申请工作日实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_ApplyforWeekday
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 申请id
/// </summary>
public int? ApplyforId
{
get;
set;
}
/// <summary>
/// 周几 存 周一 周二 周三。。。
/// </summary>
public string Weekday
{
get;
set;
}
/// <summary>
/// 开始时间
/// </summary>
public string StartTime
{
get;
set;
}
/// <summary>
/// 结束时间 05:44
/// </summary>
public string EndTime
{
get;
set;
}
/// <summary>
/// 状态 0正常 1删除
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// 公司
/// </summary>
public int? RB_Branch_Id
{
get;
set;
}
/// <summary>
/// 集团
/// </summary>
public int? RB_Group_Id
{
get;
set;
}
/// <summary>
/// CreateBy
/// </summary>
public int? CreateBy
{
get;
set;
}
/// <summary>
/// CreateDate
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
/// <summary>
/// UpdateBy
/// </summary>
public int? UpdateBy
{
get;
set;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
\ No newline at end of file
using System;
using Property.Model.Entity;
using REBORN.Common.AOP;
namespace Property.Model.Extend
{
/// <summary>
/// 耗材申请特殊日期扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_ApplyforSpecial_Extend : RB_Supplies_ApplyforSpecial
{
}
}
\ No newline at end of file
using System;
using Property.Model.Entity;
using REBORN.Common.AOP;
namespace Property.Model.Extend
{
/// <summary>
/// 耗材申请工作日扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_ApplyforWeekday_Extend : RB_Supplies_ApplyforWeekday
{
}
}
\ No newline at end of file
using System;
using Property.Model.Entity;
using REBORN.Common.AOP;
namespace Property.Model.Extend
{
/// <summary>
/// IJչʵ
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_Applyfor_Extend : RB_Supplies_Applyfor
{
}
}
\ No newline at end of file
[*.cs]
# IDE0059: 不需要赋值
csharp_style_unused_value_assignment_preference = discard_variable:none
# IDE0060: 删除未使用的参数
dotnet_code_quality_unused_parameters = all:none
...@@ -7,9 +7,6 @@ using Property.Repository; ...@@ -7,9 +7,6 @@ using Property.Repository;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using REBORN.Common.Plugin;
using Newtonsoft.Json; using Newtonsoft.Json;
using REBORN.Commom.Plugin; using REBORN.Commom.Plugin;
using REBORN.Common.API; using REBORN.Common.API;
...@@ -26,60 +23,60 @@ namespace Property.Module.FixedAssets ...@@ -26,60 +23,60 @@ namespace Property.Module.FixedAssets
/// <summary> /// <summary>
/// 资产分类 /// 资产分类
/// </summary> /// </summary>
private RB_Property_CategoryRepository property_CategoryRepository = new RB_Property_CategoryRepository(); private readonly RB_Property_CategoryRepository property_CategoryRepository = new RB_Property_CategoryRepository();
/// <summary> /// <summary>
/// 资产信息 /// 资产信息
/// </summary> /// </summary>
private RB_Property_InfoRepository property_InfoRepository = new RB_Property_InfoRepository(); private readonly RB_Property_InfoRepository property_InfoRepository = new RB_Property_InfoRepository();
/// <summary> /// <summary>
/// 资产日志 /// 资产日志
/// </summary> /// </summary>
private RB_Property_LogRepository property_LogRepository = new RB_Property_LogRepository(); private readonly RB_Property_LogRepository property_LogRepository = new RB_Property_LogRepository();
/// <summary> /// <summary>
/// 供应商 /// 供应商
/// </summary> /// </summary>
private RB_Property_SupplierRepository property_SupplierRepository = new RB_Property_SupplierRepository(); private readonly RB_Property_SupplierRepository property_SupplierRepository = new RB_Property_SupplierRepository();
private RB_Property_SignatureRelevanceRepository signatureRelevanceRepository = new RB_Property_SignatureRelevanceRepository(); private readonly RB_Property_SignatureRelevanceRepository signatureRelevanceRepository = new RB_Property_SignatureRelevanceRepository();
private RB_Property_AuditRelevanceRepository auditRelevanceRepository = new RB_Property_AuditRelevanceRepository(); private readonly RB_Property_AuditRelevanceRepository auditRelevanceRepository = new RB_Property_AuditRelevanceRepository();
/// <summary> /// <summary>
/// 资产使用 /// 资产使用
/// </summary> /// </summary>
private RB_Property_UseReceiveRepository useReceiveRepository = new RB_Property_UseReceiveRepository(); private readonly RB_Property_UseReceiveRepository useReceiveRepository = new RB_Property_UseReceiveRepository();
/// <summary> /// <summary>
/// 资产使用关联 /// 资产使用关联
/// </summary> /// </summary>
private RB_Property_UseRelevanceRepository useRelevanceRepository = new RB_Property_UseRelevanceRepository(); private readonly RB_Property_UseRelevanceRepository useRelevanceRepository = new RB_Property_UseRelevanceRepository();
/// <summary> /// <summary>
/// 请购单 /// 请购单
/// </summary> /// </summary>
private RB_Property_BuyingRequisitionRepository property_BuyingRequisitionRepository = new RB_Property_BuyingRequisitionRepository(); private readonly RB_Property_BuyingRequisitionRepository property_BuyingRequisitionRepository = new RB_Property_BuyingRequisitionRepository();
private Rb_branchRepository branchRepository = new Rb_branchRepository(); private readonly Rb_branchRepository branchRepository = new Rb_branchRepository();
private Rb_departmentRepository departmentRepository = new Rb_departmentRepository(); private readonly Rb_departmentRepository departmentRepository = new Rb_departmentRepository();
private Rb_employeeRepository employeeRepository = new Rb_employeeRepository(); private readonly Rb_employeeRepository employeeRepository = new Rb_employeeRepository();
//流程 //流程
private Rb_Workflow_TemplateRepository workflow_TemplateRepository = new Rb_Workflow_TemplateRepository(); private readonly Rb_Workflow_TemplateRepository workflow_TemplateRepository = new Rb_Workflow_TemplateRepository();
private RB_FinanceFlowConnectRepository financeFlowConnectRepository = new RB_FinanceFlowConnectRepository(); private readonly RB_FinanceFlowConnectRepository financeFlowConnectRepository = new RB_FinanceFlowConnectRepository();
private Rb_Workflow_AuditrecordRepository workflow_AuditrecordRepository = new Rb_Workflow_AuditrecordRepository(); private readonly Rb_Workflow_AuditrecordRepository workflow_AuditrecordRepository = new Rb_Workflow_AuditrecordRepository();
private Rb_Workflow_AuditRelevanceRepository workflow_AuditRelevanceRepository = new Rb_Workflow_AuditRelevanceRepository(); private readonly Rb_Workflow_AuditRelevanceRepository workflow_AuditRelevanceRepository = new Rb_Workflow_AuditRelevanceRepository();
private RB_Workfolw_Change_LogRepository workfolw_Change_LogRepository = new RB_Workfolw_Change_LogRepository(); private readonly RB_Workfolw_Change_LogRepository workfolw_Change_LogRepository = new RB_Workfolw_Change_LogRepository();
//资产折旧 //资产折旧
private RB_Property_DepreciationRepository property_DepreciationRepository = new RB_Property_DepreciationRepository(); private readonly RB_Property_DepreciationRepository property_DepreciationRepository = new RB_Property_DepreciationRepository();
//资产盘点 //资产盘点
private RB_Property_CheckRepository property_CheckRepository = new RB_Property_CheckRepository(); private readonly RB_Property_CheckRepository property_CheckRepository = new RB_Property_CheckRepository();
private RB_Property_CheckDetailRepository property_CheckDetailRepository = new RB_Property_CheckDetailRepository(); private readonly RB_Property_CheckDetailRepository property_CheckDetailRepository = new RB_Property_CheckDetailRepository();
//耗材库存 //耗材库存
private RB_Supplies_InventoryRepository supplies_InventoryRepository = new RB_Supplies_InventoryRepository(); private readonly RB_Supplies_InventoryRepository supplies_InventoryRepository = new RB_Supplies_InventoryRepository();
//物料档案 //物料档案
private RB_Supplies_MaterialRepository supplies_MaterialRepository = new RB_Supplies_MaterialRepository(); private readonly RB_Supplies_MaterialRepository supplies_MaterialRepository = new RB_Supplies_MaterialRepository();
private RB_Supplies_StockInRepository supplies_StockInRepository = new RB_Supplies_StockInRepository(); private readonly RB_Supplies_StockInRepository supplies_StockInRepository = new RB_Supplies_StockInRepository();
//流程模板 //流程模板
private WorkFlowModule workFlowModule = new WorkFlowModule(); private readonly WorkFlowModule workFlowModule = new WorkFlowModule();
/// <summary> /// <summary>
...@@ -516,7 +513,7 @@ namespace Property.Module.FixedAssets ...@@ -516,7 +513,7 @@ namespace Property.Module.FixedAssets
{ {
demodel.UseStatus = PropertyUseStateEnum.Normal; demodel.UseStatus = PropertyUseStateEnum.Normal;
demodel.PropertyStatus = PropertyStatusEnum.Leisure; demodel.PropertyStatus = PropertyStatusEnum.Leisure;
demodel.EmployeeId = demodel.EmployeeId ?? 0; demodel.EmployeeId ??= 0;
if (demodel.EmployeeId > 0) if (demodel.EmployeeId > 0)
{ {
demodel.PropertyStatus = PropertyStatusEnum.Receive; demodel.PropertyStatus = PropertyStatusEnum.Receive;
...@@ -683,7 +680,7 @@ namespace Property.Module.FixedAssets ...@@ -683,7 +680,7 @@ namespace Property.Module.FixedAssets
demodel.UseStatus = PropertyUseStateEnum.Normal; demodel.UseStatus = PropertyUseStateEnum.Normal;
demodel.PropertyStatus = PropertyStatusEnum.Leisure; demodel.PropertyStatus = PropertyStatusEnum.Leisure;
demodel.EmployeeId = demodel.EmployeeId ?? 0; demodel.EmployeeId ??= 0;
if (demodel.EmployeeId > 0) { if (demodel.EmployeeId > 0) {
demodel.PropertyStatus = PropertyStatusEnum.Receive; demodel.PropertyStatus = PropertyStatusEnum.Receive;
} }
...@@ -1176,7 +1173,7 @@ namespace Property.Module.FixedAssets ...@@ -1176,7 +1173,7 @@ namespace Property.Module.FixedAssets
if (msg != "") if (msg != "")
{ {
msg = msg.Substring(0, msg.Length - 1); msg = msg[0..^1];
} }
return msg; return msg;
} }
...@@ -1208,8 +1205,10 @@ namespace Property.Module.FixedAssets ...@@ -1208,8 +1205,10 @@ namespace Property.Module.FixedAssets
} }
demodel.ChangePerson = pModel.EmployeeId; demodel.ChangePerson = pModel.EmployeeId;
demodel.ChangeTime = pModel.GetTime; demodel.ChangeTime = pModel.GetTime;
List<RB_Property_Info_Extend> PList = new List<RB_Property_Info_Extend>(); List<RB_Property_Info_Extend> PList = new List<RB_Property_Info_Extend>
PList.Add(pModel); {
pModel
};
demodel.DetailList = new List<RB_Property_UseRelevance_Extend>() { demodel.DetailList = new List<RB_Property_UseRelevance_Extend>() {
new RB_Property_UseRelevance_Extend(){ new RB_Property_UseRelevance_Extend(){
PropertyId=pModel.Id PropertyId=pModel.Id
...@@ -1943,9 +1942,10 @@ namespace Property.Module.FixedAssets ...@@ -1943,9 +1942,10 @@ namespace Property.Module.FixedAssets
public void PushAuditMessage(List<EmAccoutIdModel> account, int workFlowId, string content, string title, int? empId, SysTemPushTypeEnum type) public void PushAuditMessage(List<EmAccoutIdModel> account, int workFlowId, string content, string title, int? empId, SysTemPushTypeEnum type)
{ {
//Dictionary<string, object> appExtras = new Dictionary<string, object>(); //Dictionary<string, object> appExtras = new Dictionary<string, object>();
Dictionary<string, object> webExtras = new Dictionary<string, object>(); Dictionary<string, object> webExtras = new Dictionary<string, object>
{
webExtras.Add("jumpUrl", "AssetsShenpi?Id=" + workFlowId + "&compType=shenpi"); { "jumpUrl", "AssetsShenpi?Id=" + workFlowId + "&compType=shenpi" }
};
//appExtras.Add("jumpUrl", "vt://financeApprovalDetail/view?ID=" + workFlowId + "&Conditon=3&Source=message&Type=" + Type); //appExtras.Add("jumpUrl", "vt://financeApprovalDetail/view?ID=" + workFlowId + "&Conditon=3&Source=message&Type=" + Type);
//IMService.PushFinanceMessage(account, empId, content, title, type, SystemPushLogTypeEnum.XMApp, appExtras); //IMService.PushFinanceMessage(account, empId, content, title, type, SystemPushLogTypeEnum.XMApp, appExtras);
...@@ -2631,7 +2631,7 @@ namespace Property.Module.FixedAssets ...@@ -2631,7 +2631,7 @@ namespace Property.Module.FixedAssets
if (!string.IsNullOrEmpty(AuditId)) if (!string.IsNullOrEmpty(AuditId))
{ {
AuditId = ("," + AuditId); AuditId = ("," + AuditId);
AuditId = AuditId.Substring(1, AuditId.Length - 2); AuditId = AuditId[1..^1];
} }
return AuditId; return AuditId;
} }
...@@ -3217,10 +3217,12 @@ namespace Property.Module.FixedAssets ...@@ -3217,10 +3217,12 @@ namespace Property.Module.FixedAssets
//我的资产 //我的资产
//查询所有领用借用待确认的 //查询所有领用借用待确认的
RB_Property_Info_Extend demodel = new RB_Property_Info_Extend(); RB_Property_Info_Extend demodel = new RB_Property_Info_Extend
demodel.RB_Group_Id = userInfo.RB_Group_id; {
demodel.IsSelectMyProperty = 1; RB_Group_Id = userInfo.RB_Group_id,
demodel.CreateBy = userInfo.EmployeeId; IsSelectMyProperty = 1,
CreateBy = userInfo.EmployeeId
};
var plist = useRelevanceRepository.GetPropertySureList(new RB_Property_UseRelevance_Extend() { RB_Group_Id = userInfo.RB_Group_id, EmployeeId = userInfo.EmployeeId }); var plist = useRelevanceRepository.GetPropertySureList(new RB_Property_UseRelevance_Extend() { RB_Group_Id = userInfo.RB_Group_id, EmployeeId = userInfo.EmployeeId });
demodel.PropertyIdStr = string.Join(",", plist.Select(x => x.PropertyId ?? 0).Distinct()); demodel.PropertyIdStr = string.Join(",", plist.Select(x => x.PropertyId ?? 0).Distinct());
int MyProperty = property_InfoRepository.GetPropertyToMyCount(demodel); int MyProperty = property_InfoRepository.GetPropertyToMyCount(demodel);
...@@ -3568,9 +3570,10 @@ namespace Property.Module.FixedAssets ...@@ -3568,9 +3570,10 @@ namespace Property.Module.FixedAssets
public void PushBuyingMessage(List<EmAccoutIdModel> account, int workFlowId, string content, string title, int? empId, SysTemPushTypeEnum type) public void PushBuyingMessage(List<EmAccoutIdModel> account, int workFlowId, string content, string title, int? empId, SysTemPushTypeEnum type)
{ {
//Dictionary<string, object> appExtras = new Dictionary<string, object>(); //Dictionary<string, object> appExtras = new Dictionary<string, object>();
Dictionary<string, object> webExtras = new Dictionary<string, object>(); Dictionary<string, object> webExtras = new Dictionary<string, object>
{
webExtras.Add("jumpUrl", ""); { "jumpUrl", "" }
};
//appExtras.Add("jumpUrl", "vt://financeApprovalDetail/view?ID=" + workFlowId + "&Conditon=3&Source=message&Type=" + Type); //appExtras.Add("jumpUrl", "vt://financeApprovalDetail/view?ID=" + workFlowId + "&Conditon=3&Source=message&Type=" + Type);
//IMService.PushFinanceMessage(account, empId, content, title, type, SystemPushLogTypeEnum.XMApp, appExtras); //IMService.PushFinanceMessage(account, empId, content, title, type, SystemPushLogTypeEnum.XMApp, appExtras);
......
...@@ -7,9 +7,6 @@ using Property.Repository; ...@@ -7,9 +7,6 @@ using Property.Repository;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using REBORN.Common.Plugin;
using Newtonsoft.Json; using Newtonsoft.Json;
using REBORN.Commom.Plugin; using REBORN.Commom.Plugin;
...@@ -23,38 +20,37 @@ namespace Property.Module.FixedAssets ...@@ -23,38 +20,37 @@ namespace Property.Module.FixedAssets
/// <summary> /// <summary>
/// 物料档案 /// 物料档案
/// </summary> /// </summary>
private RB_Supplies_MaterialRepository supplies_MaterialRepository = new RB_Supplies_MaterialRepository(); private readonly RB_Supplies_MaterialRepository supplies_MaterialRepository = new RB_Supplies_MaterialRepository();
/// <summary> /// <summary>
/// 仓库 /// 仓库
/// </summary> /// </summary>
private RB_Supplies_WareHouseRepository supplies_WareHouseRepository = new RB_Supplies_WareHouseRepository(); private readonly RB_Supplies_WareHouseRepository supplies_WareHouseRepository = new RB_Supplies_WareHouseRepository();
/// <summary> /// <summary>
/// 入库单 /// 入库单
/// </summary> /// </summary>
private RB_Supplies_StockInRepository supplies_StockInRepository = new RB_Supplies_StockInRepository(); private readonly RB_Supplies_StockInRepository supplies_StockInRepository = new RB_Supplies_StockInRepository();
/// <summary> /// <summary>
/// 入库明细 /// 入库明细
/// </summary> /// </summary>
private RB_Supplies_StockInDetailRepository supplies_StockInDetailRepository = new RB_Supplies_StockInDetailRepository(); private readonly RB_Supplies_StockInDetailRepository supplies_StockInDetailRepository = new RB_Supplies_StockInDetailRepository();
/// <summary> /// <summary>
/// 库存表 /// 库存表
/// </summary> /// </summary>
private RB_Supplies_InventoryRepository supplies_InventoryRepository = new RB_Supplies_InventoryRepository(); private readonly RB_Supplies_InventoryRepository supplies_InventoryRepository = new RB_Supplies_InventoryRepository();
/// <summary> /// <summary>
/// 库存明细表 /// 库存明细表
/// </summary> /// </summary>
private RB_Supplies_InventoryDetailRepository supplies_InventoryDetailRepository = new RB_Supplies_InventoryDetailRepository(); private readonly RB_Supplies_InventoryDetailRepository supplies_InventoryDetailRepository = new RB_Supplies_InventoryDetailRepository();
/// <summary> /// <summary>
/// 出库单 /// 出库单
/// </summary> /// </summary>
private RB_Supplies_StockOutRepository supplies_StockOutRepository = new RB_Supplies_StockOutRepository(); private readonly RB_Supplies_StockOutRepository supplies_StockOutRepository = new RB_Supplies_StockOutRepository();
/// <summary> /// <summary>
/// 出库单明细 /// 出库单明细
/// </summary> /// </summary>
private RB_Supplies_StockOutDetailRepository supplies_StockOutDetailRepository = new RB_Supplies_StockOutDetailRepository(); private readonly RB_Supplies_StockOutDetailRepository supplies_StockOutDetailRepository = new RB_Supplies_StockOutDetailRepository();
private Rb_branchRepository branchRepository = new Rb_branchRepository(); private readonly Rb_branchRepository branchRepository = new Rb_branchRepository();
private Rb_departmentRepository departmentRepository = new Rb_departmentRepository(); private readonly Rb_departmentRepository departmentRepository = new Rb_departmentRepository();
private Rb_employeeRepository employeeRepository = new Rb_employeeRepository();
/// <summary> /// <summary>
/// 获取物料档案分页列表 /// 获取物料档案分页列表
...@@ -225,7 +221,7 @@ namespace Property.Module.FixedAssets ...@@ -225,7 +221,7 @@ namespace Property.Module.FixedAssets
for (int i = 0; i < images.Count(); i++) for (int i = 0; i < images.Count(); i++)
{ {
string userFile = "/New/Upload/Property/"; string userFile = "/New/Upload/Property/";
string NewFileUrl = ""; string NewFileUrl;
if (Config.GetFilePath(images[i]).Contains("/New/")) if (Config.GetFilePath(images[i]).Contains("/New/"))
{ {
NewFileUrl = Config.GetFilePath(images[i]).Replace("Temporary", "Property"); NewFileUrl = Config.GetFilePath(images[i]).Replace("Temporary", "Property");
...@@ -873,13 +869,13 @@ namespace Property.Module.FixedAssets ...@@ -873,13 +869,13 @@ namespace Property.Module.FixedAssets
//增加库存明细 //增加库存明细
supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail() supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail()
{ {
CreateBy = demodel.CreateBy, CreateBy = userInfo.EmployeeId,
CreateDate = DateTime.Now, CreateDate = DateTime.Now,
InventoryId = iModel.Id, InventoryId = iModel.Id,
Number = item.Number, Number = item.Number,
Money = item.Money, Money = item.Money,
RB_Branch_Id = demodel.RB_Branch_Id, RB_Branch_Id = userInfo.RB_Branch_id,
RB_Group_Id = demodel.RB_Group_Id, RB_Group_Id = userInfo.RB_Group_id,
Status = 0, Status = 0,
Type = 1, Type = 1,
Id = 0, Id = 0,
...@@ -1264,13 +1260,13 @@ namespace Property.Module.FixedAssets ...@@ -1264,13 +1260,13 @@ namespace Property.Module.FixedAssets
//增加库存明细 //增加库存明细
supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail() supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail()
{ {
CreateBy = demodel.CreateBy, CreateBy = userInfo.EmployeeId,
CreateDate = DateTime.Now, CreateDate = DateTime.Now,
InventoryId = iModel.Id, InventoryId = iModel.Id,
Number = item.Number, Number = item.Number,
Money = item.Money, Money = item.Money,
RB_Branch_Id = demodel.RB_Branch_Id, RB_Branch_Id = userInfo.RB_Branch_id,
RB_Group_Id = demodel.RB_Group_Id, RB_Group_Id = userInfo.RB_Group_id,
Status = 0, Status = 0,
Type = 1, Type = 1,
Id = 0, Id = 0,
...@@ -1324,13 +1320,13 @@ namespace Property.Module.FixedAssets ...@@ -1324,13 +1320,13 @@ namespace Property.Module.FixedAssets
//增加库存明细 //增加库存明细
supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail() supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail()
{ {
CreateBy = demodel.CreateBy, CreateBy = userInfo.EmployeeId,
CreateDate = DateTime.Now, CreateDate = DateTime.Now,
InventoryId = iModel.Id, InventoryId = iModel.Id,
Number = item.Number, Number = item.Number,
Money = item.Money, Money = item.Money,
RB_Branch_Id = demodel.RB_Branch_Id, RB_Branch_Id = userInfo.RB_Branch_id,
RB_Group_Id = demodel.RB_Group_Id, RB_Group_Id = userInfo.RB_Group_id,
Status = 0, Status = 0,
Type = 2, Type = 2,
Id = 0, Id = 0,
......
...@@ -7,9 +7,6 @@ using Property.Repository; ...@@ -7,9 +7,6 @@ using Property.Repository;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using REBORN.Common.Plugin;
using Newtonsoft.Json; using Newtonsoft.Json;
using REBORN.Commom.Plugin; using REBORN.Commom.Plugin;
using REBORN.Common.API; using REBORN.Common.API;
...@@ -23,39 +20,39 @@ namespace Property.Module.FixedAssets ...@@ -23,39 +20,39 @@ namespace Property.Module.FixedAssets
/// </summary> /// </summary>
public class WorkFlowModule public class WorkFlowModule
{ {
private Rb_departmentRepository departmentRepository = new Rb_departmentRepository(); private readonly Rb_departmentRepository departmentRepository = new Rb_departmentRepository();
private Rb_employeeRepository employeeRepository = new Rb_employeeRepository(); private readonly Rb_employeeRepository employeeRepository = new Rb_employeeRepository();
private Rb_branchRepository branchRepository = new Rb_branchRepository(); private readonly Rb_branchRepository branchRepository = new Rb_branchRepository();
//流程 //流程
private Rb_Workflow_TemplateRepository workflow_TemplateRepository = new Rb_Workflow_TemplateRepository(); private readonly Rb_Workflow_TemplateRepository workflow_TemplateRepository = new Rb_Workflow_TemplateRepository();
private Rb_Workflow_ConditionRepository workflow_ConditionRepository = new Rb_Workflow_ConditionRepository(); private readonly Rb_Workflow_ConditionRepository workflow_ConditionRepository = new Rb_Workflow_ConditionRepository();
private Rb_Workflow_AuditRepository workflow_AuditRepository = new Rb_Workflow_AuditRepository(); private readonly Rb_Workflow_AuditRepository workflow_AuditRepository = new Rb_Workflow_AuditRepository();
private Rb_Workflow_AuditUserRepository workflow_AuditUserRepository = new Rb_Workflow_AuditUserRepository(); private readonly Rb_Workflow_AuditUserRepository workflow_AuditUserRepository = new Rb_Workflow_AuditUserRepository();
private Rb_Workflow_AuditrecordRepository workflow_AuditrecordRepository = new Rb_Workflow_AuditrecordRepository(); private readonly Rb_Workflow_AuditrecordRepository workflow_AuditrecordRepository = new Rb_Workflow_AuditrecordRepository();
private Rb_Workflow_AuditRelevanceRepository workflow_AuditRelevanceRepository = new Rb_Workflow_AuditRelevanceRepository(); private readonly Rb_Workflow_AuditRelevanceRepository workflow_AuditRelevanceRepository = new Rb_Workflow_AuditRelevanceRepository();
private Rb_Workflow_AuditUserRelevanceRepository workflow_AuditUserRelevanceRepository = new Rb_Workflow_AuditUserRelevanceRepository(); private readonly Rb_Workflow_AuditUserRelevanceRepository workflow_AuditUserRelevanceRepository = new Rb_Workflow_AuditUserRelevanceRepository();
private RB_Audit_DelegateRepository audit_DelegateRepository = new RB_Audit_DelegateRepository(); private readonly RB_Audit_DelegateRepository audit_DelegateRepository = new RB_Audit_DelegateRepository();
private Rb_Workflow_CopyToPeopleRepository workflow_CopyToPeopleRepository = new Rb_Workflow_CopyToPeopleRepository(); private readonly Rb_Workflow_CopyToPeopleRepository workflow_CopyToPeopleRepository = new Rb_Workflow_CopyToPeopleRepository();
private RB_Workfolw_Change_LogRepository workfolw_Change_LogRepository = new RB_Workfolw_Change_LogRepository(); private readonly RB_Workfolw_Change_LogRepository workfolw_Change_LogRepository = new RB_Workfolw_Change_LogRepository();
/// <summary> /// <summary>
/// 资产信息 /// 资产信息
/// </summary> /// </summary>
private RB_Property_InfoRepository property_InfoRepository = new RB_Property_InfoRepository(); private readonly RB_Property_InfoRepository property_InfoRepository = new RB_Property_InfoRepository();
/// <summary> /// <summary>
/// 资产日志 /// 资产日志
/// </summary> /// </summary>
private RB_Property_LogRepository property_LogRepository = new RB_Property_LogRepository(); private readonly RB_Property_LogRepository property_LogRepository = new RB_Property_LogRepository();
/// <summary> /// <summary>
/// 资产使用 /// 资产使用
/// </summary> /// </summary>
private RB_Property_UseReceiveRepository useReceiveRepository = new RB_Property_UseReceiveRepository(); private readonly RB_Property_UseReceiveRepository useReceiveRepository = new RB_Property_UseReceiveRepository();
/// <summary> /// <summary>
/// 资产使用关联 /// 资产使用关联
/// </summary> /// </summary>
private RB_Property_UseRelevanceRepository useRelevanceRepository = new RB_Property_UseRelevanceRepository(); private readonly RB_Property_UseRelevanceRepository useRelevanceRepository = new RB_Property_UseRelevanceRepository();
...@@ -297,8 +294,10 @@ namespace Property.Module.FixedAssets ...@@ -297,8 +294,10 @@ namespace Property.Module.FixedAssets
if (newList != null && newList.Count > 0) if (newList != null && newList.Count > 0)
{ {
//制单人 //制单人
var AuditEmIds = new List<int>(); var AuditEmIds = new List<int>
AuditEmIds.Add(CreateBy); {
CreateBy
};
#region 判断是否有已审核的人,有的话直接跳过 #region 判断是否有已审核的人,有的话直接跳过
if (true) if (true)
{ {
...@@ -723,10 +722,10 @@ namespace Property.Module.FixedAssets ...@@ -723,10 +722,10 @@ namespace Property.Module.FixedAssets
InsertBatcheAuditRecord(newList, wfId, financetrans, auditRelevance); InsertBatcheAuditRecord(newList, wfId, financetrans, auditRelevance);
} }
} }
else //else
{ //{
InsertBatcheAuditRecord(newList, wfId, financetrans, auditRelevance); // InsertBatcheAuditRecord(newList, wfId, financetrans, auditRelevance);
} //}
#endregion #endregion
} }
#endregion #endregion
...@@ -2365,7 +2364,7 @@ namespace Property.Module.FixedAssets ...@@ -2365,7 +2364,7 @@ namespace Property.Module.FixedAssets
for (int i = 0; i < images.Count(); i++) for (int i = 0; i < images.Count(); i++)
{ {
string userFile = "/New/Upload/Property/"; string userFile = "/New/Upload/Property/";
string NewFileUrl = ""; string NewFileUrl;
if (Config.GetFilePath(images[i]).Contains("/New/")) if (Config.GetFilePath(images[i]).Contains("/New/"))
{ {
NewFileUrl = Config.GetFilePath(images[i]).Replace("Temporary", "Property"); NewFileUrl = Config.GetFilePath(images[i]).Replace("Temporary", "Property");
...@@ -2410,9 +2409,10 @@ namespace Property.Module.FixedAssets ...@@ -2410,9 +2409,10 @@ namespace Property.Module.FixedAssets
public void PushAuditMessage(List<EmAccoutIdModel> account, int workFlowId, string content, string title, int? empId, SysTemPushTypeEnum type) public void PushAuditMessage(List<EmAccoutIdModel> account, int workFlowId, string content, string title, int? empId, SysTemPushTypeEnum type)
{ {
//Dictionary<string, object> appExtras = new Dictionary<string, object>(); //Dictionary<string, object> appExtras = new Dictionary<string, object>();
Dictionary<string, object> webExtras = new Dictionary<string, object>(); Dictionary<string, object> webExtras = new Dictionary<string, object>
{
webExtras.Add("jumpUrl", "AssetsShenpi?Id=" + workFlowId + "&compType=shenpi"); { "jumpUrl", "AssetsShenpi?Id=" + workFlowId + "&compType=shenpi" }
};
//appExtras.Add("jumpUrl", "vt://financeApprovalDetail/view?ID=" + workFlowId + "&Conditon=3&Source=message&Type=" + Type); //appExtras.Add("jumpUrl", "vt://financeApprovalDetail/view?ID=" + workFlowId + "&Conditon=3&Source=message&Type=" + Type);
//IMService.PushFinanceMessage(account, empId, content, title, type, SystemPushLogTypeEnum.XMApp, appExtras); //IMService.PushFinanceMessage(account, empId, content, title, type, SystemPushLogTypeEnum.XMApp, appExtras);
......
using Property.Model.Entity;
using Property.Model.Extend;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Property.Repository
{
/// <summary>
/// 耗材申请仓储类
/// </summary>
public partial class RB_Supplies_ApplyforRepository : RepositoryBase<RB_Supplies_Applyfor>
{
/// <summary>
/// 获取耗材申请分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public List<RB_Supplies_Applyfor_Extend> GetPageList(int pageIndex, int pageSize, RB_Supplies_Applyfor_Extend dmodel, out long count)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_Applyfor_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.BranchId>=0)
{
where += " and " + nameof(RB_Supplies_Applyfor_Extend.BranchId) + " =" + dmodel.BranchId;
}
string sql = $@" select * from RB_Supplies_Applyfor {where} order by Id desc";
return GetPage<RB_Supplies_Applyfor_Extend>(pageIndex, pageSize, out count, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Supplies_Applyfor_Extend> GetList(RB_Supplies_Applyfor_Extend dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_Applyfor_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.BranchId >= 0)
{
where += " and " + nameof(RB_Supplies_Applyfor_Extend.BranchId) + " =" + dmodel.BranchId;
}
string sql = $@" select * from RB_Supplies_Applyfor {where} order by Id desc";
return Get<RB_Supplies_Applyfor_Extend>(sql).ToList();
}
}
}
using Property.Model.Entity;
using Property.Model.Extend;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Property.Repository
{
/// <summary>
/// 耗材申请特殊日期仓储类
/// </summary>
public partial class RB_Supplies_ApplyforSpecialRepository : RepositoryBase<RB_Supplies_ApplyforSpecial>
{
/// <summary>
/// 获取耗材申请特殊日期分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public List<RB_Supplies_ApplyforSpecial_Extend> GetPageList(int pageIndex, int pageSize, RB_Supplies_ApplyforSpecial_Extend dmodel, out long count)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_ApplyforSpecial_Extend.Status), 0);
if (dmodel.ApplyforId>=0)
{
where += " and " + nameof(RB_Supplies_ApplyforSpecial_Extend.ApplyforId) + " =" + dmodel.ApplyforId;
}
string sql = $@" select * from RB_Supplies_ApplyforSpecial {where} order by Id desc";
return GetPage<RB_Supplies_ApplyforSpecial_Extend>(pageIndex, pageSize, out count, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Supplies_ApplyforSpecial_Extend> GetList(RB_Supplies_ApplyforSpecial_Extend dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_ApplyforSpecial_Extend.Status), 0);
if (dmodel.ApplyforId >= 0)
{
where += " and " + nameof(RB_Supplies_ApplyforSpecial_Extend.ApplyforId) + " =" + dmodel.ApplyforId;
}
string sql = $@" select * from RB_Supplies_ApplyforSpecial {where} order by Id desc";
return Get<RB_Supplies_ApplyforSpecial_Extend>(sql).ToList();
}
}
}
using Property.Model.Entity;
using Property.Model.Extend;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Property.Repository
{
/// <summary>
/// 耗材申请工作日仓储类
/// </summary>
public partial class RB_Supplies_ApplyforWeekdayRepository : RepositoryBase<RB_Supplies_ApplyforWeekday>
{
/// <summary>
/// 获取耗材申请工作日分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public List<RB_Supplies_ApplyforWeekday_Extend> GetPageList(int pageIndex, int pageSize, RB_Supplies_ApplyforWeekday_Extend dmodel, out long count)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_ApplyforWeekday_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.ApplyforId>=0)
{
where += " and " + nameof(RB_Supplies_ApplyforWeekday_Extend.ApplyforId) + " =" + dmodel.ApplyforId;
}
string sql = $@" select * from RB_Supplies_Applyfor {where} order by Id desc";
return GetPage<RB_Supplies_ApplyforWeekday_Extend>(pageIndex, pageSize, out count, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Supplies_ApplyforWeekday_Extend> GetList(RB_Supplies_ApplyforWeekday_Extend dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_ApplyforWeekday_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.ApplyforId >= 0)
{
where += " and " + nameof(RB_Supplies_ApplyforWeekday_Extend.ApplyforId) + " =" + dmodel.ApplyforId;
}
string sql = $@" select * from RB_Supplies_Applyfor {where} order by Id desc";
return Get<RB_Supplies_ApplyforWeekday_Extend>(sql).ToList();
}
}
}
[*.cs]
# IDE0059: 不需要赋值
csharp_style_unused_value_assignment_preference = discard_variable:none
...@@ -14,7 +14,7 @@ namespace Property.WebApi.Controllers.User ...@@ -14,7 +14,7 @@ namespace Property.WebApi.Controllers.User
{ {
public class SuppliesController : PApiController public class SuppliesController : PApiController
{ {
SuppliesModule suppliesModule = new SuppliesModule(); readonly SuppliesModule suppliesModule = new SuppliesModule();
/// <summary> /// <summary>
...@@ -1109,5 +1109,11 @@ namespace Property.WebApi.Controllers.User ...@@ -1109,5 +1109,11 @@ namespace Property.WebApi.Controllers.User
} }
#region 耗材申请日期
#endregion
} }
} }
...@@ -14,11 +14,11 @@ namespace Property.WebApi.Controllers.User ...@@ -14,11 +14,11 @@ namespace Property.WebApi.Controllers.User
public class UserController : PApiController public class UserController : PApiController
{ {
//员工 //员工
private EmployeeModule employeeModule = new EmployeeModule(); private readonly EmployeeModule employeeModule = new EmployeeModule();
//公司 //公司
private BranchModule branchModule = new BranchModule(); private readonly BranchModule branchModule = new BranchModule();
//部门 //部门
private DepartmentModule departmentModule = new DepartmentModule(); private readonly DepartmentModule departmentModule = new DepartmentModule();
/// <summary> /// <summary>
/// 获取公司列表 /// 获取公司列表
...@@ -74,8 +74,7 @@ namespace Property.WebApi.Controllers.User ...@@ -74,8 +74,7 @@ namespace Property.WebApi.Controllers.User
UserInfo userInfo = CacheManager.User.UserReidsCache.GetUserLoginInfo(requestParm.uid); UserInfo userInfo = CacheManager.User.UserReidsCache.GetUserLoginInfo(requestParm.uid);
JObject parms = JObject.Parse(requestParm.msg.ToString()); JObject parms = JObject.Parse(requestParm.msg.ToString());
int BranchId = parms.GetInt("RB_Branch_Id", -1); int BranchId = parms.GetInt("RB_Branch_Id", -1);
List<Module.UserModule.DepartmentModule.DepartmentChooseSell> list = new List<DepartmentModule.DepartmentChooseSell>(); List<Module.UserModule.DepartmentModule.DepartmentChooseSell> list = departmentModule.GetDepartmentTreeForReceiveQuery(1, userInfo.RB_Group_id, BranchId);
list = departmentModule.GetDepartmentTreeForReceiveQuery(1, userInfo.RB_Group_id, BranchId);
//if (!string.IsNullOrEmpty(userInfo.ActionMenuCode) && ("," + userInfo.ActionMenuCode + ",").Contains(",S_CheckAllOrder,")) //if (!string.IsNullOrEmpty(userInfo.ActionMenuCode) && ("," + userInfo.ActionMenuCode + ",").Contains(",S_CheckAllOrder,"))
//{ //{
// list = departmentModule.GetDepartmentTreeForReceiveQuery(1, userInfo.RB_Group_id, BranchId); // list = departmentModule.GetDepartmentTreeForReceiveQuery(1, userInfo.RB_Group_id, BranchId);
...@@ -103,5 +102,23 @@ namespace Property.WebApi.Controllers.User ...@@ -103,5 +102,23 @@ namespace Property.WebApi.Controllers.User
return ApiResult.Success("", list); return ApiResult.Success("", list);
} }
/// <summary>
/// 获取用户登录
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[HttpPost]
public ApiResult GetUserLoginMenu()
{
var requestParm = GetRequestParm();
UserInfo userInfo = CacheManager.User.UserReidsCache.GetUserLoginInfo(requestParm.uid);
List<RB_Sys_Menu_Extend> resultUserMenuList = employeeModule.GetUserMenuAllList(userInfo.RB_Post_Id, userInfo.EmployeeId, out List<RB_Sys_Menu_Extend> userMenuList);
userInfo.UserMenu = resultUserMenuList;
userInfo.token = requestParm.token;
return ApiResult.Success(data: userInfo);
}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment