修正名称的错误
This commit is contained in:
@@ -9,7 +9,7 @@ namespace NX.ERP.BLL.Model
|
|||||||
{
|
{
|
||||||
public string OutboundNo { get; set; }
|
public string OutboundNo { get; set; }
|
||||||
public DateTime OutboundDate { get; set; }
|
public DateTime OutboundDate { get; set; }
|
||||||
public OutBoundType OutBoundType { get; set; }
|
public OutBoundType OutboundType { get; set; }
|
||||||
|
|
||||||
public string WarehouseCode { get; set; }
|
public string WarehouseCode { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace NX.ERP.BLL.Model
|
|||||||
public enum OutBoundType
|
public enum OutBoundType
|
||||||
{
|
{
|
||||||
SaleOut=1,
|
SaleOut=1,
|
||||||
MaterielOut=2,
|
MaterialOut=2,
|
||||||
OtherOut=3
|
OtherOut=3
|
||||||
|
|
||||||
//1:销售出库;2:原材料出库;3:其它出库
|
//1:销售出库;2:原材料出库;3:其它出库
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ namespace NX.ERP.BLL.Store
|
|||||||
{
|
{
|
||||||
string ID = "";
|
string ID = "";
|
||||||
|
|
||||||
if (outBound.OutBoundType == Model.OutBoundType.MaterielOut)
|
if (outBound.OutboundType == Model.OutBoundType.MaterialOut)
|
||||||
{
|
{
|
||||||
var dal = new U8.Store.MaterielStoreOutDAL();
|
var dal = new U8.Store.MaterialStoreOutDAL();
|
||||||
ID = dal.AddVocher(new ERP.Model.Request.MaterielStoreOut()
|
ID = dal.AddVocher(new ERP.Model.Request.MaterialStoreOut()
|
||||||
{
|
{
|
||||||
Code= "191000000007",
|
Code= "191000000007",
|
||||||
Date = outBound.OutboundDate,
|
Date = outBound.OutboundDate,
|
||||||
@@ -26,7 +26,7 @@ namespace NX.ERP.BLL.Store
|
|||||||
|
|
||||||
Details = outBound.OutboundDtlLst.ConvertAll(m =>
|
Details = outBound.OutboundDtlLst.ConvertAll(m =>
|
||||||
{
|
{
|
||||||
return new ERP.Model.Request.MaterielStoreOutDetail()
|
return new ERP.Model.Request.MaterialStoreOutDetail()
|
||||||
{
|
{
|
||||||
|
|
||||||
InvCode = m.MaterialCode,
|
InvCode = m.MaterialCode,
|
||||||
@@ -39,7 +39,7 @@ namespace NX.ERP.BLL.Store
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
if (outBound.OutBoundType == Model.OutBoundType.SaleOut)
|
if (outBound.OutboundType == Model.OutBoundType.SaleOut)
|
||||||
{
|
{
|
||||||
var dal = new U8.Store.SaleOutDAL();
|
var dal = new U8.Store.SaleOutDAL();
|
||||||
ID = dal.AddVoucher(new ERP.Model.Request.SaleStoreOut()
|
ID = dal.AddVoucher(new ERP.Model.Request.SaleStoreOut()
|
||||||
@@ -63,7 +63,7 @@ namespace NX.ERP.BLL.Store
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
if (outBound.OutBoundType == Model.OutBoundType.OtherOut)
|
if (outBound.OutboundType == Model.OutBoundType.OtherOut)
|
||||||
{
|
{
|
||||||
var dal = new U8.Store.OtherStoreOutDAL();
|
var dal = new U8.Store.OtherStoreOutDAL();
|
||||||
ID = dal.AddVocher(new ERP.Model.Request.OtherStoreInOut()
|
ID = dal.AddVocher(new ERP.Model.Request.OtherStoreInOut()
|
||||||
|
|||||||
@@ -5,16 +5,16 @@ using System.Text;
|
|||||||
|
|
||||||
namespace NX.ERP.Model.Request
|
namespace NX.ERP.Model.Request
|
||||||
{
|
{
|
||||||
public class Materiel: BaseModel
|
public class Material: BaseModel
|
||||||
{
|
{
|
||||||
private string _code;
|
private string _code;
|
||||||
private string _name;
|
private string _name;
|
||||||
|
|
||||||
public string MaterielCode { get => _code; set => _code = value; }
|
public string MaterialCode { get => _code; set => _code = value; }
|
||||||
public string MaterielName { get => _name; set => _name = value; }
|
public string MaterialName { get => _name; set => _name = value; }
|
||||||
|
|
||||||
|
|
||||||
public string MaterielTypeCode { get; set; }
|
public string MaterialTypeCode { get; set; }
|
||||||
|
|
||||||
public string SpecsModel { get; set; }
|
public string SpecsModel { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace NX.ERP.Model.Request
|
namespace NX.ERP.Model.Request
|
||||||
{
|
{
|
||||||
public class MaterielStoreOut
|
public class MaterialStoreOut
|
||||||
{
|
{
|
||||||
private int id;
|
private int id;
|
||||||
private string code;
|
private string code;
|
||||||
@@ -15,7 +15,7 @@ namespace NX.ERP.Model.Request
|
|||||||
private string sourceCode;
|
private string sourceCode;
|
||||||
private string source;
|
private string source;
|
||||||
private string maker;
|
private string maker;
|
||||||
private IList<MaterielStoreOutDetail> details;
|
private IList<MaterialStoreOutDetail> details;
|
||||||
|
|
||||||
public int Id { get => id; set => id = value; }
|
public int Id { get => id; set => id = value; }
|
||||||
public string Code { get => code; set => code = value; }
|
public string Code { get => code; set => code = value; }
|
||||||
@@ -23,7 +23,7 @@ namespace NX.ERP.Model.Request
|
|||||||
public string SourceCode { get => sourceCode; set => sourceCode = value; }
|
public string SourceCode { get => sourceCode; set => sourceCode = value; }
|
||||||
public string Source { get => source; set => source = value; }
|
public string Source { get => source; set => source = value; }
|
||||||
public DateTime Date { get => date; set => date = value; }
|
public DateTime Date { get => date; set => date = value; }
|
||||||
public IList<MaterielStoreOutDetail> Details { get => details; set => details = value; }
|
public IList<MaterialStoreOutDetail> Details { get => details; set => details = value; }
|
||||||
public string Maker { get => maker; set => maker = value; }
|
public string Maker { get => maker; set => maker = value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace NX.ERP.Model.Request
|
namespace NX.ERP.Model.Request
|
||||||
{
|
{
|
||||||
public class MaterielStoreOutDetail
|
public class MaterialStoreOutDetail
|
||||||
{
|
{
|
||||||
|
|
||||||
private double quantity;
|
private double quantity;
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ using System.Text;
|
|||||||
|
|
||||||
namespace NX.ERP.Model.Request
|
namespace NX.ERP.Model.Request
|
||||||
{
|
{
|
||||||
public class MaterielType: BaseModel
|
public class MaterialType: BaseModel
|
||||||
{
|
{
|
||||||
private string materielTypeCode;
|
private string _MaterialTypeCode;
|
||||||
private string materielTypeName;
|
private string _MaterialTypeName;
|
||||||
private int? _level;
|
private int? _level;
|
||||||
private int? _isEnd;
|
private int? _isEnd;
|
||||||
|
|
||||||
public string MaterielTypeCode { get => materielTypeCode; set => materielTypeCode = value; }
|
public string MaterialTypeCode { get => _MaterialTypeCode; set => _MaterialTypeCode = value; }
|
||||||
public string MaterielTypeName { get => materielTypeName; set => materielTypeName = value; }
|
public string MaterialTypeName { get => _MaterialTypeName; set => _MaterialTypeName = value; }
|
||||||
public int? MaterialTypeGrade { get => _level; set => _level = value; }
|
public int? MaterialTypeGrade { get => _level; set => _level = value; }
|
||||||
public int? MaterialTypeIsend { get => _isEnd; set => _isEnd = value; }
|
public int? MaterialTypeIsend { get => _isEnd; set => _isEnd = value; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace NX.ERP.Model
|
namespace NX.ERP.Model
|
||||||
{
|
{
|
||||||
public class Materiel: BaseModel
|
public class Material: BaseModel
|
||||||
{
|
{
|
||||||
private string _code;
|
private string _code;
|
||||||
private string _name;
|
private string _name;
|
||||||
@@ -21,11 +21,11 @@ namespace NX.ERP.Model
|
|||||||
private int minStock;
|
private int minStock;
|
||||||
private int aql;
|
private int aql;
|
||||||
private int invccode;
|
private int invccode;
|
||||||
public string MaterielCode { get => _code; set => _code = value; }
|
public string MaterialCode { get => _code; set => _code = value; }
|
||||||
public string MaterielName { get => _name; set => _name = value; }
|
public string MaterialName { get => _name; set => _name = value; }
|
||||||
|
|
||||||
|
|
||||||
public string MaterielTypeCode { get; set; }
|
public string MaterialTypeCode { get; set; }
|
||||||
|
|
||||||
public string SpecsModel { get; set; }
|
public string SpecsModel { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ using System.Text;
|
|||||||
|
|
||||||
namespace NX.ERP.Model
|
namespace NX.ERP.Model
|
||||||
{
|
{
|
||||||
public class MaterielType: BaseModel
|
public class MaterialType: BaseModel
|
||||||
{
|
{
|
||||||
private string materielTypeCode;
|
private string _MaterialTypeCode;
|
||||||
private string materielTypeName;
|
private string _MaterialTypeName;
|
||||||
private int? _level;
|
private int? _level;
|
||||||
private int? _isEnd;
|
private int? _isEnd;
|
||||||
|
|
||||||
public string MaterielTypeCode { get => materielTypeCode; set => materielTypeCode = value; }
|
public string MaterialTypeCode { get => _MaterialTypeCode; set => _MaterialTypeCode = value; }
|
||||||
public string MaterielTypeName { get => materielTypeName; set => materielTypeName = value; }
|
public string MaterialTypeName { get => _MaterialTypeName; set => _MaterialTypeName = value; }
|
||||||
public int? MaterialTypeGrade { get => _level; set => _level = value; }
|
public int? MaterialTypeGrade { get => _level; set => _level = value; }
|
||||||
public int? MaterialTypeIsend { get => _isEnd; set => _isEnd = value; }
|
public int? MaterialTypeIsend { get => _isEnd; set => _isEnd = value; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ namespace NX.ERP.Model.Purchase
|
|||||||
public class ArrivalDetail
|
public class ArrivalDetail
|
||||||
{
|
{
|
||||||
private int id;
|
private int id;
|
||||||
private string materielCode;
|
private string _MaterialCode;
|
||||||
public int ArrivalDtlId { get => id; set => id = value; }
|
public int ArrivalDtlId { get => id; set => id = value; }
|
||||||
public int ArrivalID { get => arrivalID; set => arrivalID = value; }
|
public int ArrivalID { get => arrivalID; set => arrivalID = value; }
|
||||||
public string MaterialCode { get => materielCode; set => materielCode = value; }
|
public string MaterialCode { get => _MaterialCode; set => _MaterialCode = value; }
|
||||||
public string BatchNo { get => batchNo; set => batchNo = value; }
|
public string BatchNo { get => batchNo; set => batchNo = value; }
|
||||||
public string UnitCode { get => unitCode; set => unitCode = value; }
|
public string UnitCode { get => unitCode; set => unitCode = value; }
|
||||||
public double Qty { get => quantity; set => quantity = value; }
|
public double Qty { get => quantity; set => quantity = value; }
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace NX.ERP.Model.Store
|
namespace NX.ERP.Model.Store
|
||||||
{
|
{
|
||||||
public class MaterielStoreOut
|
public class MaterialStoreOut
|
||||||
{
|
{
|
||||||
private int id;
|
private int id;
|
||||||
private string code;
|
private string code;
|
||||||
@@ -14,7 +14,7 @@ namespace NX.ERP.Model.Store
|
|||||||
private DateTime date;
|
private DateTime date;
|
||||||
private string sourceCode;
|
private string sourceCode;
|
||||||
private string source;
|
private string source;
|
||||||
private IList<MaterielStoreOutDetail> details;
|
private IList<MaterialStoreOutDetail> details;
|
||||||
|
|
||||||
public int Id { get => id; set => id = value; }
|
public int Id { get => id; set => id = value; }
|
||||||
public string Code { get => code; set => code = value; }
|
public string Code { get => code; set => code = value; }
|
||||||
@@ -23,6 +23,6 @@ namespace NX.ERP.Model.Store
|
|||||||
public string SourceCode { get => sourceCode; set => sourceCode = value; }
|
public string SourceCode { get => sourceCode; set => sourceCode = value; }
|
||||||
public string Source { get => source; set => source = value; }
|
public string Source { get => source; set => source = value; }
|
||||||
public DateTime Date { get => date; set => date = value; }
|
public DateTime Date { get => date; set => date = value; }
|
||||||
public IList<MaterielStoreOutDetail> Details { get => details; set => details = value; }
|
public IList<MaterialStoreOutDetail> Details { get => details; set => details = value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace NX.ERP.Model.Store
|
namespace NX.ERP.Model.Store
|
||||||
{
|
{
|
||||||
public class MaterielStoreOutDetail
|
public class MaterialStoreOutDetail
|
||||||
{
|
{
|
||||||
|
|
||||||
private double quantity;
|
private double quantity;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ namespace U8AppMain
|
|||||||
list.Add(row["存货编码"].ToString().Trim());
|
list.Add(row["存货编码"].ToString().Trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
var InvInfo = new NX.ERP.U8.MaterielDAL().GetList(list).ToDictionary((m) => { return m.MaterielCode; });
|
var InvInfo = new NX.ERP.U8.MaterialDAL().GetList(list).ToDictionary((m) => { return m.MaterialCode; });
|
||||||
|
|
||||||
//构造数据
|
//构造数据
|
||||||
foreach (DataRow row in this.dataTable.Rows)
|
foreach (DataRow row in this.dataTable.Rows)
|
||||||
@@ -343,8 +343,8 @@ namespace U8AppMain
|
|||||||
|
|
||||||
//var a = new STVocher();
|
//var a = new STVocher();
|
||||||
//a.AddVocher();
|
//a.AddVocher();
|
||||||
var a = new NX.ERP.U8.Store.MaterielStoreOutDAL();
|
var a = new NX.ERP.U8.Store.MaterialStoreOutDAL();
|
||||||
a.AddVocher(new NX.ERP.Model.Request.MaterielStoreOut()
|
a.AddVocher(new NX.ERP.Model.Request.MaterialStoreOut()
|
||||||
{
|
{
|
||||||
Id = 1111,
|
Id = 1111,
|
||||||
Code = "2222",
|
Code = "2222",
|
||||||
@@ -353,9 +353,9 @@ namespace U8AppMain
|
|||||||
Whcode = "2",
|
Whcode = "2",
|
||||||
|
|
||||||
Date = DateTime.Now,
|
Date = DateTime.Now,
|
||||||
Details = new List<NX.ERP.Model.Request.MaterielStoreOutDetail>()
|
Details = new List<NX.ERP.Model.Request.MaterialStoreOutDetail>()
|
||||||
{
|
{
|
||||||
new NX.ERP.Model.Request.MaterielStoreOutDetail()
|
new NX.ERP.Model.Request.MaterialStoreOutDetail()
|
||||||
{
|
{
|
||||||
Position="002070206",
|
Position="002070206",
|
||||||
InvCode="218174",
|
InvCode="218174",
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ using NX.ERP.Model;
|
|||||||
|
|
||||||
namespace NX.ERP.U8
|
namespace NX.ERP.U8
|
||||||
{
|
{
|
||||||
public class MaterielDAL
|
public class MaterialDAL
|
||||||
{
|
{
|
||||||
public IEnumerable<Materiel> GetList(string strWhere = "", object Param = null)
|
public IEnumerable<Material> GetList(string strWhere = "", object Param = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ namespace NX.ERP.U8
|
|||||||
{
|
{
|
||||||
|
|
||||||
var sql = @"select
|
var sql = @"select
|
||||||
cInvCode AS MaterielCode ,
|
cInvCode AS MaterialCode ,
|
||||||
cInvAddCode AS 存货代码,
|
cInvAddCode AS 存货代码,
|
||||||
cInvName AS MaterielName ,
|
cInvName AS MaterialName ,
|
||||||
fLength AS Length,
|
fLength AS Length,
|
||||||
fWidth AS Wide,
|
fWidth AS Wide,
|
||||||
fHeight AS Height,
|
fHeight AS Height,
|
||||||
@@ -38,7 +38,7 @@ namespace NX.ERP.U8
|
|||||||
iMassDate AS 保质期数,
|
iMassDate AS 保质期数,
|
||||||
cMassUnit AS 保质期单位,
|
cMassUnit AS 保质期单位,
|
||||||
iWarnDays AS 保质期预警天数,
|
iWarnDays AS 保质期预警天数,
|
||||||
cInvCCode AS MaterielTypeCode,
|
cInvCCode AS MaterialTypeCode,
|
||||||
cReplaceItem AS 替换件,
|
cReplaceItem AS 替换件,
|
||||||
cPosition AS 货位编码,
|
cPosition AS 货位编码,
|
||||||
bSale AS 是否销售,
|
bSale AS 是否销售,
|
||||||
@@ -270,56 +270,56 @@ namespace NX.ERP.U8
|
|||||||
{
|
{
|
||||||
sql += $" where {strWhere}";
|
sql += $" where {strWhere}";
|
||||||
}
|
}
|
||||||
return conn.Query<Materiel>(sql, Param);
|
return conn.Query<Material>(sql, Param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Materiel GetModel(string Code)
|
public Material GetModel(string Code)
|
||||||
{
|
{
|
||||||
return this.GetList(" cInvCode=@Code ", new { Code }).FirstOrDefault();
|
return this.GetList(" cInvCode=@Code ", new { Code }).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public IEnumerable<Materiel> GetList(IEnumerable<string> codes)
|
public IEnumerable<Material> GetList(IEnumerable<string> codes)
|
||||||
{
|
{
|
||||||
return this.GetList(" cInvCode in @codes ",new { codes });
|
return this.GetList(" cInvCode in @codes ",new { codes });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public IEnumerable<Materiel> GetList(NX.ERP.Model.Request.Materiel materiel)
|
public IEnumerable<Material> GetList(NX.ERP.Model.Request.Material Material)
|
||||||
{
|
{
|
||||||
List<string> where = new List<string>();
|
List<string> where = new List<string>();
|
||||||
if (!string.IsNullOrEmpty(materiel.MaterielCode))
|
if (!string.IsNullOrEmpty(Material.MaterialCode))
|
||||||
{
|
{
|
||||||
where.Add(" cInvCode like @MaterielCode ");
|
where.Add(" cInvCode like @MaterialCode ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(materiel.MaterielName))
|
if (!string.IsNullOrEmpty(Material.MaterialName))
|
||||||
{
|
{
|
||||||
where.Add(" cInvName like @MaterielName ");
|
where.Add(" cInvName like @MaterialName ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(materiel.SpecsModel))
|
if (!string.IsNullOrEmpty(Material.SpecsModel))
|
||||||
{
|
{
|
||||||
where.Add(" cInvStd like @SpecsModel ");
|
where.Add(" cInvStd like @SpecsModel ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(materiel.MaterielTypeCode))
|
if (!string.IsNullOrEmpty(Material.MaterialTypeCode))
|
||||||
{
|
{
|
||||||
where.Add(" cInvCCode = @MaterielTypeCode ");
|
where.Add(" cInvCCode = @MaterialTypeCode ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||||
{
|
{
|
||||||
MaterielCode = $"%{materiel.MaterielCode}%",
|
MaterialCode = $"%{Material.MaterialCode}%",
|
||||||
MaterielName = $"%{materiel.MaterielName}%",
|
MaterialName = $"%{Material.MaterialName}%",
|
||||||
SpecsModel = materiel.SpecsModel,
|
SpecsModel = Material.SpecsModel,
|
||||||
MaterielTypeCode = materiel.MaterielTypeCode
|
MaterialTypeCode = Material.MaterialTypeCode
|
||||||
|
|
||||||
}); ;
|
}); ;
|
||||||
|
|
||||||
|
|||||||
@@ -7,50 +7,50 @@ using NX.ERP.Model;
|
|||||||
|
|
||||||
namespace NX.ERP.U8
|
namespace NX.ERP.U8
|
||||||
{
|
{
|
||||||
public class MaterielTypeDAL
|
public class MaterialTypeDAL
|
||||||
{
|
{
|
||||||
public IEnumerable<MaterielType> GetList(string strWhere = "", object Param = null)
|
public IEnumerable<MaterialType> GetList(string strWhere = "", object Param = null)
|
||||||
{
|
{
|
||||||
using (var conn = U8LoginContext.Instance.Connection)
|
using (var conn = U8LoginContext.Instance.Connection)
|
||||||
{
|
{
|
||||||
var sql = @"select cInvCCode AS MaterielTypeCode,cInvCName AS MaterielTypeName,bInvCEnd as MaterialTypeIsend,iInvCGrade as MaterialTypeGrade from InventoryClass ";
|
var sql = @"select cInvCCode AS MaterialTypeCode,cInvCName AS MaterialTypeName,bInvCEnd as MaterialTypeIsend,iInvCGrade as MaterialTypeGrade from InventoryClass ";
|
||||||
if (!string.IsNullOrEmpty(strWhere))
|
if (!string.IsNullOrEmpty(strWhere))
|
||||||
{
|
{
|
||||||
sql += $" where {strWhere}";
|
sql += $" where {strWhere}";
|
||||||
}
|
}
|
||||||
return conn.Query<MaterielType>(sql, Param);
|
return conn.Query<MaterialType>(sql, Param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public IEnumerable<Model.MaterielType> GetList(NX.ERP.Model.Request.MaterielType materielType)
|
public IEnumerable<Model.MaterialType> GetList(NX.ERP.Model.Request.MaterialType MaterialType)
|
||||||
{
|
{
|
||||||
List<string> where = new List<string>();
|
List<string> where = new List<string>();
|
||||||
if (!string.IsNullOrEmpty(materielType.MaterielTypeCode))
|
if (!string.IsNullOrEmpty(MaterialType.MaterialTypeCode))
|
||||||
{
|
{
|
||||||
where.Add(" cInvCCode like @MaterielTypeCode ");
|
where.Add(" cInvCCode like @MaterialTypeCode ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(materielType.MaterielTypeName))
|
if (!string.IsNullOrEmpty(MaterialType.MaterialTypeName))
|
||||||
{
|
{
|
||||||
where.Add(" cInvCName like @MaterielTypeName ");
|
where.Add(" cInvCName like @MaterialTypeName ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!materielType.MaterialTypeGrade.HasValue)
|
if (MaterialType.MaterialTypeGrade.HasValue)
|
||||||
{
|
{
|
||||||
where.Add(" iInvCGrade=@Level ");
|
where.Add(" iInvCGrade=@Level ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!materielType.MaterialTypeIsend.HasValue)
|
if (MaterialType.MaterialTypeIsend.HasValue)
|
||||||
{
|
{
|
||||||
where.Add(" bInvCEnd=@MaterialTypeIsend ");
|
where.Add(" bInvCEnd=@MaterialTypeIsend ");
|
||||||
}
|
}
|
||||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||||
{
|
{
|
||||||
MaterielTypeCode=$"%{materielType.MaterielTypeCode}%",
|
MaterialTypeCode=$"%{MaterialType.MaterialTypeCode}%",
|
||||||
MaterielTypeName=$"%{materielType.MaterielTypeName}%",
|
MaterialTypeName=$"%{MaterialType.MaterialTypeName}%",
|
||||||
materielType.MaterialTypeGrade,
|
MaterialType.MaterialTypeGrade,
|
||||||
materielType.MaterialTypeIsend
|
MaterialType.MaterialTypeIsend
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace NX.ERP.U8.Mom
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(Params.ProductCode))
|
if (!string.IsNullOrEmpty(Params.ProductCode))
|
||||||
{
|
{
|
||||||
where.Add(" b.InvCode like @ ProductCode");
|
where.Add(" b.InvCode like @ProductCode");
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(Params.ProductOrderNo))
|
if (!string.IsNullOrEmpty(Params.ProductOrderNo))
|
||||||
{
|
{
|
||||||
@@ -128,7 +128,7 @@ namespace NX.ERP.U8.Mom
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(Params.ProductCode))
|
if (!string.IsNullOrEmpty(Params.ProductCode))
|
||||||
{
|
{
|
||||||
where.Add(" b.InvCode like @ ProductCode");
|
where.Add(" b.InvCode like @ProductCode");
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(Params.ProductOrderNo))
|
if (!string.IsNullOrEmpty(Params.ProductOrderNo))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace NX.ERP.U8.Purchase
|
|||||||
{
|
{
|
||||||
string strSQL = @"select a.id AS ArrivalId,a.cCode as ArrivalCode,A.cbustype AS busType,a.cptcode as PTCode,a.iTaxRate as TaxRate,a.iexchrate as Exchrate,cexch_name as ExchName,cVenCode as VenCode,a.dDate as ArrivalDate,A.cVenCode AS SupplierCode,
|
string strSQL = @"select a.id AS ArrivalId,a.cCode as ArrivalCode,A.cbustype AS busType,a.cptcode as PTCode,a.iTaxRate as TaxRate,a.iexchrate as Exchrate,cexch_name as ExchName,cVenCode as VenCode,a.dDate as ArrivalDate,A.cVenCode AS SupplierCode,
|
||||||
B.Autoid as id,b.ID as ArrivalID,
|
B.Autoid as id,b.ID as ArrivalID,
|
||||||
b.cInvCode AS MaterielCode,
|
b.cInvCode AS MaterialCode,
|
||||||
b.cBatch AS BatchNo,
|
b.cBatch AS BatchNo,
|
||||||
b.cUnitID AS UnitCode,b.ioricost as oricost,b.ioritaxcost as oritaxcost ,b.icost as cost,b.iorimoney as orimoney,b.ioritaxprice as oritaxprice,b.iorisum as orisum,
|
b.cUnitID AS UnitCode,b.ioricost as oricost,b.ioritaxcost as oritaxcost ,b.icost as cost,b.iorimoney as orimoney,b.ioritaxprice as oritaxprice,b.iorisum as orisum,
|
||||||
B.iQuantity as Quantity,b.iposid as PosId ,B.CORDERCODE as OrderCode,C.POID as Poid from
|
B.iQuantity as Quantity,b.iposid as PosId ,B.CORDERCODE as OrderCode,C.POID as Poid from
|
||||||
|
|||||||
@@ -11,17 +11,17 @@ using UFIDA.U8.U8MOMAPIFramework;
|
|||||||
|
|
||||||
namespace NX.ERP.U8.Store
|
namespace NX.ERP.U8.Store
|
||||||
{
|
{
|
||||||
public class MaterielStoreOutDAL : VoucherBase
|
public class MaterialStoreOutDAL : VoucherBase
|
||||||
{
|
{
|
||||||
|
|
||||||
public MaterielStoreOutDAL() : base("11", "U8API/MaterialOut")
|
public MaterialStoreOutDAL() : base("11", "U8API/MaterialOut")
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string AddVocher(Model.Request.MaterielStoreOut storeOut)
|
public string AddVocher(Model.Request.MaterialStoreOut storeOut)
|
||||||
{
|
{
|
||||||
VoucherParameter voucherParameter = new VoucherParameter
|
VoucherParameter voucherParameter = new VoucherParameter
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace NX.ERP.U8.Store
|
|||||||
var detail = storeIn.Details[n];
|
var detail = storeIn.Details[n];
|
||||||
bodyXml.setAttribute("cinvcode", detail.InvCode);
|
bodyXml.setAttribute("cinvcode", detail.InvCode);
|
||||||
bodyXml.setAttribute("iquantity", detail.Quantity);
|
bodyXml.setAttribute("iquantity", detail.Quantity);
|
||||||
var _cost = new MaterielDAL().GetCost(detail.InvCode, 0);
|
var _cost = new MaterialDAL().GetCost(detail.InvCode, 0);
|
||||||
bodyXml.setAttribute("iunitcost", _cost);
|
bodyXml.setAttribute("iunitcost", _cost);
|
||||||
bodyXml.setAttribute("iprice", new Account.Accinformation().FormatMoney(_cost * detail.Quantity));
|
bodyXml.setAttribute("iprice", new Account.Accinformation().FormatMoney(_cost * detail.Quantity));
|
||||||
bodyXml.setAttribute("irowno", n + 1);
|
bodyXml.setAttribute("irowno", n + 1);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace NX.ERP.U8
|
|||||||
{
|
{
|
||||||
public class U8LoginContext : IDisposable
|
public class U8LoginContext : IDisposable
|
||||||
{
|
{
|
||||||
|
private static readonly object locker = new object();
|
||||||
private static U8LoginContext _u8LoginContext;
|
private static U8LoginContext _u8LoginContext;
|
||||||
private string EaiPort = System.Configuration.ConfigurationManager.AppSettings["EaiPort"];
|
private string EaiPort = System.Configuration.ConfigurationManager.AppSettings["EaiPort"];
|
||||||
private string EaiPath = System.Configuration.ConfigurationManager.AppSettings["EaiPath"];
|
private string EaiPath = System.Configuration.ConfigurationManager.AppSettings["EaiPath"];
|
||||||
@@ -19,7 +20,14 @@ namespace NX.ERP.U8
|
|||||||
{
|
{
|
||||||
if (_u8LoginContext == null)
|
if (_u8LoginContext == null)
|
||||||
{
|
{
|
||||||
_u8LoginContext = new U8LoginContext();
|
lock (locker)
|
||||||
|
{
|
||||||
|
if (_u8LoginContext == null)
|
||||||
|
{
|
||||||
|
_u8LoginContext = new U8LoginContext();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return _u8LoginContext;
|
return _u8LoginContext;
|
||||||
}
|
}
|
||||||
@@ -39,15 +47,26 @@ namespace NX.ERP.U8
|
|||||||
public U8LoginContext()
|
public U8LoginContext()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
private static readonly object locker1 = new object();
|
||||||
|
|
||||||
public clsLogin ClsLogin
|
public clsLogin ClsLogin
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (this._clslogin == null)
|
if (this._clslogin == null)
|
||||||
{
|
{
|
||||||
this.Login();
|
lock (locker1)
|
||||||
|
{
|
||||||
|
if (this._clslogin == null)
|
||||||
|
{
|
||||||
|
this.Login();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return this._clslogin;
|
return this._clslogin;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +78,7 @@ namespace NX.ERP.U8
|
|||||||
return new System.Data.SqlClient.SqlConnection(this.Constr4Net);
|
return new System.Data.SqlClient.SqlConnection(this.Constr4Net);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -160,7 +179,7 @@ namespace NX.ERP.U8
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $"http://{this.ClsLogin.cServer}:{EaiPort}/{EaiPath}";
|
return $"http://{this.ClsLogin.cServer}:{EaiPort}/{EaiPath}";
|
||||||
|
|
||||||
@@ -218,6 +237,7 @@ namespace NX.ERP.U8
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
||||||
if (uiLogin == null)
|
if (uiLogin == null)
|
||||||
{
|
{
|
||||||
uiLogin = new UFSoft.U8.Framework.Login.UI.clsLogin();
|
uiLogin = new UFSoft.U8.Framework.Login.UI.clsLogin();
|
||||||
@@ -246,6 +266,10 @@ namespace NX.ERP.U8
|
|||||||
|
|
||||||
public void Login()
|
public void Login()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (NeedUiLogin)
|
if (NeedUiLogin)
|
||||||
{
|
{
|
||||||
if (!UiLogin.login("DP"))
|
if (!UiLogin.login("DP"))
|
||||||
@@ -275,7 +299,6 @@ namespace NX.ERP.U8
|
|||||||
}
|
}
|
||||||
_clslogin.set_TaskId(UiLogin.GetTaskID("ST"));
|
_clslogin.set_TaskId(UiLogin.GetTaskID("ST"));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,21 +17,21 @@ using System.Web.Http.Filters;
|
|||||||
namespace NX.ERP.WebAPi
|
namespace NX.ERP.WebAPi
|
||||||
{
|
{
|
||||||
|
|
||||||
//public class JsonContentNegotiator : IContentNegotiator
|
public class JsonContentNegotiator : IContentNegotiator
|
||||||
//{
|
{
|
||||||
// private readonly JsonMediaTypeFormatter _jsonFormatter;
|
private readonly JsonMediaTypeFormatter _jsonFormatter;
|
||||||
|
|
||||||
// public JsonContentNegotiator(JsonMediaTypeFormatter formatter)
|
public JsonContentNegotiator(JsonMediaTypeFormatter formatter)
|
||||||
// {
|
{
|
||||||
// _jsonFormatter = formatter;
|
_jsonFormatter = formatter;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// public ContentNegotiationResult Negotiate(Type type, HttpRequestMessage request, IEnumerable<MediaTypeFormatter> formatters)
|
public ContentNegotiationResult Negotiate(Type type, HttpRequestMessage request, IEnumerable<MediaTypeFormatter> formatters)
|
||||||
// {
|
{
|
||||||
// var result = new ContentNegotiationResult(_jsonFormatter, new MediaTypeHeaderValue("application/json"));
|
var result = new ContentNegotiationResult(_jsonFormatter, new MediaTypeHeaderValue("application/json"));
|
||||||
// return result;
|
return result;
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
public static class WebApiConfig
|
public static class WebApiConfig
|
||||||
{
|
{
|
||||||
public static void Register(HttpConfiguration config)
|
public static void Register(HttpConfiguration config)
|
||||||
@@ -45,6 +45,8 @@ namespace NX.ERP.WebAPi
|
|||||||
NX.ERP.U8.U8LoginContext.Instance.Server= System.Configuration.ConfigurationManager.AppSettings["Server"];
|
NX.ERP.U8.U8LoginContext.Instance.Server= System.Configuration.ConfigurationManager.AppSettings["Server"];
|
||||||
|
|
||||||
|
|
||||||
|
//optional: set serializer settings here
|
||||||
|
|
||||||
//System.Web.Http.Filters.IExceptionFilter
|
//System.Web.Http.Filters.IExceptionFilter
|
||||||
config.Filters.Add(new ExceptionFilter());
|
config.Filters.Add(new ExceptionFilter());
|
||||||
config.Filters.Add(new ApiResultAttribute());
|
config.Filters.Add(new ApiResultAttribute());
|
||||||
|
|||||||
@@ -8,23 +8,23 @@ using System.Web.Http;
|
|||||||
|
|
||||||
namespace NX.ERP.WebAPi.Controllers
|
namespace NX.ERP.WebAPi.Controllers
|
||||||
{
|
{
|
||||||
public class MaterielController : ApiController
|
public class MaterialController : ApiController
|
||||||
{
|
{
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
[Route("api/Materiel/List")]
|
[Route("api/Material/List")]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<Materiel> List()
|
public IEnumerable<Material> List()
|
||||||
{
|
{
|
||||||
var materielDAL = new MaterielDAL();
|
var MaterialDAL = new MaterialDAL();
|
||||||
return materielDAL.GetList();
|
return MaterialDAL.GetList();
|
||||||
|
|
||||||
}
|
}
|
||||||
[Route("api/Materiel/Query")]
|
[Route("api/Material/Query")]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public IEnumerable<Materiel> Query(NX.ERP.Model.Request.Materiel Param)
|
public IEnumerable<Material> Query(NX.ERP.Model.Request.Material Param)
|
||||||
{
|
{
|
||||||
var materielDAL = new MaterielDAL();
|
var MaterialDAL = new MaterialDAL();
|
||||||
return materielDAL.GetList(Param);
|
return MaterialDAL.GetList(Param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,23 +8,23 @@ using System.Web.Http;
|
|||||||
|
|
||||||
namespace NX.ERP.WebAPi.Controllers
|
namespace NX.ERP.WebAPi.Controllers
|
||||||
{
|
{
|
||||||
public class MaterielTypeController:ApiController
|
public class MaterialTypeController:ApiController
|
||||||
{
|
{
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
[Route("api/MaterielType/List")]
|
[Route("api/MaterialType/List")]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<MaterielType> List()
|
public IEnumerable<MaterialType> List()
|
||||||
{
|
{
|
||||||
var materielType = new MaterielTypeDAL();
|
var MaterialType = new MaterialTypeDAL();
|
||||||
return materielType.GetList();
|
return MaterialType.GetList();
|
||||||
|
|
||||||
}
|
}
|
||||||
[Route("api/MaterielType/Query")]
|
[Route("api/MaterialType/Query")]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public IEnumerable<MaterielType> Query(NX.ERP.Model.Request.MaterielType Param)
|
public IEnumerable<MaterialType> Query(NX.ERP.Model.Request.MaterialType Param)
|
||||||
{
|
{
|
||||||
var materielType = new MaterielTypeDAL();
|
var MaterialType = new MaterialTypeDAL();
|
||||||
return materielType.GetList(Param);
|
return MaterialType.GetList(Param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ using System.Web.Http;
|
|||||||
namespace NX.ERP.WebAPi.Controllers.Store
|
namespace NX.ERP.WebAPi.Controllers.Store
|
||||||
{
|
{
|
||||||
|
|
||||||
public class MaterielStoreOutController:ApiController
|
public class MaterialStoreOutController:ApiController
|
||||||
{
|
{
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
[Route("api/MaterialOut/Add")]
|
[Route("api/MaterialOut/Add")]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|
||||||
public string AddVoucher([FromBody] Model.Request.MaterielStoreOut storeIn)
|
public string AddVoucher([FromBody] Model.Request.MaterialStoreOut storeIn)
|
||||||
{
|
{
|
||||||
var dal = new NX.ERP.U8.Store.MaterielStoreOutDAL();
|
var dal = new NX.ERP.U8.Store.MaterialStoreOutDAL();
|
||||||
return dal.AddVocher(storeIn);
|
return dal.AddVocher(storeIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user