Commit f17dab63 authored by liudong1993's avatar liudong1993

耗材盘点实体

parent af4c6dea
using System;
using REBORN.Common.AOP;
using REBORN.Common.Plugin;
namespace Property.Model.Entity
{
/// <summary>
/// 耗材盘点实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_Check
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 期数
/// </summary>
public string Periods
{
get;
set;
}
/// <summary>
/// 开始时间
/// </summary>
public DateTime? StartDate
{
get;
set;
}
/// <summary>
/// 结束时间
/// </summary>
public DateTime? EndDate
{
get;
set;
}
/// <summary>
/// 公司别 (暂不启用 都是网络印象同步的)
/// </summary>
public int? BranchId
{
get;
set;
}
/// <summary>
/// 分类ids (暂不启用 都是电商同步的)
/// </summary>
public string CategoryIds
{
get;
set;
}
/// <summary>
/// 仓库id
/// </summary>
public int? WarehouseId
{
get;
set;
}
/// <summary>
/// 盘点期数状态
/// </summary>
public int? CheckState
{
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;
}
}
}
\ 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_Supplies_CheckDetail
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 盘点期数id
/// </summary>
public int? CheckId
{
get;
set;
}
/// <summary>
/// 耗材id
/// </summary>
public int? SuppliesId
{
get;
set;
}
/// <summary>
/// 当前库存的数量
/// </summary>
public int? InventoryNum
{
get;
set;
}
/// <summary>
/// 实际数量
/// </summary>
public int? RealityNum
{
get;
set;
}
/// <summary>
/// 审核状态
/// </summary>
public int? AuditStatus
{
get;
set;
}
/// <summary>
/// 盘点状态
/// </summary>
public PropertyCheckStatusEnum? CheckStatus
{
get;
set;
}
/// <summary>
/// 盘点人
/// </summary>
public int? CheckEmpId
{
get;
set;
}
/// <summary>
/// 盘点时间
/// </summary>
public DateTime? CheckDate
{
get;
set;
}
/// <summary>
/// 审核人
/// </summary>
public int? AuditEmpId
{
get;
set;
}
/// <summary>
/// 审核时间
/// </summary>
public DateTime? AuditDate
{
get;
set;
}
/// <summary>
/// 盘点图片列表 json格式
/// </summary>
public string Images
{
get;
set;
}
/// <summary>
/// 盘亏盘盈处理状态 1已处理 2未处理
/// </summary>
public int? DealStatus
{
get;
set;
}
/// <summary>
/// 备注(报损 /报溢 需备注记录 出库单号/入库单号)
/// </summary>
public string Remark
{
get;
set;
}
/// <summary>
/// 报损/报溢 自动生成财务单据
/// </summary>
public int? FinanceId
{
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 System.Collections.Generic;
using Property.Model.Entity;
using REBORN.Common.AOP;
namespace Property.Model.Extend
{
/// <summary>
/// 耗材盘点明细扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "PropertyConnection")]
public class RB_Supplies_CheckDetail_Extend : RB_Supplies_CheckDetail
{
/// <summary>
/// 耗材名称
/// </summary>
public string SuppliesName { get; set; }
/// <summary>
/// 耗材编码
/// </summary>
public string SuppliesNo { get; set; }
/// <summary>
/// 规格json格式
/// </summary>
public string SpecificationName { get; set; }
/// <summary>
/// 耗材的规格
/// </summary>
public List<string> SpecificationList { get; set; }
/// <summary>
/// 查询盘亏盘盈 1是
/// </summary>
public int? IsSelectCheckLoss { 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_Supplies_Check_Extend : RB_Supplies_Check
{
/// <summary>
/// 仓库
/// </summary>
public RB_Supplies_WareHouse_Extend WModel { get; set; }
/// <summary>
/// 耗材
/// </summary>
public RB_Supplies_Material_Extend SModel { get; set; }
}
}
\ No newline at end of file
using Property.Model.Entity;
using Property.Model.Extend;
using REBORN.Common.Enum;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Property.Repository
{
/// <summary>
/// 耗材盘点明细仓储类
/// </summary>
public partial class RB_Supplies_CheckDetailRepository : RepositoryBase<RB_Supplies_CheckDetail>
{
/// <summary>
/// 获取盘点分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public List<RB_Supplies_CheckDetail_Extend> GetPageList(int pageIndex, int pageSize, RB_Supplies_CheckDetail_Extend dmodel, out long count)
{
string where = " where 1=1 ";
where += string.Format(" AND cd.{0}={1}", nameof(RB_Supplies_CheckDetail_Extend.Status), 0);
where += $@" and cd.RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.SuppliesId > 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.SuppliesId) + "=" + dmodel.SuppliesId;
}
if (dmodel.CheckId > 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.CheckId) + "=" + dmodel.CheckId;
}
if (!string.IsNullOrWhiteSpace(dmodel.SuppliesName))
{
where += " and pi." + nameof(RB_Supplies_Material.Name) + " like '%" + dmodel.SuppliesName + "%'";
}
if (dmodel.AuditStatus > 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.AuditStatus) + "=" + dmodel.AuditStatus;
}
if (dmodel.CheckStatus > 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.CheckStatus) + "=" + (int)dmodel.CheckStatus;
}
if (dmodel.DealStatus >= 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.DealStatus) + "=" + dmodel.DealStatus;
}
if (dmodel.IsSelectCheckLoss == 1)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.CheckStatus) + " in(3,4)";
}
string sql = $@" select cd.*,pi.Name as SuppliesName,pi.SuppliesNo,pi.SpecificationName from RB_Supplies_CheckDetail cd
left join rb_supplies_material pi on cd.SuppliesId=pi.Id
{where} order by cd.Id desc";
return GetPage<RB_Supplies_CheckDetail_Extend>(pageIndex, pageSize, out count, sql).ToList();
}
/// <summary>
/// 根据条件获取盘点列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Supplies_CheckDetail_Extend> GetList(RB_Supplies_CheckDetail_Extend dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND cd.{0}={1}", nameof(RB_Supplies_CheckDetail_Extend.Status), 0);
where += $@" and cd.RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.SuppliesId > 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.SuppliesId) + "=" + dmodel.SuppliesId;
}
if (dmodel.CheckId > 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.CheckId) + "=" + dmodel.CheckId;
}
if (!string.IsNullOrWhiteSpace(dmodel.SuppliesName))
{
where += " and pi." + nameof(RB_Supplies_Material.Name) + " like '%" + dmodel.SuppliesName + "%'";
}
if (dmodel.AuditStatus > 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.AuditStatus) + "=" + dmodel.AuditStatus;
}
if (dmodel.CheckStatus > 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.CheckStatus) + "=" + (int)dmodel.CheckStatus;
}
if (dmodel.DealStatus >= 0)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.DealStatus) + "=" + dmodel.DealStatus;
}
if (dmodel.IsSelectCheckLoss == 1)
{
where += " and cd." + nameof(RB_Supplies_CheckDetail_Extend.CheckStatus) + " in(3,4)";
}
string sql = $@" select cd.*,pi.Name as SuppliesName,pi.SuppliesNo,pi.SpecificationName from RB_Supplies_CheckDetail cd
left join rb_supplies_material pi on cd.SuppliesId=pi.Id
{where} order by cd.Id desc";
return Get<RB_Supplies_CheckDetail_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_CheckRepository : RepositoryBase<RB_Supplies_Check>
{
/// <summary>
/// 获取盘点分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public List<RB_Supplies_Check_Extend> GetPageList(int pageIndex, int pageSize, RB_Supplies_Check_Extend dmodel, out long count)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_Check_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.BranchId > -1)
{
where += " and " + nameof(RB_Supplies_Check_Extend.BranchId) + "=" + dmodel.BranchId;
}
if (!string.IsNullOrWhiteSpace(dmodel.Periods))
{
where += " and " + nameof(RB_Supplies_Check_Extend.Periods) + " like '%" + dmodel.Periods + "%'";
}
if (dmodel.WarehouseId > 0) {
where += " and " + nameof(RB_Supplies_Check_Extend.WarehouseId) + "=" + dmodel.WarehouseId;
}
string sql = $@" select * from RB_Supplies_Check {where} order by Id desc";
return GetPage<RB_Supplies_Check_Extend>(pageIndex, pageSize, out count, sql).ToList();
}
/// <summary>
/// 根据条件获取盘点列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Supplies_Check_Extend> GetList(RB_Supplies_Check_Extend dmodel)
{
string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_Check_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (dmodel.BranchId > -1)
{
where += " and " + nameof(RB_Supplies_Check_Extend.BranchId) + "=" + dmodel.BranchId;
}
if (!string.IsNullOrWhiteSpace(dmodel.Periods))
{
where += " and " + nameof(RB_Supplies_Check_Extend.Periods) + " like '%" + dmodel.Periods + "%'";
}
if (dmodel.WarehouseId > 0)
{
where += " and " + nameof(RB_Supplies_Check_Extend.WarehouseId) + "=" + dmodel.WarehouseId;
}
string sql = $@" select * from RB_Supplies_Check {where} order by Id desc";
return Get<RB_Supplies_Check_Extend>(sql).ToList();
}
}
}
......@@ -62,7 +62,7 @@ namespace Property.WebApi
"http://zcyx.oytour.com",
"http://yx.oytour.com",
"http://mall.oytour.com",
"http://mallapi.oytour.com",
"http://mallapi.oytour.com",
"http://www.oytour.com"
};
if (!string.IsNullOrEmpty(accessSiteStr))
......
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