Commit f3148700 authored by liudong1993's avatar liudong1993

采购入库流程

parent 39f10060
...@@ -66,6 +66,11 @@ namespace REBORN.Common.Enum ...@@ -66,6 +66,11 @@ namespace REBORN.Common.Enum
/// 请购审核 /// 请购审核
/// </summary> /// </summary>
[EnumField("请购审核")] [EnumField("请购审核")]
PurchaseRequest = 12 PurchaseRequest = 12,
/// <summary>
/// 采购入库(包括耗材+资产)
/// </summary>
[EnumField("采购入库")]
PurchaseStokcIn = 13
} }
} }
...@@ -16,6 +16,16 @@ namespace REBORN.Common.Enum ...@@ -16,6 +16,16 @@ namespace REBORN.Common.Enum
/// 待入库 /// 待入库
/// </summary> /// </summary>
[EnumField("待入库")] [EnumField("待入库")]
StockInWarting = 2 StockInWarting = 2,
/// <summary>
/// 审核驳回
/// </summary>
[EnumField("审核驳回")]
StockInAuditReject = 3,
/// <summary>
/// 已取消
/// </summary>
[EnumField("已取消")]
Cancel = 4
} }
} }
...@@ -45,5 +45,23 @@ namespace Property.Common.Models ...@@ -45,5 +45,23 @@ namespace Property.Common.Models
/// </summary> /// </summary>
[EnumField("财务单据审核")] [EnumField("财务单据审核")]
Finance = 6, Finance = 6,
/// <summary>
/// 试听课
/// </summary>
[EnumField("试听课")]
ReserveClass = 7,
/// <summary>
/// 耗材入库审核
/// </summary>
[EnumField("耗材入库审核")]
SuppliesStokcInAudit = 8,
/// <summary>
/// 资产入库审核
/// </summary>
[EnumField("资产入库审核")]
PropertyStokcInAudit = 9,
} }
} }
...@@ -247,5 +247,15 @@ namespace Property.Model.Entity ...@@ -247,5 +247,15 @@ namespace Property.Model.Entity
/// 是否折旧 1是 其他否 /// 是否折旧 1是 其他否
/// </summary> /// </summary>
public int IsDepreciation { get; set; } public int IsDepreciation { get; set; }
/// <summary>
/// 入库单Id
/// </summary>
public int StockInId { get; set; }
/// <summary>
/// 入库单编号
/// </summary>
public string StockInNum { get; set; }
} }
} }
\ No newline at end of file
...@@ -82,5 +82,9 @@ namespace Property.Model.Entity ...@@ -82,5 +82,9 @@ namespace Property.Model.Entity
/// </summary> /// </summary>
public int PropertyId { get; set; } public int PropertyId { get; set; }
/// <summary>
/// 审核中的入库数量
/// </summary>
public int AuditStokcInNum { get; set; }
} }
} }
\ No newline at end of file
using System;
using REBORN.Common.AOP;
using REBORN.Common.Enum;
using REBORN.Common.Plugin;
namespace Property.Model.Entity
{
/// <summary>
/// 资产入库实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Property_Stockin
{
/// <summary>
/// Id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 入库状态 1已入库 2待入库 3驳回 4取消
/// </summary>
public StockInStatusEnum StockInState { get; set; }
/// <summary>
/// 入库日期
/// </summary>
public DateTime StockInDate { get; set; }
/// <summary>
/// 入库总金额
/// </summary>
public decimal Money { get; set; }
/// <summary>
/// 供应商id
/// </summary>
public int SupplierId { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { 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; }
/// <summary>
/// 入库单号
/// </summary>
public string StockInNum { get; set; }
/// <summary>
/// 采购单id
/// </summary>
public int ProcurementId { get; set; }
/// <summary>
/// 模板id
/// </summary>
public int TempleteId { get; set; }
/// <summary>
/// 附件 json格式 可图片 可文件
/// </summary>
public string Voucher { get; set; }
/// <summary>
/// 入库审核备注
/// </summary>
public string AuditRemark { get; set; }
/// <summary>
/// 校区id
/// </summary>
public int SchoolId { get; set; }
/// <summary>
/// 购置日期
/// </summary>
public DateTime BuyDate { get; set; }
}
}
\ No newline at end of file
using System;
using REBORN.Common.AOP;
using REBORN.Common.Enum;
using REBORN.Common.Plugin;
namespace Property.Model.Entity
{
/// <summary>
/// 资产入库明细实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Property_StockinDetail
{
/// <summary>
/// Id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 入库id
/// </summary>
public int StockInId { get; set; }
/// <summary>
/// 资产名称
/// </summary>
public string PropertyName { get; set; }
/// <summary>
/// 品牌名称
/// </summary>
public string BrandName { get; set; }
/// <summary>
/// 分类id
/// </summary>
public int CategoryId { get; set; }
/// <summary>
/// 入库数量
/// </summary>
public int Number { get; set; }
/// <summary>
/// 成本价格
/// </summary>
public decimal CostMoney { 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>
/// 关联资产id (入库时 直接根据该资产信息生成)
/// </summary>
public int PropertyId { get; set; }
}
}
\ No newline at end of file
...@@ -21,7 +21,7 @@ namespace Property.Model.Entity ...@@ -21,7 +21,7 @@ namespace Property.Model.Entity
set; set;
} }
/// <summary> /// <summary>
/// 1、资产流程 2、耗材流程 3请购流程 /// 1、资产流程 2、耗材流程 3请购流程 4耗材采购入库 5资产采购入库
/// </summary> /// </summary>
public int? Type public int? Type
{ {
......
...@@ -86,7 +86,7 @@ namespace Property.Model.Entity ...@@ -86,7 +86,7 @@ namespace Property.Model.Entity
set; set;
} }
/// <summary> /// <summary>
/// 0资产流程 1耗材流程 2请购单流程 /// 0资产流程 1耗材流程 2请购单流程 3耗材采购入库 4资产采购入库
/// </summary> /// </summary>
public int? TemplateType public int? TemplateType
{ {
......
...@@ -54,7 +54,7 @@ namespace Property.Model.Entity ...@@ -54,7 +54,7 @@ namespace Property.Model.Entity
set; set;
} }
/// <summary> /// <summary>
/// 0资产 1耗材 2请购 /// 0资产 1耗材 2请购 3耗材采购入库 4资产采购入库
/// </summary> /// </summary>
public int? TemplateType public int? TemplateType
{ {
......
...@@ -37,7 +37,7 @@ namespace Property.Model.Entity ...@@ -37,7 +37,7 @@ namespace Property.Model.Entity
set; set;
} }
/// <summary> /// <summary>
/// 0资产 1耗材 2请购 /// 0资产 1耗材 2请购 3耗材采购入库 4资产采购入库
/// </summary> /// </summary>
public int? TemplateType public int? TemplateType
{ {
......
...@@ -67,5 +67,10 @@ namespace Property.Model.Entity ...@@ -67,5 +67,10 @@ namespace Property.Model.Entity
/// </summary> /// </summary>
public int StockInNum { get; set; } public int StockInNum { get; set; }
/// <summary>
/// 审核中的入库数量
/// </summary>
public int AuditStokcInNum { get; set; }
} }
} }
\ No newline at end of file
...@@ -154,5 +154,15 @@ namespace Property.Model.Entity ...@@ -154,5 +154,15 @@ namespace Property.Model.Entity
/// 出库单号 /// 出库单号
/// </summary> /// </summary>
public string ReturnsNo { get; set; } public string ReturnsNo { get; set; }
/// <summary>
/// 附件 json格式 1图片 2文件 {type ,url}
/// </summary>
public string Voucher { get; set; }
/// <summary>
/// 入库审核备注
/// </summary>
public string AuditRemark { get; set; }
} }
} }
\ No newline at end of file
...@@ -17,6 +17,11 @@ namespace Property.Model.Extend ...@@ -17,6 +17,11 @@ namespace Property.Model.Extend
/// </summary> /// </summary>
public int ProcurementId { get; set; } public int ProcurementId { get; set; }
/// <summary>
/// 是否启用流程审核 1是
/// </summary>
public int IsAuditEnabled { get; set; }
/// <summary> /// <summary>
/// 账户类型 /// 账户类型
/// </summary> /// </summary>
...@@ -56,5 +61,15 @@ namespace Property.Model.Extend ...@@ -56,5 +61,15 @@ namespace Property.Model.Extend
/// 明细列表 /// 明细列表
/// </summary> /// </summary>
public List<RB_Property_ProcurementDetail_Extend> DetailList { get; set; } public List<RB_Property_ProcurementDetail_Extend> DetailList { get; set; }
/// <summary>
/// 凭证列表
/// </summary>
public List<VoucherModel> VoucherList { get; set; }
/// <summary>
/// 入库审核备注
/// </summary>
public string StockInRemark { get; set; }
} }
} }
\ No newline at end of file
using System;
using System.Collections.Generic;
using Property.Model.Entity;
using REBORN.Common.AOP;
namespace Property.Model.Extend
{
/// <summary>
/// 资产入库明细扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Property_StockinDetail_Extend : RB_Property_StockinDetail
{
/// <summary>
/// 入库ids
/// </summary>
public string StockInIdStr { get; set; }
/// <summary>
/// 分类名称
/// </summary>
public string CategoryName { get; set; }
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using Property.Model.Entity;
using REBORN.Common.AOP;
namespace Property.Model.Extend
{
/// <summary>
/// 资产入库扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Property_Stockin_Extend : RB_Property_Stockin
{
/// <summary>
/// 入库开始时间
/// </summary>
public string StartTime { get; set; }
/// <summary>
/// 入库结束时间
/// </summary>
public string EndTime { get; set; }
/// <summary>
/// 资产名称
/// </summary>
public string PropertyName { get; set; }
/// <summary>
/// 财务单据id
/// </summary>
public int FinanceId { get; set; }
/// <summary>
/// 审核类型 1通过 2拒绝
/// </summary>
public int? AuditType { get; set; }
/// <summary>
/// 是否可以审核
/// </summary>
public int? Is_CanAudit { get; set; }
/// <summary>
/// 是否自己审核
/// </summary>
public int? Is_AuditSelf { get; set; }
/// <summary>
/// 流程
/// </summary>
public List<Rb_Workflow_AuditRelevance_Extend> AuditSteps { get; set; }
/// <summary>
/// 模板名称
/// </summary>
public string TemplateName { get; set; }
/// <summary>
/// 审核描述
/// </summary>
public string AuditDescription { get; set; }
/// <summary>
/// 审批人
/// </summary>
public int AuditEmId { get; set; }
/// <summary>
/// 已审批人
/// </summary>
public int AuditedEmId { get; set; }
/// <summary>
/// 创建人
/// </summary>
public string EmName { get; set; }
/// <summary>
/// 明细列表
/// </summary>
public List<RB_Property_StockinDetail_Extend> DetailList { get; set; }
/// <summary>
/// 凭证列表
/// </summary>
public List<VoucherModel> VoucherList { get; set; }
/// <summary>
/// 入库类型 1资产 2耗材
/// </summary>
public int StockInType { get; set; }
}
}
\ No newline at end of file
...@@ -17,6 +17,11 @@ namespace Property.Model.Extend ...@@ -17,6 +17,11 @@ namespace Property.Model.Extend
/// </summary> /// </summary>
public int ProcurementId { get; set; } public int ProcurementId { get; set; }
/// <summary>
/// 是否开启审批 1是
/// </summary>
public int IsAuditEnabled { get; set; }
/// <summary> /// <summary>
/// 账户类型 /// 账户类型
/// </summary> /// </summary>
...@@ -61,5 +66,15 @@ namespace Property.Model.Extend ...@@ -61,5 +66,15 @@ namespace Property.Model.Extend
/// 明细列表 /// 明细列表
/// </summary> /// </summary>
public List<RB_Supplies_ProcurementDetail_Extend> DetailList { get; set; } public List<RB_Supplies_ProcurementDetail_Extend> DetailList { get; set; }
/// <summary>
/// 附件
/// </summary>
public List<VoucherModel> VoucherList { get; set; }
/// <summary>
/// 入库备注
/// </summary>
public string StockInRemark { get; set; }
} }
} }
\ No newline at end of file
...@@ -12,6 +12,11 @@ namespace Property.Model.Extend ...@@ -12,6 +12,11 @@ namespace Property.Model.Extend
[DB(ConnectionName = "PropertyConnection")] [DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_StockIn_Extend : RB_Supplies_StockIn public class RB_Supplies_StockIn_Extend : RB_Supplies_StockIn
{ {
/// <summary>
/// 附件
/// </summary>
public List<VoucherModel> VoucherList { get; set; }
/// <summary> /// <summary>
/// 审核图片 /// 审核图片
/// </summary> /// </summary>
...@@ -97,4 +102,27 @@ namespace Property.Model.Extend ...@@ -97,4 +102,27 @@ namespace Property.Model.Extend
/// </summary> /// </summary>
public int? AuditedEmId { get; set; } public int? AuditedEmId { get; set; }
} }
/// <summary>
/// 附件
/// </summary>
public class VoucherModel
{
/// <summary>
/// 1、图片,2、文件
/// </summary>
public int Type
{
get;
set;
}
/// <summary>
/// 凭证内容
/// </summary>
public string Url
{
get;
set;
}
}
} }
\ No newline at end of file
...@@ -33,6 +33,10 @@ namespace Property.Repository ...@@ -33,6 +33,10 @@ namespace Property.Repository
{ {
where += " and pi." + nameof(RB_Property_Info_Extend.PropertyNum) + " like '%" + dmodel.PropertyNum.Trim() + "%'"; where += " and pi." + nameof(RB_Property_Info_Extend.PropertyNum) + " like '%" + dmodel.PropertyNum.Trim() + "%'";
} }
if (!string.IsNullOrEmpty(dmodel.StockInNum))
{
where += " and pi." + nameof(RB_Property_Info_Extend.StockInNum) + " like '%" + dmodel.StockInNum + "%'";
}
if (dmodel.CategoryId > 0) { if (dmodel.CategoryId > 0) {
where += " and pi." + nameof(RB_Property_Info_Extend.CategoryId) + "=" + dmodel.CategoryId; where += " and pi." + nameof(RB_Property_Info_Extend.CategoryId) + "=" + dmodel.CategoryId;
} }
......
using Property.Model.Entity;
using Property.Model.Extend;
using REBORN.Common.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Property.Repository
{
/// <summary>
/// 资产入库明细仓储类
/// </summary>
public partial class RB_Property_StockinDetailRepository : RepositoryBase<RB_Property_StockinDetail>
{
/// <summary>
/// 获取入库明细数据
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Property_StockinDetail_Extend> GetList(RB_Property_StockinDetail_Extend dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND ssd.{0}={1}", nameof(RB_Property_StockinDetail_Extend.Status), 0);
where += $@" and ssd.RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.StockInId > 0)
{
where += " and ssd." + nameof(RB_Property_StockinDetail_Extend.StockInId) + "=" + dmodel.StockInId;
}
if (dmodel.PropertyId > 0)
{
where += " and ssd." + nameof(RB_Property_StockinDetail_Extend.PropertyId) + "=" + dmodel.PropertyId;
}
if (!string.IsNullOrEmpty(dmodel.StockInIdStr))
{
where += " and ssd." + nameof(RB_Property_StockinDetail_Extend.StockInId) + " in(" + dmodel.StockInIdStr + ")";
}
string sql = $@" select ssd.*,pc.Name as CategoryName
from RB_Property_StockinDetail ssd
left join rb_property_category pc on pc.Id=ssd.CategoryId
{where} order by ssd.Id desc";
return Get<RB_Property_StockinDetail_Extend>(sql).ToList();
}
}
}
This diff is collapsed.
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