This commit is contained in:
杰 朱
2021-02-02 15:20:51 +08:00
parent 6ca5454a22
commit da75fbb8fb
5 changed files with 39 additions and 24 deletions

View File

@@ -132,7 +132,7 @@ namespace NX.ERP.U8.Mom
} }
if (!string.IsNullOrEmpty(Params.ProductOrderNo)) if (!string.IsNullOrEmpty(Params.ProductOrderNo))
{ {
where.Add(" a.moCode like @ProductOrderNo "); where.Add(" b.moCode like @ProductOrderNo ");
} }
return this.GetDetails(string.Join(" and ", where.ToArray()), new return this.GetDetails(string.Join(" and ", where.ToArray()), new
{ {
@@ -145,14 +145,24 @@ namespace NX.ERP.U8.Mom
public IEnumerable<Model.MOM.MomDetail> GetDetails(string strWhere = "", object Param = null) public IEnumerable<Model.MOM.MomDetail> GetDetails(string strWhere = "", object Param = null)
{ {
var strSql = @"select var strSql = @"select
b.MoId as id ,b.MoDId as ProductOrderDtlId,b.MoId as ProductOrderId,a.MoCode as ProductOrderNo,a.CreateDate as ProductOrderDate,b.InvCode as ProductCode,b.Qty as Qty, b.MoId as id ,b.MoDId as ProductOrderDtlId,b.MoId as ProductOrderId,b.MoCode as ProductOrderNo,b.MakeDate as ProductOrderDate,b.InvCode as ProductCode,b.Qty as Qty,
c.AllocateId as id ,c.AllocateId as AllocateId,c.MoDId as ProductOrderDtlId,c.InvCode as MaterialCode,b.MoId as ProductOrderId, c.IssQty as IssQty,c.Qty d.AllocateId as id ,d.AllocateId as AllocateId,b.MoDId as ProductOrderDtlId,d.InvCode as MaterialCode,b.MoId as ProductOrderId, d.IssQty as IssQty,d.Qty
from mom_order as a FROM v_st_mom_orderdetail b INNER JOIN
left join mom_orderdetail as b on a.MoId=b.MoId (SELECT modid as m_modid,allocateid,CREJECTCODE,IssQty,Qty,InvCode
left join mom_moallocate as c on b.MoDId=c.MoDId "; from v_st_moallocate
where isnull(WIPType,0)=3
and isnull(ByproductFlag,0)=0
and (ISNULL(Qty,0)-ISNULL(IssQty,0)+ISNULL(ReplenishQty,0))>0
and isnull(RequisitionFlag,0) = 0 and 1=1)
d ON b.modid= d.m_modid
Where b.byproductflag=0
and ISNULL(b.Status,0) = 3
and ( isnull(b.bWorkshopTrans,0) = 0 or (isnull(b.bWorkshopTrans,0) =1
and isnull(b.sfcflag,0) =1)) AND (1>0) AND (1>0) AND ( 1>0 )
";
if (!string.IsNullOrEmpty(strWhere)) if (!string.IsNullOrEmpty(strWhere))
{ {
strSql += $" where {strWhere} "; strSql += $" and {strWhere} ";
} }
var lookup = new Dictionary<int, Model.MOM.MomDetail>(); var lookup = new Dictionary<int, Model.MOM.MomDetail>();
using (var conn = U8LoginContext.Instance.Connection) using (var conn = U8LoginContext.Instance.Connection)
@@ -182,12 +192,12 @@ namespace NX.ERP.U8.Mom
public Model.MOM.MomOrder GetModel(string Code) public Model.MOM.MomOrder GetModel(string Code)
{ {
return this.GetList("a.moCode=@Code", new { Code }).FirstOrDefault(); return this.GetList("b.moCode=@Code", new { Code }).FirstOrDefault();
} }
public IEnumerable<Model.MOM.MomOrder> GetListByLastID(int Id) public IEnumerable<Model.MOM.MomOrder> GetListByLastID(int Id)
{ {
return this.GetList("a.moid >= @id", new { Id }); return this.GetList("b.moid >= @id", new { Id });
} }
} }

View File

@@ -71,7 +71,7 @@
<HintPath>..\packages\Dapper.1.42\lib\net35\Dapper.dll</HintPath> <HintPath>..\packages\Dapper.1.42\lib\net35\Dapper.dll</HintPath>
</Reference> </Reference>
<Reference Include="Interop.MSXML2"> <Reference Include="Interop.MSXML2">
<HintPath>E:\U8SOFT\Interop\Interop.MSXML2.dll</HintPath> <HintPath>D:\U8SOFT\Interop\Interop.MSXML2.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="Interop.U8Login, Version=1.14.0.0, Culture=neutral, PublicKeyToken=79a4e7ad54eeabca, processorArchitecture=MSIL"> <Reference Include="Interop.U8Login, Version=1.14.0.0, Culture=neutral, PublicKeyToken=79a4e7ad54eeabca, processorArchitecture=MSIL">
@@ -83,16 +83,16 @@
<Reference Include="System.configuration" /> <Reference Include="System.configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="UFIDA.U8.MomServiceCommon"> <Reference Include="UFIDA.U8.MomServiceCommon">
<HintPath>E:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.MomServiceCommon.dll</HintPath> <HintPath>D:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.MomServiceCommon.dll</HintPath>
</Reference> </Reference>
<Reference Include="UFIDA.U8.U8APIFramework"> <Reference Include="UFIDA.U8.U8APIFramework">
<HintPath>E:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8APIFramework.dll</HintPath> <HintPath>D:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8APIFramework.dll</HintPath>
</Reference> </Reference>
<Reference Include="UFIDA.U8.U8MOMAPIFramework"> <Reference Include="UFIDA.U8.U8MOMAPIFramework">
<HintPath>E:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8MOMAPIFramework.dll</HintPath> <HintPath>D:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8MOMAPIFramework.dll</HintPath>
</Reference> </Reference>
<Reference Include="UFSoft.U8.Framework.Login.UI"> <Reference Include="UFSoft.U8.Framework.Login.UI">
<HintPath>E:\U8SOFT\Framework\UFSoft.U8.Framework.Login.UI.dll</HintPath> <HintPath>D:\U8SOFT\Framework\UFSoft.U8.Framework.Login.UI.dll</HintPath>
</Reference> </Reference>
<Reference Include="UFSoft.U8.Framework.LoginContext, Version=1.0.0.0, Culture=neutral, PublicKeyToken=90e57cffdf9d854d, processorArchitecture=MSIL"> <Reference Include="UFSoft.U8.Framework.LoginContext, Version=1.0.0.0, Culture=neutral, PublicKeyToken=90e57cffdf9d854d, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>

View File

@@ -11,16 +11,21 @@ namespace NX.ERP.U8.Purchase
{ {
using (var conn = U8LoginContext.Instance.Connection) using (var conn = U8LoginContext.Instance.Connection)
{ {
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 MaterialCode, b.cInvCode AS MaterialCode,
b.cBatch AS BatchNo, b.cBatch AS BatchNo,
b.fRealQuantity as RealQuantity, b.fvalidinquan as RealQuantity,
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.ccomunitcode 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
pu_ArrHead as a FROM pu_ArrBody b inner join pu_ArrHead a on a.id=b.id
left join pu_arrbody as b on a.id=b.id inner join (select cinvcode as cinvcode1,iId from inventory) inventory on b.cinvcode=inventory.cinvcode1
Left Join PO_Podetails C WITH (NOLOCK) ON B.iPOsID = C.ID where ISNULL( a.cverifier,'')<>'' and a.id in (select id from PO_Podetails where fRealQuantity<>iQuantity ) "; Left Join PO_Podetails C WITH (NOLOCK) ON B.iPOsID = C.ID
Where ( (1>0) AND (1>0) ) AND ( 1>0 ) and (isnull(cbustype,'')<>'委外加工')
And (1=1) and isnull(b.cbcloser,N'')=N'' And isnull(a.cverifier,'')<>''
And a.iBillType =N'0' and isnull(b.bGsp,N'')=N'0' and (isnull(b.iQuantity,0)-isnull(b.fRefuseQuantity,0)>isnull(b.fValidInQuan,0) or (b.igrouptype=2
and isnull(b.inum,0)-isnull(b.frefusenum,0)>isnull(b.fvalidinnum,0))) and isnull(a.bStorageArrivalOrder,1)=1 and 1=1
";
if (!string.IsNullOrEmpty(strWhere)) if (!string.IsNullOrEmpty(strWhere))
{ {
strSQL += $" and {strWhere} "; strSQL += $" and {strWhere} ";

View File

@@ -37,7 +37,7 @@ namespace NX.ERP.U8.Store
headXml.setAttribute("id", puStoreIn.Id); //DomHead[0]["id"] = ""; //主关键字段,int类型 headXml.setAttribute("id", puStoreIn.Id); //DomHead[0]["id"] = ""; //主关键字段,int类型
headXml.setAttribute("bomfirst", "0"); //DomHead[0]["bomfirst"] = ""; //委外期初标志,string类型 headXml.setAttribute("bomfirst", "0"); //DomHead[0]["bomfirst"] = ""; //委外期初标志,string类型
headXml.setAttribute("ccode", "190700000050"); //DomHead[0]["ccode"] = ""; //入库单号,string类型 headXml.setAttribute("ccode", "190700000050"); //DomHead[0]["ccode"] = ""; //入库单号,string类型
headXml.setAttribute("ddate", puStoreIn.Date.ToShortDateString()); //DomHead[0]["ddate"] = ""; //入库日期,DateTime类型 headXml.setAttribute("ddate", System.DateTime.Now.ToString("G")); //DomHead[0]["ddate"] = ""; //入库日期,DateTime类型
headXml.setAttribute("iverifystate", 0); //DomHead[0]["iverifystate"] = ""; //iverifystate,int类型 headXml.setAttribute("iverifystate", 0); //DomHead[0]["iverifystate"] = ""; //iverifystate,int类型
headXml.setAttribute("iswfcontrolled", 0); //DomHead[0]["iswfcontrolled"] = ""; //iswfcontrolled,int类型 headXml.setAttribute("iswfcontrolled", 0); //DomHead[0]["iswfcontrolled"] = ""; //iswfcontrolled,int类型
headXml.setAttribute("bpufirst", "0"); //DomHead[0]["bpufirst"] = ""; //采购期初标志,string类型 headXml.setAttribute("bpufirst", "0"); //DomHead[0]["bpufirst"] = ""; //采购期初标志,string类型

View File

@@ -7,8 +7,8 @@
<appSettings> <appSettings>
<add key="server" value="192.168.0.168"/> <add key="server" value="192.168.0.168"/>
<add key="AccId" value="(default)@001"/> <add key="AccId" value="(default)@001"/>
<add key="UserId" value="wx998"/> <add key="UserId" value="wx996"/>
<add key="Password" value="nx123456"/> <add key="Password" value="1"/>
<add key="EaiPort" value="80"/> <add key="EaiPort" value="80"/>
<add key="EaiPath" value="U8EAI/import.asp" /> <add key="EaiPath" value="U8EAI/import.asp" />
<add key="webpages:Version" value="3.0.0.0" /> <add key="webpages:Version" value="3.0.0.0" />