增加领料申请接口
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
namespace NX.ERP.Model.Response.Store
|
||||
{
|
||||
|
||||
@@ -44,9 +44,9 @@ namespace NX.ERP.Model.Response.Store
|
||||
/// </summary>
|
||||
public decimal OutQuantity { get; set; }
|
||||
public int Pesodid { get => pesodid; set => pesodid = value; }
|
||||
/// <summary>
|
||||
/// 订单编号
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 订单编号
|
||||
/// </summary>
|
||||
public string MoCode { get; set; }
|
||||
/// <summary>
|
||||
/// 订单明细ID
|
||||
@@ -55,6 +55,64 @@ namespace NX.ERP.Model.Response.Store
|
||||
public int AllocateId { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public string Moseq { get; set; }
|
||||
[JsonIgnore]
|
||||
public string RejectCode { get; set; }
|
||||
[JsonIgnore]
|
||||
public string OmomId { get; set; }
|
||||
[JsonIgnore]
|
||||
public string OpSeq { get; set; }
|
||||
[JsonIgnore]
|
||||
public string OpDesc { get; set; }
|
||||
[JsonIgnore]
|
||||
public string MoLotCode { get; set; }
|
||||
[JsonIgnore]
|
||||
public string Mocode { get; set; }
|
||||
[JsonIgnore]
|
||||
public string MPoIds { get; set; }
|
||||
[JsonIgnore]
|
||||
public string OmCode { get; set; }
|
||||
[JsonIgnore]
|
||||
public string OMoDId { get; set; }
|
||||
[JsonIgnore]
|
||||
|
||||
public string ciqBookCode { get; set; }
|
||||
[JsonIgnore]
|
||||
public string mWorkCenterCode { get; set; }
|
||||
[JsonIgnore]
|
||||
|
||||
public string ServiceCode { get; set; }
|
||||
[JsonIgnore]
|
||||
public string SoType { get; set; }
|
||||
[JsonIgnore]
|
||||
public string SoCode { get; set; }
|
||||
[JsonIgnore]
|
||||
public string SodId { get; set; }
|
||||
[JsonIgnore]
|
||||
public string SoSeq { get; set; }
|
||||
[JsonIgnore]
|
||||
public string OrderType { get; set; }
|
||||
[JsonIgnore]
|
||||
public string OrderCode { get; set; }
|
||||
[JsonIgnore]
|
||||
public string OrderdId { get; set; }
|
||||
[JsonIgnore]
|
||||
public string OrderSeq { get; set; }
|
||||
[JsonIgnore]
|
||||
public string PesoType { get; set; }
|
||||
[JsonIgnore]
|
||||
|
||||
public string PesoCode { get; set; }
|
||||
[JsonIgnore]
|
||||
|
||||
public string PesodId { get; set; }
|
||||
[JsonIgnore]
|
||||
|
||||
public string PesoSeq { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -36,13 +36,24 @@ namespace NX.ERP.U8.Store
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="strWhere"></param>
|
||||
/// <param name="Params"></param>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<Model.Response.Store.MaterialApp> GetList(string strWhere = "", object Params = null)
|
||||
{
|
||||
var strSQL = @"select a.ID ,a.cCode as Code,a.dDate as Date,a.cMaker as PreparedBy,b.AutoID as id,b.AutoID as MaterialAppDtlId,
|
||||
b.ID as MaterialAppId,b.cInvCode as MaterialCode,b.iQuantity as Quantit, b.imoseq as Pesodid,b.cmocode as MoCode,b.iMpoIds as AllocateId,b.fOutQuantity as OutQuantity from MaterialAppVouch a
|
||||
left join
|
||||
MaterialAppVouchs b on a.id=b.ID";
|
||||
var strSQL = @"SELECT a.ID, a.cCode AS Code, a.dDate AS Date, a.cMaker AS PreparedBy, b.AutoID AS id
|
||||
, b.AutoID AS MaterialAppDtlId, b.ID AS MaterialAppId, b.cInvCode AS MaterialCode, b.iQuantity AS Quantit, b.imoseq AS Pesodid
|
||||
, b.cmocode AS MoCode, b.iMpoIds AS AllocateId, b.fOutQuantity AS OutQuantity, b.imoseq AS Moseq, b.crejectcode AS RejectCode
|
||||
, b.iOMoMID AS OmomId, b.iopseq AS OpSeq, b.copdesc AS OpDesc, b.cMoLotCode AS MoLotCode, b.cmocode AS Mocode
|
||||
, b.iMPoIds AS MPoIds, b.comcode AS OmCode, b.iOMoDID AS OMoDId, b.cciqbookcode AS ciqBookCode, b.cmworkcentercode AS mWorkCenterCode
|
||||
, b.cservicecode AS servicecode, b.isotype AS SoType, b.csocode AS SoCode, b.isodid AS SodId, b.isoseq AS SoSeq
|
||||
, b.iordertype AS ordertype, b.iordercode AS OrderCode, b.iorderdid AS OrderdId, b.iorderseq AS OrderSeq, b.ipesotype AS PesoType
|
||||
, b.cpesocode AS PesoCode, b.ipesodid AS PesodId, b.ipesoseq AS PesoSeq
|
||||
FROM MaterialAppVouch a
|
||||
LEFT JOIN KCMATERIALAPPLIST b ON a.id = b.id";
|
||||
if (!string.IsNullOrEmpty(strWhere))
|
||||
{
|
||||
strSQL += $" where {strWhere} ";
|
||||
@@ -165,7 +176,7 @@ namespace NX.ERP.U8.Store
|
||||
conn.Execute(strSql, new
|
||||
{
|
||||
DueDate = provide.DueDate,
|
||||
SN ="",
|
||||
SN = "",
|
||||
WorkCenter = provide.WorkCenter,
|
||||
MoCode = provide.OrderCode,
|
||||
OrderDetailId = provide.OrderDetailId
|
||||
|
||||
@@ -46,46 +46,57 @@ namespace NX.ERP.U8.Store
|
||||
IXMLDOMElement bodyXml;
|
||||
for (var n = 0; n < storeOut.Details.Count(); n++)
|
||||
{
|
||||
var item = storeOut.Details[n];
|
||||
var detail = metailApp.MaterialAppVouchsLst.FirstOrDefault(m => m.AllocateId==item.SorceDetailId);
|
||||
if (detail==null)
|
||||
var detail = storeOut.Details[n];
|
||||
var materialAppDetail = metailApp.MaterialAppVouchsLst.FirstOrDefault(m => m.MaterialAppDtlId== detail.SorceDetailId);
|
||||
if (materialAppDetail == null)
|
||||
{
|
||||
throw new Exception("未知明细");
|
||||
}
|
||||
|
||||
|
||||
bodyXml = domBody.createElement("z:row");
|
||||
bodyXml.setAttribute("inquantity",detail.Quantit-detail.OutQuantity);
|
||||
bodyXml.setAttribute("iquantity",item.Quantity);
|
||||
bodyXml.setAttribute("cposition", item.Position);
|
||||
bodyXml.setAttribute("innum", "");
|
||||
bodyXml.setAttribute("imaids","");
|
||||
bodyXml.setAttribute("imoseq","");
|
||||
bodyXml.setAttribute("crejectcode", "");
|
||||
bodyXml.setAttribute("iOMoMID", "");
|
||||
bodyXml.setAttribute("iopseq", "");
|
||||
bodyXml.setAttribute("copdesc", "");
|
||||
bodyXml.setAttribute("invcode", item.InvCode);
|
||||
bodyXml.setAttribute("cMoLotCode", "");
|
||||
bodyXml.setAttribute("cmocode", "");
|
||||
bodyXml.setAttribute("iMPoIds", "");
|
||||
bodyXml.setAttribute("comcode", "");
|
||||
bodyXml.setAttribute("iOMoDID", "");
|
||||
bodyXml.setAttribute("cciqbookcode", "");
|
||||
bodyXml.setAttribute("cmworkcentercode", "");
|
||||
bodyXml.setAttribute("cservicecode", "");
|
||||
bodyXml.setAttribute("isotype", "");
|
||||
bodyXml.setAttribute("csocode", "");
|
||||
bodyXml.setAttribute("isodid", "");
|
||||
bodyXml.setAttribute("isoseq", "");
|
||||
bodyXml.setAttribute("iordertype", "");
|
||||
bodyXml.setAttribute("iordercode", "");
|
||||
bodyXml.setAttribute("iorderdid", "");
|
||||
bodyXml.setAttribute("iorderseq", "");
|
||||
bodyXml.setAttribute("ipesotype", "");
|
||||
bodyXml.setAttribute("cpesocode", "");
|
||||
bodyXml.setAttribute("ipesodid", "");
|
||||
bodyXml.setAttribute("ipesoseq", "");
|
||||
|
||||
var metail = new NX.ERP.U8.MaterialDAL().GetInvPrice(detail.InvCode, 1, storeOut.Whcode, out var _cost);
|
||||
bodyXml.setAttribute("iunitcost", _cost);
|
||||
var info = new Account.Accinformation();
|
||||
bodyXml.setAttribute("iprice", info.FormatMoney(_cost * detail.Quantity));
|
||||
bodyXml.setAttribute("cinvcode", detail.InvCode);
|
||||
bodyXml.setAttribute("iquantity", detail.Quantity);
|
||||
bodyXml.setAttribute("irowno", n + 1);
|
||||
bodyXml.setAttribute("cbatch", "");
|
||||
bodyXml.setAttribute("cvmivencode", "");
|
||||
bodyXml.setAttribute("cposition", detail.Position);
|
||||
bodyXml.setAttribute("editprop", "A");
|
||||
bodyXml.setAttribute("innum", 10);
|
||||
|
||||
bodyXml.setAttribute("imoseq", materialAppDetail.Moseq);
|
||||
bodyXml.setAttribute("inquantity", materialAppDetail.Quantit- materialAppDetail.OutQuantity);
|
||||
|
||||
bodyXml.setAttribute("crejectcode", materialAppDetail.RejectCode);
|
||||
bodyXml.setAttribute("iOMoMID", materialAppDetail.OmomId);
|
||||
bodyXml.setAttribute("iopseq", materialAppDetail.OpSeq);
|
||||
bodyXml.setAttribute("copdesc", materialAppDetail.OpDesc);
|
||||
bodyXml.setAttribute("invcode", materialAppDetail.MaterialCode);
|
||||
bodyXml.setAttribute("cMoLotCode", materialAppDetail.MoLotCode);
|
||||
bodyXml.setAttribute("cmocode", materialAppDetail.MoCode);
|
||||
bodyXml.setAttribute("iMPoIds", materialAppDetail.MPoIds);
|
||||
bodyXml.setAttribute("comcode", materialAppDetail.OmCode);
|
||||
bodyXml.setAttribute("iOMoDID", materialAppDetail.OMoDId);
|
||||
bodyXml.setAttribute("cciqbookcode", materialAppDetail.ciqBookCode);
|
||||
bodyXml.setAttribute("cmworkcentercode", materialAppDetail.mWorkCenterCode);
|
||||
bodyXml.setAttribute("cservicecode", materialAppDetail.ServiceCode);
|
||||
bodyXml.setAttribute("isotype", materialAppDetail.SoType);
|
||||
bodyXml.setAttribute("csocode", materialAppDetail.SoCode);
|
||||
bodyXml.setAttribute("isodid", materialAppDetail.SodId);
|
||||
bodyXml.setAttribute("isoseq", materialAppDetail.SoSeq);
|
||||
bodyXml.setAttribute("iordertype", materialAppDetail.OrderType);
|
||||
bodyXml.setAttribute("iordercode", materialAppDetail.OrderCode);
|
||||
bodyXml.setAttribute("iorderdid", materialAppDetail.OrderdId);
|
||||
bodyXml.setAttribute("iorderseq", materialAppDetail.OrderSeq);
|
||||
bodyXml.setAttribute("ipesotype", materialAppDetail.PesoType);
|
||||
bodyXml.setAttribute("cpesocode", materialAppDetail.PesoCode);
|
||||
bodyXml.setAttribute("ipesodid", materialAppDetail.PesodId);
|
||||
bodyXml.setAttribute("ipesoseq", materialAppDetail.PesoSeq);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user