diff --git a/NX.ERP.U8/Mom/MomOrderDAL.cs b/NX.ERP.U8/Mom/MomOrderDAL.cs index a0cc61d..4739e35 100644 --- a/NX.ERP.U8/Mom/MomOrderDAL.cs +++ b/NX.ERP.U8/Mom/MomOrderDAL.cs @@ -132,7 +132,7 @@ namespace NX.ERP.U8.Mom } 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 { @@ -145,14 +145,24 @@ namespace NX.ERP.U8.Mom public IEnumerable GetDetails(string strWhere = "", object Param = null) { 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, - 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 - from mom_order as a - left join mom_orderdetail as b on a.MoId=b.MoId - left join mom_moallocate as c on b.MoDId=c.MoDId "; + 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, + 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 v_st_mom_orderdetail b INNER JOIN + (SELECT modid as m_modid,allocateid,CREJECTCODE,IssQty,Qty,InvCode + 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)) { - strSql += $" where {strWhere} "; + strSql += $" and {strWhere} "; } var lookup = new Dictionary(); using (var conn = U8LoginContext.Instance.Connection) @@ -182,12 +192,12 @@ namespace NX.ERP.U8.Mom 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 GetListByLastID(int Id) { - return this.GetList("a.moid >= @id", new { Id }); + return this.GetList("b.moid >= @id", new { Id }); } } diff --git a/NX.ERP.U8/NX.ERP.U8.csproj b/NX.ERP.U8/NX.ERP.U8.csproj index 05744d0..39f35c7 100644 --- a/NX.ERP.U8/NX.ERP.U8.csproj +++ b/NX.ERP.U8/NX.ERP.U8.csproj @@ -71,7 +71,7 @@ ..\packages\Dapper.1.42\lib\net35\Dapper.dll - E:\U8SOFT\Interop\Interop.MSXML2.dll + D:\U8SOFT\Interop\Interop.MSXML2.dll True @@ -83,16 +83,16 @@ - E:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.MomServiceCommon.dll + D:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.MomServiceCommon.dll - E:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8APIFramework.dll + D:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8APIFramework.dll - E:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8MOMAPIFramework.dll + D:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8MOMAPIFramework.dll - E:\U8SOFT\Framework\UFSoft.U8.Framework.Login.UI.dll + D:\U8SOFT\Framework\UFSoft.U8.Framework.Login.UI.dll False diff --git a/NX.ERP.U8/Purchase/ArrivalDAL.cs b/NX.ERP.U8/Purchase/ArrivalDAL.cs index 281b666..1680d29 100644 --- a/NX.ERP.U8/Purchase/ArrivalDAL.cs +++ b/NX.ERP.U8/Purchase/ArrivalDAL.cs @@ -11,16 +11,21 @@ namespace NX.ERP.U8.Purchase { 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.cInvCode AS MaterialCode, b.cBatch AS BatchNo, - b.fRealQuantity 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.iQuantity as Quantity,b.iposid as PosId ,B.CORDERCODE as OrderCode,C.POID as Poid from - pu_ArrHead as a - left join pu_arrbody as b on a.id=b.id - 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 ) "; + b.fvalidinquan as RealQuantity, + 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 pu_ArrBody b inner join pu_ArrHead a 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 ( (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)) { strSQL += $" and {strWhere} "; diff --git a/NX.ERP.U8/Store/PuStoreInDAL.cs b/NX.ERP.U8/Store/PuStoreInDAL.cs index 5b0c0c4..900c188 100644 --- a/NX.ERP.U8/Store/PuStoreInDAL.cs +++ b/NX.ERP.U8/Store/PuStoreInDAL.cs @@ -37,7 +37,7 @@ namespace NX.ERP.U8.Store headXml.setAttribute("id", puStoreIn.Id); //DomHead[0]["id"] = ""; //主关键字段,int类型 headXml.setAttribute("bomfirst", "0"); //DomHead[0]["bomfirst"] = ""; //委外期初标志,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("iswfcontrolled", 0); //DomHead[0]["iswfcontrolled"] = ""; //iswfcontrolled,int类型 headXml.setAttribute("bpufirst", "0"); //DomHead[0]["bpufirst"] = ""; //采购期初标志,string类型 diff --git a/NX.ERP.WebAPi/Web.config b/NX.ERP.WebAPi/Web.config index 5d45058..c57c1aa 100644 --- a/NX.ERP.WebAPi/Web.config +++ b/NX.ERP.WebAPi/Web.config @@ -7,8 +7,8 @@ - - + +