From 013101be5a8d87da24f4c7c996a6ba98f9e41604 Mon Sep 17 00:00:00 2001 From: 仲国强 <519541279@qq.com> Date: 星期五, 08 十月 2021 17:03:43 +0800 Subject: [PATCH] 编辑时返回工序工价信息 --- WebAPI/Controllers/基础资料/工资基础资料/Gy_ProcPriceController.cs | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" index 36d67ed..0a889bc 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" @@ -148,5 +148,54 @@ } #endregion + + #region 缂栬緫鏃惰繑鍥炲伐搴忓伐浠蜂俊鎭� + [Route("Gy_ProcPrice/GetProcPriceValue")] + [HttpGet] + public object GetProcPriceValue(int HItemID) + { + try + { + ds = oCN.RunProcReturn("select " + + "a.HItemID,a.HDeptID,b.HName HDeptName" + + ",a.HMaterID HMaterIDCol,c.HNumber HMaterNumberCol,c.HName HMaterNameCol,c.HModel HMaterModelCol" + + ",a.HProcID HProcIDCol,d.HNumber HProcNumberCol,d.HName HProcNameCol" + + ",a.HSourceID HSourceIDCol,e.HNumber HSourceNumberCol,e.HName HSourceNameCol" + + ",a.HPrice HPriceCol,a.HBeginDate HBeginDateCol,a.HEndDate HEndDateCol" + + ",case when a.HCostFlag<>0 then 'true'else 'false'end HCostFlagCol" + + ",case when a.HFlowFlag<>0 then 'true'else 'false'end HFlowFlagCol" + + ",case when a.HPayFlag<>0 then 'true'else 'false'end HPayFlagCol,a.HRemark HRemarkCol " + + " from Gy_ProcPrice a " + + " left join Gy_Department b on a.HDeptID = b.HItemID " + + " left join Gy_Material c on a.HMaterID = c.HItemID " + + " left join Gy_Process d on a.HProcID = d.HItemID " + + " left join Gy_Source e on a.HSourceID = e.HItemID where HItemID = " + HItemID, "Gy_ProcPrice"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion } } \ No newline at end of file -- Gitblit v1.9.1