diff --git a/AMESCoreStudio.Web/AMESCoreStudio.Web.csproj.user b/AMESCoreStudio.Web/AMESCoreStudio.Web.csproj.user index 171078ef..c5405f56 100644 --- a/AMESCoreStudio.Web/AMESCoreStudio.Web.csproj.user +++ b/AMESCoreStudio.Web/AMESCoreStudio.Web.csproj.user @@ -7,7 +7,7 @@ True False False - ~/Views/PTD/PTD001.cshtml + ~/Views/PTD/PTD001A_O.cshtml MvcControllerEmptyScaffolder root/Common/MVC/Controller true diff --git a/AMESCoreStudio.Web/Controllers/PTDController.cs b/AMESCoreStudio.Web/Controllers/PTDController.cs index 4cbb4770..217e1610 100644 --- a/AMESCoreStudio.Web/Controllers/PTDController.cs +++ b/AMESCoreStudio.Web/Controllers/PTDController.cs @@ -20,14 +20,20 @@ namespace AMESCoreStudio.Web.Controllers _kcsApi = kcsApi; } - public async Task PTD001Async(string dnNo, string lineNo) + public async Task PTD001() + { + return View(); + } + + + public async Task PTD001AAsync(string dnNo, string lineNo) { - ViewData["Title"] = "DN單查詢出貨清單"; + ViewData["Title"] = "查詢條件 - 出貨DN單: " + dnNo + " Line No:" + lineNo; if (dnNo == null || lineNo == null) return View(); - string kpDataList = ""; + string kpDataList = "
"; string dataList = ""; try { @@ -35,8 +41,8 @@ namespace AMESCoreStudio.Web.Controllers IResultModel DNDetail = await _pcsApi.GetZDNDetail4PTD001(dnNo,lineNo); if (DNDetail.DataTotal > 0) { - dataList = ""; - dataList += "
"; + dataList = "
"; + dataList += "
"; foreach (var item in DNDetail.Data) { JObject jo = JObject.Parse(item.ToString()); @@ -46,7 +52,7 @@ namespace AMESCoreStudio.Web.Controllers switch (i) { case 0: - dataList += ""; + dataList += ""; dataList += ""; break; case 1: @@ -111,22 +117,22 @@ namespace AMESCoreStudio.Web.Controllers switch (i) { case 0: - kpDataList = kpDataList + ""; + kpDataList = kpDataList + ""; break; case 1: - kpDataList = kpDataList + ""; + kpDataList = kpDataList + ""; break; case 2: - kpDataList = kpDataList + ""; + kpDataList = kpDataList + ""; break; case 3: - kpDataList = kpDataList + ""; + kpDataList = kpDataList + ""; break; case 4: - kpDataList = kpDataList + ""; + kpDataList = kpDataList + ""; break; case 5: - strStartDate = ""; + strStartDate = ""; break; default: string kp_name = jp[i].Name.Replace("kP_", ""); diff --git a/AMESCoreStudio.Web/Views/PTD/PTD001.cshtml b/AMESCoreStudio.Web/Views/PTD/PTD001.cshtml index 1849298c..02d54d99 100644 --- a/AMESCoreStudio.Web/Views/PTD/PTD001.cshtml +++ b/AMESCoreStudio.Web/Views/PTD/PTD001.cshtml @@ -32,96 +32,39 @@
@ViewBag.Title
- - -
-
-
-
-
-
- -
- -
-
+
+
+ +
+
-
-
- -
- -
-
-
-
-
- -
+
+
+ +
+
+
+ +
-
- -
-
- @Html.Raw(ViewData["list"]) -
+
+
diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs index 9314b7c6..833963cb 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs @@ -2521,7 +2521,8 @@ FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (S { await connPTD.OpenAsync(); } - string strSQL = $@"select DNNO,DNLineNO,ProductID,ShipQty,ShipCustomerID,SoldCustomerID,ExpectShipDate,CurrentShipDate + string strSQL = $@"select DNNO,DNLineNO,ProductID,ShipQty,ShipCustomerID,SoldCustomerID,ExpectShipDate , + CurrentShipDate from SFIS_PTD.dbo.ZDNDetail where DNNO ='{dnNo}' and DNLineNO ='{lineNo}'"; DataTable dtZDNDetail = new DataTable(); using (var cmd = connPTD.CreateCommand()) @@ -2611,7 +2612,7 @@ FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (S foreach (DataRow dr in dtZProductTrans.Rows) { string wip_sql = $@"SELECT '{dnNo}' as DN單號,WI.WIP_NO as WipNo,WA.ITEM_NO as ItemNO, BI.EXTRA_BARCODE_NO as ExtraBarcodeNo, BI.BARCODE_NO as BarcodeNo, BI.WIP_ID, - BI.BARCODE_ID,(select min(create_date) from jhames.wip_station where wip_id = BI.WIP_ID) StartDate + BI.BARCODE_ID,TO_CHAR((select min(create_date) from jhames.wip_station where wip_id = BI.WIP_ID),'YYYY-MM-DD HH24:MI:SS') StartDate FROM jhames.BARCODE_INFO BI, jhames.WIP_INFO WI, jhames.WIP_ATT WA WHERE BI.WIP_ID = WI.WIP_ID AND WI.WIP_NO = WA.WIP_NO
 DN NO
 DN NO " + jp[i].Value + " " + jp[i].Name + " DNNo " + jp[i].Name + " MOID " + jp[i].Name + " ProductID " + jp[i].Name + " ShipmentSN " + jp[i].Name + " ProductSN " + jp[i].Name + " StartDate