diff --git a/NX.ERP.Model/NX.ERP.Model.csproj b/NX.ERP.Model/NX.ERP.Model.csproj index 481734a..36381ee 100644 --- a/NX.ERP.Model/NX.ERP.Model.csproj +++ b/NX.ERP.Model/NX.ERP.Model.csproj @@ -86,6 +86,7 @@ + diff --git a/NX.ERP.Model/Response/Pmc/PmcWwInvlRes.cs b/NX.ERP.Model/Response/Pmc/PmcWwInvlRes.cs new file mode 100644 index 0000000..8ee9db0 --- /dev/null +++ b/NX.ERP.Model/Response/Pmc/PmcWwInvlRes.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Newtonsoft.Json; +namespace NX.ERP.Model +{ + public class PmcWwInvlRes : BaseModel + { + + public int wfjl{ get; set; } + + public int wsjl { get; set; } + + public IEnumerable wfdetails { get; set; } + + + public IEnumerable wsdetails { get; set; } + + } + + public class wfdetail + { + public string TaskItemID { get; set; } + + public string code { get; set; } + + public string name { get; set; } + + + public string standard { get; set; } + + public string Qua { get; set; } + + public string qty { get; set; } + + public string diff { get; set; } + + } + + + public class wsdetail + { + public string sheetid { get; set; } + + public string code { get; set; } + + public string name { get; set; } + + + public string standard { get; set; } + + public string Qua { get; set; } + + public string ReceivedQua { get; set; } + + + public string diff { get; set; } + + } + + +} diff --git a/NX.ERP.U8/Pmc/PurchaseQuery.cs b/NX.ERP.U8/Pmc/PurchaseQuery.cs index dca6c95..20a06be 100644 --- a/NX.ERP.U8/Pmc/PurchaseQuery.cs +++ b/NX.ERP.U8/Pmc/PurchaseQuery.cs @@ -559,5 +559,46 @@ CREATE INDEX IX_test ON tempdb..tablepuapp20210625 (cinvcode) return conn.Query(sql, new { info.cpersonname, info.InvCodes, info.cday, info.BeginDate, info.EndDate }); } } + + public NX.ERP.Model.PmcWwInvlRes Purchasesuww() + { + var PmcWwInvlRes = new NX.ERP.Model.PmcWwInvlRes(); + + using (var conn = U8LoginContext.Instance.Connection) + { + var sql = @" select aa.TaskItemID,aa.materialid,dd.code,dd.name,dd.standard, CONVERT(DECIMAL(13,3),aa.Qua) as Qua , CONVERT(DECIMAL(13,3),bb.qty) as qty , CONVERT(DECIMAL(13,3),(isnull(aa.Qua,0)-isnull(bb.qty,0))) as diff from [10.0.0.230].wxnx2021.dbo.t_TaskItem aa left join ( + select TaskItemID, sum(Qua) AS qty + from [10.0.0.230].wxnx2021.dbo.t_OutSourcing_SendItems a left join + [10.0.0.230].wxnx2021.dbo.t_OutSourcing_SendSheet b on a.SID_Sheet= b.SID_Sheet + where b.IsChecked =1 and isnull(b.IsDeleted,0)=0 group by TaskItemID ) bb on aa. SID_Item= bb.TaskItemID + left join [10.0.0.230].wxnx2021.dbo.t_TaskSheet cc on aa.SID_Sheet = cc.SID_Sheet + left join [10.0.0.230].wxnx2021.dbo.t_Material dd on dd.SysID=aa.materialid + where cc.IsChecked=1 and (isnull(aa.Qua,0)-isnull(bb.qty,0))>0 and cc.SheetType=3 and isnull(cc.IsDeleted,0)=0 + "; + + PmcWwInvlRes.wfdetails=conn.Query< NX.ERP.Model.wfdetail> (sql,"" ); + + var sql2 = @" select b.sheetid,dd.code,dd.name,dd.standard, CONVERT(DECIMAL(13,3),a.Qua) as Qua, CONVERT(DECIMAL(13,3),a.ReceivedQua) as ReceivedQua , CONVERT(DECIMAL(13,3),a.Qua-a.ReceivedQua) as diff + from [10.0.0.230].wxnx2021.dbo.t_OutSourcing_SendItems a left join + [10.0.0.230].wxnx2021.dbo.t_OutSourcing_SendSheet b on a.SID_Sheet= b.SID_Sheet + left join [10.0.0.230].wxnx2021.dbo.t_Material dd on dd.SysID=a.materialid + where b.IsChecked =1 and isnull(b.IsDeleted,0)=0 and a.Qua<>a.ReceivedQua + + "; + + PmcWwInvlRes.wsdetails = conn.Query(sql2, ""); + + + PmcWwInvlRes.wfjl = PmcWwInvlRes.wfdetails.Count(); + + PmcWwInvlRes.wsjl = PmcWwInvlRes.wsdetails.Count(); + + + } + + return PmcWwInvlRes; + } + + } } diff --git a/NX.ERP.WebAPi/Controllers/Pmc/PurchaseController.cs b/NX.ERP.WebAPi/Controllers/Pmc/PurchaseController.cs index c3b9868..12b2c1a 100644 --- a/NX.ERP.WebAPi/Controllers/Pmc/PurchaseController.cs +++ b/NX.ERP.WebAPi/Controllers/Pmc/PurchaseController.cs @@ -46,6 +46,14 @@ namespace NX.ERP.WebAPi.Controllers } + [HttpPost] + [Route("api/Purchase/Purchasesuww")] + public NX.ERP.Model.PmcWwInvlRes Purchasesuww() + { + var PurchaseQuery = new NX.ERP.U8.Purchase.PurchaseQuery(); + return PurchaseQuery.Purchasesuww(); + } + } } \ No newline at end of file diff --git a/NX.ERP.Webapp/src/App.vue b/NX.ERP.Webapp/src/App.vue index 0f77a9d..6702b64 100644 --- a/NX.ERP.Webapp/src/App.vue +++ b/NX.ERP.Webapp/src/App.vue @@ -3,37 +3,36 @@ - + 采购订单列表(PMC) 销售未发明细表 - + + 序列号查询 补料量查询 - 采购订单列表(PMC) + 采购跟进表(采购部) - 采购查询汇总--> + 采购查询汇总 -
@@ -43,12 +42,12 @@