From fade41d82af02db767134a877d6116bae7bba267 Mon Sep 17 00:00:00 2001 From: lilili Date: Tue, 5 Sep 2023 09:16:27 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=B0=83=E6=95=B4agv=E6=90=AC=E8=BF=90?= =?UTF-8?q?=E7=82=B9=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/ICSManufactureService.cs | 6 ++++-- ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs index 943fbfb..f85edaf 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs @@ -517,9 +517,11 @@ namespace ICSSoft.DataProject #endregion #region 领料后料架解绑或搬运至空料架区 - string chksql = @" select A.ContainerCode,A.EATTRIBUTE5,B.Desks from ICSContainerReceiptsNumber A + string chksql = @" select A.ContainerCode,A.EATTRIBUTE5,C.Desks from ICSContainerReceiptsNumber A INNER JOIN ICSMOApply B ON B.ApplyCode=A.TransCode - where ContainerCode=( + INNER JOIN (SELECT TOP 1 EATTRIBUTE3 AS Desks,ContainerCode from ICSAGVTaskLog WHERE EATTRIBUTE2='已完成' Order By MTIME DESC) C ON + C.ContainerCode=A.ContainerCode + where A.ContainerCode=( select top 1 ContainerCode from ICSContainerReceiptsNumber where TransCode='{0}')"; chksql = string.Format(chksql, TransCode); diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index eb7a5cf..e78deb1 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -7593,9 +7593,9 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer { if (JsonData.taskCode.Contains("CK")) { - logsql = @"update ICSAGVTaskLog set MTIME=GETDATE(),EATTRIBUTE2='已完成' + logsql = @"update ICSAGVTaskLog set MTIME=GETDATE(),EATTRIBUTE2='已完成',EATTRIBUTE3='{1}' WHERE TaskCode='{0}'"; - logsql = string.Format(logsql, JsonData.taskCode); + logsql = string.Format(logsql, JsonData.taskCode, JsonData.taskCode); DBHelper.ExecuteNonQuery(connString, CommandType.Text, logsql); } else From ac5c6781bbd39b8b1ee1c7670286f19d04f3ed10 Mon Sep 17 00:00:00 2001 From: lilili Date: Tue, 5 Sep 2023 13:59:56 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=95=B4=E5=8D=95?= =?UTF-8?q?=E6=8B=A3=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NFine.Application/WMS/PickMaterialApp.cs | 53 +++++++++++-------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index d92cdb0..ec8f6e7 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -1924,18 +1924,22 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo { throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量大于单据需求数量,请尝试重新拣料。"); } - if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty && (Type == "2" || Type == "5" || Type == "12")) + //if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty && (Type == "2" || Type == "5" || Type == "12")) + //{ + // chksql = @" select B.F_Define2 from ICSInventoryDetail A + // INNER JOIN Sys_SRM_ItemsDetail B ON B.F_Define1=A.WHCode AND B.F_Define2=A.LocationCode AND B.F_Define4=A.WorkPoint + // where INVCode='{0}' and WHCode='{1}' and WorkPoint='{2}'"; + // chksql = string.Format(chksql, chkdr["InvCode"].ToString(), chkdr["WHCode"].ToString(), WorkPoint); + // var chkds = Repository().FindDataSetBySql(chksql); + // DataTable chkdt = chkds.Tables[0]; + // if (chkdt.Rows.Count != 0) + // { + // throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); + // } + //} + if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty) { - chksql = @" select B.F_Define2 from ICSInventoryDetail A - INNER JOIN Sys_SRM_ItemsDetail B ON B.F_Define1=A.WHCode AND B.F_Define2=A.LocationCode AND B.F_Define4=A.WorkPoint - where INVCode='{0}' and WHCode='{1}' and WorkPoint='{2}'"; - chksql = string.Format(chksql, chkdr["InvCode"].ToString(), chkdr["WHCode"].ToString(), WorkPoint); - var chkds = Repository().FindDataSetBySql(chksql); - DataTable chkdt = chkds.Tables[0]; - if (chkdt.Rows.Count != 0) - { - throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); - } + throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); } } #endregion @@ -2517,18 +2521,23 @@ a.Sequence, { throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量大于单据需求数量,请尝试重新拣料。"); } - if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty && (Type == "2" || Type == "5" || Type == "12")) + //if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty && (Type == "2" || Type == "5" || Type == "12")) + //{ + // chksql = @" select B.F_Define2 from ICSInventoryDetail A + // INNER JOIN Sys_SRM_ItemsDetail B ON B.F_Define1=A.WHCode AND B.F_Define2=A.LocationCode AND B.F_Define4=A.WorkPoint + // where INVCode='{0}' and WHCode='{1}' and WorkPoint='{2}'"; + // chksql = string.Format(chksql, chkdr["InvCode"].ToString(), chkdr["WHCode"].ToString(), WorkPoint); + // var chkds = Repository().FindDataSetBySql(chksql); + // DataTable chkdt = chkds.Tables[0]; + // if (chkdt.Rows.Count != 0) + // { + // throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); + // } + //} + + if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty) { - chksql = @" select B.F_Define2 from ICSInventoryDetail A - INNER JOIN Sys_SRM_ItemsDetail B ON B.F_Define1=A.WHCode AND B.F_Define2=A.LocationCode AND B.F_Define4=A.WorkPoint - where INVCode='{0}' and WHCode='{1}' and WorkPoint='{2}'"; - chksql = string.Format(chksql, chkdr["InvCode"].ToString(), chkdr["WHCode"].ToString(), WorkPoint); - var chkds = Repository().FindDataSetBySql(chksql); - DataTable chkdt = chkds.Tables[0]; - if (chkdt.Rows.Count != 0) - { - throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); - } + throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,单据必须整单拣料,请先核对库存。"); } } #endregion From 3f4c4cec35a02f4243c1a2dadd7ddf1b97ebbf41 Mon Sep 17 00:00:00 2001 From: lilili Date: Tue, 5 Sep 2023 15:11:36 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KanBan/NFine.Application/SRM/WatchPanelApp.cs | 5 +++-- .../Areas/WMS/Views/WatchPanel/PanelWIP2.cshtml | 13 +++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/KanBan/NFine.Application/SRM/WatchPanelApp.cs b/KanBan/NFine.Application/SRM/WatchPanelApp.cs index 18418ae..3e29c54 100644 --- a/KanBan/NFine.Application/SRM/WatchPanelApp.cs +++ b/KanBan/NFine.Application/SRM/WatchPanelApp.cs @@ -226,7 +226,7 @@ and CreatedOn>CAST(CAST(GETDATE() as date) as varchar(10)) + ' 00:00:00' and st string SqlText = $@" SELECT a.ApplyCode, A.Sequence, - a.SAPSequence, + --a.SAPSequence, a.InvCode, c.LotNo, c.Quantity, @@ -236,7 +236,8 @@ and CreatedOn>CAST(CAST(GETDATE() as date) as varchar(10)) + ' 00:00:00' and st FROM ICSMOApply a -- INNER JOIN ICSContainerReceiptsNumber b ON a.ApplyCode= b.TransCode - INNER JOIN ICSWareHouseLotInfoLog c ON a.ApplyCode= c.TransCode AND + INNER JOIN ICSWareHouseLotInfoLog c ON a.ApplyCode= c.TransCode + AND c.BusinessCode= '15' AND a.Sequence= c.TransSequence INNER JOIN ( SELECT DISTINCT e.StartLocation,e.EndLocation FROM diff --git a/KanBan/NFine.Web/Areas/WMS/Views/WatchPanel/PanelWIP2.cshtml b/KanBan/NFine.Web/Areas/WMS/Views/WatchPanel/PanelWIP2.cshtml index 5257776..5bb399c 100644 --- a/KanBan/NFine.Web/Areas/WMS/Views/WatchPanel/PanelWIP2.cshtml +++ b/KanBan/NFine.Web/Areas/WMS/Views/WatchPanel/PanelWIP2.cshtml @@ -204,10 +204,15 @@ // 子件项数 完成项数 var html = "
    "; for (var i = 0; i < data.length; i++) { - html += '
  • ' + data[i].ApplyCode + ' ' + data[i].Sequence + ' ' + data[i].SAPSequence + ''; - html += ' ' + data[i].InvCode + ' ' + data[i].LotNo + ' ' + data[i].Quantity + ''; - html += ' ' + data[i].FromLocationCode + ' ' + data[i].LocationCode + '';//' + data[i].TaskCode + ''; - //html += ' ' + data[i].完成项数 + ''; + //html += '
  • ' + data[i].ApplyCode + ' ' + data[i].Sequence;// + ' ' + data[i].SAPSequence + ''; + //html += ' ' + data[i].InvCode + ' ' + data[i].LotNo + ' ' + data[i].Quantity + ''; + //html += ' ' + data[i].StartLocation + ' ' + data[i].EndLocation + '';//' + data[i].TaskCode + ''; + ////html += ' ' + data[i].完成项数 + ''; + + html += '
  • ' + data[i].ApplyCode + ' ' + data[i].Sequence + ' ' + data[i].InvCode + ''; + html += '' + data[i].LotNo + ' ' + data[i].Quantity + ''; + html += '' + data[i].StartLocation + ' ' + data[i].EndLocation + '';//' + data[i].TaskCode + ''; + } html += "
"; $("#WIPRCV").html(html); From cc337b0b4e3cd0d8cdfbedd592d57f51292115e2 Mon Sep 17 00:00:00 2001 From: lilili Date: Wed, 6 Sep 2023 11:51:53 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=89=A9=E6=96=99?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=EF=BC=8C=E5=90=8C=E6=AD=A5=E7=89=A9=E6=96=99?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=86=E6=89=B9=E5=AD=97=E6=AE=B5=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BAtrue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs b/ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs index 8cfb203..2d8eccb 100644 --- a/ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs +++ b/ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs @@ -102,6 +102,7 @@ namespace ICSSoft.FromERP line.MTIME = DateTime.Now; line.DrawingNo = item.TEST1;//图号 line.Version = item.TEST2;//版本 + line.LotEnable = true; if (isNew == true) { db.ICSInventory.InsertOnSubmit(line); From 575dd1697ff61f5fcc3e8a1cbccd2f492030f041 Mon Sep 17 00:00:00 2001 From: lilili Date: Wed, 6 Sep 2023 11:59:25 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8B=A3=E6=96=99?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml index db005a8..2765258 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml @@ -362,8 +362,8 @@ //}, rowNum: 20, autoScroll: true, - sortname: 'Code', - sortorder: "desc", + sortname: 'MTIME', + sortorder: "asc", viewrecords: true, multiselect: true, pager: "#gridPager",