Commit 011e77de authored by liudong1993's avatar liudong1993

采购调整

parent efbc6c4c
......@@ -521,6 +521,17 @@ namespace Mall.Common
}
}
/// <summary>
/// 生成收入财务单据
/// </summary>
public static string PropertyApi
{
get
{
return ReadConfigKey("PropertyApi");
}
}
/// <summary>
/// 财务单据请求参数Key
/// </summary>
......
using Mall.Common.Plugin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mall.Common.Enum.Finance
{
/// <summary>
/// 财务适用公司,费用类型
/// </summary>
public enum FinanceFlowConnectEnum
{
/// <summary>
///公司
/// </summary>
[EnumField("公司")]
Branch = 1,
/// <summary>
/// 费用
/// </summary>
[EnumField("费用")]
CostType = 2,
/// <summary>
/// 集团
/// </summary>
[EnumField("集团")]
Company = 3,
}
}
using Mall.Common.Plugin;
namespace Mall.Common.Enum.Property
{
/// <summary>
/// 资产审批枚举
/// </summary>
public enum PropertyFlowEnum
{
/// <summary>
/// 领用
/// </summary>
[EnumField("领用")]
Receive = 1,
/// <summary>
/// 退库
/// </summary>
[EnumField("退库")]
CancellingStocks = 2,
/// <summary>
/// 借用
/// </summary>
[EnumField("借用")]
Borrow = 3,
/// <summary>
/// 归还
/// </summary>
[EnumField("归还")]
GiveBack = 4,
/// <summary>
/// 调拨
/// </summary>
[EnumField("调拨")]
Allot = 5,
/// <summary>
/// 处置
/// </summary>
[EnumField("处置")]
Dispose = 6,
/// <summary>
/// 维修
/// </summary>
[EnumField("维修")]
Maintain = 7,
/// <summary>
/// 员工领用资产
/// </summary>
[EnumField("员工领用资产")]
EmpReceive = 8,
/// <summary>
/// 员工退库资产
/// </summary>
[EnumField("员工退库资产")]
EmpCancellingStocks = 9,
/// <summary>
/// 变更领用人
/// </summary>
[EnumField("变更领用人")]
Change = 10,
/// <summary>
/// 入库
/// </summary>
[EnumField("入库")]
StockIn = 11
}
}

using Mall.Common.Enum.Finance;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VT.FW.DB;
namespace Mall.Model.Entity.Finance
{
/// <summary>
/// 财务流程关联表
/// </summary>
[Serializable]
[DB(ConnectionName = "FinanceConnection")]
public class RB_FinanceFlowConnect
{
/// <summary>
/// Id
/// </summary>
public int ID
{
get;
set;
}
/// <summary>
/// 流程模板id
/// </summary>
public int? FlowtemplateId
{
get;
set;
}
/// <summary>
/// 使用对象 当type=3时,对象为集团=0
/// </summary>
public int? SuitableObjectId
{
get;
set;
}
/// <summary>
/// 1-公司,2-费用对象为0表示通用,3-集团 (备注:当为3时,请一定将SuitableObjectId=0)
/// </summary>
public FinanceFlowConnectEnum? Type
{
get;
set;
}
/// <summary>
/// 状态
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// 收入支出
/// </summary>
public int? Class
{
get; set;
}
}
}
using Mall.Common.Enum.Property;
using System;
using VT.FW.DB;
namespace Mall.Model.Entity.Property
{
/// <summary>
/// 资产审批关联实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Property_AuditRelevance
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 类型
/// </summary>
public PropertyFlowEnum? Type
{
get;
set;
}
/// <summary>
/// 是否启用 1是 2否
/// </summary>
public int? Enabled
{
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;
}
}
}
\ No newline at end of file
......@@ -135,5 +135,9 @@ namespace Mall.Model.Entity.Property
/// 采购单id
/// </summary>
public int? ProcurementId { get; set; }
/// <summary>
/// 流程模板id
/// </summary>
public int? TempleteId { get; set; }
}
}
\ No newline at end of file
using VT.FW.DB;
using Mall.Model.Entity.Finance;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mall.Model.Extend.Finance
{
/// <summary>
/// 财务流程关联表
/// </summary>
[Serializable]
[DB(ConnectionName = "FinanceConnection")]
public class RB_FinanceFlowConnect_Extend : RB_FinanceFlowConnect
{
/// <summary>
/// 多个使用对象
/// </summary>
public string SuitableObjectIds { get; set; }
/// <summary>
/// 多个流程模板
/// </summary>
public string FlowtemplateIds { get; set; }
/// <summary>
/// 对象名称
/// </summary>
public string SuitableObjectName { get; set; }
}
}
This diff is collapsed.
using Mall.Model.Entity.Finance;
using Mall.Model.Extend.Finance;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VT.FW.DB;
namespace Mall.Repository.Finance
{
/// <summary>
/// 财务流程关联扩展方法
/// </summary>
public class RB_FinanceFlowConnectRepository : BaseRepository<RB_FinanceFlowConnect>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_FinanceFlowConnect); } }
/// <summary>
/// 获取财务流程关联表
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public List<RB_FinanceFlowConnect_Extend> GetExtendList(RB_FinanceFlowConnect_Extend model)
{
string where = " WHERE 1=1 ";
where += string.Format(" AND " + nameof(RB_FinanceFlowConnect.Status) + "={0}", 0);
if (model.Type > 0)
{
where += string.Format(" AND " + nameof(RB_FinanceFlowConnect.Type) + "={0}", (int)model.Type);
}
if (model.Class > 0)
{
where += string.Format(" AND " + nameof(RB_FinanceFlowConnect.Class) + "={0}", (int)model.Class);
}
if (model.FlowtemplateId >= 0)
{
where += string.Format(" AND " + nameof(RB_FinanceFlowConnect.FlowtemplateId) + "={0}", model.FlowtemplateId);
}
if (model.SuitableObjectId >= 0)
{
where += string.Format(" AND " + nameof(RB_FinanceFlowConnect.SuitableObjectId) + "={0}", model.SuitableObjectId);
}
if (!string.IsNullOrWhiteSpace(model.SuitableObjectIds))
{
where += string.Format(" AND " + nameof(RB_FinanceFlowConnect.SuitableObjectId) + " in ({0})", model.SuitableObjectId);
}
if (!string.IsNullOrWhiteSpace(model.FlowtemplateIds))
{
where += string.Format(" AND " + nameof(RB_FinanceFlowConnect.FlowtemplateId) + " in ({0})", model.FlowtemplateIds);
}
string sql = string.Format(" SELECT * FROM {0} {1}", TableName, where);
return Get<RB_FinanceFlowConnect_Extend>(sql).ToList();
}
}
}
......@@ -67,6 +67,10 @@ namespace Mall.Repository.Finance
if (model.TempLateClass > 0) {
where += string.Format(" AND " + nameof(Rb_Workflow_Template.TempLateClass) + "={0}", (int)model.TempLateClass);
}
if (model.PropertyType > 0)
{
where += string.Format(" AND " + nameof(Rb_Workflow_Template.PropertyType) + "={0}", (int)model.PropertyType);
}
string sql = string.Format(" SELECT * FROM {0} {1}", TableName, where);
return Get<Rb_Workflow_Template_Extend>(sql).ToList();
......
using Mall.Model.Entity.Property;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB;
namespace Mall.Repository.Property
{
/// <summary>
/// 资产审批关联仓储类
/// </summary>
public partial class RB_Property_AuditRelevanceRepository : BaseRepository<RB_Property_AuditRelevance>
{
/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Property_AuditRelevance> GetList(RB_Property_AuditRelevance dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Property_AuditRelevance.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.Type > 0)
{
where += " and " + nameof(RB_Property_AuditRelevance.Type) + "=" + (int)dmodel.Type;
}
string sql = $@" select * from RB_Property_AuditRelevance {where}";
return Get<RB_Property_AuditRelevance>(sql).ToList();
}
}
}
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