Merge branch 'master' of http://36.153.118.214:10080/nx.wms/u8-import
This commit is contained in:
@@ -11,7 +11,7 @@ namespace NX.ERP.Model.Request
|
||||
public string DeptName { get; set; }
|
||||
public string supplierCode { get; set; }
|
||||
|
||||
public string Amount { get; set; }
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
public string Digest { get; set; }
|
||||
|
||||
|
||||
@@ -5,15 +5,19 @@ using System.Text;
|
||||
|
||||
namespace NX.ERP.Model.Request
|
||||
{
|
||||
public class Unit:BaseModel
|
||||
public class Unit : BaseModel
|
||||
{
|
||||
private string unitCode;
|
||||
private string unitName;
|
||||
|
||||
|
||||
|
||||
|
||||
public string UnitCode { get => unitCode; set => unitCode = value; }
|
||||
public string UnitName { get => unitName; set => unitName = value; }
|
||||
|
||||
|
||||
|
||||
public long? Pubufts { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace NX.ERP.Model
|
||||
private int maxStock;
|
||||
private int minStock;
|
||||
private int aql;
|
||||
private int invccode;
|
||||
|
||||
public string MaterialCode { get => _code; set => _code = value; }
|
||||
public string MaterialName { get => _name; set => _name = value; }
|
||||
|
||||
@@ -31,44 +31,53 @@ namespace NX.ERP.Model
|
||||
|
||||
public string UnitCode { get => unitCode; set => unitCode = value; }
|
||||
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public int MinPackageQty { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public int TaxRate { get; set; }
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public decimal Length { get => length; set => length = value; }
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public decimal Wide { get => wide; set => wide = value; }
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public decimal Height { get => height; set => height = value; }
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public int Volume { get => volume; set => volume = value; }
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public int Weight { get => weight; set => weight = value; }
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public double UnitPrice { get => unitPrice; set => unitPrice = value; }
|
||||
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public int MaxStock { get => maxStock; set => maxStock = value; }
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public int MinStock { get => minStock; set => minStock = value; }
|
||||
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public int SafeStock { get; set; }
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
|
||||
public int Aql { get => aql; set => aql = value; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public double InvNCost { get; set; }
|
||||
/// <summary>
|
||||
/// 参考成本
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public double InvSPrice { get; set; }
|
||||
/// <summary>
|
||||
/// 计划单价
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public double InvRCost { get; set; }
|
||||
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public double ImpTaxRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -19,5 +19,10 @@ namespace NX.ERP.Model
|
||||
public string GroupCode { get => groupCode; set => groupCode = value; }
|
||||
|
||||
public decimal Changerate { get; set; }
|
||||
|
||||
public long Pubufts { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,11 +219,11 @@ namespace NX.ERP.U8.AP
|
||||
headXml.setAttribute("VT_ID", 8056);
|
||||
headXml.setAttribute("bd_c", false);
|
||||
headXml.setAttribute("bStartFlag", false);
|
||||
headXml.setAttribute("cVouchID", "");
|
||||
headXml.setAttribute("cVouchID", "664");
|
||||
headXml.setAttribute("cFlag", "AP");
|
||||
headXml.setAttribute("cDeptCode", ApVouch.DeptCode);
|
||||
headXml.setAttribute("cDigest", ApVouch.Digest);
|
||||
headXml.setAttribute("cLink", "");
|
||||
headXml.setAttribute("cLink", "664");
|
||||
IXMLDOMElement bodyXml;
|
||||
|
||||
//for (var n = 0; n < storeIn.details.Count(); n++)
|
||||
@@ -238,7 +238,7 @@ namespace NX.ERP.U8.AP
|
||||
bodyXml.setAttribute("iAmount", ApVouch.Amount);
|
||||
bodyXml.setAttribute("iAmount_f", ApVouch.Amount);
|
||||
bodyXml.setAttribute("iAmt_s", 0);
|
||||
bodyXml.setAttribute("cLink", "");
|
||||
bodyXml.setAttribute("cLink", "664");
|
||||
headXml.setAttribute("cDwCode", ApVouch.supplierCode);
|
||||
bodyXml.setAttribute("bd_c", true);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace NX.ERP.U8
|
||||
{
|
||||
var sql = @"select
|
||||
cComunitCode AS UnitCode,
|
||||
cComUnitName AS UnitName,bMainUnit as MainUnit, cGroupCode as GroupCode from ComputationUnit ";
|
||||
cComUnitName AS UnitName,bMainUnit as MainUnit,CONVERT(BIGINT,pubufts) AS pubufts, cGroupCode as GroupCode from ComputationUnit ";
|
||||
if (!string.IsNullOrEmpty(strWhere))
|
||||
{
|
||||
sql += $" where {strWhere}";
|
||||
@@ -40,10 +40,21 @@ namespace NX.ERP.U8
|
||||
where.Add(" cComUnitName like @UnitName ");
|
||||
}
|
||||
|
||||
|
||||
if (Params.Pubufts != null)
|
||||
{
|
||||
|
||||
where.Add("CONVERT(BIGINT,pubufts) >=@Pubufts ");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||
{
|
||||
UnitCode = $"%{Params.UnitCode}%",
|
||||
UnitName = $"%{Params.UnitName}%"
|
||||
UnitName = $"%{Params.UnitName}%",
|
||||
Pubufts=Params.Pubufts
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ namespace NX.ERP.U8.Mom
|
||||
left join mom_orderdetail as b on a.MoId=b.MoId
|
||||
left join mom_morder as d on b.MoDId=d.MoDId
|
||||
left join mom_SNDetail as e on b.MoDId=e.iVouchsID
|
||||
left join mom_moallocate as c on b.MoDId=c.MoDId ";
|
||||
left join mom_moallocate as c on b.MoDId=c.MoDId where b.Status<>4";
|
||||
if (!string.IsNullOrEmpty(strWhere))
|
||||
{
|
||||
strSQL += $" where {strWhere} ";
|
||||
strSQL += $" and {strWhere} ";
|
||||
}
|
||||
var lookupDetail = new Dictionary<int, Model.MOM.MomDetail>();
|
||||
var lookupOrder = new Dictionary<int, Model.MOM.MomOrder>();
|
||||
@@ -59,7 +59,10 @@ namespace NX.ERP.U8.Mom
|
||||
{
|
||||
OrderDetail = momDetail;
|
||||
}
|
||||
OrderDetail.SN.Add(SN);
|
||||
if (SN != null)
|
||||
{
|
||||
OrderDetail.SN.Add(SN);
|
||||
}
|
||||
Order.Allocates.Add(MoAllocate);
|
||||
OrderDetail.ProductAllocateOrderLst.Add(MoAllocate);
|
||||
MoAllocate.momDetail = OrderDetail;
|
||||
@@ -162,9 +165,7 @@ namespace NX.ERP.U8.Mom
|
||||
a.MoId as id ,a.MoDId as ProductOrderDtlId,a.MoId as ProductOrderId,a.MoCode as ProductOrderNo,a.MakeDate as ProductOrderDate,a.InvCode as ProductCode,a.Qty as Qty
|
||||
FROM v_st_mom_orderdetail a with (nolock) Where ( (1>0) AND (1>0) )
|
||||
AND ( 1>0 ) and (case when ISNULL(SfcFlag,0)=1 then iquantity+QualifiedInQty else 1 end)<>0
|
||||
and ISNULL(QCFLAG,0)=0 and ISNULL(Status,0) = 3 and (ISNULL(iQuantity,0))>0 and isnull(MrpQty,0)<>0 and 1=1
|
||||
|
||||
";
|
||||
and ISNULL(QCFLAG,0)=0 and ISNULL(Status,0) = 3 and (ISNULL(iQuantity,0))>0 and isnull(MrpQty,0)<>0 and 1=1";
|
||||
if (!string.IsNullOrEmpty(strWhere))
|
||||
{
|
||||
strSQL += $" and {strWhere} ";
|
||||
|
||||
@@ -123,9 +123,6 @@ FROM MaterialAppVouch a
|
||||
public IEnumerable<Model.Response.Store.MaterialAppDetail> GetDetailByMoCode(string MoCode, int MoDetailId)
|
||||
{
|
||||
var models = this.GetListByMoCode(MoCode, MoDetailId);
|
||||
|
||||
|
||||
|
||||
var reslut = new List<Model.Response.Store.MaterialAppDetail>();
|
||||
foreach (var items in models)
|
||||
{
|
||||
@@ -138,7 +135,7 @@ FROM MaterialAppVouch a
|
||||
|
||||
|
||||
|
||||
public void Provide(NX.ERP.Model.Request.MaterialAppProvide provide)
|
||||
public bool Provide(NX.ERP.Model.Request.MaterialAppProvide provide)
|
||||
{
|
||||
|
||||
using (var conn = U8LoginContext.Instance.Connection)
|
||||
@@ -159,7 +156,7 @@ FROM MaterialAppVouch a
|
||||
throw new Exception("未找到");
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
else //整单发出
|
||||
{
|
||||
@@ -169,7 +166,7 @@ FROM MaterialAppVouch a
|
||||
)";
|
||||
|
||||
|
||||
conn.Execute(strSql, new
|
||||
var info = conn.Execute(strSql, new
|
||||
{
|
||||
DueDate = provide.DueDate,
|
||||
SN = "",
|
||||
@@ -177,8 +174,11 @@ FROM MaterialAppVouch a
|
||||
MoCode = provide.OrderCode,
|
||||
OrderDetailId = provide.OrderDetailId
|
||||
});
|
||||
|
||||
|
||||
if (info == 0)
|
||||
{
|
||||
throw new Exception("未找到相应的物料");
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
/// <returns></returns>
|
||||
[Route("api/MaterialApp/PendingList")]
|
||||
[HttpPost]
|
||||
|
||||
|
||||
public IEnumerable<Model.Response.Store.MaterialApp> GetPendingList()
|
||||
{
|
||||
var dal = new NX.ERP.U8.Store.MaterialAppDAL();
|
||||
@@ -68,11 +68,11 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
[Route("api/MaterialApp/Plan")]
|
||||
[HttpPost]
|
||||
|
||||
public bool Provide([FromBody]NX.ERP.Model.Request.MaterialAppProvide provide)
|
||||
public bool Provide([FromBody] NX.ERP.Model.Request.MaterialAppProvide provide)
|
||||
{
|
||||
var dal = new NX.ERP.U8.Store.MaterialAppDAL();
|
||||
dal.Provide(provide);
|
||||
return true;
|
||||
return dal.Provide(provide);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
|
||||
public class ProductStoreInController : ApiController
|
||||
{
|
||||
[Obsolete]
|
||||
|
||||
[Route("api/ProductStoreIn/Add")]
|
||||
[HttpPost]
|
||||
public object AddVoucher([FromBody] Model.Request.ProductStoreIn storeIn)
|
||||
|
||||
Reference in New Issue
Block a user